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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
52,000 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O3 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x2dba8
movq %rbx, %rdx
callq 0x2db0d
jmp 0x2dbaf
leaq 0x31026(%rip), %rax # 0x5ebd5
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_2DBA8
mov rdx, rbx
call strmake_root
jmp short loc_2DBAF
loc_2DBA8:
lea rax, asc_5EBD1+4; ""
loc_2DBAF:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0012dba8
MOV RDX,RBX
CALL 0x0012db0d
JMP 0x0012dbaf
LAB_0012dba8:
LEA RAX,[0x15ebd5]
LAB_0012dbaf:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int *puVar1;
int1 auVar2 [16];
if (param_3 == 0) {
puVar1 = &DAT_0015ebd5;
}
else {
puVar1 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = puVar1;
return auVar2;
}
| |
52,001 | has_path | eloqsql/mysys/my_getwd.c | my_bool has_path(const char *name)
{
return MY_TEST(strchr(name, FN_LIBCHAR))
#if FN_LIBCHAR != '/'
|| MY_TEST(strchr(name, '/'))
#endif
#ifdef FN_DEVCHAR
|| MY_TEST(strchr(name, FN_DEVCHAR))
#endif
;
} | O0 | c | has_path:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x364e0
movq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| has_path:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov esi, 2Fh ; '/'
call _strchr
mov rdx, rax
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
add rsp, 10h
pop rbp
retn
| _BOOL8 has_path(long long a1)
{
return strchr(a1, 47LL) != 0;
}
| has_path:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x2f
CALL 0x001364e0
MOV RDX,RAX
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
ADD RSP,0x10
POP RBP
RET
|
bool has_path(char *param_1)
{
char *pcVar1;
pcVar1 = strchr(param_1,0x2f);
return pcVar1 != (char *)0x0;
}
| |
52,002 | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | llama.cpp/common/common.h | static std::vector<T> string_split(const std::string & str, char delim) {
static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string");
std::vector<T> values;
std::istringstream str_stream(str);
std::string token;
while (std::getline(str_stream, token, delim)) {
T value;
std::istringstream token_stream(token);
token_stream >> value;
values.push_back(value);
}
return values;
} | O3 | c | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp # imm = 0x328
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r14d, %r14d
movq %r14, 0x10(%rdi)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x21810
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r14, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %r12
leaq 0x1a8(%rsp), %r13
leaq 0x4(%rsp), %rbp
movq 0xff64b(%rip), %r14 # 0x166fc8
movq %r15, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x21040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x679f5
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x21810
movq %r13, %rdi
movq %rbp, %rsi
callq 0x22530
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x679d0
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x679db
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x2e3ae
movq %r13, %rdi
movq %r14, %rsi
callq 0x22120
leaq 0x220(%rsp), %rdi
callq 0x21cf0
jmp 0x6797d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x67a11
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
movq 0xff5b0(%rip), %rsi # 0x166fc8
leaq 0x28(%rsp), %rdi
callq 0x22120
leaq 0xa0(%rsp), %rdi
callq 0x21cf0
addq $0x328, %rsp # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x67a43
movq %rax, %r14
jmp 0x67a6c
movq %rax, %r14
movq 0xff576(%rip), %rsi # 0x166fc8
leaq 0x1a8(%rsp), %rdi
callq 0x22120
leaq 0x220(%rsp), %rdi
callq 0x21cf0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x67a88
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
movq 0xff539(%rip), %rsi # 0x166fc8
leaq 0x28(%rsp), %rdi
callq 0x22120
leaq 0xa0(%rsp), %rdi
callq 0x21cf0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x67aba
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21180
movq %r14, %rdi
callq 0x21b80
| _ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 328h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
xor r14d, r14d
mov [rdi+10h], r14
lea r15, [rsp+358h+var_330]
mov rdi, r15
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+358h+var_340]
mov [rax-10h], rax
mov [rax-8], r14
mov byte ptr [rax], 0
lea r12, [rsp+358h+var_350]
lea r13, [rsp+358h+var_1B0]
lea rbp, [rsp+358h+var_354]
mov r14, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
loc_6797D:
mov rdi, r15
mov rsi, r12
mov edx, 2Ch ; ','
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_679F5
mov rdi, r13
mov rsi, r12
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
mov rdi, r13
mov rsi, rbp
call __ZNSirsERi; std::istream::operator>>(int &)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_679D0
mov eax, [rsp+358h+var_354]
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_679DB
loc_679D0:
mov rdi, rbx
mov rdx, rbp
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_679DB:
mov rdi, r13
mov rsi, r14
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+358h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_6797D
loc_679F5:
mov rdi, [rsp+358h+var_350]; void *
lea rax, [rsp+358h+var_340]
cmp rdi, rax
jz short loc_67A11
mov rsi, [rsp+358h+var_340]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67A11:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+358h+var_330]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+358h+var_2B8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 328h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_67A43:
mov r14, rax
jmp short loc_67A6C
mov r14, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_1A0]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_218]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_67A6C:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_67A88
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67A88:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_98]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_67ABA
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67ABA:
mov rdi, r14
call __Unwind_Resume
| void string_split<int>(long long *a1, long long a2)
{
_QWORD *v2; // rax
_DWORD *v3; // rsi
int v4; // [rsp+4h] [rbp-354h] BYREF
void *v5[2]; // [rsp+8h] [rbp-350h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-340h] BYREF
_BYTE v7[120]; // [rsp+28h] [rbp-330h] BYREF
_BYTE v8[264]; // [rsp+A0h] [rbp-2B8h] BYREF
_BYTE v9[120]; // [rsp+1A8h] [rbp-1B0h] BYREF
_BYTE v10[312]; // [rsp+220h] [rbp-138h] BYREF
*(_OWORD *)a1 = 0LL;
a1[2] = 0LL;
std::istringstream::basic_istringstream(v7, a2, 8LL);
v5[0] = v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
while ( 1 )
{
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v7, v5, 44LL);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
std::istringstream::basic_istringstream(v9, v5, 8LL);
std::istream::operator>>(v9, &v4);
v3 = (_DWORD *)a1[1];
if ( v3 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v3, &v4);
}
else
{
*v3 = v4;
a1[1] = (long long)(v3 + 1);
}
std::istringstream::~istringstream(v9, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v10);
}
if ( v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
std::istringstream::~istringstream(v7, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v8);
}
| string_split<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x328
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR R14D,R14D
MOV qword ptr [RDI + 0x10],R14
LEA R15,[RSP + 0x28]
MOV RDI,R15
MOV EDX,0x8
CALL 0x00121810
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],R14
MOV byte ptr [RAX],0x0
LEA R12,[RSP + 0x8]
LEA R13,[RSP + 0x1a8]
LEA RBP,[RSP + 0x4]
MOV R14,qword ptr [0x00266fc8]
LAB_0016797d:
MOV RDI,R15
MOV RSI,R12
MOV EDX,0x2c
CALL 0x00121040
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001679f5
LAB_0016799b:
MOV RDI,R13
MOV RSI,R12
MOV EDX,0x8
CALL 0x00121810
LAB_001679ab:
MOV RDI,R13
MOV RSI,RBP
CALL 0x00122530
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001679d0
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001679db
LAB_001679d0:
MOV RDI,RBX
MOV RDX,RBP
CALL 0x0012e3ae
LAB_001679db:
MOV RDI,R13
MOV RSI,R14
CALL 0x00122120
LEA RDI,[RSP + 0x220]
CALL 0x00121cf0
JMP 0x0016797d
LAB_001679f5:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00167a11
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121180
LAB_00167a11:
MOV RSI,qword ptr [0x00266fc8]
LEA RDI,[RSP + 0x28]
CALL 0x00122120
LEA RDI,[RSP + 0xa0]
CALL 0x00121cf0
ADD RSP,0x328
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */
void string_split<int>(string *param_1,char param_2)
{
int *piVar1;
istream *piVar2;
int7 in_register_00000031;
int local_354;
int1 *local_350;
int8 local_348;
int1 local_340;
int7 uStack_33f;
istream local_330 [120];
ios_base local_2b8 [264];
istream local_1b0 [120];
ios_base local_138 [264];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
std::__cxx11::istringstream::istringstream
((istringstream *)local_330,CONCAT71(in_register_00000031,param_2),8);
local_350 = &local_340;
local_348 = 0;
local_340 = 0;
while( true ) {
/* try { // try from 0016797d to 0016798c has its CatchHandler @ 00167a43 */
piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>>
(local_330,(string *)&local_350,',');
if (((byte)piVar2[*(long *)(*(long *)piVar2 + -0x18) + 0x20] & 5) != 0) break;
/* try { // try from 0016799b to 001679aa has its CatchHandler @ 00167a41 */
std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,(string *)&local_350,8);
/* try { // try from 001679ab to 001679da has its CatchHandler @ 00167a48 */
std::istream::operator>>(local_1b0,&local_354);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_354);
}
else {
*piVar1 = local_354;
*(int **)(param_1 + 8) = piVar1 + 1;
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0);
std::ios_base::~ios_base(local_138);
}
if (local_350 != &local_340) {
operator_delete(local_350,CONCAT71(uStack_33f,local_340) + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_330);
std::ios_base::~ios_base(local_2b8);
return;
}
| |
52,003 | my_getcputime | eloqsql/mysys/my_getsystime.c | ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
} | O0 | c | my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x3, %edi
leaq -0x18(%rbp), %rsi
callq 0x24260
cmpl $0x0, %eax
je 0x2de65
movq $0x0, -0x8(%rbp)
jmp 0x2de8d
imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 20h
mov edi, 3
lea rsi, [rbp+var_18]
call _clock_gettime
cmp eax, 0
jz short loc_2DE65
mov [rbp+var_8], 0
jmp short loc_2DE8D
loc_2DE65:
imul rax, [rbp+var_18], 989680h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
loc_2DE8D:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_getcputime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return v2 / 0x64 + 10000000 * v1;
}
| my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV EDI,0x3
LEA RSI,[RBP + -0x18]
CALL 0x00124260
CMP EAX,0x0
JZ 0x0012de65
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012de8d
LAB_0012de65:
IMUL RAX,qword ptr [RBP + -0x18],0x989680
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x64
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0012de8d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
timespec local_20;
long local_10;
iVar1 = clock_gettime(3,&local_20);
if (iVar1 == 0) {
local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100;
}
else {
local_10 = 0;
}
return local_10;
}
| |
52,004 | ma_readinfo | eloqsql/storage/maria/ma_locking.c | int _ma_readinfo(register MARIA_HA *info __attribute__ ((unused)),
int lock_type __attribute__ ((unused)),
int check_keybuffer __attribute__ ((unused)))
{
#ifdef MARIA_EXTERNAL_LOCKING
DBUG_ENTER("_ma_readinfo");
if (info->lock_type == F_UNLCK)
{
MARIA_SHARE *share= info->s;
if (!share->tot_locks)
{
/* should not be done for transactional tables */
if (_ma_state_info_read_dsk(share->kfile.file, &share->state))
{
if (!my_errno)
my_errno= HA_ERR_FILE_TOO_SHORT;
DBUG_RETURN(1);
}
}
if (check_keybuffer)
VOID(_ma_test_if_changed(info));
info->invalidator=share->invalidator;
}
else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK)
{
my_errno=EACCES; /* Not allowed to change */
DBUG_RETURN(-1); /* when have read_lock() */
}
DBUG_RETURN(0);
#else
return 0;
#endif /* defined(MARIA_EXTERNAL_LOCKING) */
} | O3 | c | ma_readinfo:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
popq %rbp
retq
| _ma_readinfo:
push rbp
mov rbp, rsp
xor eax, eax
pop rbp
retn
| long long ma_readinfo()
{
return 0LL;
}
| _ma_readinfo:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_readinfo(void)
{
return 0;
}
| |
52,005 | Cache::getReplacementBlockId(unsigned int, unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | uint32_t Cache::getReplacementBlockId(uint32_t begin, uint32_t end) {
// Find invalid block first
for (uint32_t i = begin; i < end; ++i) {
if (!this->blocks[i].valid)
return i;
}
// Otherwise use LRU
uint32_t resultId = begin;
uint32_t min = this->blocks[begin].lastReference;
for (uint32_t i = begin; i < end; ++i) {
if (this->blocks[i].lastReference < min) {
resultId = i;
min = this->blocks[i].lastReference;
}
}
return resultId;
} | O0 | cpp | Cache::getReplacementBlockId(unsigned int, unsigned int):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x20(%rsp), %eax
jae 0x5312
movq 0x8(%rsp), %rdi
addq $0x50, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x5620
testb $0x1, (%rax)
jne 0x5303
movl 0x1c(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x539e
jmp 0x5305
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x52d3
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x18(%rsp)
addq $0x50, %rdi
movl 0x24(%rsp), %eax
movl %eax, %esi
callq 0x5620
movl 0x10(%rax), %eax
movl %eax, 0x14(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x20(%rsp), %eax
jae 0x5396
movq 0x8(%rsp), %rdi
addq $0x50, %rdi
movl 0x10(%rsp), %eax
movl %eax, %esi
callq 0x5620
movl 0x10(%rax), %eax
cmpl 0x14(%rsp), %eax
jae 0x5387
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %eax
movl %eax, 0x18(%rsp)
addq $0x50, %rdi
movl 0x10(%rsp), %eax
movl %eax, %esi
callq 0x5620
movl 0x10(%rax), %eax
movl %eax, 0x14(%rsp)
jmp 0x5389
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x533d
movl 0x18(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
| _ZN5Cache21getReplacementBlockIdEjj:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov [rsp+38h+var_18], edx
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov eax, [rsp+38h+var_14]
mov [rsp+38h+var_1C], eax
loc_52D3:
mov eax, [rsp+38h+var_1C]
cmp eax, [rsp+38h+var_18]
jnb short loc_5312
mov rdi, [rsp+38h+var_30]
add rdi, 50h ; 'P'
mov eax, [rsp+38h+var_1C]
mov esi, eax
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
test byte ptr [rax], 1
jnz short loc_5303
mov eax, [rsp+38h+var_1C]
mov [rsp+38h+var_4], eax
jmp loc_539E
loc_5303:
jmp short $+2
loc_5305:
mov eax, [rsp+38h+var_1C]
add eax, 1
mov [rsp+38h+var_1C], eax
jmp short loc_52D3
loc_5312:
mov rdi, [rsp+38h+var_30]
mov eax, [rsp+38h+var_14]
mov [rsp+38h+var_20], eax
add rdi, 50h ; 'P'
mov eax, [rsp+38h+var_14]
mov esi, eax
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov eax, [rax+10h]
mov [rsp+38h+var_24], eax
mov eax, [rsp+38h+var_14]
mov [rsp+38h+var_28], eax
loc_533D:
mov eax, [rsp+38h+var_28]
cmp eax, [rsp+38h+var_18]
jnb short loc_5396
mov rdi, [rsp+38h+var_30]
add rdi, 50h ; 'P'
mov eax, [rsp+38h+var_28]
mov esi, eax
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov eax, [rax+10h]
cmp eax, [rsp+38h+var_24]
jnb short loc_5387
mov rdi, [rsp+38h+var_30]
mov eax, [rsp+38h+var_28]
mov [rsp+38h+var_20], eax
add rdi, 50h ; 'P'
mov eax, [rsp+38h+var_28]
mov esi, eax
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov eax, [rax+10h]
mov [rsp+38h+var_24], eax
loc_5387:
jmp short $+2
loc_5389:
mov eax, [rsp+38h+var_28]
add eax, 1
mov [rsp+38h+var_28], eax
jmp short loc_533D
loc_5396:
mov eax, [rsp+38h+var_20]
mov [rsp+38h+var_4], eax
loc_539E:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long Cache::getReplacementBlockId(Cache *this, unsigned int a2, unsigned int a3)
{
unsigned int j; // [rsp+10h] [rbp-28h]
unsigned int v5; // [rsp+14h] [rbp-24h]
unsigned int v6; // [rsp+18h] [rbp-20h]
unsigned int i; // [rsp+1Ch] [rbp-1Ch]
for ( i = a2; i < a3; ++i )
{
if ( (*(_BYTE *)std::vector<Cache::Block>::operator[]((char *)this + 80, i) & 1) == 0 )
return i;
}
v6 = a2;
v5 = *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, a2) + 16);
for ( j = a2; j < a3; ++j )
{
if ( *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, j) + 16) < v5 )
{
v6 = j;
v5 = *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, j) + 16);
}
}
return v6;
}
| getReplacementBlockId:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x20],EDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x1c],EAX
LAB_001052d3:
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RSP + 0x20]
JNC 0x00105312
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x50
MOV EAX,dword ptr [RSP + 0x1c]
MOV ESI,EAX
CALL 0x00105620
TEST byte ptr [RAX],0x1
JNZ 0x00105303
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0010539e
LAB_00105303:
JMP 0x00105305
LAB_00105305:
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001052d3
LAB_00105312:
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x18],EAX
ADD RDI,0x50
MOV EAX,dword ptr [RSP + 0x24]
MOV ESI,EAX
CALL 0x00105620
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x10],EAX
LAB_0010533d:
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x20]
JNC 0x00105396
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x50
MOV EAX,dword ptr [RSP + 0x10]
MOV ESI,EAX
CALL 0x00105620
MOV EAX,dword ptr [RAX + 0x10]
CMP EAX,dword ptr [RSP + 0x14]
JNC 0x00105387
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x18],EAX
ADD RDI,0x50
MOV EAX,dword ptr [RSP + 0x10]
MOV ESI,EAX
CALL 0x00105620
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0x14],EAX
LAB_00105387:
JMP 0x00105389
LAB_00105389:
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x0010533d
LAB_00105396:
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x34],EAX
LAB_0010539e:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* Cache::getReplacementBlockId(unsigned int, unsigned int) */
uint __thiscall Cache::getReplacementBlockId(Cache *this,uint param_1,uint param_2)
{
byte *pbVar1;
long lVar2;
uint local_28;
uint local_24;
uint local_20;
uint local_1c;
local_1c = param_1;
while( true ) {
if (param_2 <= local_1c) {
lVar2 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(ulong)param_1);
local_24 = *(uint *)(lVar2 + 0x10);
local_20 = param_1;
for (local_28 = param_1; local_28 < param_2; local_28 = local_28 + 1) {
lVar2 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(ulong)local_28);
if (*(uint *)(lVar2 + 0x10) < local_24) {
local_20 = local_28;
lVar2 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(ulong)local_28);
local_24 = *(uint *)(lVar2 + 0x10);
}
}
return local_20;
}
pbVar1 = (byte *)std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(ulong)local_1c);
if ((*pbVar1 & 1) == 0) break;
local_1c = local_1c + 1;
}
return local_1c;
}
| |
52,006 | Cache::getReplacementBlockId(unsigned int, unsigned int) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | uint32_t Cache::getReplacementBlockId(uint32_t begin, uint32_t end) {
// Find invalid block first
for (uint32_t i = begin; i < end; ++i) {
if (!this->blocks[i].valid)
return i;
}
// Otherwise use LRU
uint32_t resultId = begin;
uint32_t min = this->blocks[begin].lastReference;
for (uint32_t i = begin; i < end; ++i) {
if (this->blocks[i].lastReference < min) {
resultId = i;
min = this->blocks[i].lastReference;
}
}
return resultId;
} | O1 | cpp | Cache::getReplacementBlockId(unsigned int, unsigned int):
cmpl %edx, %esi
setb %r8b
jae 0x40e0
movq 0x50(%rdi), %r9
movl %esi, %ecx
leaq (%rcx,%rcx,2), %r10
shlq $0x4, %r10
cmpb $0x1, (%r9,%r10)
movl %esi, %eax
jne 0x40db
movl %edx, %eax
leaq (%r10,%r9), %r8
addq $0x30, %r8
movq %rax, %r9
negq %r9
leaq (%rcx,%r9), %r10
incq %r10
xorl %r9d, %r9d
cmpq %r9, %r10
je 0x40e0
decq %r9
cmpb $0x1, (%r8)
leaq 0x30(%r8), %r8
je 0x40bd
subq %r9, %rcx
cmpq %rax, %rcx
setb %r8b
movl %ecx, %eax
testb %r8b, %r8b
jne 0x4118
cmpl %edx, %esi
jae 0x4119
movq 0x50(%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rdi
shlq $0x4, %rdi
addq %rax, %rdi
addq $0x10, %rdi
movl (%rdi), %r8d
movl %edx, %edx
movl %esi, %eax
movl (%rdi), %esi
cmpl %r8d, %esi
cmovbl %ecx, %eax
cmovbl %esi, %r8d
incq %rcx
addq $0x30, %rdi
cmpq %rcx, %rdx
jne 0x4100
retq
movl %esi, %eax
retq
| _ZN5Cache21getReplacementBlockIdEjj:
cmp esi, edx
setb r8b
jnb short loc_40E0
mov r9, [rdi+50h]
mov ecx, esi
lea r10, [rcx+rcx*2]
shl r10, 4
cmp byte ptr [r9+r10], 1
mov eax, esi
jnz short loc_40DB
mov eax, edx
lea r8, [r10+r9]
add r8, 30h ; '0'
mov r9, rax
neg r9
lea r10, [rcx+r9]
inc r10
xor r9d, r9d
loc_40BD:
cmp r10, r9
jz short loc_40E0
dec r9
cmp byte ptr [r8], 1
lea r8, [r8+30h]
jz short loc_40BD
sub rcx, r9
cmp rcx, rax
setb r8b
mov eax, ecx
loc_40DB:
test r8b, r8b
jnz short locret_4118
loc_40E0:
cmp esi, edx
jnb short loc_4119
mov rax, [rdi+50h]
mov ecx, esi
lea rdi, [rcx+rcx*2]
shl rdi, 4
add rdi, rax
add rdi, 10h
mov r8d, [rdi]
mov edx, edx
mov eax, esi
loc_4100:
mov esi, [rdi]
cmp esi, r8d
cmovb eax, ecx
cmovb r8d, esi
inc rcx
add rdi, 30h ; '0'
cmp rdx, rcx
jnz short loc_4100
locret_4118:
retn
loc_4119:
mov eax, esi
retn
| long long Cache::getReplacementBlockId(Cache *this, unsigned int a2, unsigned int a3)
{
bool v3; // r8
long long v4; // r9
long long v5; // r10
long long result; // rax
_BYTE *v7; // r8
long long v8; // r9
bool v9; // zf
unsigned long long v10; // rcx
long long v11; // rcx
unsigned int *v12; // rdi
unsigned int v13; // r8d
v3 = a2 < a3;
if ( a2 < a3 )
{
v4 = *((_QWORD *)this + 10);
v5 = 48LL * a2;
result = a2;
if ( *(_BYTE *)(v4 + v5) == 1 )
{
v7 = (_BYTE *)(v5 + v4 + 48);
v8 = 0LL;
while ( a2 - (unsigned long long)a3 + 1 != v8 )
{
--v8;
v9 = *v7 == 1;
v7 += 48;
if ( !v9 )
{
v10 = a2 - v8;
v3 = v10 < a3;
result = (unsigned int)v10;
goto LABEL_7;
}
}
}
else
{
LABEL_7:
if ( v3 )
return result;
}
}
if ( a2 >= a3 )
return a2;
v11 = a2;
v12 = (unsigned int *)(*((_QWORD *)this + 10) + 48LL * a2 + 16);
v13 = *v12;
result = a2;
do
{
if ( *v12 < v13 )
{
result = (unsigned int)v11;
v13 = *v12;
}
++v11;
v12 += 12;
}
while ( a3 != v11 );
return result;
}
| getReplacementBlockId:
CMP ESI,EDX
SETC R8B
JNC 0x001040e0
MOV R9,qword ptr [RDI + 0x50]
MOV ECX,ESI
LEA R10,[RCX + RCX*0x2]
SHL R10,0x4
CMP byte ptr [R9 + R10*0x1],0x1
MOV EAX,ESI
JNZ 0x001040db
MOV EAX,EDX
LEA R8,[R10 + R9*0x1]
ADD R8,0x30
MOV R9,RAX
NEG R9
LEA R10,[RCX + R9*0x1]
INC R10
XOR R9D,R9D
LAB_001040bd:
CMP R10,R9
JZ 0x001040e0
DEC R9
CMP byte ptr [R8],0x1
LEA R8,[R8 + 0x30]
JZ 0x001040bd
SUB RCX,R9
CMP RCX,RAX
SETC R8B
MOV EAX,ECX
LAB_001040db:
TEST R8B,R8B
JNZ 0x00104118
LAB_001040e0:
CMP ESI,EDX
JNC 0x00104119
MOV RAX,qword ptr [RDI + 0x50]
MOV ECX,ESI
LEA RDI,[RCX + RCX*0x2]
SHL RDI,0x4
ADD RDI,RAX
ADD RDI,0x10
MOV R8D,dword ptr [RDI]
MOV EDX,EDX
MOV EAX,ESI
LAB_00104100:
MOV ESI,dword ptr [RDI]
CMP ESI,R8D
CMOVC EAX,ECX
CMOVC R8D,ESI
INC RCX
ADD RDI,0x30
CMP RDX,RCX
JNZ 0x00104100
LAB_00104118:
RET
LAB_00104119:
MOV EAX,ESI
RET
|
/* Cache::getReplacementBlockId(unsigned int, unsigned int) */
ulong __thiscall Cache::getReplacementBlockId(Cache *this,uint param_1,uint param_2)
{
ulong uVar1;
ulong uVar2;
uint *puVar3;
uint uVar4;
char *pcVar5;
long lVar6;
bool bVar7;
bVar7 = param_1 < param_2;
if (bVar7) {
uVar2 = (ulong)param_1;
uVar1 = (ulong)param_1;
if (*(char *)(*(long *)(this + 0x50) + uVar2 * 0x30) == '\x01') {
pcVar5 = (char *)(uVar2 * 0x30 + *(long *)(this + 0x50));
lVar6 = 0;
do {
pcVar5 = pcVar5 + 0x30;
if ((uVar2 - param_2) + 1 == lVar6) goto LAB_001040e0;
lVar6 = lVar6 + -1;
} while (*pcVar5 == '\x01');
bVar7 = uVar2 - lVar6 < (ulong)param_2;
uVar1 = uVar2 - lVar6 & 0xffffffff;
}
if (bVar7) {
return uVar1;
}
}
LAB_001040e0:
if (param_1 < param_2) {
uVar2 = (ulong)param_1;
puVar3 = (uint *)(uVar2 * 0x30 + *(long *)(this + 0x50) + 0x10);
uVar4 = *puVar3;
uVar1 = (ulong)param_1;
do {
if (*puVar3 < uVar4) {
uVar1 = uVar2 & 0xffffffff;
uVar4 = *puVar3;
}
uVar2 = uVar2 + 1;
puVar3 = puVar3 + 0xc;
} while (param_2 != uVar2);
return uVar1;
}
return (ulong)param_1;
}
| |
52,007 | ftxui::ContainerBase::MoveSelector(int) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/container.cpp | void MoveSelector(int dir) {
for (int i = *selector_ + dir; i >= 0 && i < int(children_.size());
i += dir) {
if (children_[i]->Focusable()) {
*selector_ = i;
return;
}
}
} | O2 | cpp | ftxui::ContainerBase::MoveSelector(int):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl (%rax), %r14d
addl %ebp, %r14d
js 0x22cc5
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
cmpl %ecx, %r14d
jge 0x22cc5
movl %r14d, %ecx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0x22c90
movq 0x30(%rbx), %rax
movl %r14d, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
| _ZN5ftxui13ContainerBase12MoveSelectorEi:
push rbp
push r14
push rbx
mov ebp, esi
mov rbx, rdi
mov rax, [rdi+30h]
mov r14d, [rax]
loc_22C90:
add r14d, ebp
js short loc_22CC5
mov rax, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rax
shr rcx, 4
cmp r14d, ecx
jge short loc_22CC5
mov ecx, r14d
shl rcx, 4
mov rdi, [rax+rcx]
mov rax, [rdi]
call qword ptr [rax+30h]
test al, al
jz short loc_22C90
mov rax, [rbx+30h]
mov [rax], r14d
loc_22CC5:
pop rbx
pop r14
pop rbp
retn
| int * ftxui::ContainerBase::MoveSelector(ftxui::ContainerBase *this, int a2)
{
int *result; // rax
int v3; // r14d
result = (int *)*((_QWORD *)this + 6);
v3 = *result;
while ( 1 )
{
v3 += a2;
if ( v3 < 0 )
break;
result = (int *)*((_QWORD *)this + 1);
if ( v3 >= (int)((*((_QWORD *)this + 2) - (_QWORD)result) >> 4) )
break;
result = (int *)(*(long long ( **)(_QWORD))(**(_QWORD **)&result[4 * v3] + 48LL))(*(_QWORD *)&result[4 * v3]);
if ( (_BYTE)result )
{
result = (int *)*((_QWORD *)this + 6);
*result = v3;
return result;
}
}
return result;
}
| MoveSelector:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV R14D,dword ptr [RAX]
LAB_00122c90:
ADD R14D,EBP
JS 0x00122cc5
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RAX
SHR RCX,0x4
CMP R14D,ECX
JGE 0x00122cc5
MOV ECX,R14D
SHL RCX,0x4
MOV RDI,qword ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x30]
TEST AL,AL
JZ 0x00122c90
MOV RAX,qword ptr [RBX + 0x30]
MOV dword ptr [RAX],R14D
LAB_00122cc5:
POP RBX
POP R14
POP RBP
RET
|
/* ftxui::ContainerBase::MoveSelector(int) */
void __thiscall ftxui::ContainerBase::MoveSelector(ContainerBase *this,int param_1)
{
char cVar1;
uint uVar2;
uVar2 = **(uint **)(this + 0x30);
while( true ) {
uVar2 = uVar2 + param_1;
if ((int)uVar2 < 0) {
return;
}
if ((int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 4) <= (int)uVar2) break;
cVar1 = (**(code **)(**(long **)(*(long *)(this + 8) + (ulong)uVar2 * 0x10) + 0x30))();
if (cVar1 != '\0') {
**(uint **)(this + 0x30) = uVar2;
return;
}
}
return;
}
| |
52,008 | link_changed | eloqsql/mysys/mf_keycache.c | static inline void link_changed(BLOCK_LINK *block, BLOCK_LINK **phead)
{
DBUG_ASSERT(!block->next_changed);
DBUG_ASSERT(!block->prev_changed);
block->prev_changed= phead;
if ((block->next_changed= *phead))
(*phead)->prev_changed= &block->next_changed;
*phead= block;
} | O0 | c | link_changed:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x73c6e
jmp 0x73c70
jmp 0x73c72
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
je 0x73ca6
movq -0x8(%rbp), %rcx
addq $0x10, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| link_changed:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_73C6E:
jmp short $+2
loc_73C70:
jmp short $+2
loc_73C72:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_8]
mov [rcx+10h], rax
cmp rax, 0
jz short loc_73CA6
mov rcx, [rbp+var_8]
add rcx, 10h
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+18h], rcx
loc_73CA6:
mov rcx, [rbp+var_8]
mov rax, [rbp+var_10]
mov [rax], rcx
pop rbp
retn
| long long * link_changed(long long a1, long long *a2)
{
long long v2; // rax
long long *result; // rax
*(_QWORD *)(a1 + 24) = a2;
v2 = *a2;
*(_QWORD *)(a1 + 16) = *a2;
if ( v2 )
*(_QWORD *)(*a2 + 24) = a1 + 16;
result = a2;
*a2 = a1;
return result;
}
| link_changed:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00173c6e
LAB_00173c6e:
JMP 0x00173c70
LAB_00173c70:
JMP 0x00173c72
LAB_00173c72:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JZ 0x00173ca6
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x10
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x18],RCX
LAB_00173ca6:
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void link_changed(long param_1,long *param_2)
{
long lVar1;
*(long **)(param_1 + 0x18) = param_2;
lVar1 = *param_2;
*(long *)(param_1 + 0x10) = lVar1;
if (lVar1 != 0) {
*(long *)(*param_2 + 0x18) = param_1 + 0x10;
}
*param_2 = param_1;
return;
}
| |
52,009 | js_set_module_evaluated | bluesky950520[P]quickjs/quickjs.c | static void js_set_module_evaluated(JSContext *ctx, JSModuleDef *m)
{
m->status = JS_MODULE_STATUS_EVALUATED;
if (!JS_IsUndefined(m->promise)) {
JSValue value, ret_val;
assert(m->cycle_root == m);
value = JS_UNDEFINED;
ret_val = JS_Call(ctx, m->resolving_funcs[0], JS_UNDEFINED,
1, (JSValueConst *)&value);
JS_FreeValue(ctx, ret_val);
}
} | O1 | c | js_set_module_evaluated:
movb $0x5, 0x83(%rsi)
cmpl $0x3, 0xc8(%rsi)
je 0x445b3
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorl %ecx, %ecx
leaq 0x30(%rsp), %rdi
movl %ecx, (%rdi)
movl $0x3, %r8d
movq %r8, 0x8(%rdi)
movq 0xd0(%rsi), %rax
movq 0xd8(%rsi), %rdx
movl %ecx, 0x20(%rsp)
movq %r8, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rdi, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x278b6
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1ccb2
addq $0x40, %rsp
popq %rbx
retq
| js_set_module_evaluated:
mov byte ptr [rsi+83h], 5
cmp dword ptr [rsi+0C8h], 3
jz short locret_445B3
push rbx
sub rsp, 40h
mov rbx, rdi
xor ecx, ecx
lea rdi, [rsp+48h+var_18]
mov [rdi], ecx
mov r8d, 3
mov [rdi+8], r8
mov rax, [rsi+0D0h]
mov rdx, [rsi+0D8h]
mov dword ptr [rsp+48h+var_28], ecx
mov qword ptr [rsp+48h+var_28+8], r8
movups xmm0, [rsp+48h+var_28]
movups [rsp+48h+var_48], xmm0
mov [rsp+48h+var_38], rdi
mov [rsp+48h+var_30], 2
mov rdi, rbx
mov rsi, rax
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
add rsp, 40h
pop rbx
locret_445B3:
retn
| void js_set_module_evaluated(
long long a1,
long long a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10)
{
_DWORD *v10; // rax
long long v11; // rdx
__m128 v12; // [rsp+20h] [rbp-28h]
int v13; // [rsp+30h] [rbp-18h] BYREF
long long v14; // [rsp+38h] [rbp-10h]
*(_BYTE *)(a2 + 131) = 5;
if ( *(_DWORD *)(a2 + 200) != 3 )
{
v13 = 0;
v14 = 3LL;
v12.m128_i32[0] = 0;
v12.m128_u64[1] = 3LL;
v10 = (_DWORD *)JS_CallInternal(
a1,
*(_QWORD *)(a2 + 208),
*(_QWORD *)(a2 + 216),
0LL,
3LL,
1LL,
v12,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v12.m128_i8[0],
3,
(long long)&v13,
2u);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v10, v11);
}
}
| js_set_module_evaluated:
MOV byte ptr [RSI + 0x83],0x5
CMP dword ptr [RSI + 0xc8],0x3
JZ 0x001445b3
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
XOR ECX,ECX
LEA RDI,[RSP + 0x30]
MOV dword ptr [RDI],ECX
MOV R8D,0x3
MOV qword ptr [RDI + 0x8],R8
MOV RAX,qword ptr [RSI + 0xd0]
MOV RDX,qword ptr [RSI + 0xd8]
MOV dword ptr [RSP + 0x20],ECX
MOV qword ptr [RSP + 0x28],R8
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0x18],0x2
MOV RDI,RBX
MOV RSI,RAX
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001278b6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
CALL 0x0011ccb2
ADD RSP,0x40
POP RBX
LAB_001445b3:
RET
|
void js_set_module_evaluated(long param_1,long param_2)
{
int8 uVar1;
int4 local_18 [2];
int8 local_10;
*(int1 *)(param_2 + 0x83) = 5;
if (*(int *)(param_2 + 200) != 3) {
local_18[0] = 0;
local_10 = 3;
uVar1 = JS_CallInternal(param_1,*(int8 *)(param_2 + 0xd0),*(int8 *)(param_2 + 0xd8),
0,3,1,0,3,local_18,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar1);
}
return;
}
| |
52,010 | js_set_module_evaluated | bluesky950520[P]quickjs/quickjs.c | static void js_set_module_evaluated(JSContext *ctx, JSModuleDef *m)
{
m->status = JS_MODULE_STATUS_EVALUATED;
if (!JS_IsUndefined(m->promise)) {
JSValue value, ret_val;
assert(m->cycle_root == m);
value = JS_UNDEFINED;
ret_val = JS_Call(ctx, m->resolving_funcs[0], JS_UNDEFINED,
1, (JSValueConst *)&value);
JS_FreeValue(ctx, ret_val);
}
} | O3 | c | js_set_module_evaluated:
movb $0x5, 0x83(%rsi)
cmpl $0x3, 0xc8(%rsi)
je 0x4617c
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorl %ecx, %ecx
leaq 0x30(%rsp), %rdi
movl %ecx, (%rdi)
movl $0x3, %r8d
movq %r8, 0x8(%rdi)
movq 0xd0(%rsi), %rax
movq 0xd8(%rsi), %rdx
movl %ecx, 0x20(%rsp)
movq %r8, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rdi, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x27eca
cmpl $-0x9, %edx
jb 0x46177
movq 0x18(%rbx), %rdi
movl (%rax), %ecx
leal -0x1(%rcx), %esi
movl %esi, (%rax)
cmpl $0x1, %ecx
jg 0x46177
movq %rax, %rsi
callq 0x20d90
addq $0x40, %rsp
popq %rbx
retq
| js_set_module_evaluated:
mov byte ptr [rsi+83h], 5
cmp dword ptr [rsi+0C8h], 3
jz short locret_4617C
push rbx
sub rsp, 40h
mov rbx, rdi
xor ecx, ecx
lea rdi, [rsp+48h+var_18]
mov [rdi], ecx
mov r8d, 3
mov [rdi+8], r8
mov rax, [rsi+0D0h]
mov rdx, [rsi+0D8h]
mov dword ptr [rsp+48h+var_28], ecx
mov qword ptr [rsp+48h+var_28+8], r8
movups xmm0, [rsp+48h+var_28]
movups [rsp+48h+var_48], xmm0
mov [rsp+48h+var_38], rdi
mov [rsp+48h+var_30], 2
mov rdi, rbx
mov rsi, rax
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
cmp edx, 0FFFFFFF7h
jb short loc_46177
mov rdi, [rbx+18h]
mov ecx, [rax]
lea esi, [rcx-1]
mov [rax], esi
cmp ecx, 1
jg short loc_46177
mov rsi, rax
call js_free_value_rt
loc_46177:
add rsp, 40h
pop rbx
locret_4617C:
retn
| void js_set_module_evaluated(
long long a1,
long long a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10)
{
_QWORD *v10; // rax
long long v11; // rdx
long long v12; // r8
long long v13; // r9
long long v14; // rdi
long long v15; // rcx
__m128i v16; // [rsp+20h] [rbp-28h]
int v17; // [rsp+30h] [rbp-18h] BYREF
long long v18; // [rsp+38h] [rbp-10h]
*(_BYTE *)(a2 + 131) = 5;
if ( *(_DWORD *)(a2 + 200) != 3 )
{
v17 = 0;
v18 = 3LL;
v16.m128i_i32[0] = 0;
v16.m128i_i64[1] = 3LL;
v10 = (_QWORD *)JS_CallInternal(
a1,
*(_QWORD *)(a2 + 208),
*(_QWORD *)(a2 + 216),
0LL,
3LL,
1LL,
v16,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v16.m128i_i8[0],
3,
(long long)&v17,
2u);
if ( (unsigned int)v11 >= 0xFFFFFFF7 )
{
v14 = *(_QWORD *)(a1 + 24);
v15 = *(unsigned int *)v10;
*(_DWORD *)v10 = v15 - 1;
if ( (int)v15 <= 1 )
js_free_value_rt(v14, v10, v11, v15, v12, v13);
}
}
}
| js_set_module_evaluated:
MOV byte ptr [RSI + 0x83],0x5
CMP dword ptr [RSI + 0xc8],0x3
JZ 0x0014617c
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
XOR ECX,ECX
LEA RDI,[RSP + 0x30]
MOV dword ptr [RDI],ECX
MOV R8D,0x3
MOV qword ptr [RDI + 0x8],R8
MOV RAX,qword ptr [RSI + 0xd0]
MOV RDX,qword ptr [RSI + 0xd8]
MOV dword ptr [RSP + 0x20],ECX
MOV qword ptr [RSP + 0x28],R8
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0x18],0x2
MOV RDI,RBX
MOV RSI,RAX
XOR ECX,ECX
MOV R9D,0x1
CALL 0x00127eca
CMP EDX,-0x9
JC 0x00146177
MOV RDI,qword ptr [RBX + 0x18]
MOV ECX,dword ptr [RAX]
LEA ESI,[RCX + -0x1]
MOV dword ptr [RAX],ESI
CMP ECX,0x1
JG 0x00146177
MOV RSI,RAX
CALL 0x00120d90
LAB_00146177:
ADD RSP,0x40
POP RBX
LAB_0014617c:
RET
|
void js_set_module_evaluated(long param_1,long param_2)
{
int iVar1;
int8 uVar2;
int *piVar3;
int1 auVar4 [12];
int4 local_18 [2];
int8 local_10;
*(int1 *)(param_2 + 0x83) = 5;
if (*(int *)(param_2 + 200) != 3) {
local_18[0] = 0;
local_10 = 3;
auVar4 = JS_CallInternal(param_1,*(int8 *)(param_2 + 0xd0),*(int8 *)(param_2 + 0xd8)
,0,3,1,0,3,local_18,2);
piVar3 = auVar4._0_8_;
if (0xfffffff6 < auVar4._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar3);
}
}
}
return;
}
| |
52,011 | google::protobuf::compiler::java::Context::GetOneofGeneratorInfo(google::protobuf::OneofDescriptor const*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/context.cc | const OneofGeneratorInfo* Context::GetOneofGeneratorInfo(
const OneofDescriptor* oneof) const {
const OneofGeneratorInfo* result =
FindOrNull(oneof_generator_info_map_, oneof);
if (result == NULL) {
GOOGLE_LOG(FATAL) << "Can not find OneofGeneratorInfo for oneof: "
<< oneof->name();
}
return result;
} | O3 | cpp | google::protobuf::compiler::java::Context::GetOneofGeneratorInfo(google::protobuf::OneofDescriptor const*) const:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq 0x48(%rdi), %rcx
testq %rcx, %rcx
je 0xcefc0
addq $0x40, %rdi
movq %rdi, %rax
xorl %edx, %edx
cmpq %rbx, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0xcef9e
cmpq %rdi, %rax
je 0xcefc0
cmpq %rbx, 0x20(%rax)
jbe 0xcf01a
leaq 0x101638(%rip), %rdx # 0x1d05ff
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x3, %esi
movl $0xba, %ecx
callq 0x1072ba
leaq 0x1016df(%rip), %rsi # 0x1d06c4
movq %r14, %rdi
callq 0x106db8
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x106dca
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x106e92
leaq 0x10(%rsp), %rdi
callq 0x1072d8
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
addq $0x28, %rax
jmp 0xcf012
jmp 0xcf022
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1072d8
movq %rbx, %rdi
callq 0x1f860
nop
| _ZNK6google8protobuf8compiler4java7Context21GetOneofGeneratorInfoEPKNS0_15OneofDescriptorE:
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
mov rcx, [rdi+48h]
test rcx, rcx
jz short loc_CEFC0
add rdi, 40h ; '@'
mov rax, rdi
loc_CEF9E:
xor edx, edx
cmp [rcx+20h], rbx
setb dl
cmovnb rax, rcx
mov rcx, [rcx+rdx*8+10h]
test rcx, rcx
jnz short loc_CEF9E
cmp rax, rdi
jz short loc_CEFC0
cmp [rax+20h], rbx
jbe short loc_CF01A
loc_CEFC0:
lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/aimrt_"...
lea r14, [rsp+58h+var_48]
mov rdi, r14
mov esi, 3
mov ecx, 0BAh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCanNotFindOneo; "Can not find OneofGeneratorInfo for one"...
mov rdi, r14
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rsi, [rbx+8]
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&)
lea rdi, [rsp+58h+var_49]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+58h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
xor eax, eax
loc_CF012:
add rsp, 48h
pop rbx
pop r14
retn
loc_CF01A:
add rax, 28h ; '('
jmp short loc_CF012
jmp short $+2
loc_CF022:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| char * google::protobuf::compiler::java::Context::GetOneofGeneratorInfo(
google::protobuf::compiler::java::Context *this,
const google::protobuf::OneofDescriptor *a2)
{
char *v2; // rcx
char *v3; // rdi
char *v4; // rax
long long v5; // rax
long long v6; // rax
char v8; // [rsp+Fh] [rbp-49h] BYREF
_BYTE v9[72]; // [rsp+10h] [rbp-48h] BYREF
v2 = (char *)*((_QWORD *)this + 9);
if ( v2 )
{
v3 = (char *)this + 64;
v4 = v3;
do
{
if ( *((_QWORD *)v2 + 4) >= (unsigned long long)a2 )
v4 = v2;
v2 = *(char **)&v2[8 * (*((_QWORD *)v2 + 4) < (unsigned long long)a2) + 16];
}
while ( v2 );
if ( v4 != v3 && *((_QWORD *)v4 + 4) <= (unsigned long long)a2 )
return v4 + 40;
}
google::protobuf::internal::LogMessage::LogMessage(
v9,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/context.cc",
186LL);
v5 = google::protobuf::internal::LogMessage::operator<<(v9, "Can not find OneofGeneratorInfo for oneof: ");
v6 = google::protobuf::internal::LogMessage::operator<<(v5, *((_QWORD *)a2 + 1));
google::protobuf::internal::LogFinisher::operator=(&v8, v6);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9);
return 0LL;
}
| GetOneofGeneratorInfo:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV RCX,qword ptr [RDI + 0x48]
TEST RCX,RCX
JZ 0x001cefc0
ADD RDI,0x40
MOV RAX,RDI
LAB_001cef9e:
XOR EDX,EDX
CMP qword ptr [RCX + 0x20],RBX
SETC DL
CMOVNC RAX,RCX
MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10]
TEST RCX,RCX
JNZ 0x001cef9e
CMP RAX,RDI
JZ 0x001cefc0
CMP qword ptr [RAX + 0x20],RBX
JBE 0x001cf01a
LAB_001cefc0:
LEA RDX,[0x2d05ff]
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV ESI,0x3
MOV ECX,0xba
CALL 0x002072ba
LAB_001cefde:
LEA RSI,[0x2d06c4]
MOV RDI,R14
CALL 0x00206db8
MOV RSI,qword ptr [RBX + 0x8]
MOV RDI,RAX
CALL 0x00206dca
LAB_001ceff9:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x00206e92
LAB_001cf006:
LEA RDI,[RSP + 0x10]
CALL 0x002072d8
XOR EAX,EAX
LAB_001cf012:
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_001cf01a:
ADD RAX,0x28
JMP 0x001cf012
|
/* google::protobuf::compiler::java::Context::GetOneofGeneratorInfo(google::protobuf::OneofDescriptor
const*) const */
Context * __thiscall
google::protobuf::compiler::java::Context::GetOneofGeneratorInfo
(Context *this,OneofDescriptor *param_1)
{
Context *pCVar1;
LogMessage *pLVar2;
Context *pCVar3;
LogFinisher local_49;
LogMessage local_48 [56];
pCVar3 = *(Context **)(this + 0x48);
if (pCVar3 != (Context *)0x0) {
pCVar1 = this + 0x40;
do {
if (*(OneofDescriptor **)(pCVar3 + 0x20) >= param_1) {
pCVar1 = pCVar3;
}
pCVar3 = *(Context **)
(pCVar3 + (ulong)(*(OneofDescriptor **)(pCVar3 + 0x20) < param_1) * 8 + 0x10);
} while (pCVar3 != (Context *)0x0);
if ((pCVar1 != this + 0x40) && (*(OneofDescriptor **)(pCVar1 + 0x20) <= param_1)) {
return pCVar1 + 0x28;
}
}
internal::LogMessage::LogMessage
(local_48,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/context.cc"
,0xba);
/* try { // try from 001cefde to 001ceff8 has its CatchHandler @ 001cf022 */
pLVar2 = (LogMessage *)
internal::LogMessage::operator<<(local_48,"Can not find OneofGeneratorInfo for oneof: ");
pLVar2 = (LogMessage *)internal::LogMessage::operator<<(pLVar2,*(string **)(param_1 + 8));
/* try { // try from 001ceff9 to 001cf005 has its CatchHandler @ 001cf020 */
internal::LogFinisher::operator=(&local_49,pLVar2);
internal::LogMessage::~LogMessage(local_48);
return (Context *)0x0;
}
| |
52,012 | js_bigint_asUintN | bluesky950520[P]quickjs/quickjs.c | static JSValue js_bigint_asUintN(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv, int asIntN)
{
uint64_t bits;
bf_t a_s, *a = &a_s, *r, mask_s, *mask = &mask_s;
JSValue res;
if (JS_ToIndex(ctx, &bits, argv[0]))
return JS_EXCEPTION;
res = JS_NewBigInt(ctx);
if (JS_IsException(res))
return JS_EXCEPTION;
a = JS_ToBigInt(ctx, &a_s, argv[1]);
if (!a) {
JS_FreeValue(ctx, res);
return JS_EXCEPTION;
}
/* XXX: optimize */
r = JS_GetBigInt(res);
bf_init(ctx->bf_ctx, mask);
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_add_si(mask, mask, -1, BF_PREC_INF, BF_RNDZ);
bf_logic_and(r, a, mask);
if (asIntN && bits != 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits - 1, BF_PREC_INF, BF_RNDZ);
if (bf_cmpu(r, mask) >= 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_sub(r, r, mask, BF_PREC_INF, BF_RNDZ);
}
}
bf_delete(mask);
JS_FreeBigInt(ctx, a, &a_s);
return JS_CompactBigInt(ctx, res);
} | O0 | c | js_bigint_asUintN:
subq $0xd8, %rsp
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rdi, 0xb0(%rsp)
movl %ecx, 0xac(%rsp)
movq %r8, 0xa0(%rsp)
movl %r9d, 0x9c(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x90(%rsp), %rsi
callq 0x37e80
cmpl $0x0, %eax
je 0xbc87f
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0xbcad6
movq 0xb0(%rsp), %rdi
callq 0x38b10
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xbc8da
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0xbcad6
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x68(%rsp), %rsi
callq 0x61770
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0xbc93c
movq 0xb0(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x229d0
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0xbcad6
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x38b90
movq %rax, 0x58(%rsp)
movq 0xb0(%rsp), %rax
movq 0x1d0(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0xe4cb0
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0xe4de0
movq 0x28(%rsp), %rdi
movq 0x90(%rsp), %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0xe7850
movq 0x28(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq $-0x1, %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xe7fc0
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0xe9ab0
cmpl $0x0, 0x9c(%rsp)
je 0xbca8e
cmpq $0x0, 0x90(%rsp)
je 0xbca8e
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0xe4de0
movq 0x28(%rsp), %rdi
movq 0x90(%rsp), %rsi
subq $0x1, %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0xe7850
movq 0x58(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xe5c80
cmpl $0x0, %eax
jl 0xbca8c
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0xe4de0
movq 0x28(%rsp), %rdi
movq 0x90(%rsp), %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0xe7850
movq 0x58(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x28(%rsp), %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0xe8040
jmp 0xbca8e
movq 0x28(%rsp), %rdi
callq 0x5d660
movq 0xb0(%rsp), %rdi
movq 0x60(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x617e0
movq 0xb0(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x701d0
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rdx
addq $0xd8, %rsp
retq
nop
| js_bigint_asUintN:
sub rsp, 0D8h
mov [rsp+0D8h+var_20], rsi
mov [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_28], rdi
mov [rsp+0D8h+var_2C], ecx
mov [rsp+0D8h+var_38], r8
mov [rsp+0D8h+var_3C], r9d
lea rax, [rsp+0D8h+var_70]
mov [rsp+0D8h+var_78], rax
lea rax, [rsp+0D8h+var_A8]
mov [rsp+0D8h+var_B0], rax
mov rdi, [rsp+0D8h+var_28]
mov rax, [rsp+0D8h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+0D8h+var_48]
call JS_ToIndex
cmp eax, 0
jz short loc_BC87F
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_BCAD6
loc_BC87F:
mov rdi, [rsp+0D8h+var_28]
call JS_NewBigInt
mov [rsp+0D8h+var_D0], rax
mov [rsp+0D8h+var_C8], rdx
mov rax, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_C0], rax
mov rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_B8], rax
mov rdi, [rsp+0D8h+var_C0]
mov rsi, [rsp+0D8h+var_B8]
call JS_IsException_1
cmp eax, 0
jz short loc_BC8DA
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_BCAD6
loc_BC8DA:
mov rdi, [rsp+0D8h+var_28]
mov rax, [rsp+0D8h+var_38]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+0D8h+var_70]
call JS_ToBigInt
mov [rsp+0D8h+var_78], rax
cmp [rsp+0D8h+var_78], 0
jnz short loc_BC93C
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_C0]
mov rdx, [rsp+0D8h+var_B8]
call JS_FreeValue
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_BCAD6
loc_BC93C:
mov rdi, [rsp+0D8h+var_C0]
mov rsi, [rsp+0D8h+var_B8]
call JS_GetBigInt
mov [rsp+0D8h+var_80], rax
mov rax, [rsp+0D8h+var_28]
mov rdi, [rax+1D0h]
mov rsi, [rsp+0D8h+var_B0]
call bf_init
mov rdi, [rsp+0D8h+var_B0]
mov esi, 1
call bf_set_ui
mov rdi, [rsp+0D8h+var_B0]
mov rsi, [rsp+0D8h+var_48]
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov rdi, [rsp+0D8h+var_B0]
mov rsi, [rsp+0D8h+var_B0]
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_add_si
mov rdi, [rsp+0D8h+var_80]
mov rsi, [rsp+0D8h+var_78]
mov rdx, [rsp+0D8h+var_B0]
call bf_logic_and
cmp [rsp+0D8h+var_3C], 0
jz loc_BCA8E
cmp [rsp+0D8h+var_48], 0
jz loc_BCA8E
mov rdi, [rsp+0D8h+var_B0]
mov esi, 1
call bf_set_ui
mov rdi, [rsp+0D8h+var_B0]
mov rsi, [rsp+0D8h+var_48]
sub rsi, 1
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov rdi, [rsp+0D8h+var_80]
mov rsi, [rsp+0D8h+var_B0]
call bf_cmpu
cmp eax, 0
jl short loc_BCA8C
mov rdi, [rsp+0D8h+var_B0]
mov esi, 1
call bf_set_ui
mov rdi, [rsp+0D8h+var_B0]
mov rsi, [rsp+0D8h+var_48]
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov rdi, [rsp+0D8h+var_80]
mov rsi, [rsp+0D8h+var_80]
mov rdx, [rsp+0D8h+var_B0]
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_sub
loc_BCA8C:
jmp short $+2
loc_BCA8E:
mov rdi, [rsp+0D8h+var_B0]
call bf_delete
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_78]
lea rdx, [rsp+0D8h+var_70]
call JS_FreeBigInt
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_C0]
mov rdx, [rsp+0D8h+var_B8]
call JS_CompactBigInt
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
loc_BCAD6:
mov rax, [rsp+0D8h+var_10]
mov rdx, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
| long long js_bigint_asUintN(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rdx
_DWORD *v17; // [rsp+8h] [rbp-D0h]
long long v18; // [rsp+20h] [rbp-B8h]
long long v19[5]; // [rsp+30h] [rbp-A8h] BYREF
long long BigInt; // [rsp+58h] [rbp-80h]
long long *v21; // [rsp+60h] [rbp-78h]
long long v22[5]; // [rsp+68h] [rbp-70h] BYREF
unsigned long long v23; // [rsp+90h] [rbp-48h] BYREF
int v24; // [rsp+9Ch] [rbp-3Ch]
long long v25; // [rsp+A0h] [rbp-38h]
int v26; // [rsp+ACh] [rbp-2Ch]
long long v27; // [rsp+B0h] [rbp-28h]
long long v28; // [rsp+B8h] [rbp-20h]
long long v29; // [rsp+C0h] [rbp-18h]
long long v30; // [rsp+C8h] [rbp-10h]
long long v31; // [rsp+D0h] [rbp-8h]
v28 = a2;
v29 = a3;
v27 = a1;
v26 = a4;
v25 = a5;
v24 = a6;
v21 = v22;
if ( (unsigned int)JS_ToIndex(a1, &v23, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), a7, a8, a9, a10, a11, a12, a13, a14) )
{
LODWORD(v30) = 0;
v31 = 6LL;
}
else
{
v17 = JS_NewBigInt(v27);
v18 = v14;
if ( JS_IsException_1((long long)v17, v14) )
{
LODWORD(v30) = 0;
v31 = 6LL;
}
else
{
v21 = (long long *)JS_ToBigInt(v27, (long long)v22, *(_DWORD **)(v25 + 16), *(_QWORD *)(v25 + 24));
if ( v21 )
{
BigInt = JS_GetBigInt((long long)v17);
bf_init(*(_QWORD *)(v27 + 464), v19);
bf_set_ui(v19, 1LL);
bf_mul_2exp(v19, v23, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_add_si(v19, v19, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_logic_and(BigInt, v21, v19);
if ( v24 )
{
if ( v23 )
{
bf_set_ui(v19, 1LL);
bf_mul_2exp(v19, v23 - 1, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( (int)bf_cmpu(BigInt, v19) >= 0 )
{
bf_set_ui(v19, 1LL);
bf_mul_2exp(v19, v23, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_sub(BigInt, BigInt, v19, 0x3FFFFFFFFFFFFFFFLL, 1LL);
}
}
}
bf_delete(v19);
JS_FreeBigInt(v27, v21, v22);
v30 = JS_CompactBigInt(v27, (long long)v17, v18);
v31 = v15;
}
else
{
JS_FreeValue(v27, (long long)v17, v18);
LODWORD(v30) = 0;
v31 = 6LL;
}
}
}
return v30;
}
| js_bigint_asUintN:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xb8],RSI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb0],RDI
MOV dword ptr [RSP + 0xac],ECX
MOV qword ptr [RSP + 0xa0],R8
MOV dword ptr [RSP + 0x9c],R9D
LEA RAX,[RSP + 0x68]
MOV qword ptr [RSP + 0x60],RAX
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x90]
CALL 0x00137e80
CMP EAX,0x0
JZ 0x001bc87f
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001bcad6
LAB_001bc87f:
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x00138b10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001bc8da
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001bcad6
LAB_001bc8da:
MOV RDI,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x68]
CALL 0x00161770
MOV qword ptr [RSP + 0x60],RAX
CMP qword ptr [RSP + 0x60],0x0
JNZ 0x001bc93c
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x001229d0
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001bcad6
LAB_001bc93c:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00138b90
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV RDI,qword ptr [RAX + 0x1d0]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001e4cb0
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x1
CALL 0x001e4de0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x001e7850
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,-0x1
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001e7fc0
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x001e9ab0
CMP dword ptr [RSP + 0x9c],0x0
JZ 0x001bca8e
CMP qword ptr [RSP + 0x90],0x0
JZ 0x001bca8e
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x1
CALL 0x001e4de0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x90]
SUB RSI,0x1
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x001e7850
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001e5c80
CMP EAX,0x0
JL 0x001bca8c
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x1
CALL 0x001e4de0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x001e7850
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x001e8040
LAB_001bca8c:
JMP 0x001bca8e
LAB_001bca8e:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0015d660
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0x60]
LEA RDX,[RSP + 0x68]
CALL 0x001617e0
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x001701d0
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
LAB_001bcad6:
MOV RAX,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
int1 [16]
js_bigint_asUintN(long param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5,int param_6)
{
int iVar1;
int1 auVar4 [16];
int1 local_a8 [40];
int8 local_80;
int1 *local_78;
int1 local_70 [40];
long local_48;
int local_3c;
int8 *local_38;
int4 local_2c;
long local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar2;
int8 uVar3;
local_78 = local_70;
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar1 = JS_ToIndex(param_1,&local_48,*param_5,param_5[1]);
if (iVar1 == 0) {
auVar4 = JS_NewBigInt(local_28);
uVar3 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsException(uVar2,uVar3);
if (iVar1 == 0) {
local_78 = (int1 *)JS_ToBigInt(local_28,local_70,local_38[2],local_38[3]);
if (local_78 == (int1 *)0x0) {
JS_FreeValue(local_28,uVar2,uVar3);
local_10 = 0;
local_8 = 6;
}
else {
local_80 = JS_GetBigInt(uVar2,uVar3);
bf_init(*(int8 *)(local_28 + 0x1d0),local_a8);
bf_set_ui(local_a8,1);
bf_mul_2exp(local_a8,local_48,0x3fffffffffffffff,1);
bf_add_si(local_a8,local_a8,0xffffffffffffffff,0x3fffffffffffffff,1);
bf_logic_and(local_80,local_78,local_a8);
if ((local_3c != 0) && (local_48 != 0)) {
bf_set_ui(local_a8,1);
bf_mul_2exp(local_a8,local_48 + -1,0x3fffffffffffffff,1);
iVar1 = bf_cmpu(local_80,local_a8);
if (-1 < iVar1) {
bf_set_ui(local_a8,1);
bf_mul_2exp(local_a8,local_48,0x3fffffffffffffff,1);
bf_sub(local_80,local_80,local_a8,0x3fffffffffffffff,1);
}
}
bf_delete(local_a8);
JS_FreeBigInt(local_28,local_78,local_70);
auVar4 = JS_CompactBigInt(local_28,uVar2,uVar3);
local_8 = auVar4._8_8_;
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
}
else {
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = 0;
local_8 = 6;
}
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
| |
52,013 | js_bigint_asUintN | bluesky950520[P]quickjs/quickjs.c | static JSValue js_bigint_asUintN(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv, int asIntN)
{
uint64_t bits;
bf_t a_s, *a = &a_s, *r, mask_s, *mask = &mask_s;
JSValue res;
if (JS_ToIndex(ctx, &bits, argv[0]))
return JS_EXCEPTION;
res = JS_NewBigInt(ctx);
if (JS_IsException(res))
return JS_EXCEPTION;
a = JS_ToBigInt(ctx, &a_s, argv[1]);
if (!a) {
JS_FreeValue(ctx, res);
return JS_EXCEPTION;
}
/* XXX: optimize */
r = JS_GetBigInt(res);
bf_init(ctx->bf_ctx, mask);
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_add_si(mask, mask, -1, BF_PREC_INF, BF_RNDZ);
bf_logic_and(r, a, mask);
if (asIntN && bits != 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits - 1, BF_PREC_INF, BF_RNDZ);
if (bf_cmpu(r, mask) >= 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_sub(r, r, mask, BF_PREC_INF, BF_RNDZ);
}
}
bf_delete(mask);
JS_FreeBigInt(ctx, a, &a_s);
return JS_CompactBigInt(ctx, res);
} | O1 | c | js_bigint_asUintN:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %ebp
movq %r8, %r12
movq %rdi, %r15
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0x20(%rsp), %rsi
callq 0x26e5b
testl %eax, %eax
je 0x6ee16
xorl %eax, %eax
xorl %ecx, %ecx
movl $0x6, %ebx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0xfe44
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x6edf8
movq %rax, %r14
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
movq %rdx, 0x50(%rsp)
cmpl $-0x9, %ecx
jb 0x6ee44
movq 0x50(%rsp), %rax
incl (%rax)
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x3d847
testq %rax, %rax
je 0x6efe0
movq %r14, 0x10(%rsp)
leaq 0x8(%r14), %rcx
movq %rcx, 0x8(%rsp)
movq 0x1d0(%r15), %rdi
leaq 0x28(%rsp), %r12
movq %rax, %r13
movq %r12, %rsi
callq 0x83e3c
movl $0x1, %esi
movq %r12, %rdi
callq 0x83ea7
movq 0x20(%rsp), %r14
movq %r12, %rdi
movq %r14, %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0x85e3b
movq %r12, %rdi
movq %r12, %rsi
movq $-0x1, %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0x8634c
movq 0x8(%rsp), %rdi
movq %r13, 0x18(%rsp)
movq %r13, %rsi
movq %r12, %rdx
callq 0x878d0
testl %ebp, %ebp
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x6ef7b
leaq 0x28(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x83ea7
leaq -0x1(%r14), %rsi
movq %r12, %rdi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0x85e3b
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x84816
testl %eax, %eax
js 0x6ef7b
leaq 0x28(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x83ea7
movq %r12, %rdi
movq %r14, %rsi
movabsq $0x3fffffffffffffff, %r14 # imm = 0x3FFFFFFFFFFFFFFF
movq %r14, %rdx
movl $0x1, %ecx
callq 0x85e3b
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl $0x1, %r8d
callq 0x863e6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x6ef97
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x6ef97
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
leaq 0x50(%rsp), %rdx
movq %r15, %rdi
movq 0x18(%rsp), %rsi
callq 0x3d803
cmpq $-0x9, %rbx
movq 0x10(%rsp), %rdx
jne 0x6efc9
xorl %eax, %eax
cmpq 0x18(%rdx), %rax
jno 0x6efc9
cmpl $0x0, 0x10(%rdx)
je 0x6efc9
movl $0x0, 0x10(%rdx)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rdx, %rcx
andq %rax, %rcx
movl %edx, %eax
jmp 0x6ee01
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1ccb2
jmp 0x6edf8
| js_bigint_asUintN:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov ebp, r9d
mov r12, r8
mov r15, rdi
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+0A8h+var_88]
call JS_ToIndex
test eax, eax
jz short loc_6EE16
loc_6EDF8:
xor eax, eax
xor ecx, ecx
mov ebx, 6
loc_6EE01:
or rax, rcx
mov rdx, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6EE16:
mov rdi, r15
call JS_NewBigInt
mov rbx, rdx
cmp ebx, 6
jz short loc_6EDF8
mov r14, rax
mov rdx, [r12+10h]
mov rcx, [r12+18h]
mov [rsp+0A8h+var_58], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_6EE44
mov rax, [rsp+0A8h+var_58]
inc dword ptr [rax]
loc_6EE44:
lea rsi, [rsp+0A8h+var_58]
mov rdi, r15
call JS_ToBigIntFree
test rax, rax
jz loc_6EFE0
mov [rsp+0A8h+var_98], r14
lea rcx, [r14+8]
mov [rsp+0A8h+var_A0], rcx
mov rdi, [r15+1D0h]
lea r12, [rsp+0A8h+var_80]
mov r13, rax
mov rsi, r12
call bf_init
mov esi, 1
mov rdi, r12
call bf_set_ui
mov r14, [rsp+0A8h+var_88]
mov rdi, r12
mov rsi, r14
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov rdi, r12
mov rsi, r12
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_add_si
mov rdi, [rsp+0A8h+var_A0]
mov [rsp+0A8h+var_90], r13
mov rsi, r13
mov rdx, r12
call bf_logic_and
test ebp, ebp
setz al
test r14, r14
setz cl
or cl, al
jnz loc_6EF7B
lea r12, [rsp+0A8h+var_80]
mov esi, 1
mov rdi, r12
call bf_set_ui
lea rsi, [r14-1]
mov rdi, r12
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov rdi, [rsp+0A8h+var_A0]
mov rsi, r12
call bf_cmpu
test eax, eax
js short loc_6EF7B
lea r12, [rsp+0A8h+var_80]
mov esi, 1
mov rdi, r12
call bf_set_ui
mov rdi, r12
mov rsi, r14
mov r14, 3FFFFFFFFFFFFFFFh
mov rdx, r14
mov ecx, 1
call bf_mul_2exp
mov rdi, [rsp+0A8h+var_A0]
mov rsi, rdi
mov rdx, r12
mov rcx, r14
mov r8d, 1
call bf_sub
loc_6EF7B:
mov rax, [rsp+0A8h+var_80]
test rax, rax
jz short loc_6EF97
mov rsi, [rsp+0A8h+var_60]
test rsi, rsi
jz short loc_6EF97
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_6EF97:
lea rdx, [rsp+0A8h+var_58]
mov rdi, r15
mov rsi, [rsp+0A8h+var_90]
call JS_FreeBigInt
cmp rbx, 0FFFFFFFFFFFFFFF7h
mov rdx, [rsp+0A8h+var_98]
jnz short loc_6EFC9
xor eax, eax
cmp rax, [rdx+18h]
jno short loc_6EFC9
cmp dword ptr [rdx+10h], 0
jz short loc_6EFC9
mov dword ptr [rdx+10h], 0
loc_6EFC9:
mov rax, 0FFFFFFFF00000000h
mov rcx, rdx
and rcx, rax
mov eax, edx
jmp loc_6EE01
loc_6EFE0:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, rbx
call JS_FreeValueRT
jmp loc_6EDF8
| unsigned long long js_bigint_asUintN(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
int a14)
{
long long v16; // rax
unsigned long long v17; // rcx
_DWORD *v19; // rax
double v20; // xmm4_8
double v21; // xmm5_8
long long v22; // rdx
long long v23; // rbx
_DWORD *v24; // r14
_DWORD *v25; // rdx
long long v26; // rcx
long long *v27; // rax
long long *v28; // r13
unsigned long long v29; // r14
long long v30; // r8
long long v31; // r9
long long v32; // rcx
_DWORD *v33; // [rsp+8h] [rbp-A0h]
unsigned long long v34; // [rsp+10h] [rbp-98h]
unsigned long long v35; // [rsp+20h] [rbp-88h] BYREF
_QWORD v36[4]; // [rsp+28h] [rbp-80h] BYREF
long long v37; // [rsp+48h] [rbp-60h]
long long v38[11]; // [rsp+50h] [rbp-58h] BYREF
if ( (unsigned int)JS_ToIndex(a1, &v35, *a13, a13[1], a2, a3, a4, a5, a6, a7, a8, a9) )
goto LABEL_2;
v19 = JS_NewBigInt(a1);
v23 = v22;
if ( (_DWORD)v22 == 6 )
goto LABEL_2;
v24 = v19;
v25 = (_DWORD *)a13[2];
v26 = a13[3];
v38[0] = (long long)v25;
if ( (unsigned int)v26 >= 0xFFFFFFF7 )
++*(_DWORD *)v38[0];
v27 = (long long *)JS_ToBigIntFree(a1, (long long)v38, v25, v26, a2, a3, a4, a5, v20, v21, a8, a9);
if ( !v27 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v23);
LABEL_2:
v16 = 0LL;
v17 = 0LL;
return v17 | v16;
}
v34 = (unsigned long long)v24;
v33 = v24 + 2;
v28 = v27;
bf_init(*(_QWORD *)(a1 + 464), v36);
bf_set_ui(v36, 1LL);
v29 = v35;
bf_mul_2exp(v36, v35, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_add_si(v36, v36, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_logic_and(v33, v28, v36);
LOBYTE(v32) = a14 == 0 || v29 == 0;
if ( !(_BYTE)v32 )
{
bf_set_ui(v36, 1LL);
bf_mul_2exp(v36, v29 - 1, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( (int)bf_cmpu(v33, v36) >= 0 )
{
bf_set_ui(v36, 1LL);
bf_mul_2exp(v36, v29, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_sub(v33, v33, v36, 0x3FFFFFFFFFFFFFFFLL, 1LL);
}
}
if ( v36[0] && v37 )
(*(void ( **)(_QWORD, long long, _QWORD))(v36[0] + 8LL))(*(_QWORD *)v36[0], v37, 0LL);
JS_FreeBigInt(a1, v28, v38, v32, v30, v31);
if ( v23 == -9 && __OFSUB__(0LL, *(_QWORD *)(v34 + 24)) && *(_DWORD *)(v34 + 16) )
*(_DWORD *)(v34 + 16) = 0;
v17 = v34 & 0xFFFFFFFF00000000LL;
v16 = (unsigned int)v34;
return v17 | v16;
}
| js_bigint_asUintN:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV EBP,R9D
MOV R12,R8
MOV R15,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0x20]
CALL 0x00126e5b
TEST EAX,EAX
JZ 0x0016ee16
LAB_0016edf8:
XOR EAX,EAX
XOR ECX,ECX
MOV EBX,0x6
LAB_0016ee01:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016ee16:
MOV RDI,R15
CALL 0x0010fe44
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0016edf8
MOV R14,RAX
MOV RDX,qword ptr [R12 + 0x10]
MOV RCX,qword ptr [R12 + 0x18]
MOV qword ptr [RSP + 0x50],RDX
CMP ECX,-0x9
JC 0x0016ee44
MOV RAX,qword ptr [RSP + 0x50]
INC dword ptr [RAX]
LAB_0016ee44:
LEA RSI,[RSP + 0x50]
MOV RDI,R15
CALL 0x0013d847
TEST RAX,RAX
JZ 0x0016efe0
MOV qword ptr [RSP + 0x10],R14
LEA RCX,[R14 + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [R15 + 0x1d0]
LEA R12,[RSP + 0x28]
MOV R13,RAX
MOV RSI,R12
CALL 0x00183e3c
MOV ESI,0x1
MOV RDI,R12
CALL 0x00183ea7
MOV R14,qword ptr [RSP + 0x20]
MOV RDI,R12
MOV RSI,R14
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x00185e3b
MOV RDI,R12
MOV RSI,R12
MOV RDX,-0x1
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x0018634c
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],R13
MOV RSI,R13
MOV RDX,R12
CALL 0x001878d0
TEST EBP,EBP
SETZ AL
TEST R14,R14
SETZ CL
OR CL,AL
JNZ 0x0016ef7b
LEA R12,[RSP + 0x28]
MOV ESI,0x1
MOV RDI,R12
CALL 0x00183ea7
LEA RSI,[R14 + -0x1]
MOV RDI,R12
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x00185e3b
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R12
CALL 0x00184816
TEST EAX,EAX
JS 0x0016ef7b
LEA R12,[RSP + 0x28]
MOV ESI,0x1
MOV RDI,R12
CALL 0x00183ea7
MOV RDI,R12
MOV RSI,R14
MOV R14,0x3fffffffffffffff
MOV RDX,R14
MOV ECX,0x1
CALL 0x00185e3b
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RDI
MOV RDX,R12
MOV RCX,R14
MOV R8D,0x1
CALL 0x001863e6
LAB_0016ef7b:
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x0016ef97
MOV RSI,qword ptr [RSP + 0x48]
TEST RSI,RSI
JZ 0x0016ef97
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0016ef97:
LEA RDX,[RSP + 0x50]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0013d803
CMP RBX,-0x9
MOV RDX,qword ptr [RSP + 0x10]
JNZ 0x0016efc9
XOR EAX,EAX
CMP RAX,qword ptr [RDX + 0x18]
JNO 0x0016efc9
CMP dword ptr [RDX + 0x10],0x0
JZ 0x0016efc9
MOV dword ptr [RDX + 0x10],0x0
LAB_0016efc9:
MOV RAX,-0x100000000
MOV RCX,RDX
AND RCX,RAX
MOV EAX,EDX
JMP 0x0016ee01
LAB_0016efe0:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011ccb2
JMP 0x0016edf8
|
/* WARNING: Removing unreachable block (ram,0x0016efbc) */
/* WARNING: Removing unreachable block (ram,0x0016efc2) */
int1 [16] js_bigint_asUintN(long param_1)
{
long lVar1;
int iVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
int8 uVar6;
int8 *in_R8;
int in_R9D;
int1 auVar7 [16];
long local_88;
int8 *local_80 [4];
long local_60;
int *local_58 [5];
iVar2 = JS_ToIndex(param_1,&local_88,*in_R8,in_R8[1]);
if (iVar2 == 0) {
auVar7 = JS_NewBigInt(param_1);
uVar6 = auVar7._8_8_;
uVar3 = auVar7._0_8_;
if (auVar7._8_4_ != 6) {
local_58[0] = (int *)in_R8[2];
if (0xfffffff6 < (uint)in_R8[3]) {
*local_58[0] = *local_58[0] + 1;
}
lVar4 = JS_ToBigIntFree(param_1,local_58);
if (lVar4 != 0) {
lVar1 = uVar3 + 8;
bf_init(*(int8 *)(param_1 + 0x1d0),local_80);
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88,0x3fffffffffffffff,1);
bf_add_si(local_80,local_80,0xffffffffffffffff,0x3fffffffffffffff,1);
bf_logic_and(lVar1,lVar4,local_80);
if (local_88 != 0 && in_R9D != 0) {
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88 + -1,0x3fffffffffffffff,1);
iVar2 = bf_cmpu(lVar1,local_80);
if (-1 < iVar2) {
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88,0x3fffffffffffffff,1);
bf_sub(lVar1,lVar1,local_80,0x3fffffffffffffff,1);
}
}
if ((local_80[0] != (int8 *)0x0) && (local_60 != 0)) {
(*(code *)local_80[0][1])(*local_80[0],local_60,0);
}
JS_FreeBigInt(param_1,lVar4,local_58);
uVar5 = uVar3 & 0xffffffff00000000;
uVar3 = uVar3 & 0xffffffff;
goto LAB_0016ee01;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar6);
}
}
uVar3 = 0;
uVar5 = 0;
uVar6 = 6;
LAB_0016ee01:
auVar7._0_8_ = uVar3 | uVar5;
auVar7._8_8_ = uVar6;
return auVar7;
}
| |
52,014 | js_bigint_asUintN | bluesky950520[P]quickjs/quickjs.c | static JSValue js_bigint_asUintN(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv, int asIntN)
{
uint64_t bits;
bf_t a_s, *a = &a_s, *r, mask_s, *mask = &mask_s;
JSValue res;
if (JS_ToIndex(ctx, &bits, argv[0]))
return JS_EXCEPTION;
res = JS_NewBigInt(ctx);
if (JS_IsException(res))
return JS_EXCEPTION;
a = JS_ToBigInt(ctx, &a_s, argv[1]);
if (!a) {
JS_FreeValue(ctx, res);
return JS_EXCEPTION;
}
/* XXX: optimize */
r = JS_GetBigInt(res);
bf_init(ctx->bf_ctx, mask);
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_add_si(mask, mask, -1, BF_PREC_INF, BF_RNDZ);
bf_logic_and(r, a, mask);
if (asIntN && bits != 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits - 1, BF_PREC_INF, BF_RNDZ);
if (bf_cmpu(r, mask) >= 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_sub(r, r, mask, BF_PREC_INF, BF_RNDZ);
}
}
bf_delete(mask);
JS_FreeBigInt(ctx, a, &a_s);
return JS_CompactBigInt(ctx, res);
} | O2 | c | js_bigint_asUintN:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %r13d
movq %r8, %r15
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0x20(%rsp), %rsi
callq 0x20b04
pushq $0x6
popq %rbp
testl %eax, %eax
jne 0x5d445
movq %rbx, %rdi
callq 0x21239
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x5d445
movq %rax, %r12
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x35ed0
testq %rax, %rax
je 0x5d437
movq %r14, 0x8(%rsp)
movq %r12, 0x18(%rsp)
addq $0x8, %r12
movq 0x1d0(%rbx), %rdi
leaq 0x28(%rsp), %r14
movq %rax, %rbp
movq %r14, %rsi
callq 0x6e976
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x6e9da
movq 0x20(%rsp), %r15
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
callq 0x70466
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %r14, %rsi
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
pushq $0x1
popq %r8
callq 0x707fe
movq %r12, (%rsp)
movq %r12, %rdi
movq %rbp, 0x10(%rsp)
movq %rbp, %rsi
movq %r14, %rdx
callq 0x7183e
testl %r13d, %r13d
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x5d3f8
leaq 0x28(%rsp), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x6e9da
leaq -0x1(%r15), %rsi
pushq $0x1
popq %rcx
movq %r12, %rdi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
callq 0x70466
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x6f1ea
testl %eax, %eax
js 0x5d3f8
leaq 0x28(%rsp), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x6e9da
pushq $0x1
popq %r13
movq %r12, %rdi
movq %r15, %rsi
movabsq $0x3fffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFFF
movq %r15, %rdx
movl %r13d, %ecx
callq 0x70466
movq (%rsp), %rdi
movq %rdi, %rsi
movq %r12, %rdx
movq %r15, %rcx
movl %r13d, %r8d
callq 0x7087b
leaq 0x28(%rsp), %rdi
callq 0x34774
leaq 0x50(%rsp), %rdx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x35ed9
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3672f
movq %rdx, %rbp
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %eax
jmp 0x5d449
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x174a2
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbp, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_bigint_asUintN:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r13d, r9d
mov r15, r8
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+0A8h+var_88]
call JS_ToIndex
push 6
pop rbp
test eax, eax
jnz loc_5D445
mov rdi, rbx
call JS_NewBigInt
mov r14, rdx
cmp r14d, 6
jz loc_5D445
mov r12, rax
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea rsi, [rsp+0A8h+var_58]
mov rdi, rbx
call JS_ToBigInt
test rax, rax
jz loc_5D437
mov [rsp+0A8h+var_A0], r14
mov [rsp+0A8h+var_90], r12
add r12, 8
mov rdi, [rbx+1D0h]
lea r14, [rsp+0A8h+var_80]
mov rbp, rax
mov rsi, r14
call bf_init
push 1
pop rsi
mov rdi, r14
call bf_set_ui
mov r15, [rsp+0A8h+var_88]
push 1
pop rcx
mov rdi, r14
mov rsi, r15
mov rdx, 3FFFFFFFFFFFFFFFh
call bf_mul_2exp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, r14
mov rsi, r14
mov rcx, 3FFFFFFFFFFFFFFFh
push 1
pop r8
call bf_add_si
mov [rsp+0A8h+var_A8], r12
mov rdi, r12
mov [rsp+0A8h+var_98], rbp
mov rsi, rbp
mov rdx, r14
call bf_logic_and
test r13d, r13d
setz al
test r15, r15
setz cl
or cl, al
jnz short loc_5D3F8
lea r12, [rsp+0A8h+var_80]
push 1
pop rsi
mov rdi, r12
call bf_set_ui
lea rsi, [r15-1]
push 1
pop rcx
mov rdi, r12
mov rdx, 3FFFFFFFFFFFFFFFh
call bf_mul_2exp
mov rdi, [rsp+0A8h+var_A8]
mov rsi, r12
call bf_cmpu
test eax, eax
js short loc_5D3F8
lea r12, [rsp+0A8h+var_80]
push 1
pop rsi
mov rdi, r12
call bf_set_ui
push 1
pop r13
mov rdi, r12
mov rsi, r15
mov r15, 3FFFFFFFFFFFFFFFh
mov rdx, r15
mov ecx, r13d
call bf_mul_2exp
mov rdi, [rsp+0A8h+var_A8]
mov rsi, rdi
mov rdx, r12
mov rcx, r15
mov r8d, r13d
call bf_sub
loc_5D3F8:
lea rdi, [rsp+0A8h+var_80]
call bf_delete
lea rdx, [rsp+0A8h+var_58]
mov rdi, rbx
mov rsi, [rsp+0A8h+var_98]
call JS_FreeBigInt
mov rdi, [rsp+0A8h+var_90]
mov rsi, [rsp+0A8h+var_A0]
call JS_CompactBigInt1
mov rbp, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov eax, eax
jmp short loc_5D449
loc_5D437:
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call JS_FreeValue
loc_5D445:
xor eax, eax
xor ecx, ecx
loc_5D449:
or rax, rcx
mov rdx, rbp
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_bigint_asUintN(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
int a14)
{
_DWORD *v16; // rax
long long v17; // rdx
long long v18; // r14
long long v19; // r12
long long v20; // rax
long long *v21; // rbp
long long v22; // r15
unsigned long long v23; // rcx
long long v24; // rax
long long v26; // [rsp+0h] [rbp-A8h]
long long v27; // [rsp+20h] [rbp-88h] BYREF
long long v28[5]; // [rsp+28h] [rbp-80h] BYREF
long long v29[11]; // [rsp+50h] [rbp-58h] BYREF
if ( (unsigned int)JS_ToIndex(a1, &v27, *(_DWORD **)a13, *(_QWORD *)(a13 + 8), a2, a3, a4, a5, a6, a7, a8, a9) )
goto LABEL_9;
v16 = JS_NewBigInt(a1);
v18 = v17;
if ( (_DWORD)v17 == 6 )
goto LABEL_9;
v19 = (long long)v16;
v20 = JS_ToBigInt(a1, (long long)v29, *(_DWORD **)(a13 + 16), *(_QWORD *)(a13 + 24));
if ( !v20 )
{
JS_FreeValue(a1, v19, v18);
LABEL_9:
v24 = 0LL;
v23 = 0LL;
return v23 | v24;
}
v21 = (long long *)v20;
bf_init(*(_QWORD *)(a1 + 464), v28);
bf_set_ui(v28, 1LL);
v22 = v27;
bf_mul_2exp(v28, v27, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_add_si(v28, v28, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
v26 = v19 + 8;
bf_logic_and(v19 + 8, v21, v28);
if ( a14 != 0 && v22 != 0 )
{
bf_set_ui(v28, 1LL);
bf_mul_2exp(v28, v22 - 1, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( (int)bf_cmpu(v26, v28) >= 0 )
{
bf_set_ui(v28, 1LL);
bf_mul_2exp(v28, v22, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_sub(v26, v26, v28, 0x3FFFFFFFFFFFFFFFLL, 1LL);
}
}
bf_delete(v28);
JS_FreeBigInt(a1, v21, v29);
v24 = JS_CompactBigInt1(v19, v18);
v23 = v24 & 0xFFFFFFFF00000000LL;
v24 = (unsigned int)v24;
return v23 | v24;
}
| js_bigint_asUintN:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R13D,R9D
MOV R15,R8
MOV RBX,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0x20]
CALL 0x00120b04
PUSH 0x6
POP RBP
TEST EAX,EAX
JNZ 0x0015d445
MOV RDI,RBX
CALL 0x00121239
MOV R14,RDX
CMP R14D,0x6
JZ 0x0015d445
MOV R12,RAX
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA RSI,[RSP + 0x50]
MOV RDI,RBX
CALL 0x00135ed0
TEST RAX,RAX
JZ 0x0015d437
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP + 0x18],R12
ADD R12,0x8
MOV RDI,qword ptr [RBX + 0x1d0]
LEA R14,[RSP + 0x28]
MOV RBP,RAX
MOV RSI,R14
CALL 0x0016e976
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0016e9da
MOV R15,qword ptr [RSP + 0x20]
PUSH 0x1
POP RCX
MOV RDI,R14
MOV RSI,R15
MOV RDX,0x3fffffffffffffff
CALL 0x00170466
PUSH -0x1
POP RDX
MOV RDI,R14
MOV RSI,R14
MOV RCX,0x3fffffffffffffff
PUSH 0x1
POP R8
CALL 0x001707fe
MOV qword ptr [RSP],R12
MOV RDI,R12
MOV qword ptr [RSP + 0x10],RBP
MOV RSI,RBP
MOV RDX,R14
CALL 0x0017183e
TEST R13D,R13D
SETZ AL
TEST R15,R15
SETZ CL
OR CL,AL
JNZ 0x0015d3f8
LEA R12,[RSP + 0x28]
PUSH 0x1
POP RSI
MOV RDI,R12
CALL 0x0016e9da
LEA RSI,[R15 + -0x1]
PUSH 0x1
POP RCX
MOV RDI,R12
MOV RDX,0x3fffffffffffffff
CALL 0x00170466
MOV RDI,qword ptr [RSP]
MOV RSI,R12
CALL 0x0016f1ea
TEST EAX,EAX
JS 0x0015d3f8
LEA R12,[RSP + 0x28]
PUSH 0x1
POP RSI
MOV RDI,R12
CALL 0x0016e9da
PUSH 0x1
POP R13
MOV RDI,R12
MOV RSI,R15
MOV R15,0x3fffffffffffffff
MOV RDX,R15
MOV ECX,R13D
CALL 0x00170466
MOV RDI,qword ptr [RSP]
MOV RSI,RDI
MOV RDX,R12
MOV RCX,R15
MOV R8D,R13D
CALL 0x0017087b
LAB_0015d3f8:
LEA RDI,[RSP + 0x28]
CALL 0x00134774
LEA RDX,[RSP + 0x50]
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00135ed9
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0013672f
MOV RBP,RDX
MOV RCX,-0x100000000
AND RCX,RAX
MOV EAX,EAX
JMP 0x0015d449
LAB_0015d437:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x001174a2
LAB_0015d445:
XOR EAX,EAX
XOR ECX,ECX
LAB_0015d449:
OR RAX,RCX
MOV RDX,RBP
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_bigint_asUintN(long param_1)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
int8 *in_R8;
int in_R9D;
long lVar7;
int1 auVar8 [16];
long local_88;
int1 local_80 [40];
int1 local_58 [40];
iVar1 = JS_ToIndex(param_1,&local_88,*in_R8,in_R8[1]);
uVar6 = 6;
if (iVar1 == 0) {
auVar8 = JS_NewBigInt(param_1);
lVar2 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
lVar3 = JS_ToBigInt(param_1,local_58,in_R8[2],in_R8[3]);
if (lVar3 != 0) {
lVar7 = lVar2 + 8;
bf_init(*(int8 *)(param_1 + 0x1d0),local_80);
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88,0x3fffffffffffffff,1);
bf_add_si(local_80,local_80,0xffffffffffffffff,0x3fffffffffffffff,1);
bf_logic_and(lVar7,lVar3,local_80);
if (local_88 != 0 && in_R9D != 0) {
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88 + -1,0x3fffffffffffffff,1);
iVar1 = bf_cmpu(lVar7,local_80);
if (-1 < iVar1) {
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88,0x3fffffffffffffff,1);
bf_sub(lVar7,lVar7,local_80,0x3fffffffffffffff,1);
}
}
bf_delete(local_80);
JS_FreeBigInt(param_1,lVar3,local_58);
auVar8 = JS_CompactBigInt1(lVar2,auVar8._8_8_);
uVar6 = auVar8._8_8_;
uVar5 = auVar8._0_8_ & 0xffffffff00000000;
uVar4 = auVar8._0_8_ & 0xffffffff;
goto LAB_0015d449;
}
JS_FreeValue(param_1,lVar2,auVar8._8_8_);
}
}
uVar4 = 0;
uVar5 = 0;
LAB_0015d449:
auVar8._0_8_ = uVar4 | uVar5;
auVar8._8_8_ = uVar6;
return auVar8;
}
| |
52,015 | js_bigint_asUintN | bluesky950520[P]quickjs/quickjs.c | static JSValue js_bigint_asUintN(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv, int asIntN)
{
uint64_t bits;
bf_t a_s, *a = &a_s, *r, mask_s, *mask = &mask_s;
JSValue res;
if (JS_ToIndex(ctx, &bits, argv[0]))
return JS_EXCEPTION;
res = JS_NewBigInt(ctx);
if (JS_IsException(res))
return JS_EXCEPTION;
a = JS_ToBigInt(ctx, &a_s, argv[1]);
if (!a) {
JS_FreeValue(ctx, res);
return JS_EXCEPTION;
}
/* XXX: optimize */
r = JS_GetBigInt(res);
bf_init(ctx->bf_ctx, mask);
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_add_si(mask, mask, -1, BF_PREC_INF, BF_RNDZ);
bf_logic_and(r, a, mask);
if (asIntN && bits != 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits - 1, BF_PREC_INF, BF_RNDZ);
if (bf_cmpu(r, mask) >= 0) {
bf_set_ui(mask, 1);
bf_mul_2exp(mask, bits, BF_PREC_INF, BF_RNDZ);
bf_sub(r, r, mask, BF_PREC_INF, BF_RNDZ);
}
}
bf_delete(mask);
JS_FreeBigInt(ctx, a, &a_s);
return JS_CompactBigInt(ctx, res);
} | O3 | c | js_bigint_asUintN:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %ebp
movq %r8, %r12
movq %rdi, %r15
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0x20(%rsp), %rsi
callq 0x274b4
testl %eax, %eax
je 0x710c3
xorl %eax, %eax
xorl %ecx, %ecx
movl $0x6, %ebx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0xffa8
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x710a5
movq %rax, %r14
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
cmpl $-0x9, %ecx
jb 0x710e7
incl (%rdx)
leaq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x3efa8
testq %rax, %rax
je 0x71283
movq %r14, 0x10(%rsp)
leaq 0x8(%r14), %rcx
movq %rcx, 0x8(%rsp)
movq 0x1d0(%r15), %rdi
leaq 0x28(%rsp), %r12
movq %rax, %r13
movq %r12, %rsi
callq 0x8685d
movl $0x1, %esi
movq %r12, %rdi
callq 0x868c8
movq 0x20(%rsp), %r14
movq %r12, %rdi
movq %r14, %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0x88872
movq %r12, %rdi
movq %r12, %rsi
movq $-0x1, %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0x88d9b
movq 0x8(%rsp), %rdi
movq %r13, 0x18(%rsp)
movq %r13, %rsi
movq %r12, %rdx
callq 0x8a443
testl %ebp, %ebp
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x7121e
leaq 0x28(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x868c8
leaq -0x1(%r14), %rsi
movq %r12, %rdi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %ecx
callq 0x88872
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x87224
testl %eax, %eax
js 0x7121e
leaq 0x28(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x868c8
movq %r12, %rdi
movq %r14, %rsi
movabsq $0x3fffffffffffffff, %r14 # imm = 0x3FFFFFFFFFFFFFFF
movq %r14, %rdx
movl $0x1, %ecx
callq 0x88872
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl $0x1, %r8d
callq 0x88e35
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x7123a
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x7123a
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
leaq 0x50(%rsp), %rdx
movq %r15, %rdi
movq 0x18(%rsp), %rsi
callq 0x3ef64
cmpq $-0x9, %rbx
movq 0x10(%rsp), %rdx
jne 0x7126c
xorl %eax, %eax
cmpq 0x18(%rdx), %rax
jno 0x7126c
cmpl $0x0, 0x10(%rdx)
je 0x7126c
movl $0x0, 0x10(%rdx)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rdx, %rcx
andq %rax, %rcx
movl %edx, %eax
jmp 0x710ae
cmpl $-0x9, %ebx
jb 0x710a5
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x710a5
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20d90
jmp 0x710a5
| js_bigint_asUintN:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov ebp, r9d
mov r12, r8
mov r15, rdi
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+0A8h+var_88]
call JS_ToIndex
test eax, eax
jz short loc_710C3
loc_710A5:
xor eax, eax
xor ecx, ecx
mov ebx, 6
loc_710AE:
or rax, rcx
mov rdx, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_710C3:
mov rdi, r15
call JS_NewBigInt
mov rbx, rdx
cmp ebx, 6
jz short loc_710A5
mov r14, rax
mov rdx, [r12+10h]
mov rcx, [r12+18h]
cmp ecx, 0FFFFFFF7h
jb short loc_710E7
inc dword ptr [rdx]
loc_710E7:
lea rsi, [rsp+0A8h+var_58]
mov rdi, r15
call JS_ToBigIntFree
test rax, rax
jz loc_71283
mov [rsp+0A8h+var_98], r14
lea rcx, [r14+8]
mov [rsp+0A8h+var_A0], rcx
mov rdi, [r15+1D0h]
lea r12, [rsp+0A8h+var_80]
mov r13, rax
mov rsi, r12
call bf_init
mov esi, 1
mov rdi, r12
call bf_set_ui
mov r14, [rsp+0A8h+var_88]
mov rdi, r12
mov rsi, r14
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov rdi, r12
mov rsi, r12
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, 3FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_add_si
mov rdi, [rsp+0A8h+var_A0]
mov [rsp+0A8h+var_90], r13
mov rsi, r13
mov rdx, r12
call bf_logic_and
test ebp, ebp
setz al
test r14, r14
setz cl
or cl, al
jnz loc_7121E
lea r12, [rsp+0A8h+var_80]
mov esi, 1
mov rdi, r12
call bf_set_ui
lea rsi, [r14-1]
mov rdi, r12
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 1
call bf_mul_2exp
mov rdi, [rsp+0A8h+var_A0]
mov rsi, r12
call bf_cmpu
test eax, eax
js short loc_7121E
lea r12, [rsp+0A8h+var_80]
mov esi, 1
mov rdi, r12
call bf_set_ui
mov rdi, r12
mov rsi, r14
mov r14, 3FFFFFFFFFFFFFFFh
mov rdx, r14
mov ecx, 1
call bf_mul_2exp
mov rdi, [rsp+0A8h+var_A0]
mov rsi, rdi
mov rdx, r12
mov rcx, r14
mov r8d, 1
call bf_sub
loc_7121E:
mov rax, [rsp+0A8h+var_80]
test rax, rax
jz short loc_7123A
mov rsi, [rsp+0A8h+var_60]
test rsi, rsi
jz short loc_7123A
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_7123A:
lea rdx, [rsp+0A8h+var_58]
mov rdi, r15
mov rsi, [rsp+0A8h+var_90]
call JS_FreeBigInt
cmp rbx, 0FFFFFFFFFFFFFFF7h
mov rdx, [rsp+0A8h+var_98]
jnz short loc_7126C
xor eax, eax
cmp rax, [rdx+18h]
jno short loc_7126C
cmp dword ptr [rdx+10h], 0
jz short loc_7126C
mov dword ptr [rdx+10h], 0
loc_7126C:
mov rax, 0FFFFFFFF00000000h
mov rcx, rdx
and rcx, rax
mov eax, edx
jmp loc_710AE
loc_71283:
cmp ebx, 0FFFFFFF7h
jb loc_710A5
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg loc_710A5
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
jmp loc_710A5
| unsigned long long js_bigint_asUintN(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
int a14)
{
long long v16; // rax
unsigned long long v17; // rcx
_DWORD *v19; // rax
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // rdx
long long v25; // rbx
_QWORD *v26; // r14
_DWORD *v27; // rdx
long long v28; // rcx
long long *v29; // rax
long long v30; // r8
long long v31; // r9
long long *v32; // r13
unsigned long long v33; // r14
long long v34; // r8
long long v35; // r9
long long v36; // rcx
long long v37; // rdi
int v38; // eax
long long v39; // rcx
_QWORD *v40; // [rsp+8h] [rbp-A0h]
unsigned long long v41; // [rsp+10h] [rbp-98h]
unsigned long long v42; // [rsp+20h] [rbp-88h] BYREF
_QWORD v43[4]; // [rsp+28h] [rbp-80h] BYREF
long long v44; // [rsp+48h] [rbp-60h]
long long v45[11]; // [rsp+50h] [rbp-58h] BYREF
if ( (unsigned int)JS_ToIndex(a1, &v42, *(_DWORD **)a13, *(_QWORD *)(a13 + 8), a2, a3, a4, a5, a6, a7, a8, a9)
|| (v19 = JS_NewBigInt(a1), v25 = v24, (_DWORD)v24 == 6) )
{
LABEL_2:
v16 = 0LL;
v17 = 0LL;
return v17 | v16;
}
v26 = v19;
v27 = *(_DWORD **)(a13 + 16);
v28 = *(_QWORD *)(a13 + 24);
if ( (unsigned int)v28 >= 0xFFFFFFF7 )
++*v27;
v29 = JS_ToBigIntFree(a1, (long long)v45, (long long)v27, v28, v20, v21, a2, a3, a4, a5, v22, v23, a8, a9);
if ( !v29 )
{
if ( (unsigned int)v25 >= 0xFFFFFFF7 )
{
v37 = *(_QWORD *)(a1 + 24);
v38 = *(_DWORD *)v26;
v39 = (unsigned int)(*(_DWORD *)v26 - 1);
*(_DWORD *)v26 = v39;
if ( v38 <= 1 )
js_free_value_rt(v37, v26, v25, v39, v30, v31);
}
goto LABEL_2;
}
v41 = (unsigned long long)v26;
v40 = v26 + 1;
v32 = v29;
bf_init(*(_QWORD *)(a1 + 464), v43);
bf_set_ui(v43, 1LL);
v33 = v42;
bf_mul_2exp(v43, v42, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_add_si(v43, v43, -1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_logic_and(v40, v32, v43);
LOBYTE(v36) = a14 == 0 || v33 == 0;
if ( !(_BYTE)v36 )
{
bf_set_ui(v43, 1LL);
bf_mul_2exp(v43, v33 - 1, 0x3FFFFFFFFFFFFFFFLL, 1LL);
if ( (int)bf_cmpu(v40, v43) >= 0 )
{
bf_set_ui(v43, 1LL);
bf_mul_2exp(v43, v33, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_sub(v40, v40, v43, 0x3FFFFFFFFFFFFFFFLL, 1LL);
}
}
if ( v43[0] && v44 )
(*(void ( **)(_QWORD, long long, _QWORD))(v43[0] + 8LL))(*(_QWORD *)v43[0], v44, 0LL);
JS_FreeBigInt(a1, v32, v45, v36, v34, v35);
if ( v25 == -9 && __OFSUB__(0LL, *(_QWORD *)(v41 + 24)) && *(_DWORD *)(v41 + 16) )
*(_DWORD *)(v41 + 16) = 0;
v17 = v41 & 0xFFFFFFFF00000000LL;
v16 = (unsigned int)v41;
return v17 | v16;
}
| js_bigint_asUintN:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV EBP,R9D
MOV R12,R8
MOV R15,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0x20]
CALL 0x001274b4
TEST EAX,EAX
JZ 0x001710c3
LAB_001710a5:
XOR EAX,EAX
XOR ECX,ECX
MOV EBX,0x6
LAB_001710ae:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001710c3:
MOV RDI,R15
CALL 0x0010ffa8
MOV RBX,RDX
CMP EBX,0x6
JZ 0x001710a5
MOV R14,RAX
MOV RDX,qword ptr [R12 + 0x10]
MOV RCX,qword ptr [R12 + 0x18]
CMP ECX,-0x9
JC 0x001710e7
INC dword ptr [RDX]
LAB_001710e7:
LEA RSI,[RSP + 0x50]
MOV RDI,R15
CALL 0x0013efa8
TEST RAX,RAX
JZ 0x00171283
MOV qword ptr [RSP + 0x10],R14
LEA RCX,[R14 + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [R15 + 0x1d0]
LEA R12,[RSP + 0x28]
MOV R13,RAX
MOV RSI,R12
CALL 0x0018685d
MOV ESI,0x1
MOV RDI,R12
CALL 0x001868c8
MOV R14,qword ptr [RSP + 0x20]
MOV RDI,R12
MOV RSI,R14
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x00188872
MOV RDI,R12
MOV RSI,R12
MOV RDX,-0x1
MOV RCX,0x3fffffffffffffff
MOV R8D,0x1
CALL 0x00188d9b
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],R13
MOV RSI,R13
MOV RDX,R12
CALL 0x0018a443
TEST EBP,EBP
SETZ AL
TEST R14,R14
SETZ CL
OR CL,AL
JNZ 0x0017121e
LEA R12,[RSP + 0x28]
MOV ESI,0x1
MOV RDI,R12
CALL 0x001868c8
LEA RSI,[R14 + -0x1]
MOV RDI,R12
MOV RDX,0x3fffffffffffffff
MOV ECX,0x1
CALL 0x00188872
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R12
CALL 0x00187224
TEST EAX,EAX
JS 0x0017121e
LEA R12,[RSP + 0x28]
MOV ESI,0x1
MOV RDI,R12
CALL 0x001868c8
MOV RDI,R12
MOV RSI,R14
MOV R14,0x3fffffffffffffff
MOV RDX,R14
MOV ECX,0x1
CALL 0x00188872
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RDI
MOV RDX,R12
MOV RCX,R14
MOV R8D,0x1
CALL 0x00188e35
LAB_0017121e:
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x0017123a
MOV RSI,qword ptr [RSP + 0x48]
TEST RSI,RSI
JZ 0x0017123a
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0017123a:
LEA RDX,[RSP + 0x50]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0013ef64
CMP RBX,-0x9
MOV RDX,qword ptr [RSP + 0x10]
JNZ 0x0017126c
XOR EAX,EAX
CMP RAX,qword ptr [RDX + 0x18]
JNO 0x0017126c
CMP dword ptr [RDX + 0x10],0x0
JZ 0x0017126c
MOV dword ptr [RDX + 0x10],0x0
LAB_0017126c:
MOV RAX,-0x100000000
MOV RCX,RDX
AND RCX,RAX
MOV EAX,EDX
JMP 0x001710ae
LAB_00171283:
CMP EBX,-0x9
JC 0x001710a5
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x001710a5
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120d90
JMP 0x001710a5
|
/* WARNING: Removing unreachable block (ram,0x0017125f) */
/* WARNING: Removing unreachable block (ram,0x00171265) */
int1 [16] js_bigint_asUintN(long param_1)
{
int *piVar1;
int8 uVar2;
int iVar3;
ulong uVar4;
long lVar6;
ulong uVar7;
int8 uVar8;
int8 *in_R8;
int in_R9D;
int1 auVar9 [16];
long local_88;
int8 *local_80 [4];
long local_60;
int1 local_58 [40];
int *piVar5;
iVar3 = JS_ToIndex(param_1,&local_88,*in_R8,in_R8[1]);
if (iVar3 == 0) {
auVar9 = JS_NewBigInt(param_1);
uVar8 = auVar9._8_8_;
piVar5 = auVar9._0_8_;
if (auVar9._8_4_ != 6) {
if (0xfffffff6 < (uint)in_R8[3]) {
*(int *)in_R8[2] = *(int *)in_R8[2] + 1;
}
lVar6 = JS_ToBigIntFree(param_1,local_58);
if (lVar6 != 0) {
piVar1 = piVar5 + 2;
bf_init(*(int8 *)(param_1 + 0x1d0),local_80);
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88,0x3fffffffffffffff,1);
bf_add_si(local_80,local_80,0xffffffffffffffff,0x3fffffffffffffff,1);
bf_logic_and(piVar1,lVar6,local_80);
if (local_88 != 0 && in_R9D != 0) {
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88 + -1,0x3fffffffffffffff,1);
iVar3 = bf_cmpu(piVar1,local_80);
if (-1 < iVar3) {
bf_set_ui(local_80,1);
bf_mul_2exp(local_80,local_88,0x3fffffffffffffff,1);
bf_sub(piVar1,piVar1,local_80,0x3fffffffffffffff,1);
}
}
if ((local_80[0] != (int8 *)0x0) && (local_60 != 0)) {
(*(code *)local_80[0][1])(*local_80[0],local_60,0);
}
JS_FreeBigInt(param_1,lVar6,local_58);
uVar7 = (ulong)piVar5 & 0xffffffff00000000;
uVar4 = (ulong)piVar5 & 0xffffffff;
goto LAB_001710ae;
}
if (0xfffffff6 < auVar9._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar3 = *piVar5;
*piVar5 = iVar3 + -1;
if (iVar3 < 2) {
js_free_value_rt(uVar2,piVar5,uVar8);
}
}
}
}
uVar4 = 0;
uVar7 = 0;
uVar8 = 6;
LAB_001710ae:
auVar9._0_8_ = uVar4 | uVar7;
auVar9._8_8_ = uVar8;
return auVar9;
}
| |
52,016 | Session_sysvars_tracker::update(THD*, set_var*) | eloqsql/sql/session_tracker.cc | bool Session_sysvars_tracker::update(THD *thd, set_var *var)
{
vars_list tool_list;
size_t length= 1;
void *copy= var->save_result.string_value.str ?
my_memdup(PSI_INSTRUMENT_ME, var->save_result.string_value.str,
(length= var->save_result.string_value.length + 1),
MYF(MY_WME | MY_THREAD_SPECIFIC)) :
my_strdup(PSI_INSTRUMENT_ME, "",
MYF(MY_WME | MY_THREAD_SPECIFIC));
if (!copy)
return true;
if (tool_list.parse_var_list(thd, var->save_result.string_value, true,
thd->charset()))
{
my_free(copy);
return true;
}
my_free(thd->variables.session_track_system_variables);
thd->variables.session_track_system_variables= static_cast<char*>(copy);
m_parsed= true;
orig_list.copy(&tool_list, thd);
orig_list.construct_var_list(thd->variables.session_track_system_variables,
length);
return false;
} | O0 | cpp | Session_sysvars_tracker::update(THD*, set_var*):
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x90(%rbp)
movq %rsi, -0x98(%rbp)
movq %rdx, -0xa0(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x8e38d0
movq $0x1, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x8e1f0b
movq -0xa0(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
incq %rdx
movq %rdx, -0xa8(%rbp)
xorl %edi, %edi
movl $0x10010, %ecx # imm = 0x10010
callq 0x13246d0
movq %rax, -0xe0(%rbp)
jmp 0x8e1efb
movq -0xe0(%rbp), %rax
movq %rax, -0xe8(%rbp)
jmp 0x8e1f37
leaq 0xb62f41(%rip), %rsi # 0x1444e53
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0x1324730
movq %rax, -0xf0(%rbp)
jmp 0x8e1f27
movq -0xf0(%rbp), %rax
movq %rax, -0xe8(%rbp)
jmp 0x8e1f37
movq -0xe8(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
jne 0x8e1f85
movb $0x1, -0x81(%rbp)
movl $0x1, -0xc0(%rbp)
jmp 0x8e20a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x8e38f0
jmp 0x8e20db
movq -0x98(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xa0(%rbp), %rax
movups 0x20(%rax), %xmm0
movaps %xmm0, -0xd0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x861e10
movq %rax, -0xf8(%rbp)
jmp 0x8e1fba
movq -0xf8(%rbp), %r9
movq -0x100(%rbp), %rsi
movq -0xd0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movl $0x1, %r8d
callq 0x8e1690
movb %al, -0x101(%rbp)
jmp 0x8e1fed
movb -0x101(%rbp), %al
testb $0x1, %al
jne 0x8e1ff9
jmp 0x8e201d
movq -0xb0(%rbp), %rdi
callq 0x1324630
jmp 0x8e2007
movb $0x1, -0x81(%rbp)
movl $0x1, -0xc0(%rbp)
jmp 0x8e20a3
movq -0x98(%rbp), %rax
movq 0xc18(%rax), %rdi
callq 0x1324630
jmp 0x8e2032
movq -0xd8(%rbp), %rdi
movq -0xb0(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, 0xc18(%rax)
movb $0x1, 0x88(%rdi)
addq $0x10, %rdi
movq -0x98(%rbp), %rdx
leaq -0x80(%rbp), %rsi
callq 0x8e1580
jmp 0x8e206b
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
movq -0x98(%rbp), %rax
movq 0xc18(%rax), %rsi
movq -0xa8(%rbp), %rdx
callq 0x8e19c0
jmp 0x8e2092
movb $0x0, -0x81(%rbp)
movl $0x1, -0xc0(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x8e38f0
movb -0x81(%rbp), %al
movb %al, -0x102(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8e2107
movb -0x102(%rbp), %al
andb $0x1, %al
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
movq -0xb8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8e2107
movq -0x110(%rbp), %rdi
callq 0x775a20
callq 0x7754c0
nopl (%rax)
| _ZN23Session_sysvars_tracker6updateEP3THDP7set_var:
push rbp
mov rbp, rsp
sub rsp, 110h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_90], rdi
mov [rbp+var_98], rsi
mov [rbp+var_A0], rdx
mov rax, [rbp+var_90]
mov [rbp+var_D8], rax
lea rdi, [rbp+var_80]; this
call _ZN23Session_sysvars_tracker9vars_listC2Ev; Session_sysvars_tracker::vars_list::vars_list(void)
mov [rbp+var_A8], 1
mov rax, [rbp+var_A0]
cmp qword ptr [rax+20h], 0
jz short loc_8E1F0B
mov rax, [rbp+var_A0]
mov rsi, [rax+20h]
mov rdx, [rax+28h]
inc rdx
mov [rbp+var_A8], rdx
xor edi, edi
mov ecx, 10010h
call my_memdup
mov [rbp+var_E0], rax
jmp short $+2
loc_8E1EFB:
mov rax, [rbp+var_E0]
mov [rbp+var_E8], rax
jmp short loc_8E1F37
loc_8E1F0B:
lea rsi, byte_1444E53
xor edi, edi
mov edx, 10010h
call my_strdup
mov [rbp+var_F0], rax
jmp short $+2
loc_8E1F27:
mov rax, [rbp+var_F0]
mov [rbp+var_E8], rax
jmp short $+2
loc_8E1F37:
mov rax, [rbp+var_E8]
mov [rbp+var_B0], rax
cmp [rbp+var_B0], 0
jnz short loc_8E1F85
mov [rbp+var_81], 1
mov [rbp+var_C0], 1
jmp loc_8E20A3
mov rcx, rax
mov eax, edx
mov [rbp+var_B8], rcx
mov [rbp+var_BC], eax
lea rdi, [rbp+var_80]; this
call _ZN23Session_sysvars_tracker9vars_listD2Ev; Session_sysvars_tracker::vars_list::~vars_list()
jmp loc_8E20DB
loc_8E1F85:
mov rax, [rbp+var_98]
mov [rbp+var_100], rax
mov rax, [rbp+var_A0]
movups xmm0, xmmword ptr [rax+20h]
movaps [rbp+var_D0], xmm0
mov rdi, [rbp+var_98]; this
call _ZNK3THD7charsetEv; THD::charset(void)
mov [rbp+var_F8], rax
jmp short $+2
loc_8E1FBA:
mov r9, [rbp+var_F8]
mov rsi, [rbp+var_100]
mov rdx, qword ptr [rbp+var_D0]
mov rcx, qword ptr [rbp+var_D0+8]
lea rdi, [rbp+var_80]
mov r8d, 1
call _ZN23Session_sysvars_tracker9vars_list14parse_var_listEP3THD19st_mysql_lex_stringbPK15charset_info_st; Session_sysvars_tracker::vars_list::parse_var_list(THD *,st_mysql_lex_string,bool,charset_info_st const*)
mov [rbp+var_101], al
jmp short $+2
loc_8E1FED:
mov al, [rbp+var_101]
test al, 1
jnz short loc_8E1FF9
jmp short loc_8E201D
loc_8E1FF9:
mov rdi, [rbp+var_B0]
call my_free
jmp short $+2
loc_8E2007:
mov [rbp+var_81], 1
mov [rbp+var_C0], 1
jmp loc_8E20A3
loc_8E201D:
mov rax, [rbp+var_98]
mov rdi, [rax+0C18h]
call my_free
jmp short $+2
loc_8E2032:
mov rdi, [rbp+var_D8]
mov rcx, [rbp+var_B0]
mov rax, [rbp+var_98]
mov [rax+0C18h], rcx
mov byte ptr [rdi+88h], 1
add rdi, 10h; this
mov rdx, [rbp+var_98]; THD *
lea rsi, [rbp+var_80]; Session_sysvars_tracker::vars_list *
call _ZN23Session_sysvars_tracker9vars_list4copyEPS0_P3THD; Session_sysvars_tracker::vars_list::copy(Session_sysvars_tracker::vars_list*,THD *)
jmp short $+2
loc_8E206B:
mov rdi, [rbp+var_D8]
add rdi, 10h; this
mov rax, [rbp+var_98]
mov rsi, [rax+0C18h]; char *
mov rdx, [rbp+var_A8]; unsigned __int64
call _ZN23Session_sysvars_tracker9vars_list18construct_var_listEPcm; Session_sysvars_tracker::vars_list::construct_var_list(char *,ulong)
jmp short $+2
loc_8E2092:
mov [rbp+var_81], 0
mov [rbp+var_C0], 1
loc_8E20A3:
lea rdi, [rbp+var_80]; this
call _ZN23Session_sysvars_tracker9vars_listD2Ev; Session_sysvars_tracker::vars_list::~vars_list()
mov al, [rbp+var_81]
mov [rbp+var_102], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8E2107
mov al, [rbp+var_102]
and al, 1
add rsp, 110h
pop rbp
retn
loc_8E20DB:
mov rax, [rbp+var_B8]
mov [rbp+var_110], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8E2107
mov rdi, [rbp+var_110]
call __Unwind_Resume
loc_8E2107:
call ___stack_chk_fail
| char Session_sysvars_tracker::update(Session_sysvars_tracker *this, char **a2, set_var *a3)
{
long long v4; // [rsp+18h] [rbp-F8h]
long long v5; // [rsp+28h] [rbp-E8h]
__int128 v6; // [rsp+40h] [rbp-D0h]
long long v7; // [rsp+68h] [rbp-A8h]
char v9; // [rsp+8Fh] [rbp-81h]
_BYTE v10[120]; // [rsp+90h] [rbp-80h] BYREF
unsigned long long v11; // [rsp+108h] [rbp-8h]
v11 = __readfsqword(0x28u);
Session_sysvars_tracker::vars_list::vars_list((Session_sysvars_tracker::vars_list *)v10);
v7 = 1LL;
if ( *((_QWORD *)a3 + 4) )
{
v7 = *((_QWORD *)a3 + 5) + 1LL;
v5 = my_memdup(0LL, *((_QWORD *)a3 + 4), v7, 65552LL);
}
else
{
v5 = my_strdup(0LL, &byte_1444E53, 65552LL);
}
if ( v5 )
{
v6 = *((_OWORD *)a3 + 2);
v4 = THD::charset((THD *)a2);
if ( (Session_sysvars_tracker::vars_list::parse_var_list(
(Session_sysvars_tracker::vars_list *)v10,
(THD *)a2,
(char *)v6,
*((unsigned long long *)&v6 + 1),
1,
v4) & 1) != 0 )
{
my_free(v5);
v9 = 1;
}
else
{
my_free(a2[387]);
a2[387] = (char *)v5;
*((_BYTE *)this + 136) = 1;
Session_sysvars_tracker::vars_list::copy(
(Session_sysvars_tracker *)((char *)this + 16),
(Session_sysvars_tracker::vars_list *)v10,
(THD *)a2);
Session_sysvars_tracker::vars_list::construct_var_list(
(Session_sysvars_tracker *)((char *)this + 16),
a2[387],
v7);
v9 = 0;
}
}
else
{
v9 = 1;
}
Session_sysvars_tracker::vars_list::~vars_list((Session_sysvars_tracker::vars_list *)v10);
return v9 & 1;
}
| __cxx_global_var_init.1:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x271527c]
MOV ESI,0x1
CALL 0x008fd530
POP RBP
RET
|
void __cxx_global_var_init_1(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_FUZZY_DATES,1);
return;
}
| |
52,017 | 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>::operator++() | monkey531[P]llama/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++():
movq (%rdi), %rax
testq %rax, %rax
je 0x8f6e3
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x8f6d4
cmpl $0x1, %eax
jne 0x8f6db
addq $0x30, 0x8(%rdi)
jmp 0x8f6df
addq $0x10, 0x10(%rdi)
jmp 0x8f6df
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x5e9ce(%rip), %rdi # 0xee0b9
leaq 0x5ea11(%rip), %rdx # 0xee103
leaq 0x63bc0(%rip), %rcx # 0xf32b9
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x1c0c0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
mov rax, [rdi]
test rax, rax
jz short loc_8F6E3
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_8F6D4
cmp eax, 1
jnz short loc_8F6DB
add qword ptr [rdi+8], 30h ; '0'
jmp short loc_8F6DF
loc_8F6D4:
add qword ptr [rdi+10h], 10h
jmp short loc_8F6DF
loc_8F6DB:
inc qword ptr [rdi+18h]
loc_8F6DF:
mov rax, rdi
retn
loc_8F6E3:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
a1[1] += 48;
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
| operator++:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0018f6e3
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x0018f6d4
CMP EAX,0x1
JNZ 0x0018f6db
ADD qword ptr [RDI + 0x8],0x30
JMP 0x0018f6df
LAB_0018f6d4:
ADD qword ptr [RDI + 0x10],0x10
JMP 0x0018f6df
LAB_0018f6db:
INC qword ptr [RDI + 0x18]
LAB_0018f6df:
MOV RAX,RDI
RET
LAB_0018f6e3:
PUSH RAX
LEA RDI,[0x1ee0b9]
LEA RDX,[0x1ee103]
LEA RCX,[0x1f32b9]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x0011c0c0
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*this)
{
char cVar1;
int8 in_R8;
int8 in_R9;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
*(long *)(this + 8) = *(long *)(this + 8) + 0x30;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0);
}
| |
52,018 | bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long) | monkey531[P]llama/common/json.hpp | bool operator==(const_reference lhs, ScalarType rhs) noexcept
{
return lhs == basic_json(rhs);
} | O3 | cpp | bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x919c4
movq %r14, %rdi
movl $0x1, %esi
callq 0x89876
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb1348
movl %eax, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x89876
movq %r14, %rdi
callq 0x8eb30
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
mov r14, rsp
movaps xmmword ptr [r14], xmm0
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov ebx, eax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov eax, ebx
add rsp, 18h
pop rbx
pop r14
retn
| long long ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_(
unsigned __int8 *a1,
long long a2)
{
unsigned int v2; // ebx
_OWORD v4[2]; // [rsp+0h] [rbp-28h] BYREF
v4[0] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)v4,
a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v4);
v2 = nlohmann::json_abi_v3_11_3::operator==(a1, (unsigned __int8 *)v4, (__m128d)0LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v4);
return v2;
}
| _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
MOV R14,RSP
MOVAPS xmmword ptr [R14],XMM0
MOV RDI,R14
CALL 0x001919c4
MOV RDI,R14
MOV ESI,0x1
CALL 0x00189876
MOV RDI,RBX
MOV RSI,R14
CALL 0x001b1348
MOV EBX,EAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00189876
MOV RDI,R14
CALL 0x0018eb30
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
int4
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
(basic_json *param_1)
{
int4 uVar1;
int8 local_28;
int8 uStack_20;
local_28 = 0;
uStack_20 = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
uVar1 = nlohmann::json_abi_v3_11_3::operator==(param_1,(basic_json *)&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_28);
return uVar1;
}
| |
52,019 | ftxui::(anonymous namespace)::InputBase::HandleArrowUp() | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/input.cpp | bool HandleArrowUp() {
if (cursor_position() == 0) {
return false;
}
const size_t columns = CursorColumn();
// Move cursor at the beginning of 2 lines above.
while (true) {
if (cursor_position() == 0) {
return true;
}
const size_t previous = GlyphPrevious(content(), cursor_position());
if (content()[previous] == '\n') {
break;
}
cursor_position() = previous;
}
cursor_position() = GlyphPrevious(content(), cursor_position());
while (true) {
if (cursor_position() == 0) {
break;
}
const size_t previous = GlyphPrevious(content(), cursor_position());
if (content()[previous] == '\n') {
break;
}
cursor_position() = previous;
}
MoveCursorColumn(columns);
return true;
} | O3 | cpp | ftxui::(anonymous namespace)::InputBase::HandleArrowUp():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xf8(%rdi), %r14
movq %r14, %rdi
callq 0x2c5ba
movl (%rax), %ebp
testl %ebp, %ebp
je 0x2b9b7
movq %rbx, %rdi
callq 0x2bd08
movq %rax, %r15
movq %r14, %rdi
callq 0x2c5ba
cmpl $0x0, (%rax)
je 0x2b9b7
leaq 0x28(%rbx), %r12
movq %r12, %rdi
callq 0x2c188
movq %rax, %r13
movq %r14, %rdi
callq 0x2c5ba
movslq (%rax), %rsi
movq %r13, %rdi
callq 0x3ab2e
movq %rax, %r13
movq %r12, %rdi
callq 0x2c188
movq (%rax), %rax
cmpb $0xa, (%rax,%r13)
je 0x2b940
movq %r14, %rdi
callq 0x2c5ba
movl %r13d, (%rax)
movq %r14, %rdi
callq 0x2c5ba
cmpl $0x0, (%rax)
jne 0x2b8f3
jmp 0x2b9b7
movq %r12, %rdi
callq 0x2c188
movq %rax, %r13
movq %r14, %rdi
callq 0x2c5ba
movslq (%rax), %rsi
movq %r13, %rdi
callq 0x3ab2e
movq %rax, %r13
movq %r14, %rdi
callq 0x2c5ba
movl %r13d, (%rax)
movq %r14, %rdi
callq 0x2c5ba
cmpl $0x0, (%rax)
je 0x2b9ac
movq %r12, %rdi
callq 0x2c188
movq %rax, %r13
movq %r14, %rdi
callq 0x2c5ba
movslq (%rax), %rsi
movq %r13, %rdi
callq 0x3ab2e
movq %rax, %r13
movq %r12, %rdi
callq 0x2c188
movq (%rax), %rax
cmpb $0xa, (%rax,%r13)
jne 0x2b961
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2bd78
testl %ebp, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN5ftxui12_GLOBAL__N_19InputBase13HandleArrowUpEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea r14, [rdi+0F8h]
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
mov ebp, [rax]
test ebp, ebp
jz loc_2B9B7
mov rdi, rbx; this
call _ZN5ftxui12_GLOBAL__N_19InputBase12CursorColumnEv; ftxui::`anonymous namespace'::InputBase::CursorColumn(void)
mov r15, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
cmp dword ptr [rax], 0
jz loc_2B9B7
lea r12, [rbx+28h]
loc_2B8F3:
mov rdi, r12
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov r13, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
movsxd rsi, dword ptr [rax]
mov rdi, r13
call _ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphPrevious(std::string const&,ulong)
mov r13, rax
mov rdi, r12
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov rax, [rax]
cmp byte ptr [rax+r13], 0Ah
jz short loc_2B940
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
mov [rax], r13d
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
cmp dword ptr [rax], 0
jnz short loc_2B8F3
jmp short loc_2B9B7
loc_2B940:
mov rdi, r12
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov r13, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
movsxd rsi, dword ptr [rax]
mov rdi, r13
call _ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphPrevious(std::string const&,ulong)
mov r13, rax
loc_2B961:
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
mov [rax], r13d
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
cmp dword ptr [rax], 0
jz short loc_2B9AC
mov rdi, r12
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov r13, rax
mov rdi, r14
call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void)
movsxd rsi, dword ptr [rax]
mov rdi, r13
call _ZN5ftxui13GlyphPreviousERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphPrevious(std::string const&,ulong)
mov r13, rax
mov rdi, r12
call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void)
mov rax, [rax]
cmp byte ptr [rax+r13], 0Ah
jnz short loc_2B961
loc_2B9AC:
mov rdi, rbx; this
mov esi, r15d; int
call _ZN5ftxui12_GLOBAL__N_19InputBase16MoveCursorColumnEi; ftxui::`anonymous namespace'::InputBase::MoveCursorColumn(int)
loc_2B9B7:
test ebp, ebp
setnz al
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool ftxui::`anonymous namespace'::InputBase::HandleArrowUp(ftxui::_anonymous_namespace_::InputBase *this)
{
char *v1; // r14
int v2; // ebp
int v3; // r15d
long long v4; // r13
int *v5; // rax
long long v6; // r13
int *v7; // rax
long long v8; // r13
long long v9; // r13
int *v10; // rax
v1 = (char *)this + 248;
v2 = *(_DWORD *)ftxui::Ref<int>::Address((char *)this + 248);
if ( v2 )
{
v3 = ftxui::`anonymous namespace'::InputBase::CursorColumn(this);
if ( *(_DWORD *)ftxui::Ref<int>::Address(v1) )
{
while ( 1 )
{
v4 = ftxui::Ref<std::string>::Address((char *)this + 40);
v5 = (int *)ftxui::Ref<int>::Address(v1);
v6 = ftxui::GlyphPrevious(v4, *v5);
if ( *(_BYTE *)(*(_QWORD *)ftxui::Ref<std::string>::Address((char *)this + 40) + v6) == 10 )
break;
*(_DWORD *)ftxui::Ref<int>::Address(v1) = v6;
if ( !*(_DWORD *)ftxui::Ref<int>::Address(v1) )
return v2 != 0;
}
v8 = ftxui::Ref<std::string>::Address((char *)this + 40);
v7 = (int *)ftxui::Ref<int>::Address(v1);
LODWORD(v8) = ftxui::GlyphPrevious(v8, *v7);
do
{
*(_DWORD *)ftxui::Ref<int>::Address(v1) = v8;
if ( !*(_DWORD *)ftxui::Ref<int>::Address(v1) )
break;
v9 = ftxui::Ref<std::string>::Address((char *)this + 40);
v10 = (int *)ftxui::Ref<int>::Address(v1);
v8 = ftxui::GlyphPrevious(v9, *v10);
}
while ( *(_BYTE *)(*(_QWORD *)ftxui::Ref<std::string>::Address((char *)this + 40) + v8) != 10 );
ftxui::`anonymous namespace'::InputBase::MoveCursorColumn(this, v3);
}
}
return v2 != 0;
}
| HandleArrowUp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[RDI + 0xf8]
MOV RDI,R14
CALL 0x0012c5ba
MOV EBP,dword ptr [RAX]
TEST EBP,EBP
JZ 0x0012b9b7
MOV RDI,RBX
CALL 0x0012bd08
MOV R15,RAX
MOV RDI,R14
CALL 0x0012c5ba
CMP dword ptr [RAX],0x0
JZ 0x0012b9b7
LEA R12,[RBX + 0x28]
LAB_0012b8f3:
MOV RDI,R12
CALL 0x0012c188
MOV R13,RAX
MOV RDI,R14
CALL 0x0012c5ba
MOVSXD RSI,dword ptr [RAX]
MOV RDI,R13
CALL 0x0013ab2e
MOV R13,RAX
MOV RDI,R12
CALL 0x0012c188
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + R13*0x1],0xa
JZ 0x0012b940
MOV RDI,R14
CALL 0x0012c5ba
MOV dword ptr [RAX],R13D
MOV RDI,R14
CALL 0x0012c5ba
CMP dword ptr [RAX],0x0
JNZ 0x0012b8f3
JMP 0x0012b9b7
LAB_0012b940:
MOV RDI,R12
CALL 0x0012c188
MOV R13,RAX
MOV RDI,R14
CALL 0x0012c5ba
MOVSXD RSI,dword ptr [RAX]
MOV RDI,R13
CALL 0x0013ab2e
MOV R13,RAX
LAB_0012b961:
MOV RDI,R14
CALL 0x0012c5ba
MOV dword ptr [RAX],R13D
MOV RDI,R14
CALL 0x0012c5ba
CMP dword ptr [RAX],0x0
JZ 0x0012b9ac
MOV RDI,R12
CALL 0x0012c188
MOV R13,RAX
MOV RDI,R14
CALL 0x0012c5ba
MOVSXD RSI,dword ptr [RAX]
MOV RDI,R13
CALL 0x0013ab2e
MOV R13,RAX
MOV RDI,R12
CALL 0x0012c188
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + R13*0x1],0xa
JNZ 0x0012b961
LAB_0012b9ac:
MOV RDI,RBX
MOV ESI,R15D
CALL 0x0012bd78
LAB_0012b9b7:
TEST EBP,EBP
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::(anonymous namespace)::InputBase::HandleArrowUp() */
bool __thiscall ftxui::(anonymous_namespace)::InputBase::HandleArrowUp(InputBase *this)
{
Ref<std::__cxx11::string> *this_00;
Ref<int> *this_01;
int iVar1;
int iVar2;
int *piVar3;
string *psVar4;
long lVar5;
long *plVar6;
int4 *puVar7;
this_01 = (Ref<int> *)(this + 0xf8);
piVar3 = (int *)Ref<int>::Address(this_01);
iVar1 = *piVar3;
if (iVar1 != 0) {
iVar2 = CursorColumn(this);
piVar3 = (int *)Ref<int>::Address(this_01);
if (*piVar3 != 0) {
this_00 = (Ref<std::__cxx11::string> *)(this + 0x28);
do {
psVar4 = (string *)Ref<std::__cxx11::string>::Address(this_00);
piVar3 = (int *)Ref<int>::Address(this_01);
lVar5 = GlyphPrevious(psVar4,(long)*piVar3);
plVar6 = (long *)Ref<std::__cxx11::string>::Address(this_00);
if (*(char *)(*plVar6 + lVar5) == '\n') {
psVar4 = (string *)Ref<std::__cxx11::string>::Address(this_00);
piVar3 = (int *)Ref<int>::Address(this_01);
lVar5 = GlyphPrevious(psVar4,(long)*piVar3);
goto LAB_0012b961;
}
puVar7 = (int4 *)Ref<int>::Address(this_01);
*puVar7 = (int)lVar5;
piVar3 = (int *)Ref<int>::Address(this_01);
} while (*piVar3 != 0);
}
}
goto LAB_0012b9b7;
while( true ) {
psVar4 = (string *)Ref<std::__cxx11::string>::Address(this_00);
piVar3 = (int *)Ref<int>::Address(this_01);
lVar5 = GlyphPrevious(psVar4,(long)*piVar3);
plVar6 = (long *)Ref<std::__cxx11::string>::Address(this_00);
if (*(char *)(*plVar6 + lVar5) == '\n') break;
LAB_0012b961:
puVar7 = (int4 *)Ref<int>::Address(this_01);
*puVar7 = (int)lVar5;
piVar3 = (int *)Ref<int>::Address(this_01);
if (*piVar3 == 0) break;
}
MoveCursorColumn(this,iVar2);
LAB_0012b9b7:
return iVar1 != 0;
}
| |
52,020 | ftxui::(anonymous namespace)::BorderPixel::Render(ftxui::Screen&) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/border.cpp | void Render(Screen& screen) override {
// Draw content.
children_[0]->Render(screen);
// Draw the border.
if (box_.x_min >= box_.x_max || box_.y_min >= box_.y_max) {
return;
}
screen.PixelAt(box_.x_min, box_.y_min) = pixel_;
screen.PixelAt(box_.x_max, box_.y_min) = pixel_;
screen.PixelAt(box_.x_min, box_.y_max) = pixel_;
screen.PixelAt(box_.x_max, box_.y_max) = pixel_;
for (int x = box_.x_min + 1; x < box_.x_max; ++x) {
screen.PixelAt(x, box_.y_min) = pixel_;
screen.PixelAt(x, box_.y_max) = pixel_;
}
for (int y = box_.y_min + 1; y < box_.y_max; ++y) {
screen.PixelAt(box_.x_min, y) = pixel_;
screen.PixelAt(box_.x_max, y) = pixel_;
}
} | O2 | cpp | ftxui::(anonymous namespace)::BorderPixel::Render(ftxui::Screen&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl 0x4c(%r14), %esi
cmpl 0x50(%r14), %esi
jge 0x1d4ac
movl 0x54(%r14), %edx
cmpl 0x58(%r14), %edx
jge 0x1d4ac
leaq 0x60(%r14), %r15
movq %rbx, %rdi
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
movl 0x50(%r14), %esi
movl 0x54(%r14), %edx
movq %rbx, %rdi
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
movl 0x4c(%r14), %esi
movl 0x58(%r14), %edx
movq %rbx, %rdi
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
movl 0x50(%r14), %esi
movl 0x58(%r14), %edx
movq %rbx, %rdi
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
movl 0x4c(%r14), %r12d
incl %r12d
movl 0x54(%r14), %ebp
cmpl 0x50(%r14), %r12d
jge 0x1d4a4
movq %rbx, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
movl 0x58(%r14), %edx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
jmp 0x1d431
movl 0x4c(%r14), %esi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
movl 0x50(%r14), %esi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x303fa
movq %rax, %rdi
movq %r15, %rsi
callq 0x1da5e
incl %ebp
cmpl 0x58(%r14), %ebp
jl 0x1d472
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN5ftxui12_GLOBAL__N_111BorderPixel6RenderERNS_6ScreenE:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi+8]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+20h]
mov esi, [r14+4Ch]; int
cmp esi, [r14+50h]
jge loc_1D4AC
mov edx, [r14+54h]; int
cmp edx, [r14+58h]
jge loc_1D4AC
lea r15, [r14+60h]
mov rdi, rbx; this
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
mov esi, [r14+50h]; int
mov edx, [r14+54h]; int
mov rdi, rbx; this
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
mov esi, [r14+4Ch]; int
mov edx, [r14+58h]; int
mov rdi, rbx; this
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
mov esi, [r14+50h]; int
mov edx, [r14+58h]; int
mov rdi, rbx; this
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
mov r12d, [r14+4Ch]
loc_1D431:
inc r12d
mov ebp, [r14+54h]
cmp r12d, [r14+50h]
jge short loc_1D4A4
mov rdi, rbx; this
mov esi, r12d; int
mov edx, ebp; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
mov edx, [r14+58h]; int
mov rdi, rbx; this
mov esi, r12d; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
jmp short loc_1D431
loc_1D472:
mov esi, [r14+4Ch]; int
mov rdi, rbx; this
mov edx, ebp; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
mov esi, [r14+50h]; int
mov rdi, rbx; this
mov edx, ebp; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov rdi, rax
mov rsi, r15
call _ZN5ftxui5PixelaSERKS0_; ftxui::Pixel::operator=(ftxui::Pixel const&)
loc_1D4A4:
inc ebp
cmp ebp, [r14+58h]
jl short loc_1D472
loc_1D4AC:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ftxui::`anonymous namespace'::BorderPixel::Render(
ftxui::_anonymous_namespace_::BorderPixel *this,
ftxui::Screen *a2)
{
long long result; // rax
int v4; // esi
int v5; // edx
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
int v10; // r12d
int v11; // ebp
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long v15; // rax
result = (*(long long ( **)(_QWORD))(***((_QWORD ***)this + 1) + 32LL))(**((_QWORD **)this + 1));
v4 = *((_DWORD *)this + 19);
if ( v4 < *((_DWORD *)this + 20) )
{
v5 = *((_DWORD *)this + 21);
if ( v5 < *((_DWORD *)this + 22) )
{
v6 = ftxui::Screen::PixelAt(a2, v4, v5);
ftxui::Pixel::operator=(v6, (char *)this + 96);
v7 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), *((_DWORD *)this + 21));
ftxui::Pixel::operator=(v7, (char *)this + 96);
v8 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 19), *((_DWORD *)this + 22));
ftxui::Pixel::operator=(v8, (char *)this + 96);
v9 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), *((_DWORD *)this + 22));
result = ftxui::Pixel::operator=(v9, (char *)this + 96);
v10 = *((_DWORD *)this + 19);
while ( 1 )
{
++v10;
v11 = *((_DWORD *)this + 21);
if ( v10 >= *((_DWORD *)this + 20) )
break;
v12 = ftxui::Screen::PixelAt(a2, v10, v11);
ftxui::Pixel::operator=(v12, (char *)this + 96);
v13 = ftxui::Screen::PixelAt(a2, v10, *((_DWORD *)this + 22));
result = ftxui::Pixel::operator=(v13, (char *)this + 96);
}
while ( ++v11 < *((_DWORD *)this + 22) )
{
v14 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 19), v11);
ftxui::Pixel::operator=(v14, (char *)this + 96);
v15 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), v11);
result = ftxui::Pixel::operator=(v15, (char *)this + 96);
}
}
}
return result;
}
| Render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
MOV ESI,dword ptr [R14 + 0x4c]
CMP ESI,dword ptr [R14 + 0x50]
JGE 0x0011d4ac
MOV EDX,dword ptr [R14 + 0x54]
CMP EDX,dword ptr [R14 + 0x58]
JGE 0x0011d4ac
LEA R15,[R14 + 0x60]
MOV RDI,RBX
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
MOV ESI,dword ptr [R14 + 0x50]
MOV EDX,dword ptr [R14 + 0x54]
MOV RDI,RBX
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
MOV ESI,dword ptr [R14 + 0x4c]
MOV EDX,dword ptr [R14 + 0x58]
MOV RDI,RBX
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
MOV ESI,dword ptr [R14 + 0x50]
MOV EDX,dword ptr [R14 + 0x58]
MOV RDI,RBX
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
MOV R12D,dword ptr [R14 + 0x4c]
LAB_0011d431:
INC R12D
MOV EBP,dword ptr [R14 + 0x54]
CMP R12D,dword ptr [R14 + 0x50]
JGE 0x0011d4a4
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,EBP
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
MOV EDX,dword ptr [R14 + 0x58]
MOV RDI,RBX
MOV ESI,R12D
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
JMP 0x0011d431
LAB_0011d472:
MOV ESI,dword ptr [R14 + 0x4c]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
MOV ESI,dword ptr [R14 + 0x50]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x001303fa
MOV RDI,RAX
MOV RSI,R15
CALL 0x0011da5e
LAB_0011d4a4:
INC EBP
CMP EBP,dword ptr [R14 + 0x58]
JL 0x0011d472
LAB_0011d4ac:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* ftxui::(anonymous namespace)::BorderPixel::Render(ftxui::Screen&) */
void __thiscall ftxui::(anonymous_namespace)::BorderPixel::Render(BorderPixel *this,Screen *param_1)
{
Pixel *pPVar1;
Pixel *pPVar2;
int iVar3;
int iVar4;
(**(code **)(*(long *)**(int8 **)(this + 8) + 0x20))();
if ((*(int *)(this + 0x4c) < *(int *)(this + 0x50)) &&
(*(int *)(this + 0x54) < *(int *)(this + 0x58))) {
pPVar1 = (Pixel *)(this + 0x60);
pPVar2 = (Pixel *)Screen::PixelAt(param_1,*(int *)(this + 0x4c),*(int *)(this + 0x54));
Pixel::operator=(pPVar2,pPVar1);
pPVar2 = (Pixel *)Screen::PixelAt(param_1,*(int *)(this + 0x50),*(int *)(this + 0x54));
Pixel::operator=(pPVar2,pPVar1);
pPVar2 = (Pixel *)Screen::PixelAt(param_1,*(int *)(this + 0x4c),*(int *)(this + 0x58));
Pixel::operator=(pPVar2,pPVar1);
pPVar2 = (Pixel *)Screen::PixelAt(param_1,*(int *)(this + 0x50),*(int *)(this + 0x58));
Pixel::operator=(pPVar2,pPVar1);
iVar4 = *(int *)(this + 0x4c);
while( true ) {
iVar4 = iVar4 + 1;
iVar3 = *(int *)(this + 0x54);
if (*(int *)(this + 0x50) <= iVar4) break;
pPVar2 = (Pixel *)Screen::PixelAt(param_1,iVar4,iVar3);
Pixel::operator=(pPVar2,pPVar1);
pPVar2 = (Pixel *)Screen::PixelAt(param_1,iVar4,*(int *)(this + 0x58));
Pixel::operator=(pPVar2,pPVar1);
}
while (iVar3 = iVar3 + 1, iVar3 < *(int *)(this + 0x58)) {
pPVar2 = (Pixel *)Screen::PixelAt(param_1,*(int *)(this + 0x4c),iVar3);
Pixel::operator=(pPVar2,pPVar1);
pPVar2 = (Pixel *)Screen::PixelAt(param_1,*(int *)(this + 0x50),iVar3);
Pixel::operator=(pPVar2,pPVar1);
}
}
return;
}
| |
52,021 | coro::mutex::lock_operation::await_ready() const | AlayaLite/build_O0/_deps/libcoro-src/src/mutex.cpp | auto mutex::lock_operation::await_ready() const noexcept -> bool
{
if (m_mutex.try_lock())
{
// Since there is no mutex acquired, insert a memory fence to act like it.
std::atomic_thread_fence(std::memory_order::acquire);
return true;
}
return false;
} | O0 | cpp | coro::mutex::lock_operation::await_ready() const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
callq 0xf0360
movb %al, 0x17(%rsp)
jmp 0xf02fc
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xf0306
jmp 0xf0345
movl $0x2, 0x24(%rsp)
movl 0x24(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x4, %eax
ja 0xf033e
movq 0x8(%rsp), %rax
leaq 0x63120(%rip), %rcx # 0x15344c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xf033e
jmp 0xf033e
jmp 0xf033e
mfence
movb $0x1, 0x23(%rsp)
jmp 0xf034a
movb $0x0, 0x23(%rsp)
movb 0x23(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
movq %rax, %rdi
callq 0x1f240
nopl (%rax)
| _ZNK4coro5mutex14lock_operation11await_readyEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov rdi, [rax]; this
call _ZN4coro5mutex8try_lockEv; coro::mutex::try_lock(void)
mov [rsp+28h+var_11], al
jmp short $+2
loc_F02FC:
mov al, [rsp+28h+var_11]
test al, 1
jnz short loc_F0306
jmp short loc_F0345
loc_F0306:
mov [rsp+28h+var_4], 2
mov eax, [rsp+28h+var_4]
dec eax; switch 5 cases
mov ecx, eax
mov [rsp+28h+var_20], rcx
sub eax, 4
ja short def_F0333; jumptable 00000000000F0333 default case
mov rax, [rsp+28h+var_20]
lea rcx, jpt_F0333
movsxd rax, ds:(jpt_F0333 - 15344Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_F0335:
jmp short def_F0333; jumptable 00000000000F0333 cases 1,2
loc_F0337:
jmp short def_F0333; jumptable 00000000000F0333 case 3
loc_F0339:
jmp short def_F0333; jumptable 00000000000F0333 case 4
loc_F033B:
mfence; jumptable 00000000000F0333 case 5
def_F0333:
mov [rsp+28h+var_5], 1; jumptable 00000000000F0333 default case
jmp short loc_F034A
loc_F0345:
mov [rsp+28h+var_5], 0
loc_F034A:
mov al, [rsp+28h+var_5]
and al, 1
add rsp, 28h
retn
mov rdi, rax
call __clang_call_terminate
| bool coro::mutex::lock_operation::await_ready(coro::mutex **this)
{
return (coro::mutex::try_lock(*this) & 1) != 0;
}
| await_ready:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX]
LAB_001f02f1:
CALL 0x001f0360
MOV byte ptr [RSP + 0x17],AL
JMP 0x001f02fc
LAB_001f02fc:
MOV AL,byte ptr [RSP + 0x17]
TEST AL,0x1
JNZ 0x001f0306
JMP 0x001f0345
LAB_001f0306:
MOV dword ptr [RSP + 0x24],0x2
MOV EAX,dword ptr [RSP + 0x24]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RSP + 0x8],RCX
SUB EAX,0x4
JA 0x001f033e
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x25344c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_001f033e:
MOV byte ptr [RSP + 0x23],0x1
JMP 0x001f034a
LAB_001f0345:
MOV byte ptr [RSP + 0x23],0x0
LAB_001f034a:
MOV AL,byte ptr [RSP + 0x23]
AND AL,0x1
ADD RSP,0x28
RET
|
/* WARNING: Removing unreachable block (ram,0x001f033e) */
/* coro::mutex::lock_operation::await_ready() const */
ulong __thiscall coro::mutex::lock_operation::await_ready(lock_operation *this)
{
ulong uVar1;
/* try { // try from 001f02f1 to 001f02f5 has its CatchHandler @ 001f0355 */
uVar1 = try_lock(*(mutex **)this);
if ((uVar1 & 1) == 0) {
return uVar1 & 0xffffffffffffff00;
}
/* WARNING: Could not recover jumptable at 0x001f0333. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (*(code *)(&DAT_0025344c + DAT_00253450))();
return uVar1;
}
| |
52,022 | bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) | giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc | Result HandleExceptionsInMethodIfSupported(T* object, Result (T::*method)(),
const char* location) {
// NOTE: The user code can affect the way in which Google Test handles
// exceptions by setting GTEST_FLAG(catch_exceptions), but only before
// RUN_ALL_TESTS() starts. It is technically possible to check the flag
// after the exception is caught and either report or re-throw the
// exception based on the flag's value:
//
// try {
// // Perform the test method.
// } catch (...) {
// if (GTEST_FLAG_GET(catch_exceptions))
// // Report the exception as failure.
// else
// throw; // Re-throws the original exception.
// }
//
// However, the purpose of this flag is to allow the program to drop into
// the debugger when the exception is thrown. On most platforms, once the
// control enters the catch block, the exception origin information is
// lost and the debugger will stop the program at the point of the
// re-throw in this function -- instead of at the point of the original
// throw statement in the code under test. For this reason, we perform
// the check early, sacrificing the ability to affect Google Test's
// exception handling in the method where the exception is thrown.
if (internal::GetUnitTestImpl()->catch_exceptions()) {
#if GTEST_HAS_EXCEPTIONS
try {
return HandleSehExceptionsInMethodIfSupported(object, method, location);
} catch (const AssertionException&) { // NOLINT
// This failure was reported already.
} catch (const internal::GoogleTestFailureException&) { // NOLINT
// This exception type can only be thrown by a failed Google
// Test assertion with the intention of letting another testing
// framework catch it. Therefore we just re-throw it.
throw;
} catch (const std::exception& e) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(e.what(), location));
} catch (...) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(nullptr, location));
}
return static_cast<Result>(0);
#else
return HandleSehExceptionsInMethodIfSupported(object, method, location);
#endif // GTEST_HAS_EXCEPTIONS
} else {
return (object->*method)();
}
} | O0 | cpp | bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movq %rdi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
callq 0x44940
movq %rax, %rdi
callq 0x64230
testb $0x1, %al
jne 0x4c101
jmp 0x4c2bf
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %rdx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x68250
movb %al, -0xb1(%rbp)
jmp 0x4c12e
movb -0xb1(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4c32b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl $0x4, %ecx
cmpl %ecx, %eax
jne 0x4c17a
movq -0x50(%rbp), %rdi
callq 0xa250
movq %rax, -0xb0(%rbp)
callq 0xab70
movb $0x0, -0x1(%rbp)
jmp 0x4c32b
movl -0xb8(%rbp), %eax
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x4c1a3
movq -0x50(%rbp), %rdi
callq 0xa250
movq %rax, -0xa8(%rbp)
callq 0xaa40
jmp 0x4c34a
movl -0xb8(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x4c20a
movq -0x50(%rbp), %rdi
callq 0xa250
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq -0x38(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x42060
jmp 0x4c1e1
movl $0x2, %edi
leaq -0xa0(%rbp), %rsi
callq 0x2ae30
jmp 0x4c1f4
leaq -0xa0(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c171
movq -0x50(%rbp), %rdi
callq 0xa250
movq -0x38(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
leaq -0x78(%rbp), %rdi
callq 0x42060
jmp 0x4c226
movl $0x2, %edi
leaq -0x78(%rbp), %rsi
callq 0x2ae30
jmp 0x4c236
leaq -0x78(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c171
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x4c26c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c273
jmp 0x4c339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x4c29e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0xad98
callq 0xab70
jmp 0x4c2a5
jmp 0x4c339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0xab70
jmp 0x4c2bd
jmp 0x4c339
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x28(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0xc0(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x4c308
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0xd0(%rbp)
jmp 0x4c316
movq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xd0(%rbp), %rax
callq *%rax
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0xac00
movq %rax, %rdi
callq 0x13e20
nopw (%rax,%rax)
| _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_18], rsi
mov [rbp+var_10], rdx
mov rax, [rbp+var_18]
mov rdx, [rbp+var_10]
mov [rbp+var_20], rdi
mov [rbp+var_28], rdx
mov [rbp+var_30], rax
mov [rbp+var_38], rcx
call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void)
mov rdi, rax; this
call _ZNK7testing8internal12UnitTestImpl16catch_exceptionsEv; testing::internal::UnitTestImpl::catch_exceptions(void)
test al, 1
jnz short loc_4C101
jmp loc_4C2BF
loc_4C101:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_30]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_38]
mov [rbp+var_40], rdx
mov [rbp+var_48], rax
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_40]
call _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(testing::internal::UnitTestImpl *,bool (testing::internal::UnitTestImpl::*)(void),char const*)
mov [rbp+var_B1], al
jmp short $+2
loc_4C12E:
mov al, [rbp+var_B1]
and al, 1
mov [rbp+var_1], al
jmp loc_4C32B
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
mov eax, [rbp+var_54]
mov [rbp+var_B8], eax
mov ecx, 4
cmp eax, ecx
jnz short loc_4C17A
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov [rbp+var_B0], rax
call ___cxa_end_catch
loc_4C171:
mov [rbp+var_1], 0
jmp loc_4C32B
loc_4C17A:
mov eax, [rbp+var_B8]
mov ecx, 3
cmp eax, ecx
jnz short loc_4C1A3
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov [rbp+var_A8], rax
call ___cxa_rethrow
jmp loc_4C34A
loc_4C1A3:
mov eax, [rbp+var_B8]
mov ecx, 2
cmp eax, ecx
jnz short loc_4C20A
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov [rbp+var_80], rax
mov rdi, [rbp+var_80]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov rsi, rax
mov rdx, [rbp+var_38]
lea rdi, [rbp+var_A0]
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
jmp short $+2
loc_4C1E1:
mov edi, 2
lea rsi, [rbp+var_A0]
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
jmp short $+2
loc_4C1F4:
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
call ___cxa_end_catch
jmp loc_4C171
loc_4C20A:
mov rdi, [rbp+var_50]; void *
call ___cxa_begin_catch
mov rdx, [rbp+var_38]
xor eax, eax
mov esi, eax
lea rdi, [rbp+var_78]
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
jmp short $+2
loc_4C226:
mov edi, 2
lea rsi, [rbp+var_78]
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
jmp short $+2
loc_4C236:
lea rdi, [rbp+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
call ___cxa_end_catch
jmp loc_4C171
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_4C26C
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4C26C:
call ___cxa_end_catch
jmp short $+2
loc_4C273:
jmp loc_4C339
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_4C29E
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4C29E:
call ___cxa_end_catch
jmp short $+2
loc_4C2A5:
jmp loc_4C339
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
call ___cxa_end_catch
jmp short $+2
loc_4C2BD:
jmp short loc_4C339
loc_4C2BF:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rbp+var_C8], rax
mov rdx, [rbp+var_28]
add rcx, rdx
mov [rbp+var_C0], rcx
and rax, 1
cmp rax, 0
jz short loc_4C308
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_C0]
mov rax, [rax]
sub rcx, 1
mov rax, [rax+rcx]
mov [rbp+var_D0], rax
jmp short loc_4C316
loc_4C308:
mov rax, [rbp+var_C8]
mov [rbp+var_D0], rax
loc_4C316:
mov rdi, [rbp+var_C0]
mov rax, [rbp+var_D0]
call rax
and al, 1
mov [rbp+var_1], al
loc_4C32B:
mov al, [rbp+var_1]
and al, 1
add rsp, 0D0h
pop rbp
retn
loc_4C339:
mov rdi, [rbp+var_50]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
loc_4C34A:
nop word ptr [rax+rax+00h]
| char testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(
testing::internal *a1,
long long ( *a2)(_QWORD),
long long a3,
long long a4)
{
testing::internal::UnitTestImpl *UnitTestImpl; // rax
char v5; // al
_QWORD *v7; // [rsp+10h] [rbp-C0h]
UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl(a1);
if ( (testing::internal::UnitTestImpl::catch_exceptions(UnitTestImpl) & 1) != 0 )
return testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(
a1,
a2,
a3,
a4) & 1;
v7 = (_QWORD *)((char *)a1 + a3);
if ( ((unsigned __int8)a2 & 1) != 0 )
v5 = (*(long long ( **)(_QWORD *))((char *)a2 + *v7 - 1))(v7);
else
v5 = a2(v7);
return v5 & 1;
}
| HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],RCX
CALL 0x00144940
MOV RDI,RAX
CALL 0x00164230
TEST AL,0x1
JNZ 0x0014c101
JMP 0x0014c2bf
LAB_0014c101:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
LAB_0014c121:
CALL 0x00168250
LAB_0014c126:
MOV byte ptr [RBP + -0xb1],AL
JMP 0x0014c12e
LAB_0014c12e:
MOV AL,byte ptr [RBP + -0xb1]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x0014c32b
LAB_0014c2bf:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xc8],RAX
MOV RDX,qword ptr [RBP + -0x28]
ADD RCX,RDX
MOV qword ptr [RBP + -0xc0],RCX
AND RAX,0x1
CMP RAX,0x0
JZ 0x0014c308
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RAX]
SUB RCX,0x1
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0014c316
LAB_0014c308:
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0xd0],RAX
LAB_0014c316:
MOV RDI,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0xd0]
CALL RAX
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0014c32b:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xd0
POP RBP
RET
|
/* bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
*/
bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>
(UnitTestImpl *param_1,_func_bool *param_2,char *param_3)
{
UnitTestImpl *this;
ulong uVar1;
_func_bool *local_d8;
bool local_9;
this = (UnitTestImpl *)GetUnitTestImpl();
uVar1 = UnitTestImpl::catch_exceptions(this);
if ((uVar1 & 1) == 0) {
local_d8 = param_2;
if (((ulong)param_2 & 1) != 0) {
local_d8 = *(_func_bool **)(param_2 + *(long *)(param_1 + (long)param_3) + -1);
}
local_9 = (*local_d8)(param_1 + (long)param_3);
}
else {
/* try { // try from 0014c121 to 0014c125 has its CatchHandler @ 0014c13e */
local_9 = HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>
(param_1,param_2,param_3);
}
return local_9;
}
| |
52,023 | aggregate_all_event_names(PFS_single_stat*, PFS_single_stat*) | eloqsql/storage/perfschema/pfs_instr.cc | void aggregate_all_event_names(PFS_single_stat *from_array,
PFS_single_stat *to_array)
{
PFS_single_stat *from;
PFS_single_stat *from_last;
PFS_single_stat *to;
from= from_array;
from_last= from_array + wait_class_max;
to= to_array;
for ( ; from < from_last ; from++, to++)
{
if (from->m_count > 0)
{
to->aggregate(from);
from->reset();
}
}
} | O0 | cpp | aggregate_all_event_names(PFS_single_stat*, PFS_single_stat*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
leaq 0x392a8d(%rip), %rcx # 0x3cebe0
movl (%rcx), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x3c1ae
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jbe 0x3c192
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x32260
movq -0x18(%rbp), %rdi
callq 0x31e50
jmp 0x3c194
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
jmp 0x3c168
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z25aggregate_all_event_namesP15PFS_single_statS0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
lea rcx, wait_class_max
mov ecx, [rcx]
shl rcx, 5
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_3C168:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_3C1AE
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jbe short loc_3C192
mov rdi, [rbp+var_28]; this
mov rsi, [rbp+var_18]; PFS_single_stat *
call _ZN15PFS_single_stat9aggregateEPKS_; PFS_single_stat::aggregate(PFS_single_stat const*)
mov rdi, [rbp+var_18]; this
call _ZN15PFS_single_stat5resetEv; PFS_single_stat::reset(void)
loc_3C192:
jmp short $+2
loc_3C194:
mov rax, [rbp+var_18]
add rax, 20h ; ' '
mov [rbp+var_18], rax
mov rax, [rbp+var_28]
add rax, 20h ; ' '
mov [rbp+var_28], rax
jmp short loc_3C168
loc_3C1AE:
add rsp, 30h
pop rbp
retn
| PFS_single_stat * aggregate_all_event_names(PFS_single_stat *a1, PFS_single_stat *a2)
{
PFS_single_stat *result; // rax
PFS_single_stat *v4; // [rsp+10h] [rbp-20h]
PFS_single_stat *v5; // [rsp+18h] [rbp-18h]
v5 = a1;
v4 = (PFS_single_stat *)((char *)a1 + 32 * (unsigned int)wait_class_max);
while ( 1 )
{
result = v5;
if ( v5 >= v4 )
break;
if ( *(_QWORD *)v5 )
{
PFS_single_stat::aggregate(a2, v5);
PFS_single_stat::reset(v5);
}
v5 = (PFS_single_stat *)((char *)v5 + 32);
a2 = (PFS_single_stat *)((char *)a2 + 32);
}
return result;
}
| aggregate_all_event_names:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x4cebe0]
MOV ECX,dword ptr [RCX]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_0013c168:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0013c1ae
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JBE 0x0013c192
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00132260
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00131e50
LAB_0013c192:
JMP 0x0013c194
LAB_0013c194:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x20
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0013c168
LAB_0013c1ae:
ADD RSP,0x30
POP RBP
RET
|
/* aggregate_all_event_names(PFS_single_stat*, PFS_single_stat*) */
void aggregate_all_event_names(PFS_single_stat *param_1,PFS_single_stat *param_2)
{
ulong uVar1;
PFS_single_stat *local_30;
PFS_single_stat *local_20;
uVar1 = (ulong)wait_class_max;
local_30 = param_2;
for (local_20 = param_1; local_20 < param_1 + uVar1 * 0x20; local_20 = local_20 + 0x20) {
if (*(long *)local_20 != 0) {
PFS_single_stat::aggregate(local_30,local_20);
PFS_single_stat::reset(local_20);
}
local_30 = local_30 + 0x20;
}
return;
}
| |
52,024 | my_vfprintf | eloqsql/strings/my_vsnprintf.c | int my_vfprintf(FILE *stream, const char* format, va_list args)
{
char cvtbuf[1024];
int alloc= 0;
char *p= cvtbuf;
size_t cur_len= sizeof(cvtbuf), actual;
int ret;
/*
We do not know how much buffer we need.
So start with a reasonably-sized stack-allocated buffer, and increase
it exponentially until it is big enough.
*/
for (;;)
{
size_t new_len;
actual= my_vsnprintf(p, cur_len, format, args);
if (actual < cur_len - 1)
break;
/*
Not enough space (or just enough with nothing to spare - but we cannot
distinguish this case from the return value). Allocate a bigger buffer
and try again.
*/
if (alloc)
my_free(p);
else
alloc= 1;
new_len= cur_len*2;
if (new_len < cur_len)
return 0; /* Overflow */
cur_len= new_len;
p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE));
if (!p)
return 0;
}
ret= (int) actual;
if (fputs(p, stream) < 0)
ret= -1;
if (alloc)
my_free(p);
return ret;
} | O0 | c | my_vfprintf:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp # imm = 0x470
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x420(%rbp)
movq %rsi, -0x428(%rbp)
movq %rdx, -0x430(%rbp)
movl $0x0, -0x434(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x440(%rbp)
movq $0x400, -0x448(%rbp) # imm = 0x400
movq -0x440(%rbp), %rdi
movq -0x448(%rbp), %rsi
movq -0x428(%rbp), %rdx
movq -0x430(%rbp), %rcx
callq 0xad4f0
movq %rax, -0x450(%rbp)
movq -0x450(%rbp), %rax
movq -0x448(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xad674
jmp 0xad708
cmpl $0x0, -0x434(%rbp)
je 0xad68b
movq -0x440(%rbp), %rdi
callq 0x5b4b0
jmp 0xad695
movl $0x1, -0x434(%rbp)
movq -0x448(%rbp), %rax
shlq %rax
movq %rax, -0x460(%rbp)
movq -0x460(%rbp), %rax
cmpq -0x448(%rbp), %rax
jae 0xad6c5
movl $0x0, -0x414(%rbp)
jmp 0xad758
movq -0x460(%rbp), %rax
movq %rax, -0x448(%rbp)
movq -0x448(%rbp), %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x5b130
movq %rax, -0x440(%rbp)
cmpq $0x0, -0x440(%rbp)
jne 0xad703
movl $0x0, -0x414(%rbp)
jmp 0xad758
jmp 0xad630
movq -0x450(%rbp), %rax
movl %eax, -0x454(%rbp)
movq -0x440(%rbp), %rdi
movq -0x420(%rbp), %rsi
callq 0x26380
cmpl $0x0, %eax
jge 0xad737
movl $0xffffffff, -0x454(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x434(%rbp)
je 0xad74c
movq -0x440(%rbp), %rdi
callq 0x5b4b0
movl -0x454(%rbp), %eax
movl %eax, -0x414(%rbp)
movl -0x414(%rbp), %eax
movl %eax, -0x464(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xad785
movl -0x464(%rbp), %eax
addq $0x470, %rsp # imm = 0x470
popq %rbp
retq
callq 0x26370
nopw (%rax,%rax)
| my_vfprintf:
push rbp
mov rbp, rsp
sub rsp, 470h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_420], rdi
mov [rbp+var_428], rsi
mov [rbp+var_430], rdx
mov [rbp+var_434], 0
lea rax, [rbp+var_410]
mov [rbp+var_440], rax
mov [rbp+var_448], 400h
loc_AD630:
mov rdi, [rbp+var_440]
mov rsi, [rbp+var_448]
mov rdx, [rbp+var_428]
mov rcx, [rbp+var_430]
call my_vsnprintf
mov [rbp+var_450], rax
mov rax, [rbp+var_450]
mov rcx, [rbp+var_448]
sub rcx, 1
cmp rax, rcx
jnb short loc_AD674
jmp loc_AD708
loc_AD674:
cmp [rbp+var_434], 0
jz short loc_AD68B
mov rdi, [rbp+var_440]
call my_free
jmp short loc_AD695
loc_AD68B:
mov [rbp+var_434], 1
loc_AD695:
mov rax, [rbp+var_448]
shl rax, 1
mov [rbp+var_460], rax
mov rax, [rbp+var_460]
cmp rax, [rbp+var_448]
jnb short loc_AD6C5
mov [rbp+var_414], 0
jmp loc_AD758
loc_AD6C5:
mov rax, [rbp+var_460]
mov [rbp+var_448], rax
mov rsi, [rbp+var_448]
xor edi, edi
mov edx, 8
call my_malloc
mov [rbp+var_440], rax
cmp [rbp+var_440], 0
jnz short loc_AD703
mov [rbp+var_414], 0
jmp short loc_AD758
loc_AD703:
jmp loc_AD630
loc_AD708:
mov rax, [rbp+var_450]
mov [rbp+var_454], eax
mov rdi, [rbp+var_440]
mov rsi, [rbp+var_420]
call _fputs
cmp eax, 0
jge short loc_AD737
mov [rbp+var_454], 0FFFFFFFFh
loc_AD737:
cmp [rbp+var_434], 0
jz short loc_AD74C
mov rdi, [rbp+var_440]
call my_free
loc_AD74C:
mov eax, [rbp+var_454]
mov [rbp+var_414], eax
loc_AD758:
mov eax, [rbp+var_414]
mov [rbp+var_464], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_AD785
mov eax, [rbp+var_464]
add rsp, 470h
pop rbp
retn
loc_AD785:
call ___stack_chk_fail
| long long my_vfprintf(long long a1, char *a2, int *a3)
{
unsigned long long v4; // [rsp+10h] [rbp-460h]
unsigned int v5; // [rsp+1Ch] [rbp-454h]
_BYTE *v6; // [rsp+20h] [rbp-450h]
unsigned long long i; // [rsp+28h] [rbp-448h]
char *v8; // [rsp+30h] [rbp-440h]
int v9; // [rsp+3Ch] [rbp-434h]
char v12; // [rsp+60h] [rbp-410h] BYREF
unsigned long long v13; // [rsp+468h] [rbp-8h]
v13 = __readfsqword(0x28u);
v9 = 0;
v8 = &v12;
for ( i = 1024LL; ; i *= 2LL )
{
v6 = my_vsnprintf(v8, i, a2, a3);
if ( (unsigned long long)v6 < i - 1 )
break;
if ( v9 )
my_free((long long)v8);
else
v9 = 1;
v4 = 2 * i;
if ( 2 * i < i )
return 0;
v8 = (char *)my_malloc(0, v4, 8);
if ( !v8 )
return 0;
}
v5 = (unsigned int)v6;
if ( (int)fputs(v8, a1) < 0 )
v5 = -1;
if ( v9 )
my_free((long long)v8);
return v5;
}
| my_vfprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x470
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x420],RDI
MOV qword ptr [RBP + -0x428],RSI
MOV qword ptr [RBP + -0x430],RDX
MOV dword ptr [RBP + -0x434],0x0
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x440],RAX
MOV qword ptr [RBP + -0x448],0x400
LAB_001ad630:
MOV RDI,qword ptr [RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x448]
MOV RDX,qword ptr [RBP + -0x428]
MOV RCX,qword ptr [RBP + -0x430]
CALL 0x001ad4f0
MOV qword ptr [RBP + -0x450],RAX
MOV RAX,qword ptr [RBP + -0x450]
MOV RCX,qword ptr [RBP + -0x448]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x001ad674
JMP 0x001ad708
LAB_001ad674:
CMP dword ptr [RBP + -0x434],0x0
JZ 0x001ad68b
MOV RDI,qword ptr [RBP + -0x440]
CALL 0x0015b4b0
JMP 0x001ad695
LAB_001ad68b:
MOV dword ptr [RBP + -0x434],0x1
LAB_001ad695:
MOV RAX,qword ptr [RBP + -0x448]
SHL RAX,0x1
MOV qword ptr [RBP + -0x460],RAX
MOV RAX,qword ptr [RBP + -0x460]
CMP RAX,qword ptr [RBP + -0x448]
JNC 0x001ad6c5
MOV dword ptr [RBP + -0x414],0x0
JMP 0x001ad758
LAB_001ad6c5:
MOV RAX,qword ptr [RBP + -0x460]
MOV qword ptr [RBP + -0x448],RAX
MOV RSI,qword ptr [RBP + -0x448]
XOR EDI,EDI
MOV EDX,0x8
CALL 0x0015b130
MOV qword ptr [RBP + -0x440],RAX
CMP qword ptr [RBP + -0x440],0x0
JNZ 0x001ad703
MOV dword ptr [RBP + -0x414],0x0
JMP 0x001ad758
LAB_001ad703:
JMP 0x001ad630
LAB_001ad708:
MOV RAX,qword ptr [RBP + -0x450]
MOV dword ptr [RBP + -0x454],EAX
MOV RDI,qword ptr [RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x420]
CALL 0x00126380
CMP EAX,0x0
JGE 0x001ad737
MOV dword ptr [RBP + -0x454],0xffffffff
LAB_001ad737:
CMP dword ptr [RBP + -0x434],0x0
JZ 0x001ad74c
MOV RDI,qword ptr [RBP + -0x440]
CALL 0x0015b4b0
LAB_001ad74c:
MOV EAX,dword ptr [RBP + -0x454]
MOV dword ptr [RBP + -0x414],EAX
LAB_001ad758:
MOV EAX,dword ptr [RBP + -0x414]
MOV dword ptr [RBP + -0x464],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001ad785
MOV EAX,dword ptr [RBP + -0x464]
ADD RSP,0x470
POP RBP
RET
LAB_001ad785:
CALL 0x00126370
|
int4 my_vfprintf(FILE *param_1,int8 param_2,int8 param_3)
{
bool bVar1;
int iVar2;
ulong uVar3;
long in_FS_OFFSET;
int4 local_45c;
ulong local_450;
char *local_448;
int4 local_41c;
char local_418 [1032];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar1 = false;
local_448 = local_418;
local_450 = 0x400;
do {
uVar3 = my_vsnprintf(local_448,local_450,param_2,param_3);
if (uVar3 < local_450 - 1) {
local_45c = (int4)uVar3;
iVar2 = fputs(local_448,param_1);
if (iVar2 < 0) {
local_45c = 0xffffffff;
}
if (bVar1) {
my_free(local_448);
}
local_41c = local_45c;
goto LAB_001ad758;
}
if (bVar1) {
my_free(local_448);
}
else {
bVar1 = true;
}
uVar3 = local_450 << 1;
if (uVar3 < local_450) {
local_41c = 0;
goto LAB_001ad758;
}
local_448 = (char *)my_malloc(0,uVar3,8);
local_450 = uVar3;
} while (local_448 != (char *)0x0);
local_41c = 0;
LAB_001ad758:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_41c;
}
| |
52,025 | minja::html_escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/./minja.hpp | static std::string html_escape(const std::string & s) {
std::string result;
result.reserve(s.size());
for (const auto & c : s) {
switch (c) {
case '&': result += "&"; break;
case '<': result += "<"; break;
case '>': result += ">"; break;
case '"': result += """; break;
case '\'': result += "'"; break;
default: result += c; break;
}
}
return result;
} | O0 | cpp | minja::html_escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x68, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movb $0x0, 0x57(%rsp)
callq 0x504a0
movq 0x58(%rsp), %rdi
callq 0x503f0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x50b80
jmp 0x6106e
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x502d0
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x50ea0
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x76d70
testb $0x1, %al
jne 0x610ae
jmp 0x6119a
leaq 0x30(%rsp), %rdi
callq 0x9b390
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x1c, %eax
ja 0x61173
movq 0x8(%rsp), %rax
leaq 0x161f98(%rip), %rcx # 0x1c307c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x510c0
jmp 0x611ba
movq 0x18(%rsp), %rdi
leaq 0x174f6d(%rip), %rsi # 0x1d6083
callq 0x501c0
jmp 0x6111d
jmp 0x61189
movq 0x18(%rsp), %rdi
leaq 0x174f5e(%rip), %rsi # 0x1d6089
callq 0x501c0
jmp 0x61132
jmp 0x61189
movq 0x18(%rsp), %rdi
leaq 0x174f4e(%rip), %rsi # 0x1d608e
callq 0x501c0
jmp 0x61147
jmp 0x61189
movq 0x18(%rsp), %rdi
leaq 0x174f3e(%rip), %rsi # 0x1d6093
callq 0x501c0
jmp 0x6115c
jmp 0x61189
movq 0x18(%rsp), %rdi
leaq 0x174f2f(%rip), %rsi # 0x1d6099
callq 0x501c0
jmp 0x61171
jmp 0x61189
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movsbl (%rax), %esi
callq 0x50a00
jmp 0x61187
jmp 0x61189
jmp 0x6118b
leaq 0x30(%rsp), %rdi
callq 0x9b3a0
jmp 0x61096
movb $0x1, 0x57(%rsp)
testb $0x1, 0x57(%rsp)
jne 0x611b0
movq 0x18(%rsp), %rdi
callq 0x510c0
movq 0x10(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
| _ZN5minjaL11html_escapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 68h
mov [rsp+68h+var_50], rdi
mov rax, rdi
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+68h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+68h+var_50]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
jmp short $+2
loc_6106E:
mov rax, [rsp+68h+var_10]
mov [rsp+68h+var_30], rax
mov rdi, [rsp+68h+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+68h+var_40], rax
loc_61096:
lea rdi, [rsp+68h+var_38]
lea rsi, [rsp+68h+var_40]
call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
test al, 1
jnz short loc_610AE
jmp loc_6119A
loc_610AE:
lea rdi, [rsp+68h+var_38]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
mov [rsp+68h+var_48], rax
mov rax, [rsp+68h+var_48]
movsx eax, byte ptr [rax]
add eax, 0FFFFFFDEh; switch 29 cases
mov ecx, eax
mov [rsp+68h+var_60], rcx
sub eax, 1Ch
ja def_610EB; jumptable 00000000000610EB default case, cases 35-37,40-59,61
mov rax, [rsp+68h+var_60]
lea rcx, jpt_610EB
movsxd rax, ds:(jpt_610EB - 1C307Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
mov rdi, [rsp+arg_10]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_611BA
loc_6110A:
mov rdi, [rsp+68h+var_50]; jumptable 00000000000610EB case 38
lea rsi, aAmp; "&"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_6111D:
jmp short loc_61189
loc_6111F:
mov rdi, [rsp+68h+var_50]; jumptable 00000000000610EB case 60
lea rsi, aLt; "<"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_61132:
jmp short loc_61189
loc_61134:
mov rdi, [rsp+68h+var_50]; jumptable 00000000000610EB case 62
lea rsi, aGt; ">"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_61147:
jmp short loc_61189
loc_61149:
mov rdi, [rsp+68h+var_50]; jumptable 00000000000610EB case 34
lea rsi, a34; """
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_6115C:
jmp short loc_61189
loc_6115E:
mov rdi, [rsp+68h+var_50]; jumptable 00000000000610EB case 39
lea rsi, aApos; "'"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_61171:
jmp short loc_61189
def_610EB:
mov rdi, [rsp+68h+var_50]; jumptable 00000000000610EB default case, cases 35-37,40-59,61
mov rax, [rsp+68h+var_48]
movsx esi, byte ptr [rax]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_61187:
jmp short $+2
loc_61189:
jmp short $+2
loc_6118B:
lea rdi, [rsp+68h+var_38]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp loc_61096
loc_6119A:
mov [rsp+68h+var_11], 1
test [rsp+68h+var_11], 1
jnz short loc_611B0
mov rdi, [rsp+68h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_611B0:
mov rax, [rsp+68h+var_58]
add rsp, 68h
retn
loc_611BA:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| long long minja::html_escape(long long a1, long long a2)
{
long long v2; // rax
_BYTE *v4; // [rsp+20h] [rbp-48h]
long long v5; // [rsp+28h] [rbp-40h] BYREF
_QWORD v6[4]; // [rsp+30h] [rbp-38h] BYREF
char v7; // [rsp+57h] [rbp-11h]
long long v8; // [rsp+58h] [rbp-10h]
long long v9; // [rsp+60h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = 0;
std::string::basic_string();
v2 = std::string::size(a2);
std::string::reserve(a1, v2);
v6[1] = a2;
v6[0] = std::string::begin(a2);
v5 = std::string::end(a2);
while ( (__gnu_cxx::operator!=<char const*,std::string>(v6, &v5) & 1) != 0 )
{
v4 = (_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v6);
switch ( *v4 )
{
case '"':
std::string::operator+=(a1, """);
break;
case '&':
std::string::operator+=(a1, "&");
break;
case '\'':
std::string::operator+=(a1, "'");
break;
case '<':
std::string::operator+=(a1, "<");
break;
case '>':
std::string::operator+=(a1, ">");
break;
default:
std::string::operator+=(a1, (unsigned int)(char)*v4);
break;
}
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v6);
}
return a1;
}
| html_escape:
SUB RSP,0x68
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV byte ptr [RSP + 0x57],0x0
CALL 0x001504a0
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001503f0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
LAB_00161067:
CALL 0x00150b80
JMP 0x0016106e
LAB_0016106e:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001502d0
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00150ea0
MOV qword ptr [RSP + 0x28],RAX
LAB_00161096:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x28]
CALL 0x00176d70
TEST AL,0x1
JNZ 0x001610ae
JMP 0x0016119a
LAB_001610ae:
LEA RDI,[RSP + 0x30]
CALL 0x0019b390
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOVSX EAX,byte ptr [RAX]
ADD EAX,-0x22
MOV ECX,EAX
MOV qword ptr [RSP + 0x8],RCX
SUB EAX,0x1c
JA 0x00161173
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x2c307c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_26:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x2d6083]
CALL 0x001501c0
JMP 0x0016111d
LAB_0016111d:
JMP 0x00161189
caseD_3c:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x2d6089]
CALL 0x001501c0
JMP 0x00161132
LAB_00161132:
JMP 0x00161189
caseD_3e:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x2d608e]
CALL 0x001501c0
JMP 0x00161147
LAB_00161147:
JMP 0x00161189
caseD_22:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x2d6093]
CALL 0x001501c0
JMP 0x0016115c
LAB_0016115c:
JMP 0x00161189
caseD_27:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x2d6099]
CALL 0x001501c0
JMP 0x00161171
LAB_00161171:
JMP 0x00161189
caseD_23:
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
MOVSX ESI,byte ptr [RAX]
CALL 0x00150a00
LAB_00161185:
JMP 0x00161187
LAB_00161187:
JMP 0x00161189
LAB_00161189:
JMP 0x0016118b
LAB_0016118b:
LEA RDI,[RSP + 0x30]
CALL 0x0019b3a0
JMP 0x00161096
LAB_0016119a:
MOV byte ptr [RSP + 0x57],0x1
TEST byte ptr [RSP + 0x57],0x1
JNZ 0x001611b0
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001510c0
LAB_001611b0:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x68
RET
|
/* WARNING: Removing unreachable block (ram,0x001611a6) */
/* minja::html_escape(std::__cxx11::string const&) */
minja * __thiscall minja::html_escape(minja *this,string *param_1)
{
bool bVar1;
char *pcVar2;
int8 local_40;
int8 local_38;
string *local_30;
int1 local_11;
string *local_10;
minja *local_8;
local_11 = 0;
local_10 = param_1;
local_8 = this;
std::__cxx11::string::string((string *)this);
std::__cxx11::string::size();
/* try { // try from 00161067 to 00161184 has its CatchHandler @ 001610ed */
std::__cxx11::string::reserve((ulong)this);
local_30 = local_10;
local_38 = std::__cxx11::string::begin();
local_40 = std::__cxx11::string::end();
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_38,(__normal_iterator *)&local_40), bVar1) {
pcVar2 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_38);
switch(*pcVar2) {
case '\"':
std::__cxx11::string::operator+=((string *)this,""");
break;
default:
std::__cxx11::string::operator+=((string *)this,*pcVar2);
break;
case '&':
std::__cxx11::string::operator+=((string *)this,"&");
break;
case '\'':
std::__cxx11::string::operator+=((string *)this,"'");
break;
case '<':
std::__cxx11::string::operator+=((string *)this,"<");
break;
case '>':
std::__cxx11::string::operator+=((string *)this,">");
}
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_38);
}
return this;
}
| |
52,026 | mi_unique_hash | eloqsql/storage/myisam/mi_unique.c | ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const uchar *record)
{
const uchar *pos, *end;
ha_checksum crc= 0;
ulong seed1=0, seed2= 4;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint length=keyseg->length;
if (keyseg->null_bit)
{
if (record[keyseg->null_pos] & keyseg->null_bit)
{
/*
Change crc in a way different from an empty string or 0.
(This is an optimisation; The code will work even if this isn't
done)
*/
crc=((crc << 8) + 511+
(crc >> (8*sizeof(ha_checksum)-8)));
continue;
}
}
pos= record+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
uint tmp_length= (pack_length == 1 ? (uint) *(uchar*) pos :
uint2korr(pos));
pos+= pack_length; /* Skip VARCHAR length */
set_if_smaller(length,tmp_length);
}
else if (keyseg->flag & HA_BLOB_PART)
{
uint tmp_length=_mi_calc_blob_length(keyseg->bit_start,pos);
memcpy((char**) &pos, pos+keyseg->bit_start, sizeof(char*));
if (!length || length > tmp_length)
length=tmp_length; /* The whole blob */
}
end= pos+length;
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
my_ci_hash_sort(keyseg->charset,
(const uchar*) pos, length,
&seed1, &seed2);
crc^= seed1;
}
else
while (pos != end)
crc=((crc << 8) +
(((uchar) *(uchar*) pos++))) +
(crc >> (8*sizeof(ha_checksum)-8));
}
return crc;
} | O3 | c | mi_unique_hash:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq $0x0, -0x38(%rbp)
movq $0x4, -0x48(%rbp)
movq 0x8(%rdi), %r13
xorl %r15d, %r15d
movq %rdi, -0x40(%rbp)
cmpq 0x10(%rdi), %r13
jae 0x887b8
xorl %r15d, %r15d
movq %rsi, -0x30(%rbp)
movzbl 0x18(%r13), %r14d
movzwl 0x14(%r13), %ebx
movb 0x19(%r13), %al
testb %al, %al
je 0x886f6
movl 0xc(%r13), %ecx
testb %al, (%rsi,%rcx)
je 0x886f6
roll $0x8, %r15d
addl $0x1ff, %r15d # imm = 0x1FF
jmp 0x88787
movl 0x8(%r13), %r12d
addq %rsi, %r12
movzwl 0x12(%r13), %eax
testb $0x8, %al
jne 0x88734
testb $0x20, %al
je 0x88753
movzbl 0x1a(%r13), %edi
movq %r12, %rsi
callq 0x79b6d
movq -0x30(%rbp), %rsi
movzbl 0x1a(%r13), %ecx
movq (%r12,%rcx), %r12
cmpl %eax, %ebx
movl %eax, %ecx
cmovbl %ebx, %ecx
testl %ebx, %ebx
cmovel %eax, %ecx
movl %ecx, %ebx
jmp 0x88753
movzbl 0x1a(%r13), %eax
cmpq $0x1, %rax
jne 0x88746
movzbl (%r12), %ecx
jmp 0x8874b
movzwl (%r12), %ecx
addq %rax, %r12
cmpl %ebx, %ecx
cmovbl %ecx, %ebx
movl %ebx, %edx
cmpl $0x11, %r14d
ja 0x8879b
movl $0x28002, %eax # imm = 0x28002
btl %r14d, %eax
jae 0x8879b
movq (%r13), %rdi
movq 0xc0(%rdi), %rax
movq %r12, %rsi
leaq -0x38(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq *0x50(%rax)
movq -0x30(%rbp), %rsi
xorl -0x38(%rbp), %r15d
addq $0x20, %r13
movq -0x40(%rbp), %rax
cmpq 0x10(%rax), %r13
jb 0x886cb
jmp 0x887b8
testq %rdx, %rdx
je 0x88787
xorl %eax, %eax
roll $0x8, %r15d
movzbl (%r12,%rax), %ecx
addl %ecx, %r15d
incq %rax
cmpq %rax, %rdx
jne 0x887a2
jmp 0x88787
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mi_unique_hash:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_38], 0
mov [rbp+var_48], 4
mov r13, [rdi+8]
xor r15d, r15d
mov [rbp+var_40], rdi
cmp r13, [rdi+10h]
jnb loc_887B8
xor r15d, r15d
mov [rbp+var_30], rsi
loc_886CB:
movzx r14d, byte ptr [r13+18h]
movzx ebx, word ptr [r13+14h]
mov al, [r13+19h]
test al, al
jz short loc_886F6
mov ecx, [r13+0Ch]
test [rsi+rcx], al
jz short loc_886F6
rol r15d, 8
add r15d, 1FFh
jmp loc_88787
loc_886F6:
mov r12d, [r13+8]
add r12, rsi
movzx eax, word ptr [r13+12h]
test al, 8
jnz short loc_88734
test al, 20h
jz short loc_88753
movzx edi, byte ptr [r13+1Ah]
mov rsi, r12
call _mi_calc_blob_length
mov rsi, [rbp+var_30]
movzx ecx, byte ptr [r13+1Ah]
mov r12, [r12+rcx]
cmp ebx, eax
mov ecx, eax
cmovb ecx, ebx
test ebx, ebx
cmovz ecx, eax
mov ebx, ecx
jmp short loc_88753
loc_88734:
movzx eax, byte ptr [r13+1Ah]
cmp rax, 1
jnz short loc_88746
movzx ecx, byte ptr [r12]
jmp short loc_8874B
loc_88746:
movzx ecx, word ptr [r12]
loc_8874B:
add r12, rax
cmp ecx, ebx
cmovb ebx, ecx
loc_88753:
mov edx, ebx
cmp r14d, 11h
ja short loc_8879B
mov eax, 28002h
bt eax, r14d
jnb short loc_8879B
mov rdi, [r13+0]
mov rax, [rdi+0C0h]
mov rsi, r12
lea rcx, [rbp+var_38]
lea r8, [rbp+var_48]
call qword ptr [rax+50h]
mov rsi, [rbp+var_30]
xor r15d, dword ptr [rbp+var_38]
loc_88787:
add r13, 20h ; ' '
mov rax, [rbp+var_40]
cmp r13, [rax+10h]
jb loc_886CB
jmp short loc_887B8
loc_8879B:
test rdx, rdx
jz short loc_88787
xor eax, eax
loc_887A2:
rol r15d, 8
movzx ecx, byte ptr [r12+rax]
add r15d, ecx
inc rax
cmp rdx, rax
jnz short loc_887A2
jmp short loc_88787
loc_887B8:
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_unique_hash(long long a1, long long a2)
{
_QWORD *v2; // r13
unsigned int v3; // r15d
unsigned int v4; // r14d
unsigned int v5; // ebx
unsigned __int8 v6; // al
unsigned __int8 *v7; // r12
__int16 v8; // ax
unsigned int v9; // eax
unsigned int v10; // ecx
long long v11; // rax
unsigned int v12; // ecx
int v13; // eax
long long i; // rax
long long v16; // [rsp+8h] [rbp-48h] BYREF
long long v17; // [rsp+10h] [rbp-40h]
long long v18; // [rsp+18h] [rbp-38h] BYREF
long long v19; // [rsp+20h] [rbp-30h]
v18 = 0LL;
v16 = 4LL;
v2 = *(_QWORD **)(a1 + 8);
v3 = 0;
v17 = a1;
if ( (unsigned long long)v2 < *(_QWORD *)(a1 + 16) )
{
v3 = 0;
v19 = a2;
do
{
v4 = *((unsigned __int8 *)v2 + 24);
v5 = *((unsigned __int16 *)v2 + 10);
v6 = *((_BYTE *)v2 + 25);
if ( v6 && (v6 & *(_BYTE *)(a2 + *((unsigned int *)v2 + 3))) != 0 )
{
v3 = __ROL4__(v3, 8) + 511;
}
else
{
v7 = (unsigned __int8 *)(a2 + *((unsigned int *)v2 + 2));
v8 = *((_WORD *)v2 + 9);
if ( (v8 & 8) != 0 )
{
v11 = *((unsigned __int8 *)v2 + 26);
if ( v11 == 1 )
v12 = *v7;
else
v12 = *(unsigned __int16 *)v7;
v7 += v11;
if ( v12 < v5 )
v5 = v12;
}
else if ( (v8 & 0x20) != 0 )
{
v9 = mi_calc_blob_length(*((unsigned __int8 *)v2 + 26), (unsigned __int8 *)(a2 + *((unsigned int *)v2 + 2)));
a2 = v19;
v7 = *(unsigned __int8 **)&v7[*((unsigned __int8 *)v2 + 26)];
v10 = v9;
if ( v5 < v9 )
v10 = v5;
if ( !v5 )
v10 = v9;
v5 = v10;
}
if ( v4 <= 0x11 && (v13 = 163842, _bittest(&v13, v4)) )
{
(*(void ( **)(_QWORD, unsigned __int8 *, _QWORD, long long *, long long *))(*(_QWORD *)(*v2 + 192LL)
+ 80LL))(
*v2,
v7,
v5,
&v18,
&v16);
a2 = v19;
v3 ^= v18;
}
else if ( v5 )
{
for ( i = 0LL; i != v5; v3 = v7[i++] + __ROL4__(v3, 8) )
;
}
}
v2 += 4;
}
while ( (unsigned long long)v2 < *(_QWORD *)(v17 + 16) );
}
return v3;
}
| mi_unique_hash:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x48],0x4
MOV R13,qword ptr [RDI + 0x8]
XOR R15D,R15D
MOV qword ptr [RBP + -0x40],RDI
CMP R13,qword ptr [RDI + 0x10]
JNC 0x001887b8
XOR R15D,R15D
MOV qword ptr [RBP + -0x30],RSI
LAB_001886cb:
MOVZX R14D,byte ptr [R13 + 0x18]
MOVZX EBX,word ptr [R13 + 0x14]
MOV AL,byte ptr [R13 + 0x19]
TEST AL,AL
JZ 0x001886f6
MOV ECX,dword ptr [R13 + 0xc]
TEST byte ptr [RSI + RCX*0x1],AL
JZ 0x001886f6
ROL R15D,0x8
ADD R15D,0x1ff
JMP 0x00188787
LAB_001886f6:
MOV R12D,dword ptr [R13 + 0x8]
ADD R12,RSI
MOVZX EAX,word ptr [R13 + 0x12]
TEST AL,0x8
JNZ 0x00188734
TEST AL,0x20
JZ 0x00188753
MOVZX EDI,byte ptr [R13 + 0x1a]
MOV RSI,R12
CALL 0x00179b6d
MOV RSI,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [R13 + 0x1a]
MOV R12,qword ptr [R12 + RCX*0x1]
CMP EBX,EAX
MOV ECX,EAX
CMOVC ECX,EBX
TEST EBX,EBX
CMOVZ ECX,EAX
MOV EBX,ECX
JMP 0x00188753
LAB_00188734:
MOVZX EAX,byte ptr [R13 + 0x1a]
CMP RAX,0x1
JNZ 0x00188746
MOVZX ECX,byte ptr [R12]
JMP 0x0018874b
LAB_00188746:
MOVZX ECX,word ptr [R12]
LAB_0018874b:
ADD R12,RAX
CMP ECX,EBX
CMOVC EBX,ECX
LAB_00188753:
MOV EDX,EBX
CMP R14D,0x11
JA 0x0018879b
MOV EAX,0x28002
BT EAX,R14D
JNC 0x0018879b
MOV RDI,qword ptr [R13]
MOV RAX,qword ptr [RDI + 0xc0]
MOV RSI,R12
LEA RCX,[RBP + -0x38]
LEA R8,[RBP + -0x48]
CALL qword ptr [RAX + 0x50]
MOV RSI,qword ptr [RBP + -0x30]
XOR R15D,dword ptr [RBP + -0x38]
LAB_00188787:
ADD R13,0x20
MOV RAX,qword ptr [RBP + -0x40]
CMP R13,qword ptr [RAX + 0x10]
JC 0x001886cb
JMP 0x001887b8
LAB_0018879b:
TEST RDX,RDX
JZ 0x00188787
XOR EAX,EAX
LAB_001887a2:
ROL R15D,0x8
MOVZX ECX,byte ptr [R12 + RAX*0x1]
ADD R15D,ECX
INC RAX
CMP RDX,RAX
JNZ 0x001887a2
JMP 0x00188787
LAB_001887b8:
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint mi_unique_hash(long param_1,long param_2)
{
byte bVar1;
ushort uVar2;
uint uVar3;
ulong uVar4;
uint uVar5;
ulong uVar6;
ushort *puVar7;
long *plVar8;
uint uVar9;
int8 local_50;
long local_48;
int8 local_40;
long local_38;
local_40 = 0;
local_50 = 4;
plVar8 = *(long **)(param_1 + 8);
uVar9 = 0;
if (plVar8 < *(long **)(param_1 + 0x10)) {
uVar9 = 0;
local_48 = param_1;
local_38 = param_2;
do {
bVar1 = *(byte *)(plVar8 + 3);
uVar2 = *(ushort *)((long)plVar8 + 0x14);
uVar6 = (ulong)uVar2;
if ((*(byte *)((long)plVar8 + 0x19) == 0) ||
((*(byte *)(param_2 + (ulong)*(uint *)((long)plVar8 + 0xc)) &
*(byte *)((long)plVar8 + 0x19)) == 0)) {
puVar7 = (ushort *)((ulong)*(uint *)(plVar8 + 1) + param_2);
if ((*(ushort *)((long)plVar8 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)plVar8 + 0x12) & 0x20) != 0) {
uVar3 = _mi_calc_blob_length(*(int1 *)((long)plVar8 + 0x1a),puVar7);
puVar7 = *(ushort **)((long)puVar7 + (ulong)*(byte *)((long)plVar8 + 0x1a));
uVar5 = uVar3;
if (uVar2 < uVar3) {
uVar5 = (uint)uVar2;
}
if (uVar2 == 0) {
uVar5 = uVar3;
}
uVar6 = (ulong)uVar5;
param_2 = local_38;
}
}
else {
if ((ulong)*(byte *)((long)plVar8 + 0x1a) == 1) {
uVar5 = (uint)(byte)*puVar7;
}
else {
uVar5 = (uint)*puVar7;
}
puVar7 = (ushort *)((long)puVar7 + (ulong)*(byte *)((long)plVar8 + 0x1a));
if (uVar5 < uVar2) {
uVar6 = (ulong)uVar5;
}
}
if ((bVar1 < 0x12) && ((0x28002U >> (bVar1 & 0x1f) & 1) != 0)) {
(**(code **)(*(long *)(*plVar8 + 0xc0) + 0x50))(*plVar8,puVar7,uVar6,&local_40,&local_50);
uVar9 = uVar9 ^ (uint)local_40;
param_2 = local_38;
}
else if (uVar6 != 0) {
uVar4 = 0;
do {
uVar9 = (uVar9 << 8 | uVar9 >> 0x18) + (uint)*(byte *)((long)puVar7 + uVar4);
uVar4 = uVar4 + 1;
} while (uVar6 != uVar4);
}
}
else {
uVar9 = (uVar9 << 8 | uVar9 >> 0x18) + 0x1ff;
}
plVar8 = plVar8 + 4;
} while (plVar8 < *(long **)(local_48 + 0x10));
}
return uVar9;
}
| |
52,027 | vsort_sequential_float | davidesantangelo[P]vsort/vsort.c | static void vsort_sequential_float(float *arr, int size)
{
if (!arr || size <= 1)
return;
// Use insertion sort if nearly sorted (check only for modest sizes)
if (size < thresholds.parallel_threshold / 2 &&
vsort_is_nearly_sorted_float(arr, size))
{
vsort_log_info("Array (float, size %d) appears nearly sorted, using insertion sort.", size);
insertion_sort_float(arr, 0, size - 1);
return;
}
// Radix sort is not typically used for floats. Default to quicksort.
quicksort_float(arr, 0, size - 1);
} | O3 | c | vsort_sequential_float:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
cmpl $0x14, %esi
jl 0x24a4
movl 0x3ce6(%rip), %eax # 0x60e0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %r15d, %ecx
jle 0x24a4
movzwl %r15w, %eax
imull $0xcccd, %eax, %eax # imm = 0xCCCD
shrl $0x14, %eax
cmpl $0xc8, %r15d
movl $0xa, %edx
cmovael %eax, %edx
cmpl $0x7e4, %r15d # imm = 0x7E4
movl $0x64, %ecx
cmovbl %edx, %ecx
xorl %esi, %esi
movl %r15d, %eax
xorl %edx, %edx
divl %ecx
cmpl %r15d, %ecx
movl $0x1, %edx
cmovbel %eax, %edx
cmpl %r15d, %edx
jae 0x24a4
movl %edx, %eax
addl %edx, %edx
leaq (%rbx,%rax,4), %rdi
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
xorl %r9d, %r9d
movl %esi, %r10d
movl %r9d, %esi
movss (%rbx,%rsi,4), %xmm0
xorl %esi, %esi
ucomiss (%rdi,%r9,4), %xmm0
seta %sil
addl %r10d, %esi
leal (%rdx,%r9), %r11d
leal 0x1(%r8), %r10d
cmpl %r15d, %r11d
jge 0x2496
addl $0x2, %r8d
addq %rax, %r9
cmpl %ecx, %r8d
movl %r10d, %r8d
jb 0x2461
addl %esi, %esi
leal (%rsi,%rsi,4), %eax
cmpl %r10d, %eax
jbe 0x2787
leal -0x1(%r15), %ebp
cmpl %r15d, 0x3c29(%rip) # 0x60d8
jle 0x24fa
cmpl $0x2, %r15d
jl 0x27d4
movl %ebp, %eax
movl $0x1, %ecx
xorl %edx, %edx
movss (%rbx,%rcx,4), %xmm0
leaq (%rbx,%rdx,4), %rsi
movl %ecx, %edi
movss (%rsi), %xmm1
ucomiss %xmm1, %xmm0
jae 0x24e5
movss %xmm1, 0x4(%rsi)
addq $-0x4, %rsi
decl %edi
jg 0x24cf
movss %xmm0, 0x4(%rsi)
incq %rcx
incq %rdx
cmpq %rax, %rdx
jne 0x24c4
jmp 0x27d4
movl $0x2000, %edi # imm = 0x2000
callq 0x1130
testq %rax, %rax
je 0x270f
movq %rax, %r14
movl $0x0, (%rax)
movl %ebp, 0x4(%rax)
movl $0x1, %eax
testl %eax, %eax
je 0x2763
movl %eax, %ecx
movslq (%r14,%rcx,4), %r13
leal -0x2(%rax), %ebp
movl -0x4(%r14,%rcx,4), %r12d
movslq %r12d, %r15
movl %r13d, %edx
subl %r15d, %edx
leal 0x1(%rdx), %esi
cmpl 0x3b92(%rip), %esi # 0x60d8
jge 0x2596
cmpl %r12d, %r13d
jle 0x2703
leal 0x1(%r12), %eax
movq %r15, %rcx
leaq (%rbx,%rcx,4), %rdx
movss 0x4(%rdx), %xmm0
cmpq %r15, %rcx
jl 0x2582
movl %eax, %esi
movss (%rdx), %xmm1
ucomiss %xmm1, %xmm0
jae 0x2582
movss %xmm1, 0x4(%rdx)
addq $-0x4, %rdx
decl %esi
cmpl %r12d, %esi
jg 0x2569
incq %rcx
movss %xmm0, 0x4(%rdx)
incl %eax
cmpq %r13, %rcx
jne 0x2559
jmp 0x2703
movl %edx, %esi
shrl $0x1f, %esi
addl %edx, %esi
sarl %esi
addl %r12d, %esi
movss (%rbx,%r15,4), %xmm1
movslq %esi, %rdx
movss (%rbx,%rdx,4), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x25c2
movss %xmm0, (%rbx,%r15,4)
movss %xmm1, (%rbx,%rdx,4)
jmp 0x25c5
movaps %xmm0, %xmm1
movss (%rbx,%r13,4), %xmm2
ucomiss %xmm2, %xmm1
jbe 0x25e3
movss %xmm2, (%rbx,%rdx,4)
movss %xmm1, (%rbx,%r13,4)
movaps %xmm1, %xmm2
movss (%rbx,%rdx,4), %xmm1
movss (%rbx,%r15,4), %xmm0
ucomiss %xmm0, %xmm1
jae 0x2601
movss %xmm1, (%rbx,%r15,4)
movss %xmm0, (%rbx,%rdx,4)
movss (%rbx,%r13,4), %xmm2
jmp 0x2604
movaps %xmm1, %xmm0
movss %xmm2, (%rbx,%rdx,4)
movss %xmm0, (%rbx,%r13,4)
cmpl %r12d, %r13d
jle 0x2666
leal -0x1(%r12), %edx
movq %r13, %rsi
subq %r15, %rsi
leaq (%rbx,%r15,4), %rdi
xorl %r8d, %r8d
movss (%rdi,%r8,4), %xmm1
ucomiss %xmm1, %xmm0
jb 0x2651
incl %edx
leal (%r12,%r8), %r9d
cmpl %edx, %r9d
je 0x2651
movslq %edx, %r9
movss (%rbx,%r9,4), %xmm2
movss %xmm1, (%rbx,%r9,4)
movss %xmm2, (%rdi,%r8,4)
incq %r8
cmpq %r8, %rsi
jne 0x2626
movss (%rbx,%r13,4), %xmm0
incl %edx
movslq %edx, %rsi
jmp 0x266c
movq %r15, %rsi
movl %r12d, %edx
movss (%rbx,%rsi,4), %xmm1
movss %xmm0, (%rbx,%rsi,4)
movss %xmm1, (%rbx,%r13,4)
cmpl $0x7fe, %eax # imm = 0x7FE
jb 0x26de
leaq 0x12ee(%rip), %rdi # 0x3978
movl %r12d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x2c6c
cmpl %r12d, %r13d
jle 0x2703
leal 0x1(%r12), %eax
movq %r15, %rcx
leaq (%rbx,%rcx,4), %rdx
movss 0x4(%rdx), %xmm0
cmpq %r15, %rcx
jl 0x26cd
movl %eax, %esi
movss (%rdx), %xmm1
ucomiss %xmm1, %xmm0
jae 0x26cd
movss %xmm1, 0x4(%rdx)
addq $-0x4, %rdx
decl %esi
cmpl %r12d, %esi
jg 0x26b4
incq %rcx
movss %xmm0, 0x4(%rdx)
incl %eax
cmpq %r13, %rcx
jne 0x26a4
jmp 0x2703
leal 0x1(%rdx), %esi
cmpl %r13d, %esi
jge 0x26ed
movl %esi, -0x4(%r14,%rcx,4)
movl %eax, %ebp
decl %edx
cmpl %r12d, %edx
jle 0x2703
movslq %ebp, %rbp
movl %r12d, 0x4(%r14,%rbp,4)
addl $0x2, %ebp
movl %edx, (%r14,%rbp,4)
movl %ebp, %eax
testl %ebp, %ebp
jns 0x251e
jmp 0x2771
leaq 0x11e3(%rip), %rdi # 0x38f9
xorl %eax, %eax
callq 0x2bd9
cmpl $0x2, %r15d
jl 0x27d4
movl %ebp, %eax
movl $0x1, %ecx
xorl %edx, %edx
movss (%rbx,%rcx,4), %xmm0
leaq (%rbx,%rdx,4), %rsi
movl %ecx, %edi
movss (%rsi), %xmm1
ucomiss %xmm1, %xmm0
jae 0x2751
movss %xmm1, 0x4(%rsi)
addq $-0x4, %rsi
decl %edi
jg 0x273b
movss %xmm0, 0x4(%rsi)
incq %rcx
incq %rdx
cmpq %rax, %rdx
jne 0x2730
jmp 0x27d4
leaq 0x11e1(%rip), %rdi # 0x394b
xorl %eax, %eax
callq 0x2bd9
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
leaq 0x1127(%rip), %rdi # 0x38b5
xorl %r14d, %r14d
movl %r15d, %esi
xorl %eax, %eax
callq 0x2cff
decl %r15d
movl $0x1, %eax
movss (%rbx,%rax,4), %xmm0
leaq (%rbx,%r14,4), %rcx
movl %eax, %edx
movss (%rcx), %xmm1
ucomiss %xmm1, %xmm0
jae 0x27c4
movss %xmm1, 0x4(%rcx)
addq $-0x4, %rcx
decl %edx
jg 0x27ae
movss %xmm0, 0x4(%rcx)
incq %rax
incq %r14
cmpq %r15, %r14
jne 0x27a3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| vsort_sequential_float:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, esi
mov rbx, rdi
cmp esi, 14h
jl loc_24A4
mov eax, cs:thresholds_2
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
cmp ecx, r15d
jle loc_24A4
movzx eax, r15w
imul eax, 0CCCDh
shr eax, 14h
cmp r15d, 0C8h
mov edx, 0Ah
cmovnb edx, eax
cmp r15d, 7E4h
mov ecx, 64h ; 'd'
cmovb ecx, edx
xor esi, esi
mov eax, r15d
xor edx, edx
div ecx
cmp ecx, r15d
mov edx, 1
cmovbe edx, eax
cmp edx, r15d
jnb short loc_24A4
mov eax, edx
add edx, edx
lea rdi, [rbx+rax*4]
mov r8d, 0FFFFFFFFh
xor r9d, r9d
loc_2461:
mov r10d, esi
mov esi, r9d
movss xmm0, dword ptr [rbx+rsi*4]
xor esi, esi
ucomiss xmm0, dword ptr [rdi+r9*4]
setnbe sil
add esi, r10d
lea r11d, [rdx+r9]
lea r10d, [r8+1]
cmp r11d, r15d
jge short loc_2496
add r8d, 2
add r9, rax
cmp r8d, ecx
mov r8d, r10d
jb short loc_2461
loc_2496:
add esi, esi
lea eax, [rsi+rsi*4]
cmp eax, r10d
jbe loc_2787
loc_24A4:
lea ebp, [r15-1]
cmp cs:thresholds_0, r15d
jle short loc_24FA
cmp r15d, 2
jl loc_27D4
mov eax, ebp
mov ecx, 1
xor edx, edx
loc_24C4:
movss xmm0, dword ptr [rbx+rcx*4]
lea rsi, [rbx+rdx*4]
mov edi, ecx
loc_24CF:
movss xmm1, dword ptr [rsi]
ucomiss xmm0, xmm1
jnb short loc_24E5
movss dword ptr [rsi+4], xmm1
add rsi, 0FFFFFFFFFFFFFFFCh
dec edi
jg short loc_24CF
loc_24E5:
movss dword ptr [rsi+4], xmm0
inc rcx
inc rdx
cmp rdx, rax
jnz short loc_24C4
jmp loc_27D4
loc_24FA:
mov edi, 2000h
call _malloc
test rax, rax
jz loc_270F
mov r14, rax
mov dword ptr [rax], 0
mov [rax+4], ebp
mov eax, 1
loc_251E:
test eax, eax
jz loc_2763
mov ecx, eax
movsxd r13, dword ptr [r14+rcx*4]
lea ebp, [rax-2]
mov r12d, [r14+rcx*4-4]
movsxd r15, r12d
mov edx, r13d
sub edx, r15d
lea esi, [rdx+1]
cmp esi, cs:thresholds_0
jge short loc_2596
cmp r13d, r12d
jle loc_2703
lea eax, [r12+1]
mov rcx, r15
loc_2559:
lea rdx, [rbx+rcx*4]
movss xmm0, dword ptr [rdx+4]
cmp rcx, r15
jl short loc_2582
mov esi, eax
loc_2569:
movss xmm1, dword ptr [rdx]
ucomiss xmm0, xmm1
jnb short loc_2582
movss dword ptr [rdx+4], xmm1
add rdx, 0FFFFFFFFFFFFFFFCh
dec esi
cmp esi, r12d
jg short loc_2569
loc_2582:
inc rcx
movss dword ptr [rdx+4], xmm0
inc eax
cmp rcx, r13
jnz short loc_2559
jmp loc_2703
loc_2596:
mov esi, edx
shr esi, 1Fh
add esi, edx
sar esi, 1
add esi, r12d
movss xmm1, dword ptr [rbx+r15*4]
movsxd rdx, esi
movss xmm0, dword ptr [rbx+rdx*4]
ucomiss xmm1, xmm0
jbe short loc_25C2
movss dword ptr [rbx+r15*4], xmm0
movss dword ptr [rbx+rdx*4], xmm1
jmp short loc_25C5
loc_25C2:
movaps xmm1, xmm0
loc_25C5:
movss xmm2, dword ptr [rbx+r13*4]
ucomiss xmm1, xmm2
jbe short loc_25E3
movss dword ptr [rbx+rdx*4], xmm2
movss dword ptr [rbx+r13*4], xmm1
movaps xmm2, xmm1
movss xmm1, dword ptr [rbx+rdx*4]
loc_25E3:
movss xmm0, dword ptr [rbx+r15*4]
ucomiss xmm1, xmm0
jnb short loc_2601
movss dword ptr [rbx+r15*4], xmm1
movss dword ptr [rbx+rdx*4], xmm0
movss xmm2, dword ptr [rbx+r13*4]
jmp short loc_2604
loc_2601:
movaps xmm0, xmm1
loc_2604:
movss dword ptr [rbx+rdx*4], xmm2
movss dword ptr [rbx+r13*4], xmm0
cmp r13d, r12d
jle short loc_2666
lea edx, [r12-1]
mov rsi, r13
sub rsi, r15
lea rdi, [rbx+r15*4]
xor r8d, r8d
loc_2626:
movss xmm1, dword ptr [rdi+r8*4]
ucomiss xmm0, xmm1
jb short loc_2651
inc edx
lea r9d, [r12+r8]
cmp r9d, edx
jz short loc_2651
movsxd r9, edx
movss xmm2, dword ptr [rbx+r9*4]
movss dword ptr [rbx+r9*4], xmm1
movss dword ptr [rdi+r8*4], xmm2
loc_2651:
inc r8
cmp rsi, r8
jnz short loc_2626
movss xmm0, dword ptr [rbx+r13*4]
inc edx
movsxd rsi, edx
jmp short loc_266C
loc_2666:
mov rsi, r15
mov edx, r12d
loc_266C:
movss xmm1, dword ptr [rbx+rsi*4]
movss dword ptr [rbx+rsi*4], xmm0
movss dword ptr [rbx+r13*4], xmm1
cmp eax, 7FEh
jb short loc_26DE
lea rdi, aQuicksortStack; "Quicksort stack nearing capacity (float"...
mov esi, r12d
mov edx, r13d
xor eax, eax
call vsort_log_warning
cmp r13d, r12d
jle short loc_2703
lea eax, [r12+1]
mov rcx, r15
loc_26A4:
lea rdx, [rbx+rcx*4]
movss xmm0, dword ptr [rdx+4]
cmp rcx, r15
jl short loc_26CD
mov esi, eax
loc_26B4:
movss xmm1, dword ptr [rdx]
ucomiss xmm0, xmm1
jnb short loc_26CD
movss dword ptr [rdx+4], xmm1
add rdx, 0FFFFFFFFFFFFFFFCh
dec esi
cmp esi, r12d
jg short loc_26B4
loc_26CD:
inc rcx
movss dword ptr [rdx+4], xmm0
inc eax
cmp rcx, r13
jnz short loc_26A4
jmp short loc_2703
loc_26DE:
lea esi, [rdx+1]
cmp esi, r13d
jge short loc_26ED
mov [r14+rcx*4-4], esi
mov ebp, eax
loc_26ED:
dec edx
cmp edx, r12d
jle short loc_2703
movsxd rbp, ebp
mov [r14+rbp*4+4], r12d
add ebp, 2
mov [r14+rbp*4], edx
loc_2703:
mov eax, ebp
test ebp, ebp
jns loc_251E
jmp short loc_2771
loc_270F:
lea rdi, aMemoryAllocati_1; "Memory allocation failed in quicksort_f"...
xor eax, eax
call vsort_log_error
cmp r15d, 2
jl loc_27D4
mov eax, ebp
mov ecx, 1
xor edx, edx
loc_2730:
movss xmm0, dword ptr [rbx+rcx*4]
lea rsi, [rbx+rdx*4]
mov edi, ecx
loc_273B:
movss xmm1, dword ptr [rsi]
ucomiss xmm0, xmm1
jnb short loc_2751
movss dword ptr [rsi+4], xmm1
add rsi, 0FFFFFFFFFFFFFFFCh
dec edi
jg short loc_273B
loc_2751:
movss dword ptr [rsi+4], xmm0
inc rcx
inc rdx
cmp rdx, rax
jnz short loc_2730
jmp short loc_27D4
loc_2763:
lea rdi, aQuicksortStack_0; "Quicksort stack underflow! Aborting (fl"...
xor eax, eax
call vsort_log_error
loc_2771:
mov rdi, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _free
loc_2787:
lea rdi, aArrayFloatSize; "Array (float, size %d) appears nearly s"...
xor r14d, r14d
mov esi, r15d
xor eax, eax
call vsort_log_info
dec r15d
mov eax, 1
loc_27A3:
movss xmm0, dword ptr [rbx+rax*4]
lea rcx, [rbx+r14*4]
mov edx, eax
loc_27AE:
movss xmm1, dword ptr [rcx]
ucomiss xmm0, xmm1
jnb short loc_27C4
movss dword ptr [rcx+4], xmm1
add rcx, 0FFFFFFFFFFFFFFFCh
dec edx
jg short loc_27AE
loc_27C4:
movss dword ptr [rcx+4], xmm0
inc rax
inc r14
cmp r14, r15
jnz short loc_27A3
loc_27D4:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long vsort_sequential_float(long long a1, int a2)
{
long long result; // rax
int v3; // r15d
unsigned int v5; // edx
unsigned int v6; // ecx
unsigned int v7; // edx
long long v8; // rax
int v9; // edx
int v10; // r8d
long long v11; // r9
unsigned int v12; // r10d
bool v13; // cf
unsigned int v14; // ebp
long long v15; // rcx
long long v16; // rdx
float v17; // xmm0_4
long long v18; // rsi
int v19; // edi
bool v20; // cc
_DWORD *v21; // rax
float *v22; // rdx
long long v23; // rcx
long long v24; // r8
int v25; // r9d
_DWORD *v26; // r14
unsigned int v27; // eax
long long v28; // r13
long long v29; // rbp
int v30; // r12d
int v31; // eax
float v32; // xmm0_4
int v33; // esi
float v34; // xmm1_4
float v35; // xmm0_4
float v36; // xmm2_4
float v37; // xmm0_4
int v38; // edx
long long v39; // rdi
float v40; // xmm1_4
int v41; // xmm2_4
int v42; // edx
long long v43; // rsi
int v44; // xmm1_4
int v45; // eax
float v46; // xmm0_4
long long v47; // rcx
long long v48; // rdx
float v49; // xmm0_4
long long v50; // rsi
int v51; // edi
long long v52; // r14
int v53; // r15d
float v54; // xmm0_4
long long v55; // rcx
int v56; // edx
char v57; // [rsp-8h] [rbp-38h]
v57 = result;
v3 = a2;
if ( a2 < 20 )
goto LABEL_14;
result = (unsigned int)thresholds_2;
if ( thresholds_2 / 2 <= a2 )
goto LABEL_14;
v5 = 10;
if ( (unsigned int)a2 >= 0xC8 )
v5 = (unsigned __int16)a2 / 0x14u;
v6 = 100;
if ( (unsigned int)a2 < 0x7E4 )
v6 = v5;
a2 = 0;
result = v3 / v6;
v7 = 1;
if ( v6 <= v3 )
v7 = v3 / v6;
if ( v7 >= v3 )
goto LABEL_14;
v8 = v7;
v9 = 2 * v7;
v10 = -1;
v11 = 0LL;
do
{
a2 += *(float *)(a1 + 4LL * (unsigned int)v11) > *(float *)(a1 + 4 * v8 + 4 * v11);
v12 = v10 + 1;
if ( v9 + (int)v11 >= v3 )
break;
v11 += v8;
v13 = v10 + 2 < v6;
++v10;
}
while ( v13 );
a2 *= 2;
result = (unsigned int)(5 * a2);
if ( (unsigned int)result <= v12 )
{
v52 = 0LL;
vsort_log_info(
(unsigned int)"Array (float, size %d) appears nearly sorted, using insertion sort.",
v3,
v9,
v6,
v10,
v11);
v53 = v3 - 1;
result = 1LL;
do
{
v54 = *(float *)(a1 + 4 * result);
v55 = a1 + 4 * v52;
v56 = result;
do
{
if ( v54 >= *(float *)v55 )
break;
*(_DWORD *)(v55 + 4) = *(_DWORD *)v55;
v55 -= 4LL;
v20 = v56-- <= 1;
}
while ( !v20 );
*(float *)(v55 + 4) = v54;
++result;
++v52;
}
while ( v52 != v53 );
}
else
{
LABEL_14:
v14 = v3 - 1;
if ( thresholds_0 <= v3 )
{
v21 = (_DWORD *)malloc(0x2000LL);
if ( v21 )
{
v26 = v21;
*v21 = 0;
v21[1] = v14;
v27 = 1;
while ( v27 )
{
LODWORD(v23) = v27;
v28 = (int)v26[v27];
LODWORD(v29) = v27 - 2;
v30 = v26[v27 - 1];
LODWORD(v22) = v26[v27] - v30;
a2 = (_DWORD)v22 + 1;
if ( (int)v22 + 1 >= thresholds_0 )
{
v33 = v30 + (int)v22 / 2;
v34 = *(float *)(a1 + 4LL * v30);
v35 = *(float *)(a1 + 4LL * v33);
if ( v34 <= v35 )
{
v34 = *(float *)(a1 + 4LL * v33);
}
else
{
*(float *)(a1 + 4LL * v30) = v35;
*(float *)(a1 + 4LL * v33) = v34;
}
v36 = *(float *)(a1 + 4 * v28);
if ( v34 > v36 )
{
*(float *)(a1 + 4LL * v33) = v36;
*(float *)(a1 + 4 * v28) = v34;
v36 = v34;
v34 = *(float *)(a1 + 4LL * v33);
}
v37 = *(float *)(a1 + 4LL * v30);
if ( v34 >= v37 )
{
v37 = v34;
}
else
{
*(float *)(a1 + 4LL * v30) = v34;
*(float *)(a1 + 4LL * v33) = v37;
v36 = *(float *)(a1 + 4 * v28);
}
*(float *)(a1 + 4LL * v33) = v36;
*(float *)(a1 + 4 * v28) = v37;
if ( (int)v28 <= v30 )
{
v43 = v30;
v42 = v30;
}
else
{
v38 = v30 - 1;
v39 = a1 + 4LL * v30;
v24 = 0LL;
do
{
v40 = *(float *)(v39 + 4 * v24);
if ( v37 >= v40 )
{
++v38;
v25 = v30 + v24;
if ( v30 + (_DWORD)v24 != v38 )
{
v25 = v38;
v41 = *(_DWORD *)(a1 + 4LL * v38);
*(float *)(a1 + 4LL * v38) = v40;
*(_DWORD *)(v39 + 4 * v24) = v41;
}
}
++v24;
}
while ( v28 - v30 != v24 );
v37 = *(float *)(a1 + 4 * v28);
v42 = v38 + 1;
v43 = v42;
}
v44 = *(_DWORD *)(a1 + 4 * v43);
*(float *)(a1 + 4 * v43) = v37;
*(_DWORD *)(a1 + 4 * v28) = v44;
if ( v27 < 0x7FE )
{
a2 = v42 + 1;
if ( v42 + 1 < (int)v28 )
{
v26[v27 - 1] = a2;
LODWORD(v29) = v27;
}
LODWORD(v22) = v42 - 1;
if ( (int)v22 > v30 )
{
v26[(int)v29 + 1] = v30;
v29 = (unsigned int)(v29 + 2);
v26[v29] = (_DWORD)v22;
}
}
else
{
a2 = v30;
vsort_log_warning(
(unsigned int)"Quicksort stack nearing capacity (float), potential overflow risk. Falling back for range [%d, %d].",
v30,
v28,
v27,
v24,
v25,
v57);
if ( (int)v28 > v30 )
{
v45 = v30 + 1;
v23 = v30;
do
{
v22 = (float *)(a1 + 4 * v23);
v46 = v22[1];
if ( v23 >= v30 )
{
a2 = v45;
do
{
if ( v46 >= *v22 )
break;
v22[1] = *v22;
--v22;
--a2;
}
while ( a2 > v30 );
}
++v23;
v22[1] = v46;
++v45;
}
while ( v23 != v28 );
}
}
}
else if ( (int)v28 > v30 )
{
v31 = v30 + 1;
v23 = v30;
do
{
v22 = (float *)(a1 + 4 * v23);
v32 = v22[1];
if ( v23 >= v30 )
{
a2 = v31;
do
{
if ( v32 >= *v22 )
break;
v22[1] = *v22;
--v22;
--a2;
}
while ( a2 > v30 );
}
++v23;
v22[1] = v32;
++v31;
}
while ( v23 != v28 );
}
v27 = v29;
if ( (int)v29 < 0 )
return free(v26);
}
vsort_log_error((unsigned int)"Quicksort stack underflow! Aborting (float).", a2, (_DWORD)v22, v23, v24, v25);
return free(v26);
}
else
{
result = vsort_log_error(
(unsigned int)"Memory allocation failed in quicksort_float stack, falling back to insertion sort",
a2,
(_DWORD)v22,
v23,
v24,
v25);
if ( v3 >= 2 )
{
result = v14;
v47 = 1LL;
v48 = 0LL;
do
{
v49 = *(float *)(a1 + 4 * v47);
v50 = a1 + 4 * v48;
v51 = v47;
do
{
if ( v49 >= *(float *)v50 )
break;
*(_DWORD *)(v50 + 4) = *(_DWORD *)v50;
v50 -= 4LL;
v20 = v51-- <= 1;
}
while ( !v20 );
*(float *)(v50 + 4) = v49;
++v47;
++v48;
}
while ( v48 != v14 );
}
}
}
else if ( v3 >= 2 )
{
result = v14;
v15 = 1LL;
v16 = 0LL;
do
{
v17 = *(float *)(a1 + 4 * v15);
v18 = a1 + 4 * v16;
v19 = v15;
do
{
if ( v17 >= *(float *)v18 )
break;
*(_DWORD *)(v18 + 4) = *(_DWORD *)v18;
v18 -= 4LL;
v20 = v19-- <= 1;
}
while ( !v20 );
*(float *)(v18 + 4) = v17;
++v15;
++v16;
}
while ( v16 != v14 );
}
}
return result;
}
| vsort_sequential_float:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ESI
MOV RBX,RDI
CMP ESI,0x14
JL 0x001024a4
MOV EAX,dword ptr [0x001060e0]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
CMP ECX,R15D
JLE 0x001024a4
MOVZX EAX,R15W
IMUL EAX,EAX,0xcccd
SHR EAX,0x14
CMP R15D,0xc8
MOV EDX,0xa
CMOVNC EDX,EAX
CMP R15D,0x7e4
MOV ECX,0x64
CMOVC ECX,EDX
XOR ESI,ESI
MOV EAX,R15D
XOR EDX,EDX
DIV ECX
CMP ECX,R15D
MOV EDX,0x1
CMOVBE EDX,EAX
CMP EDX,R15D
JNC 0x001024a4
MOV EAX,EDX
ADD EDX,EDX
LEA RDI,[RBX + RAX*0x4]
MOV R8D,0xffffffff
XOR R9D,R9D
LAB_00102461:
MOV R10D,ESI
MOV ESI,R9D
MOVSS XMM0,dword ptr [RBX + RSI*0x4]
XOR ESI,ESI
UCOMISS XMM0,dword ptr [RDI + R9*0x4]
SETA SIL
ADD ESI,R10D
LEA R11D,[RDX + R9*0x1]
LEA R10D,[R8 + 0x1]
CMP R11D,R15D
JGE 0x00102496
ADD R8D,0x2
ADD R9,RAX
CMP R8D,ECX
MOV R8D,R10D
JC 0x00102461
LAB_00102496:
ADD ESI,ESI
LEA EAX,[RSI + RSI*0x4]
CMP EAX,R10D
JBE 0x00102787
LAB_001024a4:
LEA EBP,[R15 + -0x1]
CMP dword ptr [0x001060d8],R15D
JLE 0x001024fa
CMP R15D,0x2
JL 0x001027d4
MOV EAX,EBP
MOV ECX,0x1
XOR EDX,EDX
LAB_001024c4:
MOVSS XMM0,dword ptr [RBX + RCX*0x4]
LEA RSI,[RBX + RDX*0x4]
MOV EDI,ECX
LAB_001024cf:
MOVSS XMM1,dword ptr [RSI]
UCOMISS XMM0,XMM1
JNC 0x001024e5
MOVSS dword ptr [RSI + 0x4],XMM1
ADD RSI,-0x4
DEC EDI
JG 0x001024cf
LAB_001024e5:
MOVSS dword ptr [RSI + 0x4],XMM0
INC RCX
INC RDX
CMP RDX,RAX
JNZ 0x001024c4
JMP 0x001027d4
LAB_001024fa:
MOV EDI,0x2000
CALL 0x00101130
TEST RAX,RAX
JZ 0x0010270f
MOV R14,RAX
MOV dword ptr [RAX],0x0
MOV dword ptr [RAX + 0x4],EBP
MOV EAX,0x1
LAB_0010251e:
TEST EAX,EAX
JZ 0x00102763
MOV ECX,EAX
MOVSXD R13,dword ptr [R14 + RCX*0x4]
LEA EBP,[RAX + -0x2]
MOV R12D,dword ptr [R14 + RCX*0x4 + -0x4]
MOVSXD R15,R12D
MOV EDX,R13D
SUB EDX,R15D
LEA ESI,[RDX + 0x1]
CMP ESI,dword ptr [0x001060d8]
JGE 0x00102596
CMP R13D,R12D
JLE 0x00102703
LEA EAX,[R12 + 0x1]
MOV RCX,R15
LAB_00102559:
LEA RDX,[RBX + RCX*0x4]
MOVSS XMM0,dword ptr [RDX + 0x4]
CMP RCX,R15
JL 0x00102582
MOV ESI,EAX
LAB_00102569:
MOVSS XMM1,dword ptr [RDX]
UCOMISS XMM0,XMM1
JNC 0x00102582
MOVSS dword ptr [RDX + 0x4],XMM1
ADD RDX,-0x4
DEC ESI
CMP ESI,R12D
JG 0x00102569
LAB_00102582:
INC RCX
MOVSS dword ptr [RDX + 0x4],XMM0
INC EAX
CMP RCX,R13
JNZ 0x00102559
JMP 0x00102703
LAB_00102596:
MOV ESI,EDX
SHR ESI,0x1f
ADD ESI,EDX
SAR ESI,0x1
ADD ESI,R12D
MOVSS XMM1,dword ptr [RBX + R15*0x4]
MOVSXD RDX,ESI
MOVSS XMM0,dword ptr [RBX + RDX*0x4]
UCOMISS XMM1,XMM0
JBE 0x001025c2
MOVSS dword ptr [RBX + R15*0x4],XMM0
MOVSS dword ptr [RBX + RDX*0x4],XMM1
JMP 0x001025c5
LAB_001025c2:
MOVAPS XMM1,XMM0
LAB_001025c5:
MOVSS XMM2,dword ptr [RBX + R13*0x4]
UCOMISS XMM1,XMM2
JBE 0x001025e3
MOVSS dword ptr [RBX + RDX*0x4],XMM2
MOVSS dword ptr [RBX + R13*0x4],XMM1
MOVAPS XMM2,XMM1
MOVSS XMM1,dword ptr [RBX + RDX*0x4]
LAB_001025e3:
MOVSS XMM0,dword ptr [RBX + R15*0x4]
UCOMISS XMM1,XMM0
JNC 0x00102601
MOVSS dword ptr [RBX + R15*0x4],XMM1
MOVSS dword ptr [RBX + RDX*0x4],XMM0
MOVSS XMM2,dword ptr [RBX + R13*0x4]
JMP 0x00102604
LAB_00102601:
MOVAPS XMM0,XMM1
LAB_00102604:
MOVSS dword ptr [RBX + RDX*0x4],XMM2
MOVSS dword ptr [RBX + R13*0x4],XMM0
CMP R13D,R12D
JLE 0x00102666
LEA EDX,[R12 + -0x1]
MOV RSI,R13
SUB RSI,R15
LEA RDI,[RBX + R15*0x4]
XOR R8D,R8D
LAB_00102626:
MOVSS XMM1,dword ptr [RDI + R8*0x4]
UCOMISS XMM0,XMM1
JC 0x00102651
INC EDX
LEA R9D,[R12 + R8*0x1]
CMP R9D,EDX
JZ 0x00102651
MOVSXD R9,EDX
MOVSS XMM2,dword ptr [RBX + R9*0x4]
MOVSS dword ptr [RBX + R9*0x4],XMM1
MOVSS dword ptr [RDI + R8*0x4],XMM2
LAB_00102651:
INC R8
CMP RSI,R8
JNZ 0x00102626
MOVSS XMM0,dword ptr [RBX + R13*0x4]
INC EDX
MOVSXD RSI,EDX
JMP 0x0010266c
LAB_00102666:
MOV RSI,R15
MOV EDX,R12D
LAB_0010266c:
MOVSS XMM1,dword ptr [RBX + RSI*0x4]
MOVSS dword ptr [RBX + RSI*0x4],XMM0
MOVSS dword ptr [RBX + R13*0x4],XMM1
CMP EAX,0x7fe
JC 0x001026de
LEA RDI,[0x103978]
MOV ESI,R12D
MOV EDX,R13D
XOR EAX,EAX
CALL 0x00102c6c
CMP R13D,R12D
JLE 0x00102703
LEA EAX,[R12 + 0x1]
MOV RCX,R15
LAB_001026a4:
LEA RDX,[RBX + RCX*0x4]
MOVSS XMM0,dword ptr [RDX + 0x4]
CMP RCX,R15
JL 0x001026cd
MOV ESI,EAX
LAB_001026b4:
MOVSS XMM1,dword ptr [RDX]
UCOMISS XMM0,XMM1
JNC 0x001026cd
MOVSS dword ptr [RDX + 0x4],XMM1
ADD RDX,-0x4
DEC ESI
CMP ESI,R12D
JG 0x001026b4
LAB_001026cd:
INC RCX
MOVSS dword ptr [RDX + 0x4],XMM0
INC EAX
CMP RCX,R13
JNZ 0x001026a4
JMP 0x00102703
LAB_001026de:
LEA ESI,[RDX + 0x1]
CMP ESI,R13D
JGE 0x001026ed
MOV dword ptr [R14 + RCX*0x4 + -0x4],ESI
MOV EBP,EAX
LAB_001026ed:
DEC EDX
CMP EDX,R12D
JLE 0x00102703
MOVSXD RBP,EBP
MOV dword ptr [R14 + RBP*0x4 + 0x4],R12D
ADD EBP,0x2
MOV dword ptr [R14 + RBP*0x4],EDX
LAB_00102703:
MOV EAX,EBP
TEST EBP,EBP
JNS 0x0010251e
JMP 0x00102771
LAB_0010270f:
LEA RDI,[0x1038f9]
XOR EAX,EAX
CALL 0x00102bd9
CMP R15D,0x2
JL 0x001027d4
MOV EAX,EBP
MOV ECX,0x1
XOR EDX,EDX
LAB_00102730:
MOVSS XMM0,dword ptr [RBX + RCX*0x4]
LEA RSI,[RBX + RDX*0x4]
MOV EDI,ECX
LAB_0010273b:
MOVSS XMM1,dword ptr [RSI]
UCOMISS XMM0,XMM1
JNC 0x00102751
MOVSS dword ptr [RSI + 0x4],XMM1
ADD RSI,-0x4
DEC EDI
JG 0x0010273b
LAB_00102751:
MOVSS dword ptr [RSI + 0x4],XMM0
INC RCX
INC RDX
CMP RDX,RAX
JNZ 0x00102730
JMP 0x001027d4
LAB_00102763:
LEA RDI,[0x10394b]
XOR EAX,EAX
CALL 0x00102bd9
LAB_00102771:
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00101030
LAB_00102787:
LEA RDI,[0x1038b5]
XOR R14D,R14D
MOV ESI,R15D
XOR EAX,EAX
CALL 0x00102cff
DEC R15D
MOV EAX,0x1
LAB_001027a3:
MOVSS XMM0,dword ptr [RBX + RAX*0x4]
LEA RCX,[RBX + R14*0x4]
MOV EDX,EAX
LAB_001027ae:
MOVSS XMM1,dword ptr [RCX]
UCOMISS XMM0,XMM1
JNC 0x001027c4
MOVSS dword ptr [RCX + 0x4],XMM1
ADD RCX,-0x4
DEC EDX
JG 0x001027ae
LAB_001027c4:
MOVSS dword ptr [RCX + 0x4],XMM0
INC RAX
INC R14
CMP R14,R15
JNZ 0x001027a3
LAB_001027d4:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void vsort_sequential_float(long param_1,uint param_2)
{
int4 uVar1;
int iVar2;
int4 *__ptr;
ulong uVar3;
long lVar4;
float *pfVar5;
int iVar6;
ulong uVar7;
uint uVar8;
int iVar9;
uint uVar10;
long lVar11;
ulong uVar12;
uint uVar13;
long lVar14;
long lVar15;
float fVar16;
float fVar17;
float fVar18;
if ((0x13 < (int)param_2) && ((int)param_2 < thresholds_2 / 2)) {
uVar8 = 10;
if (199 < param_2) {
uVar8 = (param_2 & 0xffff) / 0x14;
}
uVar3 = 100;
if (param_2 < 0x7e4) {
uVar3 = (ulong)uVar8;
}
iVar9 = 0;
uVar7 = 1;
if ((uint)uVar3 <= param_2) {
uVar7 = param_2 / uVar3;
}
if ((uint)uVar7 < param_2) {
uVar12 = 0;
uVar8 = 0xffffffff;
do {
fVar18 = *(float *)(param_1 + (uVar12 & 0xffffffff) * 4);
pfVar5 = (float *)(param_1 + uVar7 * 4 + uVar12 * 4);
iVar9 = (uint)(*pfVar5 <= fVar18 && fVar18 != *pfVar5) + iVar9;
uVar13 = uVar8 + 1;
if ((int)param_2 <= (int)((uint)uVar7 * 2 + (int)uVar12)) break;
uVar10 = uVar8 + 2;
uVar12 = uVar12 + uVar7;
uVar8 = uVar13;
} while (uVar10 < (uint)uVar3);
if ((uint)(iVar9 * 10) <= uVar13) {
uVar7 = 0;
vsort_log_info("Array (float, size %d) appears nearly sorted, using insertion sort.",param_2
);
uVar3 = 1;
do {
fVar18 = *(float *)(param_1 + uVar3 * 4);
pfVar5 = (float *)(param_1 + uVar7 * 4);
uVar12 = uVar3 & 0xffffffff;
do {
if (*pfVar5 <= fVar18) break;
pfVar5[1] = *pfVar5;
pfVar5 = pfVar5 + -1;
iVar9 = (int)uVar12;
uVar8 = iVar9 - 1;
uVar12 = (ulong)uVar8;
} while (uVar8 != 0 && 0 < iVar9);
pfVar5[1] = fVar18;
uVar3 = uVar3 + 1;
uVar7 = uVar7 + 1;
if (uVar7 == param_2 - 1) {
return;
}
} while( true );
}
}
}
uVar8 = param_2 - 1;
if ((int)param_2 < thresholds_0) {
if (1 < (int)param_2) {
uVar3 = 1;
uVar7 = 0;
do {
fVar18 = *(float *)(param_1 + uVar3 * 4);
pfVar5 = (float *)(param_1 + uVar7 * 4);
uVar12 = uVar3 & 0xffffffff;
do {
if (*pfVar5 <= fVar18) break;
pfVar5[1] = *pfVar5;
pfVar5 = pfVar5 + -1;
iVar9 = (int)uVar12;
uVar13 = iVar9 - 1;
uVar12 = (ulong)uVar13;
} while (uVar13 != 0 && 0 < iVar9);
pfVar5[1] = fVar18;
uVar3 = uVar3 + 1;
uVar7 = uVar7 + 1;
} while (uVar7 != uVar8);
}
}
else {
__ptr = (int4 *)malloc(0x2000);
if (__ptr != (int4 *)0x0) {
*__ptr = 0;
__ptr[1] = uVar8;
uVar8 = 1;
do {
if (uVar8 == 0) {
vsort_log_error("Quicksort stack underflow! Aborting (float).");
break;
}
iVar9 = __ptr[uVar8];
lVar14 = (long)iVar9;
uVar13 = uVar8 - 2;
iVar2 = __ptr[(ulong)uVar8 - 1];
lVar15 = (long)iVar2;
if ((iVar9 - iVar2) + 1 < thresholds_0) {
lVar4 = lVar15;
iVar6 = iVar2;
uVar8 = uVar13;
if (iVar2 < iVar9) {
do {
pfVar5 = (float *)(param_1 + lVar4 * 4);
fVar18 = pfVar5[1];
iVar9 = iVar6 + 1;
if (lVar15 <= lVar4) {
do {
if (*pfVar5 <= fVar18) break;
pfVar5[1] = *pfVar5;
pfVar5 = pfVar5 + -1;
iVar9 = iVar9 + -1;
} while (iVar2 < iVar9);
}
lVar4 = lVar4 + 1;
pfVar5[1] = fVar18;
iVar6 = iVar6 + 1;
} while (lVar4 != lVar14);
}
}
else {
fVar18 = *(float *)(param_1 + lVar15 * 4);
lVar4 = (long)((iVar9 - iVar2) / 2 + iVar2);
fVar17 = *(float *)(param_1 + lVar4 * 4);
if (fVar17 < fVar18) {
*(float *)(param_1 + lVar15 * 4) = fVar17;
*(float *)(param_1 + lVar4 * 4) = fVar18;
fVar17 = fVar18;
}
fVar18 = *(float *)(param_1 + lVar14 * 4);
fVar16 = fVar17;
if (fVar18 < fVar17) {
*(float *)(param_1 + lVar4 * 4) = fVar18;
*(float *)(param_1 + lVar14 * 4) = fVar17;
fVar16 = *(float *)(param_1 + lVar4 * 4);
fVar18 = fVar17;
}
fVar17 = *(float *)(param_1 + lVar15 * 4);
if (fVar16 < fVar17) {
*(float *)(param_1 + lVar15 * 4) = fVar16;
*(float *)(param_1 + lVar4 * 4) = fVar17;
fVar18 = *(float *)(param_1 + lVar14 * 4);
fVar16 = fVar17;
}
*(float *)(param_1 + lVar4 * 4) = fVar18;
*(float *)(param_1 + lVar14 * 4) = fVar16;
lVar4 = lVar15;
iVar6 = iVar2;
if (iVar2 < iVar9) {
iVar6 = iVar2 + -1;
lVar4 = param_1 + lVar15 * 4;
lVar11 = 0;
do {
fVar18 = *(float *)(lVar4 + lVar11 * 4);
if ((fVar18 <= fVar16) && (iVar6 = iVar6 + 1, iVar2 + (int)lVar11 != iVar6)) {
uVar1 = *(int4 *)(param_1 + (long)iVar6 * 4);
*(float *)(param_1 + (long)iVar6 * 4) = fVar18;
*(int4 *)(lVar4 + lVar11 * 4) = uVar1;
}
lVar11 = lVar11 + 1;
} while (lVar14 - lVar15 != lVar11);
fVar16 = *(float *)(param_1 + lVar14 * 4);
lVar4 = (long)(iVar6 + 1);
iVar6 = iVar6 + 1;
}
uVar1 = *(int4 *)(param_1 + lVar4 * 4);
*(float *)(param_1 + lVar4 * 4) = fVar16;
*(int4 *)(param_1 + lVar14 * 4) = uVar1;
if (uVar8 < 0x7fe) {
if (iVar6 + 1 < iVar9) {
__ptr[(ulong)uVar8 - 1] = iVar6 + 1;
uVar13 = uVar8;
}
uVar8 = uVar13;
if (iVar2 < iVar6 + -1) {
__ptr[(long)(int)uVar13 + 1] = iVar2;
__ptr[uVar13 + 2] = iVar6 + -1;
uVar8 = uVar13 + 2;
}
}
else {
vsort_log_warning("Quicksort stack nearing capacity (float), potential overflow risk. Falling back for range [%d, %d]."
,iVar2,iVar9);
lVar4 = lVar15;
iVar6 = iVar2;
uVar8 = uVar13;
if (iVar2 < iVar9) {
do {
pfVar5 = (float *)(param_1 + lVar4 * 4);
fVar18 = pfVar5[1];
iVar9 = iVar6 + 1;
if (lVar15 <= lVar4) {
do {
if (*pfVar5 <= fVar18) break;
pfVar5[1] = *pfVar5;
pfVar5 = pfVar5 + -1;
iVar9 = iVar9 + -1;
} while (iVar2 < iVar9);
}
lVar4 = lVar4 + 1;
pfVar5[1] = fVar18;
iVar6 = iVar6 + 1;
} while (lVar4 != lVar14);
}
}
}
} while (-1 < (int)uVar8);
free(__ptr);
return;
}
vsort_log_error(
"Memory allocation failed in quicksort_float stack, falling back to insertion sort"
);
if (1 < (int)param_2) {
uVar3 = 1;
uVar7 = 0;
do {
fVar18 = *(float *)(param_1 + uVar3 * 4);
pfVar5 = (float *)(param_1 + uVar7 * 4);
uVar12 = uVar3 & 0xffffffff;
do {
if (*pfVar5 <= fVar18) break;
pfVar5[1] = *pfVar5;
pfVar5 = pfVar5 + -1;
iVar9 = (int)uVar12;
uVar13 = iVar9 - 1;
uVar12 = (ulong)uVar13;
} while (uVar13 != 0 && 0 < iVar9);
pfVar5[1] = fVar18;
uVar3 = uVar3 + 1;
uVar7 = uVar7 + 1;
} while (uVar7 != uVar8);
}
}
return;
}
| |
52,028 | common_sampler::set_logits(llama_context*, int) | monkey531[P]llama/common/sampling.cpp | void set_logits(struct llama_context * ctx, int idx) {
const auto * logits = llama_get_logits_ith(ctx, idx);
const llama_model * model = llama_get_model(ctx);
const llama_vocab * vocab = llama_model_get_vocab(model);
const int n_vocab = llama_vocab_n_tokens(vocab);
cur.resize(n_vocab);
for (llama_token token_id = 0; token_id < n_vocab; token_id++) {
cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f};
}
cur_p = { cur.data(), cur.size(), -1, false };
} | O0 | cpp | common_sampler::set_logits(llama_context*, int):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x5b070
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rdi
callq 0x5add0
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x5b230
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x5a6a0
movq 0x8(%rsp), %rdi
movl %eax, 0x44(%rsp)
addq $0x180, %rdi # imm = 0x180
movslq 0x44(%rsp), %rsi
callq 0x1c6340
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0x1c561b
movq 0x8(%rsp), %rdi
movl 0x40(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0x58(%rsp), %rax
movslq 0x40(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, 0x38(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x3c(%rsp)
addq $0x180, %rdi # imm = 0x180
movslq 0x40(%rsp), %rsi
callq 0x1c63e0
movq 0x34(%rsp), %rcx
movq %rcx, (%rax)
movl 0x3c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x1c55b9
movq 0x8(%rsp), %rdi
addq $0x180, %rdi # imm = 0x180
callq 0x1c6400
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
addq $0x180, %rdi # imm = 0x180
callq 0x1c6420
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq $-0x1, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x198(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x1a0(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x1a8(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x1b0(%rax)
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN14common_sampler10set_logitsEP13llama_contexti:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov [rsp+78h+var_14], edx
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_70], rax
mov rdi, [rsp+78h+var_10]
mov esi, [rsp+78h+var_14]
call _llama_get_logits_ith
mov [rsp+78h+var_20], rax
mov rdi, [rsp+78h+var_10]
call _llama_get_model
mov [rsp+78h+var_28], rax
mov rdi, [rsp+78h+var_28]
call _llama_model_get_vocab
mov [rsp+78h+var_30], rax
mov rdi, [rsp+78h+var_30]
call _llama_vocab_n_tokens
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_34], eax
add rdi, 180h
movsxd rsi, [rsp+78h+var_34]
call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong)
mov [rsp+78h+var_38], 0
loc_1C55B9:
mov eax, [rsp+78h+var_38]
cmp eax, [rsp+78h+var_34]
jge short loc_1C561B
mov rdi, [rsp+78h+var_70]
mov eax, [rsp+78h+var_38]
mov dword ptr [rsp+78h+var_44], eax
mov rax, [rsp+78h+var_20]
movsxd rcx, [rsp+78h+var_38]
movss xmm0, dword ptr [rax+rcx*4]
movss dword ptr [rsp+78h+var_44+4], xmm0
xorps xmm0, xmm0
movss [rsp+78h+var_3C], xmm0
add rdi, 180h
movsxd rsi, [rsp+78h+var_38]
call _ZNSt6vectorI16llama_token_dataSaIS0_EEixEm; std::vector<llama_token_data>::operator[](ulong)
mov rcx, [rsp+78h+var_44]
mov [rax], rcx
mov ecx, [rsp+78h+var_3C]
mov [rax+8], ecx
mov eax, [rsp+78h+var_38]
add eax, 1
mov [rsp+78h+var_38], eax
jmp short loc_1C55B9
loc_1C561B:
mov rdi, [rsp+78h+var_70]
add rdi, 180h
call _ZNSt6vectorI16llama_token_dataSaIS0_EE4dataEv; std::vector<llama_token_data>::data(void)
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_68], rax
add rdi, 180h
call _ZNKSt6vectorI16llama_token_dataSaIS0_EE4sizeEv; std::vector<llama_token_data>::size(void)
mov rcx, rax
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_60], rcx
mov [rsp+78h+var_58], 0FFFFFFFFFFFFFFFFh
mov byte ptr [rsp+78h+var_50], 0
mov rcx, [rsp+78h+var_68]
mov [rax+198h], rcx
mov rcx, [rsp+78h+var_60]
mov [rax+1A0h], rcx
mov rcx, [rsp+78h+var_58]
mov [rax+1A8h], rcx
mov rcx, [rsp+78h+var_50]
mov [rax+1B0h], rcx
add rsp, 78h
retn
| _QWORD * common_sampler::set_logits(_QWORD *a1, long long a2, unsigned int a3)
{
long long v3; // rax
long long v4; // rcx
_QWORD *result; // rax
long long v6; // [rsp+10h] [rbp-68h]
long long v7; // [rsp+28h] [rbp-50h]
long long v8; // [rsp+34h] [rbp-44h]
int i; // [rsp+40h] [rbp-38h]
int v10; // [rsp+44h] [rbp-34h]
long long vocab; // [rsp+48h] [rbp-30h]
long long model; // [rsp+50h] [rbp-28h]
long long logits_ith; // [rsp+58h] [rbp-20h]
logits_ith = llama_get_logits_ith(a2, a3);
model = llama_get_model(a2);
vocab = llama_model_get_vocab(model);
v10 = llama_vocab_n_tokens(vocab);
std::vector<llama_token_data>::resize(a1 + 48, v10);
for ( i = 0; i < v10; ++i )
{
LODWORD(v8) = i;
HIDWORD(v8) = *(_DWORD *)(logits_ith + 4LL * i);
v3 = std::vector<llama_token_data>::operator[](a1 + 48, i);
*(_QWORD *)v3 = v8;
*(_DWORD *)(v3 + 8) = 0;
}
v6 = std::vector<llama_token_data>::data(a1 + 48);
v4 = std::vector<llama_token_data>::size(a1 + 48);
result = a1;
LOBYTE(v7) = 0;
a1[51] = v6;
a1[52] = v4;
a1[53] = -1LL;
a1[54] = v7;
return result;
}
| |||
52,029 | common_sampler::set_logits(llama_context*, int) | monkey531[P]llama/common/sampling.cpp | void set_logits(struct llama_context * ctx, int idx) {
const auto * logits = llama_get_logits_ith(ctx, idx);
const llama_model * model = llama_get_model(ctx);
const llama_vocab * vocab = llama_model_get_vocab(model);
const int n_vocab = llama_vocab_n_tokens(vocab);
cur.resize(n_vocab);
for (llama_token token_id = 0; token_id < n_vocab; token_id++) {
cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f};
}
cur_p = { cur.data(), cur.size(), -1, false };
} | O1 | cpp | common_sampler::set_logits(llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x1bdd0
movq %rax, %r14
movq %r15, %rdi
callq 0x1b7b0
movq %rax, %rdi
callq 0x1c190
movq %rax, %rdi
callq 0x1c110
movl %eax, %ebp
leaq 0x180(%rbx), %r15
movslq %eax, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xd0886
testl %r12d, %r12d
jle 0xd0698
movq (%r15), %rax
movl %ebp, %ecx
addq $0x8, %rax
xorl %edx, %edx
movss (%r14,%rdx,4), %xmm0
movl %edx, -0x8(%rax)
movss %xmm0, -0x4(%rax)
movl $0x0, (%rax)
incq %rdx
addq $0xc, %rax
cmpq %rdx, %rcx
jne 0xd0678
movq 0x180(%rbx), %rax
movq 0x188(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq %rax, 0x198(%rbx)
movq %rdx, 0x1a0(%rbx)
movq $-0x1, 0x1a8(%rbx)
movb $0x0, 0x1b0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN14common_sampler10set_logitsEP13llama_contexti:
push rbp
push r15
push r14
push r12
push rbx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, edx
call _llama_get_logits_ith
mov r14, rax
mov rdi, r15
call _llama_get_model
mov rdi, rax
call _llama_model_get_vocab
mov rdi, rax
call _llama_vocab_n_tokens
mov ebp, eax
lea r15, [rbx+180h]
movsxd r12, eax
mov rdi, r15
mov rsi, r12
call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong)
test r12d, r12d
jle short loc_D0698
mov rax, [r15]
mov ecx, ebp
add rax, 8
xor edx, edx
loc_D0678:
movss xmm0, dword ptr [r14+rdx*4]
mov [rax-8], edx
movss dword ptr [rax-4], xmm0
mov dword ptr [rax], 0
inc rdx
add rax, 0Ch
cmp rcx, rdx
jnz short loc_D0678
loc_D0698:
mov rax, [rbx+180h]
mov rcx, [rbx+188h]
sub rcx, rax
sar rcx, 2
mov rdx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
mov [rbx+198h], rax
mov [rbx+1A0h], rdx
mov qword ptr [rbx+1A8h], 0FFFFFFFFFFFFFFFFh
mov byte ptr [rbx+1B0h], 0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long common_sampler::set_logits(long long a1, long long a2, unsigned int a3, double a4)
{
long long logits_ith; // r14
long long model; // rax
long long vocab; // rax
int v7; // ebp
_DWORD *v8; // rax
long long i; // rdx
int v10; // xmm0_4
long long result; // rax
long long v12; // rcx
logits_ith = llama_get_logits_ith(a2, a3);
model = llama_get_model(a2);
vocab = llama_model_get_vocab(model);
v7 = llama_vocab_n_tokens(vocab, a4);
std::vector<llama_token_data>::resize(a1 + 384, v7);
if ( v7 > 0 )
{
v8 = (_DWORD *)(*(_QWORD *)(a1 + 384) + 8LL);
for ( i = 0LL; i != v7; ++i )
{
v10 = *(_DWORD *)(logits_ith + 4 * i);
*(v8 - 2) = i;
*(v8 - 1) = v10;
*v8 = 0;
v8 += 3;
}
}
result = *(_QWORD *)(a1 + 384);
v12 = (*(_QWORD *)(a1 + 392) - result) >> 2;
*(_QWORD *)(a1 + 408) = result;
*(_QWORD *)(a1 + 416) = 0xAAAAAAAAAAAAAAABLL * v12;
*(_QWORD *)(a1 + 424) = -1LL;
*(_BYTE *)(a1 + 432) = 0;
return result;
}
| set_logits:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,EDX
CALL 0x0011bdd0
MOV R14,RAX
MOV RDI,R15
CALL 0x0011b7b0
MOV RDI,RAX
CALL 0x0011c190
MOV RDI,RAX
CALL 0x0011c110
MOV EBP,EAX
LEA R15,[RBX + 0x180]
MOVSXD R12,EAX
MOV RDI,R15
MOV RSI,R12
CALL 0x001d0886
TEST R12D,R12D
JLE 0x001d0698
MOV RAX,qword ptr [R15]
MOV ECX,EBP
ADD RAX,0x8
XOR EDX,EDX
LAB_001d0678:
MOVSS XMM0,dword ptr [R14 + RDX*0x4]
MOV dword ptr [RAX + -0x8],EDX
MOVSS dword ptr [RAX + -0x4],XMM0
MOV dword ptr [RAX],0x0
INC RDX
ADD RAX,0xc
CMP RCX,RDX
JNZ 0x001d0678
LAB_001d0698:
MOV RAX,qword ptr [RBX + 0x180]
MOV RCX,qword ptr [RBX + 0x188]
SUB RCX,RAX
SAR RCX,0x2
MOV RDX,-0x5555555555555555
IMUL RDX,RCX
MOV qword ptr [RBX + 0x198],RAX
MOV qword ptr [RBX + 0x1a0],RDX
MOV qword ptr [RBX + 0x1a8],-0x1
MOV byte ptr [RBX + 0x1b0],0x0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* common_sampler::set_logits(llama_context*, int) */
void __thiscall common_sampler::set_logits(common_sampler *this,llama_context *param_1,int param_2)
{
int4 uVar1;
uint uVar2;
long lVar3;
int8 uVar4;
int4 *puVar5;
ulong uVar6;
lVar3 = llama_get_logits_ith(param_1,param_2);
uVar4 = llama_get_model(param_1);
uVar4 = llama_model_get_vocab(uVar4);
uVar2 = llama_vocab_n_tokens(uVar4);
std::vector<llama_token_data,std::allocator<llama_token_data>>::resize
((vector<llama_token_data,std::allocator<llama_token_data>> *)(this + 0x180),
(long)(int)uVar2);
if (0 < (int)uVar2) {
puVar5 = (int4 *)(*(long *)(this + 0x180) + 8);
uVar6 = 0;
do {
uVar1 = *(int4 *)(lVar3 + uVar6 * 4);
puVar5[-2] = (int)uVar6;
puVar5[-1] = uVar1;
*puVar5 = 0;
uVar6 = uVar6 + 1;
puVar5 = puVar5 + 3;
} while (uVar2 != uVar6);
}
*(long *)(this + 0x198) = *(long *)(this + 0x180);
*(long *)(this + 0x1a0) =
(*(long *)(this + 0x188) - *(long *)(this + 0x180) >> 2) * -0x5555555555555555;
*(int8 *)(this + 0x1a8) = 0xffffffffffffffff;
this[0x1b0] = (common_sampler)0x0;
return;
}
| |
52,030 | mi_kpos | eloqsql/storage/myisam/mi_search.c | my_off_t _mi_kpos(uint nod_flag, uchar *after_key)
{
after_key-=nod_flag;
switch (nod_flag) {
#if SIZEOF_OFF_T > 4
case 7:
return mi_uint7korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 6:
return mi_uint6korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 5:
return mi_uint5korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
#else
case 7:
after_key++;
case 6:
after_key++;
case 5:
after_key++;
#endif
case 4:
return ((my_off_t) mi_uint4korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH;
case 3:
return ((my_off_t) mi_uint3korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH;
case 2:
return (my_off_t) (mi_uint2korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH);
case 1:
return (uint) (*after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 0: /* At leaf page */
default: /* Impossible */
return(HA_OFFSET_ERROR);
}
} | O3 | c | mi_kpos:
pushq %rbp
movq %rsp, %rbp
leal -0x1(%rdi), %eax
cmpl $0x6, %eax
ja 0x8b4d3
movl %edi, %ecx
negq %rcx
leaq 0x62012(%rip), %rdx # 0xed474
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movzbl (%rsi,%rcx), %eax
shll $0xa, %eax
jmp 0x8b527
movl (%rsi,%rcx), %eax
movzbl 0x4(%rsi,%rcx), %ecx
shlq $0x38, %rcx
shlq $0x18, %rax
jmp 0x8b51d
movzbl 0x2(%rsi,%rcx), %eax
movzbl 0x1(%rsi,%rcx), %edx
movzbl (%rsi,%rcx), %ecx
shlq $0x1a, %rcx
shll $0x12, %edx
shll $0xa, %eax
orl %edx, %eax
jmp 0x8b4ce
movzbl 0x3(%rsi,%rcx), %eax
movzbl 0x2(%rsi,%rcx), %edx
movzbl 0x1(%rsi,%rcx), %edi
movzbl (%rsi,%rcx), %ecx
shlq $0x22, %rcx
shlq $0x1a, %rdi
shll $0x12, %edx
shll $0xa, %eax
orl %edx, %eax
orq %rdi, %rax
orq %rcx, %rax
jmp 0x8b527
movq $-0x1, %rax
jmp 0x8b527
movzbl 0x1(%rsi,%rcx), %eax
movzbl (%rsi,%rcx), %ecx
shll $0x12, %ecx
shll $0xa, %eax
orl %ecx, %eax
jmp 0x8b527
movl (%rsi,%rcx), %eax
movzwl 0x4(%rsi,%rcx), %ecx
shlq $0x30, %rcx
shlq $0x10, %rax
jmp 0x8b51d
movl (%rsi,%rcx), %eax
movzwl 0x4(%rsi,%rcx), %edx
movzbl 0x6(%rsi,%rcx), %ecx
shlq $0x38, %rcx
shlq $0x28, %rdx
shlq $0x8, %rax
orq %rdx, %rax
orq %rcx, %rax
bswapq %rax
shlq $0xa, %rax
popq %rbp
retq
| _mi_kpos:
push rbp
mov rbp, rsp
lea eax, [rdi-1]; switch 7 cases
cmp eax, 6
ja short def_8B469; jumptable 000000000008B469 default case
mov ecx, edi
neg rcx
lea rdx, jpt_8B469
movsxd rax, ds:(jpt_8B469 - 0ED474h)[rdx+rax*4]
add rax, rdx
jmp rax; switch jump
loc_8B46B:
movzx eax, byte ptr [rsi+rcx]; jumptable 000000000008B469 case 1
shl eax, 0Ah
jmp loc_8B527
loc_8B477:
mov eax, [rsi+rcx]; jumptable 000000000008B469 case 5
movzx ecx, byte ptr [rsi+rcx+4]
shl rcx, 38h
shl rax, 18h
jmp loc_8B51D
loc_8B48C:
movzx eax, byte ptr [rsi+rcx+2]; jumptable 000000000008B469 case 3
movzx edx, byte ptr [rsi+rcx+1]
movzx ecx, byte ptr [rsi+rcx]
shl rcx, 1Ah
shl edx, 12h
shl eax, 0Ah
or eax, edx
jmp short loc_8B4CE
loc_8B4A8:
movzx eax, byte ptr [rsi+rcx+3]; jumptable 000000000008B469 case 4
movzx edx, byte ptr [rsi+rcx+2]
movzx edi, byte ptr [rsi+rcx+1]
movzx ecx, byte ptr [rsi+rcx]
shl rcx, 22h
shl rdi, 1Ah
shl edx, 12h
shl eax, 0Ah
or eax, edx
or rax, rdi
loc_8B4CE:
or rax, rcx
jmp short loc_8B527
def_8B469:
mov rax, 0FFFFFFFFFFFFFFFFh; jumptable 000000000008B469 default case
jmp short loc_8B527
loc_8B4DC:
movzx eax, byte ptr [rsi+rcx+1]; jumptable 000000000008B469 case 2
movzx ecx, byte ptr [rsi+rcx]
shl ecx, 12h
shl eax, 0Ah
or eax, ecx
jmp short loc_8B527
loc_8B4EF:
mov eax, [rsi+rcx]; jumptable 000000000008B469 case 6
movzx ecx, word ptr [rsi+rcx+4]
shl rcx, 30h
shl rax, 10h
jmp short loc_8B51D
loc_8B501:
mov eax, [rsi+rcx]; jumptable 000000000008B469 case 7
movzx edx, word ptr [rsi+rcx+4]
movzx ecx, byte ptr [rsi+rcx+6]
shl rcx, 38h
shl rdx, 28h
shl rax, 8
or rax, rdx
loc_8B51D:
or rax, rcx
bswap rax
shl rax, 0Ah
loc_8B527:
pop rbp
retn
| unsigned long long mi_kpos(unsigned int a1, long long a2)
{
unsigned long long result; // rax
unsigned long long v3; // rcx
unsigned long long v4; // rax
unsigned long long v5; // rcx
unsigned long long v6; // rax
switch ( a1 )
{
case 1u:
return *(unsigned __int8 *)(a2 - a1) << 10;
case 2u:
return (*(unsigned __int8 *)(a2 - a1) << 18) | (*(unsigned __int8 *)(a2 - a1 + 1) << 10);
case 3u:
v5 = (unsigned long long)*(unsigned __int8 *)(a2 - a1) << 26;
v6 = (*(unsigned __int8 *)(a2 - a1 + 1) << 18) | (*(unsigned __int8 *)(a2 - a1 + 2) << 10);
return v5 | v6;
case 4u:
v5 = (unsigned long long)*(unsigned __int8 *)(a2 - a1) << 34;
v6 = ((unsigned long long)*(unsigned __int8 *)(a2 - a1 + 1) << 26) | (*(unsigned __int8 *)(a2 - a1 + 2) << 18) | (*(unsigned __int8 *)(a2 - a1 + 3) << 10);
return v5 | v6;
case 5u:
v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 4) << 56;
v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 24;
goto LABEL_11;
case 6u:
v3 = (unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 48;
v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 16;
goto LABEL_11;
case 7u:
v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 6) << 56;
v4 = ((unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 40) | ((unsigned long long)*(unsigned int *)(a2 - a1) << 8);
LABEL_11:
result = _byteswap_uint64(v3 | v4) << 10;
break;
default:
result = -1LL;
break;
}
return result;
}
| _mi_kpos:
PUSH RBP
MOV RBP,RSP
LEA EAX,[RDI + -0x1]
CMP EAX,0x6
JA 0x0018b4d3
MOV ECX,EDI
NEG RCX
LEA RDX,[0x1ed474]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
switchD:
JMP RAX
caseD_1:
MOVZX EAX,byte ptr [RSI + RCX*0x1]
SHL EAX,0xa
JMP 0x0018b527
caseD_5:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x4]
SHL RCX,0x38
SHL RAX,0x18
JMP 0x0018b51d
caseD_3:
MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x2]
MOVZX EDX,byte ptr [RSI + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1]
SHL RCX,0x1a
SHL EDX,0x12
SHL EAX,0xa
OR EAX,EDX
JMP 0x0018b4ce
caseD_4:
MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x3]
MOVZX EDX,byte ptr [RSI + RCX*0x1 + 0x2]
MOVZX EDI,byte ptr [RSI + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1]
SHL RCX,0x22
SHL RDI,0x1a
SHL EDX,0x12
SHL EAX,0xa
OR EAX,EDX
OR RAX,RDI
LAB_0018b4ce:
OR RAX,RCX
JMP 0x0018b527
LAB_0018b4d3:
MOV RAX,-0x1
JMP 0x0018b527
caseD_2:
MOVZX EAX,byte ptr [RSI + RCX*0x1 + 0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1]
SHL ECX,0x12
SHL EAX,0xa
OR EAX,ECX
JMP 0x0018b527
caseD_6:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX ECX,word ptr [RSI + RCX*0x1 + 0x4]
SHL RCX,0x30
SHL RAX,0x10
JMP 0x0018b51d
caseD_7:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX EDX,word ptr [RSI + RCX*0x1 + 0x4]
MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x6]
SHL RCX,0x38
SHL RDX,0x28
SHL RAX,0x8
OR RAX,RDX
LAB_0018b51d:
OR RAX,RCX
BSWAP RAX
SHL RAX,0xa
LAB_0018b527:
POP RBP
RET
|
ulong _mi_kpos(uint param_1,long param_2)
{
ulong uVar1;
long lVar2;
ulong uVar3;
if (6 < param_1 - 1) {
return 0xffffffffffffffff;
}
lVar2 = -(ulong)param_1;
switch(param_1) {
case 1:
return (ulong)*(byte *)(param_2 + lVar2) << 10;
case 2:
return (ulong)((uint)*(byte *)(param_2 + 1 + lVar2) << 10 |
(uint)*(byte *)(param_2 + lVar2) << 0x12);
case 3:
uVar3 = (ulong)*(byte *)(param_2 + lVar2) << 0x1a;
uVar1 = (ulong)((uint)*(byte *)(param_2 + 2 + lVar2) << 10 |
(uint)*(byte *)(param_2 + 1 + lVar2) << 0x12);
goto LAB_0018b4ce;
case 4:
uVar3 = (ulong)*(byte *)(param_2 + lVar2) << 0x22;
uVar1 = (ulong)((uint)*(byte *)(param_2 + 3 + lVar2) << 10 |
(uint)*(byte *)(param_2 + 2 + lVar2) << 0x12) |
(ulong)*(byte *)(param_2 + 1 + lVar2) << 0x1a;
LAB_0018b4ce:
return uVar1 | uVar3;
case 5:
uVar3 = (ulong)*(byte *)(param_2 + 4 + lVar2) << 0x38;
uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 0x18;
break;
case 6:
uVar3 = (ulong)*(ushort *)(param_2 + 4 + lVar2) << 0x30;
uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 0x10;
break;
case 7:
uVar3 = (ulong)*(byte *)(param_2 + 6 + lVar2) << 0x38;
uVar1 = (ulong)*(uint *)(param_2 + lVar2) << 8 | (ulong)*(ushort *)(param_2 + 4 + lVar2) << 0x28
;
}
return (uVar3 >> 0x38 | ((uVar1 | uVar3) & 0xff000000000000) >> 0x28 |
(uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8
| (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28) << 10;
}
| |
52,031 | my_char_weight_put | eloqsql/strings/ctype-uca.c | static my_bool
my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
uint16 *to, size_t to_length, size_t *nweights,
my_wc_t *str, size_t len)
{
size_t count;
int rc= FALSE;
if (!to_length)
{
*nweights= 0;
return len > 0;
}
to_length--; /* Without trailing zero */
for (count= 0; len; )
{
size_t chlen;
const uint16 *from= NULL;
uint16 implicit_weights[3];
for (chlen= len; chlen > 1; chlen--)
{
const MY_CONTRACTION *cnt;
if (chlen <= MY_UCA_MAX_CONTRACTION &&
(cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
from= cnt->weight;
str+= chlen;
len-= chlen;
break;
}
}
if (!from)
{
from= my_char_weight_addr(dst, *str);
if (!from)
{
from= implicit_weights;
my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno);
}
str++;
len--;
}
for ( ; from && *from && count < to_length; )
{
*to++= *from++;
count++;
}
if (count == to_length && from && * from)
rc= TRUE; /* All weights did not fit */
}
*to= 0;
*nweights= count;
return rc;
} | O0 | c | my_char_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x59bce
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x38(%rbp)
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0x59d6d
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x59d53
movq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x1, -0x50(%rbp)
jbe 0x59c67
cmpq $0x6, -0x50(%rbp)
ja 0x59c57
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x5a020
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x59c57
movq -0x68(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x59c67
jmp 0x59c59
movq -0x50(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x59bfd
cmpq $0x0, -0x58(%rbp)
jne 0x59cc2
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %esi
callq 0x57340
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x59caa
leaq -0x5e(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x5e(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x30(%rax), %edx
callq 0x59940
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x59cc4
xorl %eax, %eax
cmpq $0x0, -0x58(%rbp)
movb %al, -0x69(%rbp)
je 0x59cef
movq -0x58(%rbp), %rax
movzwl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x69(%rbp)
je 0x59cef
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
setb %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x59cf8
jmp 0x59d2a
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x58(%rbp)
movw (%rax), %cx
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x18(%rbp)
movw %cx, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x59cc4
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x59d4e
cmpq $0x0, -0x58(%rbp)
je 0x59d4e
movq -0x58(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
je 0x59d4e
movl $0x1, -0x44(%rbp)
jmp 0x59be2
movq -0x18(%rbp), %rax
movw $0x0, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_char_weight_put:
push rbp
mov rbp, rsp
sub rsp, 70h
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_38], r9
mov [rbp+var_44], 0
cmp [rbp+var_20], 0
jnz short loc_59BCE
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
cmp [rbp+var_38], 0
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp loc_59D6D
loc_59BCE:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
mov [rbp+var_40], 0
loc_59BE2:
cmp [rbp+var_38], 0
jz loc_59D53
mov [rbp+var_58], 0
mov rax, [rbp+var_38]
mov [rbp+var_50], rax
loc_59BFD:
cmp [rbp+var_50], 1
jbe short loc_59C67
cmp [rbp+var_50], 6
ja short loc_59C57
mov rdi, [rbp+var_10]
add rdi, 18h
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_50]
call my_uca_contraction_find
mov [rbp+var_68], rax
cmp rax, 0
jz short loc_59C57
mov rax, [rbp+var_68]
add rax, 30h ; '0'
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
shl rax, 3
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_38]
sub rax, rcx
mov [rbp+var_38], rax
jmp short loc_59C67
loc_59C57:
jmp short $+2
loc_59C59:
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_50], rax
jmp short loc_59BFD
loc_59C67:
cmp [rbp+var_58], 0
jnz short loc_59CC2
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov esi, eax
call my_char_weight_addr
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jnz short loc_59CAA
lea rax, [rbp+var_5E]
mov [rbp+var_58], rax
lea rdi, [rbp+var_5E]
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov edx, [rax+30h]
call my_uca_implicit_weight_put
loc_59CAA:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
loc_59CC2:
jmp short $+2
loc_59CC4:
xor eax, eax
cmp [rbp+var_58], 0
mov [rbp+var_69], al
jz short loc_59CEF
mov rax, [rbp+var_58]
movzx ecx, word ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_69], al
jz short loc_59CEF
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
setb al
mov [rbp+var_69], al
loc_59CEF:
mov al, [rbp+var_69]
test al, 1
jnz short loc_59CF8
jmp short loc_59D2A
loc_59CF8:
mov rax, [rbp+var_58]
mov rcx, rax
add rcx, 2
mov [rbp+var_58], rcx
mov cx, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 2
mov [rbp+var_18], rdx
mov [rax], cx
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_59CC4
loc_59D2A:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
jnz short loc_59D4E
cmp [rbp+var_58], 0
jz short loc_59D4E
mov rax, [rbp+var_58]
movzx eax, word ptr [rax]
cmp eax, 0
jz short loc_59D4E
mov [rbp+var_44], 1
loc_59D4E:
jmp loc_59BE2
loc_59D53:
mov rax, [rbp+var_18]
mov word ptr [rax], 0
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
mov eax, [rbp+var_44]
mov [rbp+var_1], al
loc_59D6D:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| bool my_char_weight_put(
_QWORD *a1,
_WORD *a2,
unsigned long long a3,
unsigned long long *a4,
unsigned long long *a5,
unsigned long long a6)
{
__int16 *v6; // rax
__int16 v7; // cx
_WORD *v8; // rax
bool v10; // [rsp+7h] [rbp-69h]
long long v11; // [rsp+8h] [rbp-68h]
_WORD v12[3]; // [rsp+12h] [rbp-5Eh] BYREF
__int16 *v13; // [rsp+18h] [rbp-58h]
unsigned long long i; // [rsp+20h] [rbp-50h]
int v15; // [rsp+2Ch] [rbp-44h]
unsigned long long v16; // [rsp+30h] [rbp-40h]
unsigned long long v17; // [rsp+38h] [rbp-38h]
unsigned long long *v18; // [rsp+40h] [rbp-30h]
unsigned long long *v19; // [rsp+48h] [rbp-28h]
unsigned long long v20; // [rsp+50h] [rbp-20h]
_WORD *v21; // [rsp+58h] [rbp-18h]
_QWORD *v22; // [rsp+60h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v15 = 0;
if ( a3 )
{
--v20;
v16 = 0LL;
while ( v17 )
{
v13 = 0LL;
for ( i = v17; i > 1; --i )
{
if ( i <= 6 )
{
v11 = my_uca_contraction_find(v22 + 3, v18, i);
if ( v11 )
{
v13 = (__int16 *)(v11 + 48);
v18 += i;
v17 -= i;
break;
}
}
}
if ( !v13 )
{
v13 = (__int16 *)my_char_weight_addr(v22, *v18);
if ( !v13 )
{
v13 = v12;
my_uca_implicit_weight_put(v12, *v18, *((_DWORD *)v22 + 12));
}
++v18;
--v17;
}
while ( 1 )
{
v10 = 0;
if ( v13 )
{
v10 = 0;
if ( *v13 )
v10 = v16 < v20;
}
if ( !v10 )
break;
v6 = v13++;
v7 = *v6;
v8 = v21++;
*v8 = v7;
++v16;
}
if ( v16 == v20 && v13 && *v13 )
v15 = 1;
}
*v21 = 0;
*v19 = v16;
return v15;
}
else
{
*v19 = 0LL;
return v17 != 0;
}
}
| my_char_weight_put:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
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 qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x44],0x0
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00159bce
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
CMP qword ptr [RBP + -0x38],0x0
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x00159d6d
LAB_00159bce:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x40],0x0
LAB_00159be2:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x00159d53
MOV qword ptr [RBP + -0x58],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x50],RAX
LAB_00159bfd:
CMP qword ptr [RBP + -0x50],0x1
JBE 0x00159c67
CMP qword ptr [RBP + -0x50],0x6
JA 0x00159c57
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x0015a020
MOV qword ptr [RBP + -0x68],RAX
CMP RAX,0x0
JZ 0x00159c57
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x30
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
SHL RAX,0x3
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00159c67
LAB_00159c57:
JMP 0x00159c59
LAB_00159c59:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00159bfd
LAB_00159c67:
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x00159cc2
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ESI,EAX
CALL 0x00157340
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x00159caa
LEA RAX,[RBP + -0x5e]
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x5e]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x30]
CALL 0x00159940
LAB_00159caa:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_00159cc2:
JMP 0x00159cc4
LAB_00159cc4:
XOR EAX,EAX
CMP qword ptr [RBP + -0x58],0x0
MOV byte ptr [RBP + -0x69],AL
JZ 0x00159cef
MOV RAX,qword ptr [RBP + -0x58]
MOVZX ECX,word ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x69],AL
JZ 0x00159cef
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
SETC AL
MOV byte ptr [RBP + -0x69],AL
LAB_00159cef:
MOV AL,byte ptr [RBP + -0x69]
TEST AL,0x1
JNZ 0x00159cf8
JMP 0x00159d2a
LAB_00159cf8:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RAX
ADD RCX,0x2
MOV qword ptr [RBP + -0x58],RCX
MOV CX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x2
MOV qword ptr [RBP + -0x18],RDX
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00159cc4
LAB_00159d2a:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00159d4e
CMP qword ptr [RBP + -0x58],0x0
JZ 0x00159d4e
MOV RAX,qword ptr [RBP + -0x58]
MOVZX EAX,word ptr [RAX]
CMP EAX,0x0
JZ 0x00159d4e
MOV dword ptr [RBP + -0x44],0x1
LAB_00159d4e:
JMP 0x00159be2
LAB_00159d53:
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x44]
MOV byte ptr [RBP + -0x1],AL
LAB_00159d6d:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int8
my_char_weight_put(long param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5,
ulong param_6)
{
long lVar1;
ulong uVar2;
bool bVar3;
short local_66 [3];
short *local_60;
ulong local_58;
uint local_4c;
ulong local_48;
ulong local_40;
ulong *local_38;
ulong *local_30;
ulong local_28;
short *local_20;
long local_18;
int1 local_9;
local_4c = 0;
if (param_3 == 0) {
*param_4 = 0;
local_9 = param_6 != 0;
uVar2 = 0;
}
else {
local_28 = param_3 - 1;
local_48 = 0;
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_20 = param_2;
local_18 = param_1;
while (local_40 != 0) {
local_60 = (short *)0x0;
for (local_58 = local_40; 1 < local_58; local_58 = local_58 - 1) {
if ((local_58 < 7) &&
(lVar1 = my_uca_contraction_find(local_18 + 0x18,local_38,local_58), lVar1 != 0)) {
local_60 = (short *)(lVar1 + 0x30);
local_38 = local_38 + local_58;
local_40 = local_40 - local_58;
break;
}
}
if (local_60 == (short *)0x0) {
local_60 = (short *)my_char_weight_addr(local_18,*local_38 & 0xffffffff);
if (local_60 == (short *)0x0) {
local_60 = local_66;
my_uca_implicit_weight_put(local_66,*local_38,*(int4 *)(local_18 + 0x30));
}
local_38 = local_38 + 1;
local_40 = local_40 - 1;
}
while( true ) {
bVar3 = false;
if ((local_60 != (short *)0x0) && (bVar3 = false, *local_60 != 0)) {
bVar3 = local_48 < local_28;
}
if (!bVar3) break;
*local_20 = *local_60;
local_48 = local_48 + 1;
local_60 = local_60 + 1;
local_20 = local_20 + 1;
}
if (((local_48 == local_28) && (local_60 != (short *)0x0)) && (*local_60 != 0)) {
local_4c = 1;
}
}
*local_20 = 0;
*local_30 = local_48;
uVar2 = (ulong)local_4c;
local_9 = (int1)local_4c;
}
return CONCAT71((int7)(uVar2 >> 8),local_9);
}
| |
52,032 | matrix_i_create | tsotchke[P]eshkol/src/core/utils/vector.c | MatrixI* matrix_i_create(Arena* arena, size_t rows, size_t cols) {
assert(arena != NULL);
assert(rows > 0 && rows <= VECTOR_MAX_DIM);
assert(cols > 0 && cols <= VECTOR_MAX_DIM);
MatrixI* mat = arena_alloc_aligned(arena, sizeof(MatrixI), VECTOR_ALIGNMENT);
if (!mat) {
return NULL;
}
mat->rows = rows;
mat->cols = cols;
memset(mat->data, 0, sizeof(mat->data));
return mat;
} | O3 | c | matrix_i_create:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5210
movq %rsi, %r14
leaq -0x1(%rsi), %rax
cmpq $0x4, %rax
jae 0x522f
movq %rdx, %rbx
leaq -0x1(%rdx), %rax
cmpq $0x4, %rax
jae 0x524e
movl $0x60, %esi
movl $0x20, %edx
callq 0x3e09
testq %rax, %rax
je 0x5208
movq %r14, 0x40(%rax)
movq %rbx, 0x48(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1f28(%rip), %rdi # 0x713f
leaq 0x34d2(%rip), %rsi # 0x86f0
leaq 0x3956(%rip), %rcx # 0x8b7b
movl $0x310, %edx # imm = 0x310
callq 0x1090
leaq 0x38cd(%rip), %rdi # 0x8b03
leaq 0x34b3(%rip), %rsi # 0x86f0
leaq 0x3937(%rip), %rcx # 0x8b7b
movl $0x311, %edx # imm = 0x311
callq 0x1090
leaq 0x38d1(%rip), %rdi # 0x8b26
leaq 0x3494(%rip), %rsi # 0x86f0
leaq 0x3918(%rip), %rcx # 0x8b7b
movl $0x312, %edx # imm = 0x312
callq 0x1090
| matrix_i_create:
push r14
push rbx
push rax
test rdi, rdi
jz short loc_5210
mov r14, rsi
lea rax, [rsi-1]
cmp rax, 4
jnb short loc_522F
mov rbx, rdx
lea rax, [rdx-1]
cmp rax, 4
jnb short loc_524E
mov esi, 60h ; '`'
mov edx, 20h ; ' '
call arena_alloc_aligned
test rax, rax
jz short loc_5208
mov [rax+40h], r14
mov [rax+48h], rbx
xorps xmm0, xmm0
movaps xmmword ptr [rax], xmm0
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax+20h], xmm0
movaps xmmword ptr [rax+30h], xmm0
loc_5208:
add rsp, 8
pop rbx
pop r14
retn
loc_5210:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aMatrixiMatrixI; "MatrixI *matrix_i_create(Arena *, size_"...
mov edx, 310h
call ___assert_fail
loc_522F:
lea rdi, aRows0RowsVecto; "rows > 0 && rows <= VECTOR_MAX_DIM"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aMatrixiMatrixI; "MatrixI *matrix_i_create(Arena *, size_"...
mov edx, 311h
call ___assert_fail
loc_524E:
lea rdi, aCols0ColsVecto; "cols > 0 && cols <= VECTOR_MAX_DIM"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aMatrixiMatrixI; "MatrixI *matrix_i_create(Arena *, size_"...
mov edx, 312h
call ___assert_fail
| long long matrix_i_create(_QWORD *a1, long long a2, long long a3)
{
long long result; // rax
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
784LL,
"MatrixI *matrix_i_create(Arena *, size_t, size_t)");
if ( (unsigned long long)(a2 - 1) >= 4 )
__assert_fail(
"rows > 0 && rows <= VECTOR_MAX_DIM",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
785LL,
"MatrixI *matrix_i_create(Arena *, size_t, size_t)");
if ( (unsigned long long)(a3 - 1) >= 4 )
__assert_fail(
"cols > 0 && cols <= VECTOR_MAX_DIM",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
786LL,
"MatrixI *matrix_i_create(Arena *, size_t, size_t)");
result = arena_alloc_aligned(a1, 96LL, 0x20uLL);
if ( result )
{
*(_QWORD *)(result + 64) = a2;
*(_QWORD *)(result + 72) = a3;
*(_OWORD *)result = 0LL;
*(_OWORD *)(result + 16) = 0LL;
*(_OWORD *)(result + 32) = 0LL;
*(_OWORD *)(result + 48) = 0LL;
}
return result;
}
| matrix_i_create:
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00105210
MOV R14,RSI
LEA RAX,[RSI + -0x1]
CMP RAX,0x4
JNC 0x0010522f
MOV RBX,RDX
LEA RAX,[RDX + -0x1]
CMP RAX,0x4
JNC 0x0010524e
MOV ESI,0x60
MOV EDX,0x20
CALL 0x00103e09
TEST RAX,RAX
JZ 0x00105208
MOV qword ptr [RAX + 0x40],R14
MOV qword ptr [RAX + 0x48],RBX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RAX],XMM0
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX + 0x20],XMM0
MOVAPS xmmword ptr [RAX + 0x30],XMM0
LAB_00105208:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00105210:
LEA RDI,[0x10713f]
LEA RSI,[0x1086f0]
LEA RCX,[0x108b7b]
MOV EDX,0x310
CALL 0x00101090
LAB_0010522f:
LEA RDI,[0x108b03]
LEA RSI,[0x1086f0]
LEA RCX,[0x108b7b]
MOV EDX,0x311
CALL 0x00101090
LAB_0010524e:
LEA RDI,[0x108b26]
LEA RSI,[0x1086f0]
LEA RCX,[0x108b7b]
MOV EDX,0x312
CALL 0x00101090
|
void matrix_i_create(long param_1,long param_2,long param_3)
{
int8 *puVar1;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c"
,0x310,"MatrixI *matrix_i_create(Arena *, size_t, size_t)");
}
if (param_2 - 1U < 4) {
if (param_3 - 1U < 4) {
puVar1 = (int8 *)arena_alloc_aligned(param_1,0x60,0x20);
if (puVar1 != (int8 *)0x0) {
puVar1[8] = param_2;
puVar1[9] = param_3;
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
puVar1[3] = 0;
puVar1[4] = 0;
puVar1[5] = 0;
puVar1[6] = 0;
puVar1[7] = 0;
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("cols > 0 && cols <= VECTOR_MAX_DIM",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c"
,0x312,"MatrixI *matrix_i_create(Arena *, size_t, size_t)");
}
/* WARNING: Subroutine does not return */
__assert_fail("rows > 0 && rows <= VECTOR_MAX_DIM",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
0x311,"MatrixI *matrix_i_create(Arena *, size_t, size_t)");
}
| |
52,033 | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | VariableExpr(const Location & location, const std::string& n)
: Expression(location), name(n) {} | O1 | cpp | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x930c5(%rip), %r15 # 0x12d3b8
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9a323
movq 0x94c73(%rip), %rcx # 0x12ef88
cmpb $0x0, (%rcx)
je 0x9a31f
incl 0x8(%rax)
jmp 0x9a323
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x93a8e(%rip), %rax # 0x12ddc0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x232a0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9a36e
callq 0x6e5ca
movq %r14, %rdi
callq 0x1bf90
| _ZN5minja12VariableExprC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9A323
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9A31F
inc dword ptr [rax+8]
jmp short loc_9A323
loc_9A31F:
lock inc dword ptr [rax+8]
loc_9A323:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9A36E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A36E:
mov rdi, r14
call __Unwind_Resume
| long long minja::VariableExpr::VariableExpr(_QWORD *a1, _QWORD *a2, long long a3)
{
long long v3; // rax
*a1 = &`vtable for'minja::Expression + 2;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &`vtable for'minja::VariableExpr + 2;
a1[4] = a1 + 6;
return std::string::_M_construct<char *>(a1 + 4, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
}
| VariableExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x22d3b8]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0019a323
MOV RCX,qword ptr [0x0022ef88]
CMP byte ptr [RCX],0x0
JZ 0x0019a31f
INC dword ptr [RAX + 0x8]
JMP 0x0019a323
LAB_0019a31f:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019a323:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x22ddc0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_0019a34f:
CALL 0x001232a0
LAB_0019a354:
POP RBX
POP R14
POP R15
RET
|
/* minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::string const&) */
void __thiscall
minja::VariableExpr::VariableExpr(VariableExpr *this,Location *param_1,string *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_0022d3c8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_0022ddd0;
*(VariableExpr **)(this + 0x20) = this + 0x30;
/* try { // try from 0019a34f to 0019a353 has its CatchHandler @ 0019a35a */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
return;
}
| |
52,034 | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | VariableExpr(const Location & location, const std::string& n)
: Expression(location), name(n) {} | O3 | cpp | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
movq %rdi, %rbx
leaq 0x91eb5(%rip), %rax # 0x12adc0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x98f2a
movq (%rax), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x91487(%rip), %rax # 0x12a3b8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x98f46
callq 0x6de32
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1a8e0
| _ZN5minja12VariableExprD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_98F2A
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98F2A:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_98F46
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_98F46:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::VariableExpr::~VariableExpr(minja::VariableExpr *this)
{
char *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::VariableExpr + 2;
v2 = (char *)*((_QWORD *)this + 4);
if ( v2 != (char *)this + 48 )
operator delete(v2, *((_QWORD *)this + 6) + 1LL);
*(_QWORD *)this = &`vtable for'minja::Expression + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
| ~VariableExpr:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22adc0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x20]
LEA RAX,[RBX + 0x30]
CMP RDI,RAX
JZ 0x00198f2a
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011a8e0
LAB_00198f2a:
LEA RAX,[0x22a3b8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00198f46
CALL 0x0016de32
LAB_00198f46:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011a8e0
|
/* minja::VariableExpr::~VariableExpr() */
void __thiscall minja::VariableExpr::~VariableExpr(VariableExpr *this)
{
*(int ***)this = &PTR_do_evaluate_0022add0;
if (*(VariableExpr **)(this + 0x20) != this + 0x30) {
operator_delete(*(VariableExpr **)(this + 0x20),*(long *)(this + 0x30) + 1);
}
*(int ***)this = &PTR___cxa_pure_virtual_0022a3c8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_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 + 0x10));
}
operator_delete(this,0x40);
return;
}
| |
52,035 | js_malloc | bluesky950520[P]quickjs/quickjs.c | void *js_malloc(JSContext *ctx, size_t size)
{
void *ptr;
ptr = js_malloc_rt(ctx->rt, size);
if (unlikely(!ptr)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return ptr;
} | O1 | c | js_malloc:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xed69
testq %rax, %rax
je 0xedfa
popq %rbx
retq
movq %rbx, %rdi
callq 0x1cb63
xorl %eax, %eax
jmp 0xedf8
| js_malloc:
push rbx
mov rbx, rdi
mov rdi, [rdi+18h]
call js_malloc_rt
test rax, rax
jz short loc_EDFA
loc_EDF8:
pop rbx
retn
loc_EDFA:
mov rdi, rbx
call JS_ThrowOutOfMemory
xor eax, eax
jmp short loc_EDF8
| long long js_malloc(long long a1, long long a2)
{
long long result; // rax
result = js_malloc_rt(*(_QWORD *)(a1 + 24), a2);
if ( !result )
{
JS_ThrowOutOfMemory(a1);
return 0LL;
}
return result;
}
| js_malloc:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
CALL 0x0010ed69
TEST RAX,RAX
JZ 0x0010edfa
LAB_0010edf8:
POP RBX
RET
LAB_0010edfa:
MOV RDI,RBX
CALL 0x0011cb63
XOR EAX,EAX
JMP 0x0010edf8
|
long js_malloc(long param_1)
{
long lVar1;
lVar1 = js_malloc_rt(*(int8 *)(param_1 + 0x18));
if (lVar1 == 0) {
JS_ThrowOutOfMemory(param_1);
lVar1 = 0;
}
return lVar1;
}
| |
52,036 | js_malloc | bluesky950520[P]quickjs/quickjs.c | void *js_malloc(JSContext *ctx, size_t size)
{
void *ptr;
ptr = js_malloc_rt(ctx->rt, size);
if (unlikely(!ptr)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return ptr;
} | O2 | c | js_malloc:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x17079
movq %rax, %r14
testq %rax, %rax
je 0x17237
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x171e0
jmp 0x1722c
| js_malloc:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+18h]
call js_malloc_rt
mov r14, rax
test rax, rax
jz short loc_17237
loc_1722C:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_17237:
mov rdi, rbx
call JS_ThrowOutOfMemory
jmp short loc_1722C
| long long js_malloc(long long a1, long long a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v6; // r14
v6 = js_malloc_rt(*(_QWORD *)(a1 + 24), a2);
if ( !v6 )
JS_ThrowOutOfMemory(a1, a2, v2, v3, v4, v5);
return v6;
}
| js_malloc:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
CALL 0x00117079
MOV R14,RAX
TEST RAX,RAX
JZ 0x00117237
LAB_0011722c:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00117237:
MOV RDI,RBX
CALL 0x001171e0
JMP 0x0011722c
|
long js_malloc(long param_1)
{
long lVar1;
lVar1 = js_malloc_rt(*(int8 *)(param_1 + 0x18));
if (lVar1 == 0) {
JS_ThrowOutOfMemory(param_1);
}
return lVar1;
}
| |
52,037 | js_malloc | bluesky950520[P]quickjs/quickjs.c | void *js_malloc(JSContext *ctx, size_t size)
{
void *ptr;
ptr = js_malloc_rt(ctx->rt, size);
if (unlikely(!ptr)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return ptr;
} | O3 | c | js_malloc:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xed88
movq %rax, %r14
testq %rax, %rax
je 0xee35
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x1d44b
jmp 0xee2a
| js_malloc:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+18h]
call js_malloc_rt
mov r14, rax
test rax, rax
jz short loc_EE35
loc_EE2A:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_EE35:
mov rdi, rbx
call JS_ThrowOutOfMemory
jmp short loc_EE2A
| long long js_malloc(long long a1, long long a2)
{
long long v2; // r14
v2 = js_malloc_rt(*(_QWORD *)(a1 + 24), a2);
if ( !v2 )
JS_ThrowOutOfMemory(a1);
return v2;
}
| js_malloc:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
CALL 0x0010ed88
MOV R14,RAX
TEST RAX,RAX
JZ 0x0010ee35
LAB_0010ee2a:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0010ee35:
MOV RDI,RBX
CALL 0x0011d44b
JMP 0x0010ee2a
|
long js_malloc(long param_1)
{
long lVar1;
lVar1 = js_malloc_rt(*(int8 *)(param_1 + 0x18));
if (lVar1 == 0) {
JS_ThrowOutOfMemory(param_1);
}
return lVar1;
}
| |
52,038 | 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[](unsigned long) const | monkey531[P]llama/common/json.hpp | const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | 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>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0x65637
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
movq %r14, %rdi
callq 0x3e11c
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x484ef(%rip), %rsi # 0xadb4a
leaq 0x10(%rsp), %rdi
callq 0x656d0
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x3dec4
xorl %ebp, %ebp
leaq 0x76c42(%rip), %rsi # 0xdc2c8
leaq -0x18f09(%rip), %rdx # 0x4c784
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x656bb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x656bb
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x656c8
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18ba0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_65637
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_65637:
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, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; 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_656BB
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_656BB
mov r14, rax
mov bpl, 1
loc_656BB:
test bpl, bpl
jz short loc_656C8
mov rdi, rbx; void *
call ___cxa_free_exception
loc_656C8:
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,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
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) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x00165637
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00165637:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013e11c
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00165654:
LEA RSI,[0x1adb4a]
LEA RDI,[RSP + 0x10]
CALL 0x001656d0
MOV BPL,0x1
LAB_00165668:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0013dec4
XOR EBP,EBP
LEA RSI,[0x1dc2c8]
LEA RDX,[0x14c784]
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>::operator[](unsigned long) const */
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,ulong param_1)
{
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>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00165654 to 00165664 has its CatchHandler @ 001656b5 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 00165668 to 00165694 has its CatchHandler @ 00165695 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
52,039 | testing::internal::ReadEntireFile[abi:cxx11](_IO_FILE*) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc | std::string ReadEntireFile(FILE* file) {
const size_t file_size = GetFileSize(file);
char* const buffer = new char[file_size];
size_t bytes_last_read = 0; // # of bytes read in the last fread()
size_t bytes_read = 0; // # of bytes read so far
fseek(file, 0, SEEK_SET);
// Keeps reading the file until we cannot read further or the
// pre-determined file size is reached.
do {
bytes_last_read =
fread(buffer + bytes_read, 1, file_size - bytes_read, file);
bytes_read += bytes_last_read;
} while (bytes_last_read > 0 && bytes_read < file_size);
const std::string content(buffer, bytes_read);
delete[] buffer;
return content;
} | O0 | cpp | testing::internal::ReadEntireFile[abi:cxx11](_IO_FILE*):
subq $0x88, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1bc90
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdi
callq 0xb040
movq %rax, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq 0x78(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0xb530
movq 0x68(%rsp), %rdi
addq 0x58(%rsp), %rdi
movq 0x70(%rsp), %rdx
subq 0x58(%rsp), %rdx
movq 0x78(%rsp), %rcx
movl $0x1, %esi
callq 0xb800
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq 0x58(%rsp), %rax
movq %rax, 0x58(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x60(%rsp)
movb %al, 0x2f(%rsp)
jbe 0x1bd77
movq 0x58(%rsp), %rax
cmpq 0x70(%rsp), %rax
setb %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x1bd21
movb $0x0, 0x57(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x56(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xb920
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x46230
jmp 0x1bdc2
leaq 0x56(%rsp), %rdi
callq 0xb500
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x1bde6
movq 0x8(%rsp), %rdi
callq 0xb6a0
movb $0x1, 0x57(%rsp)
testb $0x1, 0x57(%rsp)
jne 0x1be18
jmp 0x1be0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x56(%rsp), %rdi
callq 0xb500
jmp 0x1be25
movq 0x30(%rsp), %rdi
callq 0xec60
movq 0x38(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0xb910
nop
| _ZN7testing8internal14ReadEntireFileB5cxx11EP8_IO_FILE:
sub rsp, 88h
mov [rsp+88h+var_58], rdi
mov rax, rdi
mov [rsp+88h+var_50], rax
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov rdi, [rsp+88h+var_10]
call _ZN7testing8internal11GetFileSizeEP8_IO_FILE; testing::internal::GetFileSize(_IO_FILE *)
mov [rsp+88h+var_18], rax
mov rdi, [rsp+88h+var_18]; unsigned __int64
call __Znam; operator new[](ulong)
mov [rsp+88h+var_20], rax
mov [rsp+88h+var_28], 0
mov [rsp+88h+var_30], 0
mov rdi, [rsp+88h+var_10]
xor eax, eax
mov esi, eax
xor edx, edx
call _fseek
loc_1BD21:
mov rdi, [rsp+88h+var_20]
add rdi, [rsp+88h+var_30]
mov rdx, [rsp+88h+var_18]
sub rdx, [rsp+88h+var_30]
mov rcx, [rsp+88h+var_10]
mov esi, 1
call _fread
mov [rsp+88h+var_28], rax
mov rax, [rsp+88h+var_28]
add rax, [rsp+88h+var_30]
mov [rsp+88h+var_30], rax
xor eax, eax
cmp [rsp+88h+var_28], 0
mov [rsp+88h+var_59], al
jbe short loc_1BD77
mov rax, [rsp+88h+var_30]
cmp rax, [rsp+88h+var_18]
setb al
mov [rsp+88h+var_59], al
loc_1BD77:
mov al, [rsp+88h+var_59]
test al, 1
jnz short loc_1BD21
mov [rsp+88h+var_31], 0
mov rax, [rsp+88h+var_20]
mov [rsp+88h+var_78], rax
mov rax, [rsp+88h+var_30]
mov [rsp+88h+var_70], rax
lea rdi, [rsp+88h+var_32]
mov [rsp+88h+var_68], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+88h+var_58]
mov rsi, [rsp+88h+var_78]
mov rdx, [rsp+88h+var_70]
mov rcx, [rsp+88h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&)
jmp short $+2
loc_1BDC2:
lea rdi, [rsp+88h+var_32]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+88h+var_20]
mov [rsp+88h+var_80], rax
cmp rax, 0
jz short loc_1BDE6
mov rdi, [rsp+88h+var_80]; void *
call __ZdaPv; operator delete[](void *)
loc_1BDE6:
mov [rsp+88h+var_31], 1
test [rsp+88h+var_31], 1
jnz short loc_1BE18
jmp short loc_1BE0E
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_4E]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_1BE25
loc_1BE0E:
mov rdi, [rsp+88h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1BE18:
mov rax, [rsp+88h+var_50]
add rsp, 88h
retn
loc_1BE25:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| long long testing::internal::ReadEntireFile[abi:cxx11](long long a1, long long a2)
{
int v2; // r8d
int v3; // r9d
char *v5; // [rsp+10h] [rbp-78h]
int v6; // [rsp+18h] [rbp-70h]
bool v7; // [rsp+2Fh] [rbp-59h]
_BYTE v8[2]; // [rsp+56h] [rbp-32h] BYREF
unsigned long long v9; // [rsp+58h] [rbp-30h]
long long v10; // [rsp+60h] [rbp-28h]
char *v11; // [rsp+68h] [rbp-20h]
unsigned long long FileSize; // [rsp+70h] [rbp-18h]
long long v13; // [rsp+78h] [rbp-10h]
long long v14; // [rsp+80h] [rbp-8h]
v14 = a1;
v13 = a2;
FileSize = testing::internal::GetFileSize(a2);
v11 = (char *)operator new[](FileSize);
v10 = 0LL;
v9 = 0LL;
fseek(a2, 0LL, 0LL);
do
{
v10 = fread(&v11[v9], 1LL, FileSize - v9, v13);
v9 += v10;
v7 = 0;
if ( v10 )
v7 = v9 < FileSize;
}
while ( v7 );
v8[1] = 0;
v5 = v11;
v6 = v9;
std::allocator<char>::allocator();
std::string::basic_string(a1, (_DWORD)v5, v6, (unsigned int)v8, v2, v3);
std::allocator<char>::~allocator(v8, v5);
if ( v11 )
operator delete[](v11);
return a1;
}
| ReadEntireFile[abi:cxx11]:
SUB RSP,0x88
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x0011bc90
MOV qword ptr [RSP + 0x70],RAX
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x0010b040
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x58],0x0
MOV RDI,qword ptr [RSP + 0x78]
XOR EAX,EAX
MOV ESI,EAX
XOR EDX,EDX
CALL 0x0010b530
LAB_0011bd21:
MOV RDI,qword ptr [RSP + 0x68]
ADD RDI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x70]
SUB RDX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x78]
MOV ESI,0x1
CALL 0x0010b800
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
ADD RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x58],RAX
XOR EAX,EAX
CMP qword ptr [RSP + 0x60],0x0
MOV byte ptr [RSP + 0x2f],AL
JBE 0x0011bd77
MOV RAX,qword ptr [RSP + 0x58]
CMP RAX,qword ptr [RSP + 0x70]
SETC AL
MOV byte ptr [RSP + 0x2f],AL
LAB_0011bd77:
MOV AL,byte ptr [RSP + 0x2f]
TEST AL,0x1
JNZ 0x0011bd21
MOV byte ptr [RSP + 0x57],0x0
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x56]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x0010b920
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
LAB_0011bdbb:
CALL 0x00146230
LAB_0011bdc0:
JMP 0x0011bdc2
LAB_0011bdc2:
LEA RDI,[RSP + 0x56]
CALL 0x0010b500
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],RAX
CMP RAX,0x0
JZ 0x0011bde6
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010b6a0
LAB_0011bde6:
MOV byte ptr [RSP + 0x57],0x1
TEST byte ptr [RSP + 0x57],0x1
JNZ 0x0011be18
JMP 0x0011be0e
LAB_0011be0e:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x0010ec60
LAB_0011be18:
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x88
RET
|
/* WARNING: Removing unreachable block (ram,0x0011bdf2) */
/* testing::internal::ReadEntireFile[abi:cxx11](_IO_FILE*) */
internal * __thiscall testing::internal::ReadEntireFile_abi_cxx11_(internal *this,_IO_FILE *param_1)
{
char *pcVar1;
ulong uVar2;
bool local_59;
allocator local_32;
int1 local_31;
ulong local_30;
size_t local_28;
char *local_20;
ulong local_18;
_IO_FILE *local_10;
internal *local_8;
local_10 = param_1;
local_8 = this;
local_18 = GetFileSize(param_1);
local_20 = (char *)operator_new__(local_18);
local_28 = 0;
local_30 = 0;
fseek(local_10,0,0);
do {
local_28 = fread(local_20 + local_30,1,local_18 - local_30,local_10);
pcVar1 = local_20;
uVar2 = local_28 + local_30;
local_59 = local_28 != 0 && uVar2 < local_18;
local_30 = uVar2;
} while (local_59);
local_31 = 0;
std::allocator<char>::allocator();
/* try { // try from 0011bdbb to 0011bdbf has its CatchHandler @ 0011bdf4 */
std::__cxx11::string::string((string *)this,pcVar1,uVar2,&local_32);
std::allocator<char>::~allocator((allocator<char> *)&local_32);
if (local_20 != (char *)0x0) {
operator_delete__(local_20);
}
return this;
}
| |
52,040 | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char) | monkey531[P]llama/common/./json.hpp | void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
} | O0 | cpp | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x11813c
movq 0x10(%rsp), %rdi
callq 0x116c30
movq %rax, %rdi
movq (%rdi), %rax
movl $0x30, %esi
callq *(%rax)
jmp 0x118386
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x118bc0
movq 0x10(%rsp), %rdi
movq %rax, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x38(%rsp), %rsi
callq 0x118e90
testb $0x1, %al
jne 0x11816c
jmp 0x1181a0
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movb $0x2d, (%rax)
movq 0x38(%rsp), %rsi
callq 0x118bf0
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x118c70
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x1181bd
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x118c70
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movq %rax, 0x8(%rsp)
addq $0x10, %rdi
callq 0x118d00
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1181e7
jmp 0x118206
leaq 0xbc02b(%rip), %rdi # 0x1d4219
leaq 0xb4727(%rip), %rsi # 0x1cc91c
movl $0x4952, %edx # imm = 0x4952
leaq 0xbc2b6(%rip), %rcx # 0x1d44b7
callq 0x50230
movl 0x24(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
cmpq $0x64, 0x28(%rsp)
jb 0x1182bc
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x28(%rsp)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0xc05b9(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
movl $0x1, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0xc0584(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x118219
cmpq $0xa, 0x28(%rsp)
jb 0x118338
movq 0x28(%rsp), %rax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0xc053a(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
movl $0x1, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0xc0505(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x118357
movq 0x28(%rsp), %rax
addq $0x30, %rax
movb %al, %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movq 0x10(%rsp), %rdi
callq 0x116c30
movq 0x10(%rsp), %rdi
movq %rax, (%rsp)
addq $0x10, %rdi
callq 0x118d70
movq (%rsp), %rdi
movq %rax, %rsi
movl 0x24(%rsp), %eax
movl %eax, %edx
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_38], rax
cmp [rsp+48h+var_10], 0
jnz short loc_11813C
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
mov esi, 30h ; '0'
call qword ptr [rax]
jmp loc_118386
loc_11813C:
mov rdi, [rsp+48h+var_38]
add rdi, 10h
call _ZNSt5arrayIcLm64EE5beginEv; std::array<char,64ul>::begin(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_18], rax
mov [rsp+48h+var_24], 0
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_
test al, 1
jnz short loc_11816C
jmp short loc_1181A0
loc_11816C:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_18]
mov byte ptr [rax], 2Dh ; '-'
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11remove_signEl; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(long)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
add eax, 1
mov [rsp+48h+var_24], eax
jmp short loc_1181BD
loc_1181A0:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
mov [rsp+48h+var_24], eax
loc_1181BD:
mov rdi, [rsp+48h+var_38]
mov eax, [rsp+48h+var_24]
mov [rsp+48h+var_40], rax
add rdi, 10h
call _ZNKSt5arrayIcLm64EE4sizeEv; std::array<char,64ul>::size(void)
mov rcx, rax
mov rax, [rsp+48h+var_40]
sub rcx, 1
cmp rax, rcx
jnb short loc_1181E7
jmp short loc_118206
loc_1181E7:
lea rdi, aNCharsNumberBu; "n_chars < number_buffer.size() - 1"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 4952h
lea rcx, aVoidNlohmannDe_8; "void nlohmann::detail::serializer<nlohm"...
call ___assert_fail
loc_118206:
mov ecx, [rsp+48h+var_24]
mov rax, [rsp+48h+var_18]
mov ecx, ecx
add rax, rcx
mov [rsp+48h+var_18], rax
loc_118219:
cmp [rsp+48h+var_20], 64h ; 'd'
jb loc_1182BC
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov eax, edx
mov [rsp+48h+var_28], eax
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov [rsp+48h+var_20], rax
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp loc_118219
loc_1182BC:
cmp [rsp+48h+var_20], 0Ah
jb short loc_118338
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_2C], eax
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp short loc_118357
loc_118338:
mov rax, [rsp+48h+var_20]
add rax, 30h ; '0'
mov cl, al
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
loc_118357:
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_48], rax
add rdi, 10h
call _ZNSt5arrayIcLm64EE4dataEv; std::array<char,64ul>::data(void)
mov rdi, [rsp+48h+var_48]
mov rsi, rax
mov eax, [rsp+48h+var_24]
mov edx, eax
mov rax, [rdi]
call qword ptr [rax+8]
loc_118386:
add rsp, 48h
retn
| long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
long long a1,
unsigned long long a2)
{
long long ( ***v2)(_QWORD, long long); // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // [rsp+0h] [rbp-48h]
unsigned int v10; // [rsp+20h] [rbp-28h]
unsigned int v11; // [rsp+24h] [rbp-24h]
unsigned long long v12; // [rsp+28h] [rbp-20h]
_BYTE *v13; // [rsp+30h] [rbp-18h]
_BYTE *v14; // [rsp+30h] [rbp-18h]
if ( a2 )
{
v13 = (_BYTE *)std::array<char,64ul>::begin(a1 + 16);
if ( (ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_(
a1,
a2) & 1) != 0 )
{
*v13 = 45;
v12 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(
a1,
a2);
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
v12)
+ 1;
}
else
{
v12 = a2;
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
a2);
}
if ( v11 >= (unsigned long long)(std::array<char,64ul>::size(a1 + 16) - 1) )
__assert_fail(
"n_chars < number_buffer.size() - 1",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
18770LL,
"void nlohmann::detail::serializer<nlohmann::basic_json<nlohmann::ordered_map>>::dump_integer(NumberType) [BasicJ"
"sonType = nlohmann::basic_json<nlohmann::ordered_map>, NumberType = long]");
v14 = &v13[v11];
while ( v12 >= 0x64 )
{
v10 = v12 % 0x64;
v12 /= 0x64uLL;
v4 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v4, 1LL);
v5 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
v14 -= 2;
*v14 = *(_BYTE *)std::array<char,2ul>::operator[](v5, 0LL);
}
if ( v12 < 0xA )
{
*(v14 - 1) = v12 + 48;
}
else
{
v6 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v6, 1LL);
v7 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 2) = *(_BYTE *)std::array<char,2ul>::operator[](v7, 0LL);
}
v9 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
v8 = std::array<char,64ul>::data(a1 + 16);
return (*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v9 + 8LL))(v9, v8, v11);
}
else
{
v2 = (long long ( ***)(_QWORD, long long))std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
return (**v2)(v2, 48LL);
}
}
| |||
52,041 | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char) | monkey531[P]llama/common/./json.hpp | void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char):
testl %esi, %esi
je 0x66c1c
movl %esi, %eax
leaq 0x10(%rdi), %rsi
movzbl %al, %ecx
movl $0x1, %edx
cmpb $0xa, %cl
jb 0x66c02
movl $0x2, %edx
cmpb $0x64, %al
jae 0x66c2c
leaq (%rsi,%rdx), %r8
cmpb $0xa, %al
jb 0x66c57
leaq 0x58711(%rip), %rax # 0xbf322
movzwl (%rax,%rcx,2), %eax
movw %ax, -0x2(%r8)
jmp 0x66c5d
movq (%rdi), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0x30, %esi
jmpq *%rax
leal (%rcx,%rcx,4), %edx
leal (%rcx,%rdx,8), %ecx
shrl $0xc, %ecx
imull $0x64, %ecx, %edx
subb %dl, %al
movzbl %al, %eax
leaq 0x586de(%rip), %rdx # 0xbf322
movzwl (%rdx,%rax,2), %eax
leaq 0x11(%rdi), %r8
movw %ax, 0x11(%rdi)
movl $0x3, %edx
movl %ecx, %eax
orb $0x30, %al
movb %al, -0x1(%r8)
movq (%rdi), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
jmpq *%rax
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
test esi, esi
jz short loc_66C1C
mov eax, esi
lea rsi, [rdi+10h]
movzx ecx, al
mov edx, 1
cmp cl, 0Ah
jb short loc_66C02
mov edx, 2
cmp al, 64h ; 'd'
jnb short loc_66C2C
loc_66C02:
lea r8, [rsi+rdx]
cmp al, 0Ah
jb short loc_66C57
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rax+rcx*2]
mov [r8-2], ax
jmp short loc_66C5D
loc_66C1C:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax]
mov esi, 30h ; '0'
jmp rax
loc_66C2C:
lea edx, [rcx+rcx*4]
lea ecx, [rcx+rdx*8]
shr ecx, 0Ch
imul edx, ecx, 64h ; 'd'
sub al, dl
movzx eax, al
lea rdx, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rdx+rax*2]
lea r8, [rdi+11h]
mov [rdi+11h], ax
mov edx, 3
mov eax, ecx
loc_66C57:
or al, 30h
mov [r8-1], al
loc_66C5D:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax+8]
jmp rax
| long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
_QWORD *a1,
int a2)
{
char v2; // al
long long v3; // rdx
char *v4; // r8
if ( !a2 )
return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL);
v2 = a2;
v3 = 1LL;
if ( (unsigned __int8)a2 >= 0xAu )
{
v3 = 2LL;
if ( (unsigned __int8)a2 >= 0x64u )
{
v4 = (char *)a1 + 17;
*(_WORD *)((char *)a1 + 17) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2 % 0x64u];
v2 = (unsigned __int8)a2 / 0x64u;
goto LABEL_8;
}
}
v4 = (char *)a1 + v3 + 16;
if ( (unsigned __int8)a2 < 0xAu )
{
LABEL_8:
*(v4 - 1) = v2 | 0x30;
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
*((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2];
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
TEST ESI,ESI
JZ 0x00166c1c
MOV EAX,ESI
LEA RSI,[RDI + 0x10]
MOVZX ECX,AL
MOV EDX,0x1
CMP CL,0xa
JC 0x00166c02
MOV EDX,0x2
CMP AL,0x64
JNC 0x00166c2c
LAB_00166c02:
LEA R8,[RSI + RDX*0x1]
CMP AL,0xa
JC 0x00166c57
LEA RAX,[0x1bf322]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV word ptr [R8 + -0x2],AX
JMP 0x00166c5d
LAB_00166c1c:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX]
MOV ESI,0x30
JMP RAX
LAB_00166c2c:
LEA EDX,[RCX + RCX*0x4]
LEA ECX,[RCX + RDX*0x8]
SHR ECX,0xc
IMUL EDX,ECX,0x64
SUB AL,DL
MOVZX EAX,AL
LEA RDX,[0x1bf322]
MOVZX EAX,word ptr [RDX + RAX*0x2]
LEA R8,[RDI + 0x11]
MOV word ptr [RDI + 0x11],AX
MOV EDX,0x3
MOV EAX,ECX
LAB_00166c57:
OR AL,0x30
MOV byte ptr [R8 + -0x1],AL
LAB_00166c5d:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
JMP RAX
|
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_
(int8 *param_1,uint param_2)
{
byte bVar1;
byte bVar2;
long lVar3;
long lVar4;
if (param_2 == 0) {
/* WARNING: Could not recover jumptable at 0x00166c2a. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30);
return;
}
bVar1 = (byte)param_2;
lVar3 = 1;
if ((bVar1 < 10) || (lVar3 = 2, bVar1 < 100)) {
lVar4 = (long)(param_1 + 2) + lVar3;
bVar2 = bVar1;
if (9 < bVar1) {
*(int2 *)(lVar4 + -2) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)bVar1 * 2);
goto LAB_00166c5d;
}
}
else {
bVar2 = (byte)((param_2 & 0xff) + ((param_2 & 0xff) + (param_2 & 0xff) * 4) * 8 >> 0xc);
lVar4 = (long)param_1 + 0x11;
*(int2 *)((long)param_1 + 0x11) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)(byte)(bVar1 + bVar2 * -100) * 2);
lVar3 = 3;
}
*(byte *)(lVar4 + -1) = bVar2 | 0x30;
LAB_00166c5d:
/* WARNING: Could not recover jumptable at 0x00166c67. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,lVar3);
return;
}
| |
52,042 | mi_get_pointer_length | eloqsql/storage/myisam/mi_create.c | uint mi_get_pointer_length(ulonglong file_length, uint def)
{
DBUG_ASSERT(def >= 2 && def <= 7);
if (file_length) /* If not default */
{
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
if (file_length >= 1ULL << 56)
def=8;
else
#endif
if (file_length >= 1ULL << 48)
def=7;
else if (file_length >= 1ULL << 40)
def=6;
else if (file_length >= 1ULL << 32)
def=5;
else if (file_length >= 1ULL << 24)
def=4;
else if (file_length >= 1ULL << 16)
def=3;
else
def=2;
}
return def;
} | O3 | c | mi_get_pointer_length:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
testq %rdi, %rdi
je 0x94119
movq %rdi, %rax
shrq $0x30, %rax
movl $0x7, %eax
jne 0x94119
movq %rdi, %rax
shrq $0x28, %rax
movl $0x6, %eax
jne 0x94119
movq %rdi, %rax
shrq $0x20, %rax
movl $0x5, %eax
jne 0x94119
movl $0x4, %eax
cmpq $0xffffff, %rdi # imm = 0xFFFFFF
ja 0x94119
cmpq $0x10000, %rdi # imm = 0x10000
movl $0x2, %eax
sbbl $-0x1, %eax
popq %rbp
retq
| mi_get_pointer_length:
push rbp
mov rbp, rsp
mov eax, esi
test rdi, rdi
jz short loc_94119
mov rax, rdi
shr rax, 30h
mov eax, 7
jnz short loc_94119
mov rax, rdi
shr rax, 28h
mov eax, 6
jnz short loc_94119
mov rax, rdi
shr rax, 20h
mov eax, 5
jnz short loc_94119
mov eax, 4
cmp rdi, 0FFFFFFh
ja short loc_94119
cmp rdi, 10000h
mov eax, 2
sbb eax, 0FFFFFFFFh
loc_94119:
pop rbp
retn
| long long mi_get_pointer_length(unsigned long long a1, unsigned int a2)
{
long long result; // rax
result = a2;
if ( a1 )
{
result = 7LL;
if ( !HIWORD(a1) )
{
result = 6LL;
if ( !(a1 >> 40) )
{
result = 5LL;
if ( !HIDWORD(a1) )
{
result = 4LL;
if ( a1 <= 0xFFFFFF )
return 2 - ((unsigned int)(a1 < 0x10000) - 1);
}
}
}
}
return result;
}
| mi_get_pointer_length:
PUSH RBP
MOV RBP,RSP
MOV EAX,ESI
TEST RDI,RDI
JZ 0x00194119
MOV RAX,RDI
SHR RAX,0x30
MOV EAX,0x7
JNZ 0x00194119
MOV RAX,RDI
SHR RAX,0x28
MOV EAX,0x6
JNZ 0x00194119
MOV RAX,RDI
SHR RAX,0x20
MOV EAX,0x5
JNZ 0x00194119
MOV EAX,0x4
CMP RDI,0xffffff
JA 0x00194119
CMP RDI,0x10000
MOV EAX,0x2
SBB EAX,-0x1
LAB_00194119:
POP RBP
RET
|
int mi_get_pointer_length(ulong param_1,int param_2)
{
if ((((param_1 != 0) && (param_2 = 7, param_1 >> 0x30 == 0)) &&
(param_2 = 6, param_1 >> 0x28 == 0)) &&
((param_2 = 5, param_1 >> 0x20 == 0 && (param_2 = 4, param_1 < 0x1000000)))) {
param_2 = 3 - (uint)(param_1 < 0x10000);
}
return param_2;
}
| |
52,043 | fill_uchar | eloqsql/strings/ctype.c | static int fill_uchar(uchar *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
{
for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ;
b=s;
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
a[i]= (uchar) strtoul(b,NULL,16);
}
return 0;
} | O0 | c | fill_uchar:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x74786
jmp 0x746b2
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0x746de
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x10436(%rip), %rdi # 0x84b05
callq 0x24100
cmpq $0x0, %rax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x746e7
jmp 0x746f7
jmp 0x746e9
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x746b2
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0x7472d
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x103e9(%rip), %rdi # 0x84b05
callq 0x24100
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x74736
jmp 0x74746
jmp 0x74738
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x746ff
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x74758
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x7475a
jmp 0x74786
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x243c0
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x746a2
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nop
| fill_uchar:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_746A2:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jnb loc_74786
jmp short $+2
loc_746B2:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jnb short loc_746DE
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_84B05; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
mov [rbp+var_41], al
loc_746DE:
mov al, [rbp+var_41]
test al, 1
jnz short loc_746E7
jmp short loc_746F7
loc_746E7:
jmp short $+2
loc_746E9:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_746B2
loc_746F7:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_746FF:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_42], al
jnb short loc_7472D
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_84B05; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
xor al, 0FFh
mov [rbp+var_42], al
loc_7472D:
mov al, [rbp+var_42]
test al, 1
jnz short loc_74736
jmp short loc_74746
loc_74736:
jmp short $+2
loc_74738:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_746FF
loc_74746:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_74758
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jbe short loc_7475A
loc_74758:
jmp short loc_74786
loc_7475A:
mov rdi, [rbp+var_38]
xor eax, eax
mov esi, eax
mov edx, 10h
call ___isoc23_strtoul
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_24]
mov [rax+rcx], dl
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_746A2
loc_74786:
xor eax, eax
add rsp, 50h
pop rbp
retn
| long long fill_uchar(long long a1, unsigned int a2, char *a3, long long a4)
{
char v5; // [rsp+Eh] [rbp-42h]
bool v6; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
char *v8; // [rsp+18h] [rbp-38h]
char *v9; // [rsp+20h] [rbp-30h]
unsigned int v10; // [rsp+2Ch] [rbp-24h]
v10 = 0;
v7 = (unsigned long long)&a3[a4];
v9 = a3;
while ( (unsigned long long)v9 < v7 )
{
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v9 < v7 )
v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0;
if ( !v6 )
break;
++v9;
}
v8 = v9;
while ( 1 )
{
v5 = 0;
if ( (unsigned long long)v9 < v7 )
v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0);
if ( (v5 & 1) == 0 )
break;
++v9;
}
if ( v9 == v8 || v10 > a2 )
break;
*(_BYTE *)(a1 + v10++) = __isoc23_strtoul(v8, 0LL, 16LL);
}
return 0LL;
}
| fill_uchar:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_001746a2:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00174786
JMP 0x001746b2
LAB_001746b2:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JNC 0x001746de
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x184b05]
CALL 0x00124100
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001746de:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001746e7
JMP 0x001746f7
LAB_001746e7:
JMP 0x001746e9
LAB_001746e9:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001746b2
LAB_001746f7:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_001746ff:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x42],AL
JNC 0x0017472d
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x184b05]
CALL 0x00124100
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x42],AL
LAB_0017472d:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x00174736
JMP 0x00174746
LAB_00174736:
JMP 0x00174738
LAB_00174738:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001746ff
LAB_00174746:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x00174758
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x0017475a
LAB_00174758:
JMP 0x00174786
LAB_0017475a:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0x10
CALL 0x001243c0
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x24]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001746a2
LAB_00174786:
XOR EAX,EAX
ADD RSP,0x50
POP RBP
RET
|
int8 fill_uchar(long param_1,uint param_2,char *param_3,long param_4)
{
char *pcVar1;
int1 uVar2;
char *pcVar3;
char *pcVar4;
bool bVar5;
char *local_38;
uint local_2c;
local_2c = 0;
pcVar3 = param_3 + param_4;
local_38 = param_3;
while( true ) {
if (pcVar3 <= local_38) {
return 0;
}
while( true ) {
pcVar1 = local_38;
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 != (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
while( true ) {
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 == (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
if (local_38 == pcVar1) break;
if (param_2 < local_2c) {
return 0;
}
uVar2 = __isoc23_strtoul(pcVar1,0,0x10);
*(int1 *)(param_1 + (ulong)local_2c) = uVar2;
local_2c = local_2c + 1;
}
return 0;
}
| |
52,044 | TinyEncoder::TinyEncoder() | 7CodeWizard[P]stablediffusion/tae.hpp | TinyEncoder() {
for (int i = 0; i < num_blocks; i++) {
input_blocks[i].in_channels = channels;
input_blocks[i].out_channels = channels;
middle_blocks[i].in_channels = channels;
middle_blocks[i].out_channels = channels;
output_blocks[i].in_channels = channels;
output_blocks[i].out_channels = channels;
}
initial_block.in_channels = channels;
initial_block.out_channels = channels;
} | O0 | cpp | TinyEncoder::TinyEncoder():
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movl $0x3, (%rax)
movl $0x4, 0x4(%rax)
movl $0x40, 0x8(%rax)
movl $0x3, 0xc(%rax)
movl $0x0, -0xc(%rsp)
movq -0x18(%rsp), %rcx
movl -0xc(%rsp), %eax
cmpl 0xc(%rcx), %eax
jge 0x4c644
movq -0x18(%rsp), %rax
movl 0x8(%rax), %edx
movq %rax, %rcx
addq $0x68, %rcx
movslq -0xc(%rsp), %rsi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, (%rcx)
movl 0x8(%rax), %edx
movq %rax, %rcx
addq $0x68, %rcx
movslq -0xc(%rsp), %rsi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, 0x4(%rcx)
movl 0x8(%rax), %edx
movq %rax, %rcx
addq $0x130, %rcx # imm = 0x130
movslq -0xc(%rsp), %rsi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, (%rcx)
movl 0x8(%rax), %edx
movq %rax, %rcx
addq $0x130, %rcx # imm = 0x130
movslq -0xc(%rsp), %rsi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, 0x4(%rcx)
movl 0x8(%rax), %edx
movq %rax, %rcx
addq $0x1f8, %rcx # imm = 0x1F8
movslq -0xc(%rsp), %rsi
shlq $0x6, %rsi
addq %rsi, %rcx
movl %edx, (%rcx)
movl 0x8(%rax), %ecx
addq $0x1f8, %rax # imm = 0x1F8
movslq -0xc(%rsp), %rdx
shlq $0x6, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x4c582
movq -0x18(%rsp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x20(%rax)
movl 0x8(%rax), %ecx
movl %ecx, 0x24(%rax)
retq
nopw %cs:(%rax,%rax)
| _ZN11TinyEncoderC2Ev:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
mov [rsp+var_18], rax
mov dword ptr [rax], 3
mov dword ptr [rax+4], 4
mov dword ptr [rax+8], 40h ; '@'
mov dword ptr [rax+0Ch], 3
mov [rsp+var_C], 0
loc_4C582:
mov rcx, [rsp+var_18]
mov eax, [rsp+var_C]
cmp eax, [rcx+0Ch]
jge loc_4C644
mov rax, [rsp+var_18]
mov edx, [rax+8]
mov rcx, rax
add rcx, 68h ; 'h'
movsxd rsi, [rsp+var_C]
shl rsi, 6
add rcx, rsi
mov [rcx], edx
mov edx, [rax+8]
mov rcx, rax
add rcx, 68h ; 'h'
movsxd rsi, [rsp+var_C]
shl rsi, 6
add rcx, rsi
mov [rcx+4], edx
mov edx, [rax+8]
mov rcx, rax
add rcx, 130h
movsxd rsi, [rsp+var_C]
shl rsi, 6
add rcx, rsi
mov [rcx], edx
mov edx, [rax+8]
mov rcx, rax
add rcx, 130h
movsxd rsi, [rsp+var_C]
shl rsi, 6
add rcx, rsi
mov [rcx+4], edx
mov edx, [rax+8]
mov rcx, rax
add rcx, 1F8h
movsxd rsi, [rsp+var_C]
shl rsi, 6
add rcx, rsi
mov [rcx], edx
mov ecx, [rax+8]
add rax, 1F8h
movsxd rdx, [rsp+var_C]
shl rdx, 6
add rax, rdx
mov [rax+4], ecx
mov eax, [rsp+var_C]
add eax, 1
mov [rsp+var_C], eax
jmp loc_4C582
loc_4C644:
mov rax, [rsp+var_18]
mov ecx, [rax+8]
mov [rax+20h], ecx
mov ecx, [rax+8]
mov [rax+24h], ecx
retn
| void TinyEncoder::TinyEncoder(TinyEncoder *this)
{
int i; // [rsp+Ch] [rbp-Ch]
*(_DWORD *)this = 3;
*((_DWORD *)this + 1) = 4;
*((_DWORD *)this + 2) = 64;
*((_DWORD *)this + 3) = 3;
for ( i = 0; i < *((_DWORD *)this + 3); ++i )
{
*((_DWORD *)this + 16 * (long long)i + 26) = *((_DWORD *)this + 2);
*((_DWORD *)this + 16 * (long long)i + 27) = *((_DWORD *)this + 2);
*((_DWORD *)this + 16 * (long long)i + 76) = *((_DWORD *)this + 2);
*((_DWORD *)this + 16 * (long long)i + 77) = *((_DWORD *)this + 2);
*((_DWORD *)this + 16 * (long long)i + 126) = *((_DWORD *)this + 2);
*((_DWORD *)this + 16 * (long long)i + 127) = *((_DWORD *)this + 2);
}
*((_DWORD *)this + 8) = *((_DWORD *)this + 2);
*((_DWORD *)this + 9) = *((_DWORD *)this + 2);
}
| TinyEncoder:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x18],RAX
MOV dword ptr [RAX],0x3
MOV dword ptr [RAX + 0x4],0x4
MOV dword ptr [RAX + 0x8],0x40
MOV dword ptr [RAX + 0xc],0x3
MOV dword ptr [RSP + -0xc],0x0
LAB_0014c582:
MOV RCX,qword ptr [RSP + -0x18]
MOV EAX,dword ptr [RSP + -0xc]
CMP EAX,dword ptr [RCX + 0xc]
JGE 0x0014c644
MOV RAX,qword ptr [RSP + -0x18]
MOV EDX,dword ptr [RAX + 0x8]
MOV RCX,RAX
ADD RCX,0x68
MOVSXD RSI,dword ptr [RSP + -0xc]
SHL RSI,0x6
ADD RCX,RSI
MOV dword ptr [RCX],EDX
MOV EDX,dword ptr [RAX + 0x8]
MOV RCX,RAX
ADD RCX,0x68
MOVSXD RSI,dword ptr [RSP + -0xc]
SHL RSI,0x6
ADD RCX,RSI
MOV dword ptr [RCX + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x8]
MOV RCX,RAX
ADD RCX,0x130
MOVSXD RSI,dword ptr [RSP + -0xc]
SHL RSI,0x6
ADD RCX,RSI
MOV dword ptr [RCX],EDX
MOV EDX,dword ptr [RAX + 0x8]
MOV RCX,RAX
ADD RCX,0x130
MOVSXD RSI,dword ptr [RSP + -0xc]
SHL RSI,0x6
ADD RCX,RSI
MOV dword ptr [RCX + 0x4],EDX
MOV EDX,dword ptr [RAX + 0x8]
MOV RCX,RAX
ADD RCX,0x1f8
MOVSXD RSI,dword ptr [RSP + -0xc]
SHL RSI,0x6
ADD RCX,RSI
MOV dword ptr [RCX],EDX
MOV ECX,dword ptr [RAX + 0x8]
ADD RAX,0x1f8
MOVSXD RDX,dword ptr [RSP + -0xc]
SHL RDX,0x6
ADD RAX,RDX
MOV dword ptr [RAX + 0x4],ECX
MOV EAX,dword ptr [RSP + -0xc]
ADD EAX,0x1
MOV dword ptr [RSP + -0xc],EAX
JMP 0x0014c582
LAB_0014c644:
MOV RAX,qword ptr [RSP + -0x18]
MOV ECX,dword ptr [RAX + 0x8]
MOV dword ptr [RAX + 0x20],ECX
MOV ECX,dword ptr [RAX + 0x8]
MOV dword ptr [RAX + 0x24],ECX
RET
|
/* TinyEncoder::TinyEncoder() */
void __thiscall TinyEncoder::TinyEncoder(TinyEncoder *this)
{
int local_c;
*(int4 *)this = 3;
*(int4 *)(this + 4) = 4;
*(int4 *)(this + 8) = 0x40;
*(int4 *)(this + 0xc) = 3;
for (local_c = 0; local_c < *(int *)(this + 0xc); local_c = local_c + 1) {
*(int4 *)(this + (long)local_c * 0x40 + 0x68) = *(int4 *)(this + 8);
*(int4 *)(this + (long)local_c * 0x40 + 0x6c) = *(int4 *)(this + 8);
*(int4 *)(this + (long)local_c * 0x40 + 0x130) = *(int4 *)(this + 8);
*(int4 *)(this + (long)local_c * 0x40 + 0x134) = *(int4 *)(this + 8);
*(int4 *)(this + (long)local_c * 0x40 + 0x1f8) = *(int4 *)(this + 8);
*(int4 *)(this + (long)local_c * 0x40 + 0x1fc) = *(int4 *)(this + 8);
}
*(int4 *)(this + 0x20) = *(int4 *)(this + 8);
*(int4 *)(this + 0x24) = *(int4 *)(this + 8);
return;
}
| |
52,045 | TinyEncoder::TinyEncoder() | 7CodeWizard[P]stablediffusion/tae.hpp | TinyEncoder() {
for (int i = 0; i < num_blocks; i++) {
input_blocks[i].in_channels = channels;
input_blocks[i].out_channels = channels;
middle_blocks[i].in_channels = channels;
middle_blocks[i].out_channels = channels;
output_blocks[i].in_channels = channels;
output_blocks[i].out_channels = channels;
}
initial_block.in_channels = channels;
initial_block.out_channels = channels;
} | O1 | cpp | TinyEncoder::TinyEncoder():
movaps 0x82787(%rip), %xmm0 # 0xbda10
movups %xmm0, (%rdi)
movq $-0xc0, %rcx
movabsq $0x4000000040, %rax # imm = 0x4000000040
movq %rax, 0x128(%rdi,%rcx)
movq %rax, 0x1f0(%rdi,%rcx)
movq %rax, 0x2b8(%rdi,%rcx)
addq $0x40, %rcx
jne 0x3b29d
movq %rax, 0x20(%rdi)
retq
| _ZN11TinyEncoderC2Ev:
movaps xmm0, cs:xmmword_BDA10
movups xmmword ptr [rdi], xmm0
mov rcx, 0FFFFFFFFFFFFFF40h
mov rax, 4000000040h
loc_3B29D:
mov [rdi+rcx+128h], rax
mov [rdi+rcx+1F0h], rax
mov [rdi+rcx+2B8h], rax
add rcx, 40h ; '@'
jnz short loc_3B29D
mov [rdi+20h], rax
retn
| void TinyEncoder::TinyEncoder(TinyEncoder *this)
{
long long v1; // rcx
*(_OWORD *)this = xmmword_BDA10;
v1 = -192LL;
do
{
*(_QWORD *)((char *)this + v1 + 296) = 0x4000000040LL;
*(_QWORD *)((char *)this + v1 + 496) = 0x4000000040LL;
*(_QWORD *)((char *)this + v1 + 696) = 0x4000000040LL;
v1 += 64LL;
}
while ( v1 );
*((_QWORD *)this + 4) = 0x4000000040LL;
}
| |||
52,046 | TinyEncoder::TinyEncoder() | 7CodeWizard[P]stablediffusion/tae.hpp | TinyEncoder() {
for (int i = 0; i < num_blocks; i++) {
input_blocks[i].in_channels = channels;
input_blocks[i].out_channels = channels;
middle_blocks[i].in_channels = channels;
middle_blocks[i].out_channels = channels;
output_blocks[i].in_channels = channels;
output_blocks[i].out_channels = channels;
}
initial_block.in_channels = channels;
initial_block.out_channels = channels;
} | O3 | cpp | TinyEncoder::TinyEncoder():
movaps 0x823b1(%rip), %xmm0 # 0xbca20
movups %xmm0, (%rdi)
movq $-0xc0, %rcx
movabsq $0x4000000040, %rax # imm = 0x4000000040
movq %rax, 0x128(%rdi,%rcx)
movq %rax, 0x1f0(%rdi,%rcx)
movq %rax, 0x2b8(%rdi,%rcx)
addq $0x40, %rcx
jne 0x3a683
movq %rax, 0x20(%rdi)
retq
| _ZN11TinyEncoderC2Ev:
movaps xmm0, cs:xmmword_BCA20
movups xmmword ptr [rdi], xmm0
mov rcx, 0FFFFFFFFFFFFFF40h
mov rax, 4000000040h
loc_3A683:
mov [rdi+rcx+128h], rax
mov [rdi+rcx+1F0h], rax
mov [rdi+rcx+2B8h], rax
add rcx, 40h ; '@'
jnz short loc_3A683
mov [rdi+20h], rax
retn
| void TinyEncoder::TinyEncoder(TinyEncoder *this)
{
long long v1; // rcx
*(_OWORD *)this = xmmword_BCA20;
v1 = -192LL;
do
{
*(_QWORD *)((char *)this + v1 + 296) = 0x4000000040LL;
*(_QWORD *)((char *)this + v1 + 496) = 0x4000000040LL;
*(_QWORD *)((char *)this + v1 + 696) = 0x4000000040LL;
v1 += 64LL;
}
while ( v1 );
*((_QWORD *)this + 4) = 0x4000000040LL;
}
| |||
52,047 | mysql_close_slow_part_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | MK_ASYNC_CONT_BODY_VOID_RETURN(sock)
}
int STDCALL
mysql_close_start(MYSQL *sock)
{
int res;
/* It is legitimate to have NULL sock argument, which will do nothing. */
if (sock && sock->net.pvio)
{
res= mysql_close_slow_part_start(sock);
/* If we need to block, return now and do the rest in mysql_close_cont(). */
if (res)
return res;
}
mysql_close(sock);
return 0;
} | O3 | c | mysql_close_slow_part_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x480(%rdi), %rax
movq 0x28(%rax), %r14
cmpb $0x0, 0x15(%r14)
je 0x2c823
movb $0x1, 0x14(%r14)
movl %esi, 0x4(%r14)
leaq 0x38(%r14), %rdi
callq 0x303fb
movb $0x0, 0x14(%r14)
testl %eax, %eax
jle 0x2c877
movl (%r14), %r14d
jmp 0x2c883
movl $0x7de, 0x90(%rbx) # imm = 0x7DE
leaq 0x297(%rbx), %rdi
leaq 0x1f455(%rip), %rax # 0x4bc90
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x29c(%rbx)
leaq 0x97(%rbx), %rdi
leaq 0x1f440(%rip), %rax # 0x4bca0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movb %r14b, 0x296(%rbx)
jmp 0x2c883
movb $0x0, 0x15(%r14)
xorl %r14d, %r14d
testl %eax, %eax
js 0x2c88b
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x7d8, 0x90(%rbx) # imm = 0x7D8
leaq 0x297(%rbx), %rdi
leaq 0x1f3ed(%rip), %rax # 0x4bc90
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x29c(%rbx)
leaq 0x97(%rbx), %rdi
leaq 0x1f3d8(%rip), %rax # 0x4bca0
movq 0x40(%rax), %rsi
jmp 0x2c864
| mysql_close_slow_part_cont:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rax, [rdi+480h]
mov r14, [rax+28h]
cmp byte ptr [r14+15h], 0
jz short loc_2C823
mov byte ptr [r14+14h], 1
mov [r14+4], esi
lea rdi, [r14+38h]
call my_context_continue
mov byte ptr [r14+14h], 0
test eax, eax
jle short loc_2C877
mov r14d, [r14]
jmp short loc_2C883
loc_2C823:
mov dword ptr [rbx+90h], 7DEh
lea rdi, [rbx+297h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+29Ch], r14b
lea rdi, [rbx+97h]
lea rax, client_errors
mov rsi, [rax+70h]
loc_2C864:
mov edx, 1FFh
call _strncpy
mov [rbx+296h], r14b
jmp short loc_2C883
loc_2C877:
mov byte ptr [r14+15h], 0
xor r14d, r14d
test eax, eax
js short loc_2C88B
loc_2C883:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
loc_2C88B:
mov dword ptr [rbx+90h], 7D8h
lea rdi, [rbx+297h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+29Ch], r14b
lea rdi, [rbx+97h]
lea rax, client_errors
mov rsi, [rax+40h]
jmp short loc_2C864
| long long mysql_close_slow_part_cont(long long a1, unsigned int a2)
{
unsigned int *v3; // r14
int v4; // eax
unsigned int v5; // r14d
long long v6; // rdi
char *v7; // rsi
v3 = *(unsigned int **)(*(_QWORD *)(a1 + 1152) + 40LL);
if ( !*((_BYTE *)v3 + 21) )
{
*(_DWORD *)(a1 + 144) = 2014;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
v5 = 0;
*(_BYTE *)(a1 + 668) = 0;
v6 = a1 + 151;
v7 = client_errors[14];
LABEL_5:
strncpy(v6, v7, 511LL);
*(_BYTE *)(a1 + 662) = 0;
return v5;
}
*((_BYTE *)v3 + 20) = 1;
v3[1] = a2;
v4 = my_context_continue(v3 + 14);
*((_BYTE *)v3 + 20) = 0;
if ( v4 <= 0 )
{
*((_BYTE *)v3 + 21) = 0;
v5 = 0;
if ( v4 >= 0 )
return v5;
*(_DWORD *)(a1 + 144) = 2008;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
v5 = 0;
*(_BYTE *)(a1 + 668) = 0;
v6 = a1 + 151;
v7 = client_errors[8];
goto LABEL_5;
}
return *v3;
}
| mysql_close_slow_part_cont:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x480]
MOV R14,qword ptr [RAX + 0x28]
CMP byte ptr [R14 + 0x15],0x0
JZ 0x0012c823
MOV byte ptr [R14 + 0x14],0x1
MOV dword ptr [R14 + 0x4],ESI
LEA RDI,[R14 + 0x38]
CALL 0x001303fb
MOV byte ptr [R14 + 0x14],0x0
TEST EAX,EAX
JLE 0x0012c877
MOV R14D,dword ptr [R14]
JMP 0x0012c883
LAB_0012c823:
MOV dword ptr [RBX + 0x90],0x7de
LEA RDI,[RBX + 0x297]
LEA RAX,[0x14bc90]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x29c],R14B
LEA RDI,[RBX + 0x97]
LEA RAX,[0x14bca0]
MOV RSI,qword ptr [RAX + 0x70]
LAB_0012c864:
MOV EDX,0x1ff
CALL 0x00113220
MOV byte ptr [RBX + 0x296],R14B
JMP 0x0012c883
LAB_0012c877:
MOV byte ptr [R14 + 0x15],0x0
XOR R14D,R14D
TEST EAX,EAX
JS 0x0012c88b
LAB_0012c883:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
LAB_0012c88b:
MOV dword ptr [RBX + 0x90],0x7d8
LEA RDI,[RBX + 0x297]
LEA RAX,[0x14bc90]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x29c],R14B
LEA RDI,[RBX + 0x97]
LEA RAX,[0x14bca0]
MOV RSI,qword ptr [RAX + 0x40]
JMP 0x0012c864
|
int4 mysql_close_slow_part_cont(long param_1,int4 param_2)
{
int4 *puVar1;
int iVar2;
char *__src;
puVar1 = *(int4 **)(*(long *)(param_1 + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(param_1 + 0x90) = 0x7de;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
__src = PTR_s_Commands_out_of_sync__you_can_t_r_0014bd10;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_2;
iVar2 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (0 < iVar2) {
return *puVar1;
}
*(int1 *)((long)puVar1 + 0x15) = 0;
if (-1 < iVar2) {
return 0;
}
*(int4 *)(param_1 + 0x90) = 0x7d8;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
__src = PTR_s_Client_run_out_of_memory_0014bce0;
}
strncpy((char *)(param_1 + 0x97),__src,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
return 0;
}
| |
52,048 | iq2_find_best_neighbour | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | static int iq2_find_best_neighbour(const uint16_t * restrict neighbours, const uint64_t * restrict grid,
const float * restrict xval, const float * restrict weight, float scale, int8_t * restrict L) {
int num_neighbors = neighbours[0];
GGML_ASSERT(num_neighbors > 0);
float best_d2 = FLT_MAX;
int grid_index = -1;
for (int j = 1; j <= num_neighbors; ++j) {
const int8_t * pg = (const int8_t *)(grid + neighbours[j]);
float d2 = 0;
for (int i = 0; i < 8; ++i) {
float q = pg[i];
float diff = scale*q - xval[i];
d2 += weight[i]*diff*diff;
}
if (d2 < best_d2) {
best_d2 = d2; grid_index = neighbours[j];
}
}
GGML_ASSERT(grid_index >= 0);
const int8_t * pg = (const int8_t *)(grid + grid_index);
for (int i = 0; i < 8; ++i) L[i] = (pg[i] - 1)/2;
return grid_index;
} | O0 | c | iq2_find_best_neighbour:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movss %xmm0, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jg 0x891d2
leaq 0x37ba4(%rip), %rdi # 0xc0d5c
movl $0xb75, %esi # imm = 0xB75
leaq 0x28445(%rip), %rdx # 0xb1609
leaq 0x38e0f(%rip), %rcx # 0xc1fda
movb $0x0, %al
callq 0x48a00
movss 0x2d156(%rip), %xmm0 # 0xb6330
movss %xmm0, -0x38(%rbp)
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x34(%rbp), %eax
jg 0x892de
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
cmpl $0x8, -0x50(%rbp)
jge 0x892a6
movq -0x48(%rbp), %rax
movslq -0x50(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x54(%rbp)
movss -0x24(%rbp), %xmm0
movss -0x54(%rbp), %xmm2
movq -0x18(%rbp), %rax
movslq -0x50(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
movq -0x20(%rbp), %rax
movslq -0x50(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x58(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x4c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x89226
movss -0x4c(%rbp), %xmm1
movss -0x38(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x892ce
movss -0x4c(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x3c(%rbp)
jmp 0x892d0
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x891ed
cmpl $0x0, -0x3c(%rbp)
jge 0x89305
leaq 0x37a71(%rip), %rdi # 0xc0d5c
movl $0xb84, %esi # imm = 0xB84
leaq 0x28312(%rip), %rdx # 0xb1609
leaq 0x38cee(%rip), %rcx # 0xc1fec
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
cmpl $0x8, -0x64(%rbp)
jge 0x89354
movq -0x60(%rbp), %rax
movslq -0x64(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movb %al, %dl
movq -0x30(%rbp), %rax
movslq -0x64(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x8931f
movl -0x3c(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| iq2_find_best_neighbour:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
movss [rbp+var_24], xmm0
mov [rbp+var_30], r8
mov rax, [rbp+var_8]
movzx eax, word ptr [rax]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jg short loc_891D2
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0B75h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNumNeighbors0; "num_neighbors > 0"
mov al, 0
call _ggml_abort
loc_891D2:
movss xmm0, cs:dword_B6330
movss [rbp+var_38], xmm0
mov [rbp+var_3C], 0FFFFFFFFh
mov [rbp+var_40], 1
loc_891ED:
mov eax, [rbp+var_40]
cmp eax, [rbp+var_34]
jg loc_892DE
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
movsxd rdx, [rbp+var_40]
movzx ecx, word ptr [rcx+rdx*2]
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_48], rax
xorps xmm0, xmm0
movss [rbp+var_4C], xmm0
mov [rbp+var_50], 0
loc_89226:
cmp [rbp+var_50], 8
jge short loc_892A6
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_50]
movsx eax, byte ptr [rax+rcx]
cvtsi2ss xmm0, eax
movss [rbp+var_54], xmm0
movss xmm0, [rbp+var_24]
movss xmm2, [rbp+var_54]
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_50]
movss xmm1, dword ptr [rax+rcx*4]
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_58], xmm0
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_50]
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, [rbp+var_58]
movss xmm2, [rbp+var_58]
movss xmm1, [rbp+var_4C]
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_4C], xmm0
mov eax, [rbp+var_50]
add eax, 1
mov [rbp+var_50], eax
jmp short loc_89226
loc_892A6:
movss xmm1, [rbp+var_4C]
movss xmm0, [rbp+var_38]
ucomiss xmm0, xmm1
jbe short loc_892CE
movss xmm0, [rbp+var_4C]
movss [rbp+var_38], xmm0
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_40]
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_3C], eax
loc_892CE:
jmp short $+2
loc_892D0:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
jmp loc_891ED
loc_892DE:
cmp [rbp+var_3C], 0
jge short loc_89305
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0B84h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGridIndex0; "grid_index >= 0"
mov al, 0
call _ggml_abort
loc_89305:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_3C]
shl rcx, 3
add rax, rcx
mov [rbp+var_60], rax
mov [rbp+var_64], 0
loc_8931F:
cmp [rbp+var_64], 8
jge short loc_89354
mov rax, [rbp+var_60]
movsxd rcx, [rbp+var_64]
movsx eax, byte ptr [rax+rcx]
sub eax, 1
mov ecx, 2
cdq
idiv ecx
mov dl, al
mov rax, [rbp+var_30]
movsxd rcx, [rbp+var_64]
mov [rax+rcx], dl
mov eax, [rbp+var_64]
add eax, 1
mov [rbp+var_64], eax
jmp short loc_8931F
loc_89354:
mov eax, [rbp+var_3C]
add rsp, 70h
pop rbp
retn
| long long iq2_find_best_neighbour(_WORD *a1, long long a2, long long a3, long long a4, long long a5, float a6)
{
int k; // [rsp+Ch] [rbp-64h]
float v8; // [rsp+18h] [rbp-58h]
int j; // [rsp+20h] [rbp-50h]
float v10; // [rsp+24h] [rbp-4Ch]
int i; // [rsp+30h] [rbp-40h]
int v12; // [rsp+34h] [rbp-3Ch]
float v13; // [rsp+38h] [rbp-38h]
if ( !*a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2933,
(long long)"GGML_ASSERT(%s) failed",
"num_neighbors > 0");
v13 = 3.4028235e38;
v12 = -1;
for ( i = 1; i <= (unsigned __int16)*a1; ++i )
{
v10 = 0.0;
for ( j = 0; j < 8; ++j )
{
v8 = (float)(a6 * (float)*(char *)(8LL * (unsigned __int16)a1[i] + a2 + j))
+ COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)*(unsigned int *)(a3 + 4LL * j)) ^ 0x80000000);
v10 = (float)((float)(*(float *)(a4 + 4LL * j) * v8) * v8) + v10;
}
if ( v13 > v10 )
{
v13 = v10;
v12 = (unsigned __int16)a1[i];
}
}
if ( v12 < 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2948,
(long long)"GGML_ASSERT(%s) failed",
"grid_index >= 0");
for ( k = 0; k < 8; ++k )
*(_BYTE *)(a5 + k) = (*(char *)(8LL * v12 + a2 + k) - 1) / 2;
return (unsigned int)v12;
}
| iq2_find_best_neighbour:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOVSS dword ptr [RBP + -0x24],XMM0
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JG 0x001891d2
LEA RDI,[0x1c0d5c]
MOV ESI,0xb75
LEA RDX,[0x1b1609]
LEA RCX,[0x1c1fda]
MOV AL,0x0
CALL 0x00148a00
LAB_001891d2:
MOVSS XMM0,dword ptr [0x001b6330]
MOVSS dword ptr [RBP + -0x38],XMM0
MOV dword ptr [RBP + -0x3c],0xffffffff
MOV dword ptr [RBP + -0x40],0x1
LAB_001891ed:
MOV EAX,dword ptr [RBP + -0x40]
CMP EAX,dword ptr [RBP + -0x34]
JG 0x001892de
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RCX + RDX*0x2]
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV dword ptr [RBP + -0x50],0x0
LAB_00189226:
CMP dword ptr [RBP + -0x50],0x8
JGE 0x001892a6
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CVTSI2SS XMM0,EAX
MOVSS dword ptr [RBP + -0x54],XMM0
MOVSS XMM0,dword ptr [RBP + -0x24]
MOVSS XMM2,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x50]
MOVSS XMM1,dword ptr [RAX + RCX*0x4]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x58],XMM0
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [RBP + -0x58]
MOVSS XMM2,dword ptr [RBP + -0x58]
MOVSS XMM1,dword ptr [RBP + -0x4c]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV EAX,dword ptr [RBP + -0x50]
ADD EAX,0x1
MOV dword ptr [RBP + -0x50],EAX
JMP 0x00189226
LAB_001892a6:
MOVSS XMM1,dword ptr [RBP + -0x4c]
MOVSS XMM0,dword ptr [RBP + -0x38]
UCOMISS XMM0,XMM1
JBE 0x001892ce
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOVSS dword ptr [RBP + -0x38],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x3c],EAX
LAB_001892ce:
JMP 0x001892d0
LAB_001892d0:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001891ed
LAB_001892de:
CMP dword ptr [RBP + -0x3c],0x0
JGE 0x00189305
LEA RDI,[0x1c0d5c]
MOV ESI,0xb84
LEA RDX,[0x1b1609]
LEA RCX,[0x1c1fec]
MOV AL,0x0
CALL 0x00148a00
LAB_00189305:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x3c]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x64],0x0
LAB_0018931f:
CMP dword ptr [RBP + -0x64],0x8
JGE 0x00189354
MOV RAX,qword ptr [RBP + -0x60]
MOVSXD RCX,dword ptr [RBP + -0x64]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
SUB EAX,0x1
MOV ECX,0x2
CDQ
IDIV ECX
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,dword ptr [RBP + -0x64]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x64]
ADD EAX,0x1
MOV dword ptr [RBP + -0x64],EAX
JMP 0x0018931f
LAB_00189354:
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x70
POP RBP
RET
|
uint iq2_find_best_neighbour
(float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6)
{
ushort uVar1;
float fVar2;
int local_6c;
int local_58;
float local_54;
int local_48;
uint local_44;
float local_40;
uVar1 = *param_2;
if (uVar1 == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0xb75,"GGML_ASSERT(%s) failed","num_neighbors > 0");
}
local_40 = DAT_001b6330;
local_44 = 0xffffffff;
for (local_48 = 1; local_48 <= (int)(uint)uVar1; local_48 = local_48 + 1) {
local_54 = 0.0;
for (local_58 = 0; local_58 < 8; local_58 = local_58 + 1) {
fVar2 = param_1 * (float)(int)*(char *)(param_3 + (long)(int)(uint)param_2[local_48] * 8 +
(long)local_58) +
-*(float *)(param_4 + (long)local_58 * 4);
local_54 = *(float *)(param_5 + (long)local_58 * 4) * fVar2 * fVar2 + local_54;
}
if (local_54 < local_40) {
local_40 = local_54;
local_44 = (uint)param_2[local_48];
}
}
if ((int)local_44 < 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0xb84,"GGML_ASSERT(%s) failed","grid_index >= 0");
}
for (local_6c = 0; local_6c < 8; local_6c = local_6c + 1) {
*(char *)(param_6 + local_6c) =
(char)((long)(*(char *)(param_3 + (long)(int)local_44 * 8 + (long)local_6c) + -1) / 2);
}
return local_44;
}
| |
52,049 | iq2_find_best_neighbour | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | static int iq2_find_best_neighbour(const uint16_t * restrict neighbours, const uint64_t * restrict grid,
const float * restrict xval, const float * restrict weight, float scale, int8_t * restrict L) {
int num_neighbors = neighbours[0];
GGML_ASSERT(num_neighbors > 0);
float best_d2 = FLT_MAX;
int grid_index = -1;
for (int j = 1; j <= num_neighbors; ++j) {
const int8_t * pg = (const int8_t *)(grid + neighbours[j]);
float d2 = 0;
for (int i = 0; i < 8; ++i) {
float q = pg[i];
float diff = scale*q - xval[i];
d2 += weight[i]*diff*diff;
}
if (d2 < best_d2) {
best_d2 = d2; grid_index = neighbours[j];
}
}
GGML_ASSERT(grid_index >= 0);
const int8_t * pg = (const int8_t *)(grid + grid_index);
for (int i = 0; i < 8; ++i) L[i] = (pg[i] - 1)/2;
return grid_index;
} | O2 | c | iq2_find_best_neighbour:
pushq %rbp
pushq %r14
pushq %rbx
movzwl (%rdi), %eax
testq %rax, %rax
je 0x3f677
incq %rax
movss 0x13a48(%rip), %xmm1 # 0x5302c
pushq $-0x1
popq %r9
pushq $0x1
popq %r10
cmpq %rax, %r10
je 0x3f643
movzwl (%rdi,%r10,2), %r11d
leaq (%rsi,%r11,8), %rbx
xorps %xmm2, %xmm2
xorl %r14d, %r14d
cmpq $0x8, %r14
je 0x3f630
movsbl (%rbx,%r14), %ebp
cvtsi2ss %ebp, %xmm3
mulss %xmm0, %xmm3
subss (%rdx,%r14,4), %xmm3
movss (%rcx,%r14,4), %xmm4
mulss %xmm3, %xmm4
mulss %xmm3, %xmm4
addss %xmm4, %xmm2
incq %r14
jmp 0x3f600
ucomiss %xmm2, %xmm1
cmoval %r11d, %r9d
minss %xmm1, %xmm2
incq %r10
movaps %xmm2, %xmm1
jmp 0x3f5ec
testl %r9d, %r9d
js 0x3f693
movl %r9d, %eax
leaq (%rsi,%rax,8), %rcx
xorl %esi, %esi
movw $0x2, %di
cmpq $0x8, %rsi
je 0x3f66f
movsbl (%rcx,%rsi), %eax
decl %eax
cwtd
idivw %di
movb %al, (%r8,%rsi)
incq %rsi
jmp 0x3f655
movl %r9d, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1e3e6(%rip), %rdi # 0x5da64
leaq 0xef50(%rip), %rdx # 0x4e5d5
leaq 0x1f606(%rip), %rcx # 0x5ec92
movl $0xb75, %esi # imm = 0xB75
jmp 0x3f6ad
leaq 0x1e3ca(%rip), %rdi # 0x5da64
leaq 0xef34(%rip), %rdx # 0x4e5d5
leaq 0x1f5fc(%rip), %rcx # 0x5eca4
movl $0xb84, %esi # imm = 0xB84
xorl %eax, %eax
callq 0x1f9b0
| iq2_find_best_neighbour:
push rbp
push r14
push rbx
movzx eax, word ptr [rdi]
test rax, rax
jz loc_3F677
inc rax
movss xmm1, cs:dword_5302C
push 0FFFFFFFFFFFFFFFFh
pop r9
push 1
pop r10
loc_3F5EC:
cmp r10, rax
jz short loc_3F643
movzx r11d, word ptr [rdi+r10*2]
lea rbx, [rsi+r11*8]
xorps xmm2, xmm2
xor r14d, r14d
loc_3F600:
cmp r14, 8
jz short loc_3F630
movsx ebp, byte ptr [rbx+r14]
cvtsi2ss xmm3, ebp
mulss xmm3, xmm0
subss xmm3, dword ptr [rdx+r14*4]
movss xmm4, dword ptr [rcx+r14*4]
mulss xmm4, xmm3
mulss xmm4, xmm3
addss xmm2, xmm4
inc r14
jmp short loc_3F600
loc_3F630:
ucomiss xmm1, xmm2
cmova r9d, r11d
minss xmm2, xmm1
inc r10
movaps xmm1, xmm2
jmp short loc_3F5EC
loc_3F643:
test r9d, r9d
js short loc_3F693
mov eax, r9d
lea rcx, [rsi+rax*8]
xor esi, esi
mov di, 2
loc_3F655:
cmp rsi, 8
jz short loc_3F66F
movsx eax, byte ptr [rcx+rsi]
dec eax
cwd
idiv di
mov [r8+rsi], al
inc rsi
jmp short loc_3F655
loc_3F66F:
mov eax, r9d
pop rbx
pop r14
pop rbp
retn
loc_3F677:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNumNeighbors0; "num_neighbors > 0"
mov esi, 0B75h
jmp short loc_3F6AD
loc_3F693:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGridIndex0; "grid_index >= 0"
mov esi, 0B84h
loc_3F6AD:
xor eax, eax
call _ggml_abort
| long long iq2_find_best_neighbour(
_WORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long i; // r10
long long j; // r14
long long v16; // rcx
long long k; // rsi
const char *v19; // rcx
int v20; // esi
char v21; // [rsp+0h] [rbp-18h]
if ( !*a1 )
{
v19 = "num_neighbors > 0";
v20 = 2933;
goto LABEL_17;
}
a8 = (__m128)0x7F7FFFFFu;
a6 = -1LL;
for ( i = 1LL; i != (unsigned __int16)*a1 + 1LL; ++i )
{
a9 = 0LL;
for ( j = 0LL; j != 8; ++j )
{
a10.m128_f32[0] = (float)((float)*(char *)(a2 + 8LL * (unsigned __int16)a1[i] + j) * a7.m128_f32[0])
- *(float *)(a3 + 4 * j);
a11 = (__m128)*(unsigned int *)(a4 + 4 * j);
a11.m128_f32[0] = (float)(a11.m128_f32[0] * a10.m128_f32[0]) * a10.m128_f32[0];
a9.m128_f32[0] = a9.m128_f32[0] + a11.m128_f32[0];
}
if ( a8.m128_f32[0] > a9.m128_f32[0] )
a6 = (unsigned __int16)a1[i];
a9.m128_f32[0] = fminf(a9.m128_f32[0], a8.m128_f32[0]);
a8 = a9;
}
if ( (int)a6 < 0 )
{
v19 = "grid_index >= 0";
v20 = 2948;
LABEL_17:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
v20,
(long long)"GGML_ASSERT(%s) failed",
(long long)v19,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v21);
}
v16 = a2 + 8LL * (unsigned int)a6;
for ( k = 0LL; k != 8; ++k )
*(_BYTE *)(a5 + k) = (__int16)(*(char *)(v16 + k) - 1) / 2;
return (unsigned int)a6;
}
| iq2_find_best_neighbour:
PUSH RBP
PUSH R14
PUSH RBX
MOVZX EAX,word ptr [RDI]
TEST RAX,RAX
JZ 0x0013f677
INC RAX
MOVSS XMM1,dword ptr [0x0015302c]
PUSH -0x1
POP R9
PUSH 0x1
POP R10
LAB_0013f5ec:
CMP R10,RAX
JZ 0x0013f643
MOVZX R11D,word ptr [RDI + R10*0x2]
LEA RBX,[RSI + R11*0x8]
XORPS XMM2,XMM2
XOR R14D,R14D
LAB_0013f600:
CMP R14,0x8
JZ 0x0013f630
MOVSX EBP,byte ptr [RBX + R14*0x1]
CVTSI2SS XMM3,EBP
MULSS XMM3,XMM0
SUBSS XMM3,dword ptr [RDX + R14*0x4]
MOVSS XMM4,dword ptr [RCX + R14*0x4]
MULSS XMM4,XMM3
MULSS XMM4,XMM3
ADDSS XMM2,XMM4
INC R14
JMP 0x0013f600
LAB_0013f630:
UCOMISS XMM1,XMM2
CMOVA R9D,R11D
MINSS XMM2,XMM1
INC R10
MOVAPS XMM1,XMM2
JMP 0x0013f5ec
LAB_0013f643:
TEST R9D,R9D
JS 0x0013f693
MOV EAX,R9D
LEA RCX,[RSI + RAX*0x8]
XOR ESI,ESI
MOV DI,0x2
LAB_0013f655:
CMP RSI,0x8
JZ 0x0013f66f
MOVSX EAX,byte ptr [RCX + RSI*0x1]
DEC EAX
CWD
IDIV DI
MOV byte ptr [R8 + RSI*0x1],AL
INC RSI
JMP 0x0013f655
LAB_0013f66f:
MOV EAX,R9D
POP RBX
POP R14
POP RBP
RET
LAB_0013f677:
LEA RDI,[0x15da64]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15ec92]
MOV ESI,0xb75
JMP 0x0013f6ad
LAB_0013f693:
LEA RDI,[0x15da64]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15eca4]
MOV ESI,0xb84
LAB_0013f6ad:
XOR EAX,EAX
CALL 0x0011f9b0
|
ulong iq2_find_best_neighbour
(float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6)
{
char *pcVar1;
int8 uVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
long lVar6;
float fVar7;
float fVar8;
float fVar9;
if ((ulong)*param_2 == 0) {
pcVar1 = "num_neighbors > 0";
uVar2 = 0xb75;
}
else {
uVar3 = 0xffffffffffffffff;
fVar7 = DAT_0015302c;
for (lVar5 = 1; lVar5 != (ulong)*param_2 + 1; lVar5 = lVar5 + 1) {
fVar8 = 0.0;
for (lVar6 = 0; lVar6 != 8; lVar6 = lVar6 + 1) {
fVar9 = (float)(int)*(char *)(param_3 + (ulong)param_2[lVar5] * 8 + lVar6) * param_1 -
*(float *)(param_4 + lVar6 * 4);
fVar8 = fVar8 + *(float *)(param_5 + lVar6 * 4) * fVar9 * fVar9;
}
uVar4 = uVar3 & 0xffffffff;
uVar3 = (ulong)param_2[lVar5];
if (fVar7 <= fVar8) {
fVar8 = fVar7;
uVar3 = uVar4;
}
fVar7 = fVar8;
}
if (-1 < (int)uVar3) {
for (lVar5 = 0; lVar5 != 8; lVar5 = lVar5 + 1) {
*(char *)(param_6 + lVar5) =
(char)((int)(short)(*(char *)(param_3 + (uVar3 & 0xffffffff) * 8 + lVar5) + -1) / 2);
}
return uVar3 & 0xffffffff;
}
pcVar1 = "grid_index >= 0";
uVar2 = 0xb84;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,uVar2,"GGML_ASSERT(%s) failed",pcVar1);
}
| |
52,050 | iq2_find_best_neighbour | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | static int iq2_find_best_neighbour(const uint16_t * restrict neighbours, const uint64_t * restrict grid,
const float * restrict xval, const float * restrict weight, float scale, int8_t * restrict L) {
int num_neighbors = neighbours[0];
GGML_ASSERT(num_neighbors > 0);
float best_d2 = FLT_MAX;
int grid_index = -1;
for (int j = 1; j <= num_neighbors; ++j) {
const int8_t * pg = (const int8_t *)(grid + neighbours[j]);
float d2 = 0;
for (int i = 0; i < 8; ++i) {
float q = pg[i];
float diff = scale*q - xval[i];
d2 += weight[i]*diff*diff;
}
if (d2 < best_d2) {
best_d2 = d2; grid_index = neighbours[j];
}
}
GGML_ASSERT(grid_index >= 0);
const int8_t * pg = (const int8_t *)(grid + grid_index);
for (int i = 0; i < 8; ++i) L[i] = (pg[i] - 1)/2;
return grid_index;
} | O3 | c | iq2_find_best_neighbour:
pushq %rbp
pushq %r14
pushq %rbx
movzwl (%rdi), %r9d
testq %r9, %r9
je 0x3c7ec
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movss 0x14b70(%rip), %xmm1 # 0x512b8
movl $0x1, %r10d
movzwl (%rdi,%r10,2), %r11d
leaq (%rsi,%r11,8), %rbx
xorps %xmm2, %xmm2
xorl %r14d, %r14d
movsbl (%rbx,%r14), %ebp
xorps %xmm3, %xmm3
cvtsi2ss %ebp, %xmm3
mulss %xmm0, %xmm3
subss (%rdx,%r14,4), %xmm3
movss (%rcx,%r14,4), %xmm4
mulss %xmm3, %xmm4
mulss %xmm3, %xmm4
addss %xmm4, %xmm2
incq %r14
cmpq $0x8, %r14
jne 0x3c75d
ucomiss %xmm2, %xmm1
cmoval %r11d, %eax
minss %xmm1, %xmm2
leaq 0x1(%r10), %r11
movaps %xmm2, %xmm1
cmpq %r9, %r10
movq %r11, %r10
jne 0x3c74e
testl %eax, %eax
js 0x3c808
movl %eax, %ecx
movq (%rsi,%rcx,8), %xmm0
punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
psraw $0x8, %xmm0
pcmpeqd %xmm1, %xmm1
paddw %xmm0, %xmm1
movdqa %xmm1, %xmm0
psrlw $0xf, %xmm0
paddw %xmm1, %xmm0
psrlw $0x1, %xmm0
pand 0x14922(%rip), %xmm0 # 0x51100
packuswb %xmm0, %xmm0
movq %xmm0, (%r8)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1f501(%rip), %rdi # 0x5bcf4
leaq 0xfe6b(%rip), %rdx # 0x4c665
leaq 0x20721(%rip), %rcx # 0x5cf22
movl $0xb75, %esi # imm = 0xB75
jmp 0x3c822
leaq 0x1f4e5(%rip), %rdi # 0x5bcf4
leaq 0xfe4f(%rip), %rdx # 0x4c665
leaq 0x20717(%rip), %rcx # 0x5cf34
movl $0xb84, %esi # imm = 0xB84
xorl %eax, %eax
callq 0x17cd0
| iq2_find_best_neighbour:
push rbp
push r14
push rbx
movzx r9d, word ptr [rdi]
test r9, r9
jz loc_3C7EC
mov eax, 0FFFFFFFFh
movss xmm1, cs:dword_512B8
mov r10d, 1
loc_3C74E:
movzx r11d, word ptr [rdi+r10*2]
lea rbx, [rsi+r11*8]
xorps xmm2, xmm2
xor r14d, r14d
loc_3C75D:
movsx ebp, byte ptr [rbx+r14]
xorps xmm3, xmm3
cvtsi2ss xmm3, ebp
mulss xmm3, xmm0
subss xmm3, dword ptr [rdx+r14*4]
movss xmm4, dword ptr [rcx+r14*4]
mulss xmm4, xmm3
mulss xmm4, xmm3
addss xmm2, xmm4
inc r14
cmp r14, 8
jnz short loc_3C75D
ucomiss xmm1, xmm2
cmova eax, r11d
minss xmm2, xmm1
lea r11, [r10+1]
movaps xmm1, xmm2
cmp r10, r9
mov r10, r11
jnz short loc_3C74E
test eax, eax
js short loc_3C808
mov ecx, eax
movq xmm0, qword ptr [rsi+rcx*8]
punpcklbw xmm0, xmm0
psraw xmm0, 8
pcmpeqd xmm1, xmm1
paddw xmm1, xmm0
movdqa xmm0, xmm1
psrlw xmm0, 0Fh
paddw xmm0, xmm1
psrlw xmm0, 1
pand xmm0, cs:xmmword_51100
packuswb xmm0, xmm0
movq qword ptr [r8], xmm0
pop rbx
pop r14
pop rbp
retn
loc_3C7EC:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNumNeighbors0; "num_neighbors > 0"
mov esi, 0B75h
jmp short loc_3C822
loc_3C808:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGridIndex0; "grid_index >= 0"
mov esi, 0B84h
loc_3C822:
xor eax, eax
call _ggml_abort
| long long iq2_find_best_neighbour(_WORD *a1, long long a2, long long a3, long long a4, _QWORD *a5, float a6)
{
long long v6; // r9
long long result; // rax
float v8; // xmm1_4
long long v9; // r10
float v10; // xmm2_4
long long i; // r14
float v12; // xmm3_4
__m128i v14; // xmm0
__m128i v15; // xmm1
__m128i v16; // xmm0
const char *v17; // rcx
int v18; // esi
v6 = (unsigned __int16)*a1;
if ( !*a1 )
{
v17 = "num_neighbors > 0";
v18 = 2933;
goto LABEL_12;
}
result = 0xFFFFFFFFLL;
v8 = 3.4028235e38;
v9 = 1LL;
do
{
v10 = 0.0;
for ( i = 0LL; i != 8; ++i )
{
v12 = (float)((float)*(char *)(a2 + 8LL * (unsigned __int16)a1[v9] + i) * a6) - *(float *)(a3 + 4 * i);
v10 = v10 + (float)((float)(*(float *)(a4 + 4 * i) * v12) * v12);
}
if ( v8 > v10 )
result = (unsigned __int16)a1[v9];
v8 = fminf(v10, v8);
}
while ( v9++ != v6 );
if ( (int)result < 0 )
{
v17 = "grid_index >= 0";
v18 = 2948;
LABEL_12:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
v18,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v17,
(_DWORD)a5,
v6);
}
v14 = _mm_loadl_epi64((const __m128i *)(a2 + 8LL * (unsigned int)result));
v15 = _mm_add_epi16((__m128i)-1LL, _mm_srai_epi16(_mm_unpacklo_epi8(v14, v14), 8u));
v16 = _mm_and_si128(_mm_srli_epi16(_mm_add_epi16(_mm_srli_epi16(v15, 0xFu), v15), 1u), (__m128i)xmmword_51100);
*a5 = _mm_packus_epi16(v16, v16).m128i_u64[0];
return result;
}
| iq2_find_best_neighbour:
PUSH RBP
PUSH R14
PUSH RBX
MOVZX R9D,word ptr [RDI]
TEST R9,R9
JZ 0x0013c7ec
MOV EAX,0xffffffff
MOVSS XMM1,dword ptr [0x001512b8]
MOV R10D,0x1
LAB_0013c74e:
MOVZX R11D,word ptr [RDI + R10*0x2]
LEA RBX,[RSI + R11*0x8]
XORPS XMM2,XMM2
XOR R14D,R14D
LAB_0013c75d:
MOVSX EBP,byte ptr [RBX + R14*0x1]
XORPS XMM3,XMM3
CVTSI2SS XMM3,EBP
MULSS XMM3,XMM0
SUBSS XMM3,dword ptr [RDX + R14*0x4]
MOVSS XMM4,dword ptr [RCX + R14*0x4]
MULSS XMM4,XMM3
MULSS XMM4,XMM3
ADDSS XMM2,XMM4
INC R14
CMP R14,0x8
JNZ 0x0013c75d
UCOMISS XMM1,XMM2
CMOVA EAX,R11D
MINSS XMM2,XMM1
LEA R11,[R10 + 0x1]
MOVAPS XMM1,XMM2
CMP R10,R9
MOV R10,R11
JNZ 0x0013c74e
TEST EAX,EAX
JS 0x0013c808
MOV ECX,EAX
MOVQ XMM0,qword ptr [RSI + RCX*0x8]
PUNPCKLBW XMM0,XMM0
PSRAW XMM0,0x8
PCMPEQD XMM1,XMM1
PADDW XMM1,XMM0
MOVDQA XMM0,XMM1
PSRLW XMM0,0xf
PADDW XMM0,XMM1
PSRLW XMM0,0x1
PAND XMM0,xmmword ptr [0x00151100]
PACKUSWB XMM0,XMM0
MOVQ qword ptr [R8],XMM0
POP RBX
POP R14
POP RBP
RET
LAB_0013c7ec:
LEA RDI,[0x15bcf4]
LEA RDX,[0x14c665]
LEA RCX,[0x15cf22]
MOV ESI,0xb75
JMP 0x0013c822
LAB_0013c808:
LEA RDI,[0x15bcf4]
LEA RDX,[0x14c665]
LEA RCX,[0x15cf34]
MOV ESI,0xb84
LAB_0013c822:
XOR EAX,EAX
CALL 0x00117cd0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void iq2_find_best_neighbour
(float param_1,ushort *param_2,long param_3,long param_4,long param_5,
int8 *param_6)
{
ulong uVar1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
bool bVar6;
ushort uVar7;
ushort uVar17;
ushort uVar18;
ushort uVar19;
ushort uVar20;
ushort uVar21;
ushort uVar22;
int1 auVar8 [16];
int1 auVar15 [16];
ushort uVar23;
int2 uVar24;
short sVar25;
int2 uVar26;
short sVar27;
short sVar28;
short sVar29;
short sVar30;
short sVar31;
short sVar32;
short sVar33;
float fVar34;
float fVar35;
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int1 auVar13 [16];
int1 auVar14 [16];
int1 uVar16;
if ((ulong)*param_2 == 0) {
pcVar2 = "num_neighbors > 0";
uVar3 = 0xb75;
}
else {
uVar1 = 0xffffffff;
uVar24 = (int2)DAT_001512b8;
uVar26 = (int2)((uint)DAT_001512b8 >> 0x10);
uVar4 = 1;
do {
fVar34 = 0.0;
lVar5 = 0;
do {
fVar35 = (float)(int)*(char *)(param_3 + (ulong)param_2[uVar4] * 8 + lVar5) * param_1 -
*(float *)(param_4 + lVar5 * 4);
fVar34 = fVar34 + *(float *)(param_5 + lVar5 * 4) * fVar35 * fVar35;
lVar5 = lVar5 + 1;
} while (lVar5 != 8);
if (fVar34 <= (float)CONCAT22(uVar26,uVar24) && (float)CONCAT22(uVar26,uVar24) != fVar34) {
uVar1 = (ulong)param_2[uVar4];
}
if ((float)CONCAT22(uVar26,uVar24) <= fVar34) {
fVar34 = (float)CONCAT22(uVar26,uVar24);
}
uVar24 = SUB42(fVar34,0);
uVar26 = (int2)((uint)fVar34 >> 0x10);
bVar6 = uVar4 != *param_2;
uVar4 = uVar4 + 1;
} while (bVar6);
if (-1 < (int)uVar1) {
uVar1 = *(ulong *)(param_3 + uVar1 * 8);
uVar16 = (int1)(uVar1 >> 0x38);
auVar14._8_6_ = 0;
auVar14._0_8_ = uVar1;
auVar14[0xe] = uVar16;
auVar14[0xf] = uVar16;
uVar16 = (int1)(uVar1 >> 0x30);
auVar13._14_2_ = auVar14._14_2_;
auVar13._8_5_ = 0;
auVar13._0_8_ = uVar1;
auVar13[0xd] = uVar16;
auVar12._13_3_ = auVar13._13_3_;
auVar12._8_4_ = 0;
auVar12._0_8_ = uVar1;
auVar12[0xc] = uVar16;
uVar16 = (int1)(uVar1 >> 0x28);
auVar11._12_4_ = auVar12._12_4_;
auVar11._8_3_ = 0;
auVar11._0_8_ = uVar1;
auVar11[0xb] = uVar16;
auVar10._11_5_ = auVar11._11_5_;
auVar10._8_2_ = 0;
auVar10._0_8_ = uVar1;
auVar10[10] = uVar16;
uVar16 = (int1)(uVar1 >> 0x20);
auVar9._10_6_ = auVar10._10_6_;
auVar9[8] = 0;
auVar9._0_8_ = uVar1;
auVar9[9] = uVar16;
auVar8._9_7_ = auVar9._9_7_;
auVar8[8] = uVar16;
auVar8._0_8_ = uVar1;
uVar16 = (int1)(uVar1 >> 0x18);
auVar15._8_8_ = auVar8._8_8_;
auVar15[7] = uVar16;
auVar15[6] = uVar16;
uVar16 = (int1)(uVar1 >> 0x10);
auVar15[5] = uVar16;
auVar15[4] = uVar16;
uVar16 = (int1)(uVar1 >> 8);
auVar15[3] = uVar16;
auVar15[2] = uVar16;
auVar15[0] = (int1)uVar1;
auVar15[1] = auVar15[0];
auVar15 = psraw(auVar15,8);
sVar25 = auVar15._0_2_ + -1;
sVar27 = auVar15._2_2_ + -1;
sVar28 = auVar15._4_2_ + -1;
sVar29 = auVar15._6_2_ + -1;
sVar30 = auVar15._8_2_ + -1;
sVar31 = auVar15._10_2_ + -1;
sVar32 = auVar15._12_2_ + -1;
sVar33 = auVar15._14_2_ + -1;
uVar7 = (ushort)(sVar25 - (sVar25 >> 0xf)) >> 1 & _DAT_00151100;
uVar17 = (ushort)(sVar27 - (sVar27 >> 0xf)) >> 1 & _UNK_00151102;
uVar18 = (ushort)(sVar28 - (sVar28 >> 0xf)) >> 1 & _UNK_00151104;
uVar19 = (ushort)(sVar29 - (sVar29 >> 0xf)) >> 1 & _UNK_00151106;
uVar20 = (ushort)(sVar30 - (sVar30 >> 0xf)) >> 1 & _UNK_00151108;
uVar21 = (ushort)(sVar31 - (sVar31 >> 0xf)) >> 1 & _UNK_0015110a;
uVar22 = (ushort)(sVar32 - (sVar32 >> 0xf)) >> 1 & _UNK_0015110c;
uVar23 = (ushort)(sVar33 - (sVar33 >> 0xf)) >> 1 & _UNK_0015110e;
*param_6 = CONCAT17((uVar23 != 0) * (uVar23 < 0x100) * (char)uVar23 - (0xff < uVar23),
CONCAT16((uVar22 != 0) * (uVar22 < 0x100) * (char)uVar22 - (0xff < uVar22)
,CONCAT15((uVar21 != 0) * (uVar21 < 0x100) * (char)uVar21 -
(0xff < uVar21),
CONCAT14((uVar20 != 0) * (uVar20 < 0x100) *
(char)uVar20 - (0xff < uVar20),
CONCAT13((uVar19 != 0) * (uVar19 < 0x100) *
(char)uVar19 - (0xff < uVar19),
CONCAT12((uVar18 != 0) *
(uVar18 < 0x100) *
(char)uVar18 -
(0xff < uVar18),
CONCAT11((uVar17 != 0) *
(uVar17 < 0x100) *
(char)uVar17 -
(0xff < uVar17),
(uVar7 != 0) *
(uVar7 < 0x100) *
(char)uVar7 -
(0xff < uVar7))))))
));
return;
}
pcVar2 = "grid_index >= 0";
uVar3 = 0xb84;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
| |
52,051 | 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>::push_back(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>> const&) | monkey531[P]llama/common/json.hpp | void push_back(const typename object_t::value_type& val)
{
// push_back only works for null objects or objects
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
assert_invariant();
}
// add element to object
auto res = m_data.m_value.object->insert(val);
set_parent(res.first->second);
} | 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>::push_back(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>> const&):
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x124720
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x17(%rsp)
jne 0x1a18c1
movq 0x8(%rsp), %rdi
callq 0xe8260
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1a18d4
jmp 0x1a1988
movb $0x1, 0x43(%rsp)
movl $0x20, %edi
callq 0x5e6b0
movq 0x8(%rsp), %rdi
movq %rax, (%rsp)
callq 0xef030
movq %rax, 0x50(%rsp)
leaq 0x7f214(%rip), %rsi # 0x220b11
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1238d0
jmp 0x1a190e
movq 0x8(%rsp), %rcx
movq (%rsp), %rdi
movl $0x134, %esi # imm = 0x134
leaq 0x58(%rsp), %rdx
callq 0xeedd0
jmp 0x1a1928
movq (%rsp), %rdi
movb $0x0, 0x43(%rsp)
leaq 0x10f700(%rip), %rsi # 0x2b1038
leaq -0xb285f(%rip), %rdx # 0xef0e0
callq 0x5eb30
jmp 0x1a1a29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x1a1971
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x5f5d8
testb $0x1, 0x43(%rsp)
jne 0x1a197a
jmp 0x1a1983
movq (%rsp), %rdi
callq 0x5efd0
jmp 0x1a1a1f
movq 0x8(%rsp), %rdi
callq 0x124720
testb $0x1, %al
jne 0x1a1998
jmp 0x1a19c7
movq 0x8(%rsp), %rax
movb $0x1, (%rax)
leaq 0x38(%rsp), %rdi
movl $0x1, %esi
callq 0xda810
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rdi)
movl $0x1, %esi
callq 0xda6e0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x78(%rsp), %rsi
callq 0x1a1c20
movb %dl, 0x20(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movb 0x20(%rsp), %al
movb %al, 0x30(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xeec00
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
movq $-0x1, %rdx
callq 0x179200
addq $0x88, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x5ebf0
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E:
sub rsp, 88h
mov qword ptr [rsp+88h+var_8], rdi; int
mov qword ptr [rsp+88h+var_10], rsi; int
mov rdi, qword ptr [rsp+88h+var_8]
mov qword ptr [rsp+88h+var_80], rdi; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; 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_null(void)
mov cl, al
mov al, 1
test cl, 1
mov [rsp+88h+var_71], al
jnz short loc_1A18C1
mov rdi, qword ptr [rsp+88h+var_80]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; 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_object(void)
mov [rsp+88h+var_71], al
loc_1A18C1:
mov al, [rsp+88h+var_71]
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_1A18D4
jmp loc_1A1988
loc_1A18D4:
mov [rsp+88h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rdi, qword ptr [rsp+88h+var_80]
mov [rsp+88h+var_88], 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+88h+var_38], rax; char
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+88h+var_30]
lea rdx, [rsp+88h+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* &&)
jmp short $+2
loc_1A190E:
mov rcx, qword ptr [rsp+88h+var_80]
mov rdi, [rsp+88h+var_88]; int
mov esi, 134h
lea rdx, [rsp+88h+var_30]
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_1A1928:
mov rdi, [rsp+88h+var_88]; void *
mov [rsp+88h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_1A1A29
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_1A1971
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1A1971:
test [rsp+arg_3B], 1
jnz short loc_1A197A
jmp short loc_1A1983
loc_1A197A:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_1A1983:
jmp loc_1A1A1F
loc_1A1988:
mov rdi, qword ptr [rsp+88h+var_80]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; 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_null(void)
test al, 1
jnz short loc_1A1998
jmp short loc_1A19C7
loc_1A1998:
mov rax, qword ptr [rsp+88h+var_80]
mov byte ptr [rax], 1
lea rdi, [rsp+88h+var_50]; int
mov esi, 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
mov rdi, qword ptr [rsp+88h+var_80]
mov rax, qword ptr [rsp+88h+var_50]
mov [rdi+8], rax
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_1A19C7:
mov rax, qword ptr [rsp+88h+var_80]
mov rdi, [rax+8]
mov rsi, qword ptr [rsp+88h+var_10]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; 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>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
mov [rsp+88h+var_68], dl
mov [rsp+88h+var_70], rax
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_60], rax
mov al, [rsp+88h+var_68]
mov [rsp+88h+var_58], al
lea rdi, [rsp+88h+var_60]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
mov rdi, qword ptr [rsp+88h+var_80]
mov rsi, rax
add rsi, 20h ; ' '
mov rdx, 0FFFFFFFFFFFFFFFFh
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parent(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>&,ulong)
add rsp, 88h
retn
loc_1A1A1F:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
loc_1A1A29:
nop dword ptr [rax+00000000h]
| 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>::push_back(
_BYTE *a1,
long long a2)
{
char v2; // dl
long long v3; // rax
int v5; // [rsp+0h] [rbp-88h]
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+0h] [rbp-88h]
long long v7; // [rsp+8h] [rbp-80h]
int v8; // [rsp+10h] [rbp-78h]
bool is_object; // [rsp+17h] [rbp-71h]
__int16 v10; // [rsp+18h] [rbp-70h]
long long v11; // [rsp+20h] [rbp-68h]
long long v12; // [rsp+28h] [rbp-60h] BYREF
char v13; // [rsp+30h] [rbp-58h]
int v14[2]; // [rsp+38h] [rbp-50h] BYREF
char v15; // [rsp+43h] [rbp-45h]
char v16[8]; // [rsp+50h] [rbp-38h] BYREF
_BYTE v17[32]; // [rsp+58h] [rbp-30h] BYREF
int v18[2]; // [rsp+78h] [rbp-10h]
int v19[2]; // [rsp+80h] [rbp-8h]
*(_QWORD *)v19 = a1;
*(_QWORD *)v18 = a2;
v7 = (long long)a1;
is_object = 1;
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_null(a1) )
is_object = 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_object(a1);
if ( !is_object )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
*(_QWORD *)v16 = 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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v17,
(long long)"cannot use push_back() with ",
(nlohmann::json_abi_v3_11_3::detail **)v16);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
(long long)v17,
(long long)a1);
v15 = 0;
__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::type_error::~type_error);
}
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_null(a1) )
{
*a1 = 1;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::json_value(
(int)v14,
v5,
(int)a1,
v8,
v10,
v11,
v12,
v13);
*(_QWORD *)(v7 + 8) = *(_QWORD *)v14;
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(v7);
}
v12 = 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>>>>::insert(
*(_QWORD *)(v7 + 8),
*(_QWORD *)v18);
v13 = v2;
v3 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&v12);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parent(
v7,
v3 + 32);
}
| max_size:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x001a1890
POP RCX
RET
|
/* std::allocator_traits<std::allocator<common_sampler*> >::max_size(std::allocator<common_sampler*>
const&) */
void std::allocator_traits<std::allocator<common_sampler*>>::max_size(allocator *param_1)
{
__gnu_cxx::new_allocator<common_sampler*>::max_size();
return;
}
| |
52,052 | 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>::push_back(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>> const&) | monkey531[P]llama/common/json.hpp | void push_back(const typename object_t::value_type& val)
{
// push_back only works for null objects or objects
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
assert_invariant();
}
// add element to object
auto res = m_data.m_value.object->insert(val);
set_parent(res.first->second);
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(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>> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movb (%rdi), %al
cmpb $0x2, %al
jae 0xbe421
movq %rsi, %rbx
testb %al, %al
jne 0xbe40d
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x1b8f0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x6adae
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xbe628
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x714aa
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3accd(%rip), %rsi # 0xf9112
leaq 0x10(%rsp), %rdi
callq 0x8c919
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x71252
xorl %ebp, %ebp
leaq 0x73d38(%rip), %rsi # 0x1321a8
leaq -0x50e6f(%rip), %rdx # 0x6d608
movq %rbx, %rdi
callq 0x1bf60
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbe4a5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xbe4a5
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xbe4b2
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
mov al, [rdi]
cmp al, 2
jnb short loc_BE421
mov rbx, rsi
test al, al
jnz short loc_BE40D
mov byte ptr [r14], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_BE40D:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; 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>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
loc_BE421:
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, aCannotUsePushB; "cannot use push_back() with "
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, 134h; 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
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BE4A5
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BE4A5
mov r14, rax
mov bpl, 1
loc_BE4A5:
test bpl, bpl
jz short loc_BE4B2
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BE4B2:
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>::push_back(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 >= 2u )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = 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)v6,
(long long)"cannot use push_back() with ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
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 ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
v2 = operator new(0x20uLL);
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return 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>>>>::insert(
*(_QWORD *)(a1 + 8),
a2);
}
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOV AL,byte ptr [RDI]
CMP AL,0x2
JNC 0x001be421
MOV RBX,RSI
TEST AL,AL
JNZ 0x001be40d
MOV byte ptr [R14],0x1
MOV EDI,0x20
CALL 0x0011b8f0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0016adae
LAB_001be40d:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x001be628
LAB_001be421:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x001714aa
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001be43e:
LEA RSI,[0x1f9112]
LEA RDI,[RSP + 0x10]
CALL 0x0018c919
MOV BPL,0x1
LAB_001be452:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x00171252
XOR EBP,EBP
LEA RSI,[0x2321a8]
LEA RDX,[0x16d608]
MOV RDI,RBX
CALL 0x0011bf60
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::push_back(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> > const&) */
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>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,pair *param_1)
{
int8 *puVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if ((byte)*this < 2) {
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar1 = (int8 *)operator_new(0x20);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
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>>>>
::insert(*(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),param_1);
return;
}
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001be43e to 001be44e has its CatchHandler @ 001be49f */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 001be452 to 001be47e has its CatchHandler @ 001be47f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
52,053 | ma_write_abort_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_write_abort_block_record(MARIA_HA *info)
{
my_bool res= 0;
MARIA_BITMAP_BLOCKS *blocks= &info->cur_row.insert_blocks;
MARIA_BITMAP_BLOCK *block, *end;
LSN lsn= LSN_IMPOSSIBLE;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_write_abort_block_record");
_ma_bitmap_lock(share); /* Lock bitmap from other insert threads */
if (delete_head_or_tail(info,
ma_recordpos_to_page(info->cur_row.lastpos),
ma_recordpos_to_dir_entry(info->cur_row.lastpos), 1,
0))
res= 1;
for (block= blocks->block + 1, end= block + blocks->count - 1; block < end;
block++)
{
if (block->used & BLOCKUSED_USED)
{
if (block->used & BLOCKUSED_TAIL)
{
/*
block->page_count is set to the tail directory entry number in
write_block_record()
*/
if (delete_head_or_tail(info, block->page,
block->page_count & ~TAIL_BIT,
0, 0))
res= 1;
}
else
{
if (free_full_page_range(info, block->page, block->page_count))
res= 1;
}
}
}
_ma_bitmap_unlock(share);
if (share->now_transactional)
{
/*
Write clr to mark end of aborted row insert.
The above delete_head_or_tail() calls will only log redo, not undo.
The undo just before the row insert is stored in row->orig_undo_lsn.
When applying undo's, we can skip all undo records between current
lsn and row->orig_undo_lsn as logically things are as before the
attempted insert.
*/
if (_ma_write_clr(info, info->cur_row.orig_undo_lsn,
LOGREC_UNDO_ROW_INSERT,
share->calc_checksum != 0,
(ha_checksum) 0 - info->cur_row.checksum,
&lsn, (void*) 0))
res= 1;
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
} | O0 | c | ma_write_abort_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x41bc0
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x75830
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x75850
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %eax, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x75490
cmpb $0x0, %al
je 0x75345
movb $0x1, -0x9(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addq $-0x18, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x753ff
movq -0x20(%rbp), %rax
movzbl 0x14(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x753ec
movq -0x20(%rbp), %rax
movzbl 0x14(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x753c9
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edx
andl $0xffff7fff, %edx # imm = 0xFFFF7FFF
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x75490
cmpb $0x0, %al
je 0x753c7
movb $0x1, -0x9(%rbp)
jmp 0x753ea
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x75870
cmpb $0x0, %al
je 0x753e8
movb $0x1, -0x9(%rbp)
jmp 0x753ea
jmp 0x753ec
jmp 0x753ee
movq -0x20(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0x7536e
movq -0x38(%rbp), %rdi
callq 0x41c90
movq -0x38(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x7546b
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rsi
movq -0x38(%rbp), %rax
cmpq $0x0, 0x6a8(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
movq -0x8(%rbp), %rcx
xorl %r8d, %r8d
subl 0xb0(%rcx), %r8d
movl $0x12, %edx
leaq -0x30(%rbp), %r9
xorl %ecx, %ecx
movsbl %al, %ecx
movq $0x0, (%rsp)
callq 0x6fa00
cmpb $0x0, %al
je 0x75469
movb $0x1, -0x9(%rbp)
jmp 0x7546b
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x75aa0
movb -0x9(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_write_abort_block_record:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_9], 0
mov rax, [rbp+var_8]
add rax, 80h
mov [rbp+var_18], rax
mov [rbp+var_30], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call _ma_bitmap_lock
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rdi, [rax+98h]
call ma_recordpos_to_page
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rdi, [rax+98h]
call ma_recordpos_to_dir_entry
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_40]
mov edx, eax
mov ecx, 1
xor r8d, r8d
call delete_head_or_tail
cmp al, 0
jz short loc_75345
mov [rbp+var_9], 1
loc_75345:
mov rax, [rbp+var_18]
mov rax, [rax]
add rax, 18h
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov ecx, [rcx+8]
imul rcx, 18h
add rax, rcx
add rax, 0FFFFFFFFFFFFFFE8h
mov [rbp+var_28], rax
loc_7536E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb loc_753FF
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+14h]
and eax, 1
cmp eax, 0
jz short loc_753EC
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+14h]
and eax, 4
cmp eax, 0
jz short loc_753C9
mov rdi, [rbp+var_8]
mov rax, [rbp+var_20]
mov rsi, [rax]
mov rax, [rbp+var_20]
mov edx, [rax+8]
and edx, 0FFFF7FFFh
xor r8d, r8d
mov ecx, r8d
call delete_head_or_tail
cmp al, 0
jz short loc_753C7
mov [rbp+var_9], 1
loc_753C7:
jmp short loc_753EA
loc_753C9:
mov rdi, [rbp+var_8]
mov rax, [rbp+var_20]
mov rsi, [rax]
mov rax, [rbp+var_20]
mov edx, [rax+8]
call free_full_page_range
cmp al, 0
jz short loc_753E8
mov [rbp+var_9], 1
loc_753E8:
jmp short $+2
loc_753EA:
jmp short $+2
loc_753EC:
jmp short $+2
loc_753EE:
mov rax, [rbp+var_20]
add rax, 18h
mov [rbp+var_20], rax
jmp loc_7536E
loc_753FF:
mov rdi, [rbp+var_38]
call _ma_bitmap_unlock
mov rax, [rbp+var_38]
cmp byte ptr [rax+7E7h], 0
jz short loc_7546B
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
mov rsi, [rax+0B8h]
mov rax, [rbp+var_38]
cmp qword ptr [rax+6A8h], 0
setnz al
and al, 1
movzx eax, al
mov rcx, [rbp+var_8]
xor r8d, r8d
sub r8d, [rcx+0B0h]
mov edx, 12h
lea r9, [rbp+var_30]
xor ecx, ecx
movsx ecx, al
mov [rsp+60h+var_60], 0
call _ma_write_clr
cmp al, 0
jz short loc_75469
mov [rbp+var_9], 1
loc_75469:
jmp short $+2
loc_7546B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
call _ma_unpin_all_pages_and_finalize_row_0
mov al, [rbp+var_9]
mov [rbp+var_49], al
mov al, [rbp+var_49]
add rsp, 60h
pop rbp
retn
| bool ma_write_abort_block_record(long long a1)
{
unsigned int v1; // eax
long long v3; // [rsp+20h] [rbp-40h]
long long v4; // [rsp+28h] [rbp-38h]
long long v5; // [rsp+30h] [rbp-30h] BYREF
unsigned long long v6; // [rsp+38h] [rbp-28h]
unsigned long long v7; // [rsp+40h] [rbp-20h]
long long v8; // [rsp+48h] [rbp-18h]
bool v9; // [rsp+57h] [rbp-9h]
long long *v10; // [rsp+58h] [rbp-8h]
v10 = (long long *)a1;
v8 = a1 + 128;
v5 = 0LL;
v4 = *(_QWORD *)a1;
ma_bitmap_lock(*(_QWORD *)a1);
v3 = ma_recordpos_to_page(*(_QWORD *)(a1 + 152));
v1 = ma_recordpos_to_dir_entry(*(_QWORD *)(a1 + 152));
v9 = (unsigned __int8)delete_head_or_tail(a1, v3, v1, 1LL, 0LL) != 0;
v7 = *(_QWORD *)(a1 + 128) + 24LL;
v6 = 24LL * *(unsigned int *)(a1 + 136) + v7 - 24;
while ( v7 < v6 )
{
if ( (*(_BYTE *)(v7 + 20) & 1) != 0 )
{
if ( (*(_BYTE *)(v7 + 20) & 4) != 0 )
{
if ( (unsigned __int8)delete_head_or_tail(v10, *(_QWORD *)v7, *(_DWORD *)(v7 + 8) & 0xFFFF7FFF, 0LL, 0LL) )
v9 = 1;
}
else if ( (unsigned __int8)free_full_page_range(v10, *(_QWORD *)v7, *(unsigned int *)(v7 + 8)) )
{
v9 = 1;
}
}
v7 += 24LL;
}
ma_bitmap_unlock(v4);
if ( *(_BYTE *)(v4 + 2023)
&& ma_write_clr(v10, v10[23], 18, *(_QWORD *)(v4 + 1704) != 0LL, -*((_DWORD *)v10 + 44), (long long)&v5, 0LL) )
{
v9 = 1;
}
ma_unpin_all_pages_and_finalize_row_0(v10, v5);
return v9;
}
| _ma_write_abort_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x80
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00141bc0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x98]
CALL 0x00175830
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x98]
CALL 0x00175850
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,EAX
MOV ECX,0x1
XOR R8D,R8D
CALL 0x00175490
CMP AL,0x0
JZ 0x00175345
MOV byte ptr [RBP + -0x9],0x1
LAB_00175345:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x8]
IMUL RCX,RCX,0x18
ADD RAX,RCX
ADD RAX,-0x18
MOV qword ptr [RBP + -0x28],RAX
LAB_0017536e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001753ff
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x14]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001753ec
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x14]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001753c9
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX + 0x8]
AND EDX,0xffff7fff
XOR R8D,R8D
MOV ECX,R8D
CALL 0x00175490
CMP AL,0x0
JZ 0x001753c7
MOV byte ptr [RBP + -0x9],0x1
LAB_001753c7:
JMP 0x001753ea
LAB_001753c9:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX + 0x8]
CALL 0x00175870
CMP AL,0x0
JZ 0x001753e8
MOV byte ptr [RBP + -0x9],0x1
LAB_001753e8:
JMP 0x001753ea
LAB_001753ea:
JMP 0x001753ec
LAB_001753ec:
JMP 0x001753ee
LAB_001753ee:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0017536e
LAB_001753ff:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00141c90
MOV RAX,qword ptr [RBP + -0x38]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x0017546b
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x6a8],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV RCX,qword ptr [RBP + -0x8]
XOR R8D,R8D
SUB R8D,dword ptr [RCX + 0xb0]
MOV EDX,0x12
LEA R9,[RBP + -0x30]
XOR ECX,ECX
MOVSX ECX,AL
MOV qword ptr [RSP],0x0
CALL 0x0016fa00
CMP AL,0x0
JZ 0x00175469
MOV byte ptr [RBP + -0x9],0x1
LAB_00175469:
JMP 0x0017546b
LAB_0017546b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00175aa0
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x49],AL
MOV AL,byte ptr [RBP + -0x49]
ADD RSP,0x60
POP RBP
RET
|
int1 _ma_write_abort_block_record(long *param_1)
{
long lVar1;
long *plVar2;
char cVar3;
int4 uVar4;
int8 uVar5;
int8 local_38;
int8 *local_30;
int8 *local_28;
long *local_20;
int1 local_11;
long *local_10;
local_11 = 0;
local_20 = param_1 + 0x10;
local_38 = 0;
lVar1 = *param_1;
local_10 = param_1;
_ma_bitmap_lock(lVar1);
plVar2 = local_10;
uVar5 = ma_recordpos_to_page(local_10[0x13]);
uVar4 = ma_recordpos_to_dir_entry(local_10[0x13]);
cVar3 = delete_head_or_tail(plVar2,uVar5,uVar4,1,0);
if (cVar3 != '\0') {
local_11 = 1;
}
local_28 = (int8 *)(*local_20 + 0x18);
local_30 = local_28 + (ulong)*(uint *)(local_20 + 1) * 3 + -3;
for (; local_28 < local_30; local_28 = local_28 + 3) {
if ((*(byte *)((long)local_28 + 0x14) & 1) != 0) {
if ((*(byte *)((long)local_28 + 0x14) & 4) == 0) {
cVar3 = free_full_page_range(local_10,*local_28,*(int4 *)(local_28 + 1));
if (cVar3 != '\0') {
local_11 = 1;
}
}
else {
cVar3 = delete_head_or_tail(local_10,*local_28,*(uint *)(local_28 + 1) & 0xffff7fff,0);
if (cVar3 != '\0') {
local_11 = 1;
}
}
}
}
_ma_bitmap_unlock(lVar1);
if ((*(char *)(lVar1 + 0x7e7) != '\0') &&
(cVar3 = _ma_write_clr(local_10,local_10[0x17],0x12,*(long *)(lVar1 + 0x6a8) != 0,
-(int)local_10[0x16],&local_38,0), cVar3 != '\0')) {
local_11 = 1;
}
_ma_unpin_all_pages_and_finalize_row(local_10,local_38);
return local_11;
}
| |
52,054 | Catch::StringMaker<wchar_t*, void>::convert[abi:cxx11](wchar_t*) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | std::string StringMaker<wchar_t *>::convert(wchar_t * str) {
if (str) {
return ::Catch::Detail::stringify(std::wstring{ str });
} else {
return{ "{null string}" };
}
} | O3 | cpp | Catch::StringMaker<wchar_t*, void>::convert[abi:cxx11](wchar_t*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x582c7
movq %rsi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rsi, %rdi
callq 0x17780
leaq (%r14,%rax,4), %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8207a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58048
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x582e4
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x17150
jmp 0x582e4
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x84f56(%rip), %rsi # 0xdd22b
leaq 0x84f5c(%rip), %rdx # 0xdd238
movq %rbx, %rdi
callq 0x37312
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x58312
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x17150
movq %rbx, %rdi
callq 0x17740
| _ZN5Catch11StringMakerIPwvE7convertB5cxx11ES1_:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
test rsi, rsi
jz short loc_582C7
mov r14, rsi
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
mov rdi, rsi
call _wcslen
lea rdx, [r14+rax*4]
lea r15, [rsp+48h+var_40]
mov rdi, r15
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag; std::wstring::_M_construct<wchar_t const*>(wchar_t const*,wchar_t const*,std::forward_iterator_tag)
mov rdi, rbx; int
mov rsi, r15; int
call _ZN5Catch11StringMakerINSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEvE7convertERKS6_; Catch::StringMaker<std::wstring,void>::convert(std::wstring const&)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_582E4
mov rax, [rsp+48h+var_30]
lea rsi, ds:4[rax*4]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_582E4
loc_582C7:
lea rax, [rbx+10h]
mov [rbx], rax
lea rsi, aNullString; "{null string}"
lea rdx, aNullString+0Dh; ""
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_582E4:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_58312
mov rax, [rsp+arg_10]
lea rsi, ds:4[rax*4]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_58312:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * Catch::StringMaker<wchar_t *,void>::convert[abi:cxx11](_QWORD *a1, long long a2)
{
long long v2; // rax
void *v4[2]; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[6]; // [rsp+18h] [rbp-30h] BYREF
if ( a2 )
{
v4[0] = v5;
v2 = wcslen(a2);
std::wstring::_M_construct<wchar_t const*>(v4, a2, a2 + 4 * v2);
Catch::StringMaker<std::wstring,void>::convert((long long)a1, (long long *)v4);
if ( v4[0] != v5 )
operator delete(v4[0], 4LL * v5[0] + 4);
}
else
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "{null string}", (long long)"");
}
return a1;
}
| convert[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
TEST RSI,RSI
JZ 0x001582c7
MOV R14,RSI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,RSI
CALL 0x00117780
LEA RDX,[R14 + RAX*0x4]
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV RSI,R14
CALL 0x0018207a
LAB_0015829e:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00158048
LAB_001582a9:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001582e4
MOV RAX,qword ptr [RSP + 0x18]
LEA RSI,[0x4 + RAX*0x4]
CALL 0x00117150
JMP 0x001582e4
LAB_001582c7:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1dd22b]
LEA RDX,[0x1dd238]
MOV RDI,RBX
CALL 0x00137312
LAB_001582e4:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Catch::StringMaker<wchar_t*, void>::convert[abi:cxx11](wchar_t*) */
StringMaker<wchar_t*,void> * __thiscall
Catch::StringMaker<wchar_t*,void>::convert_abi_cxx11_
(StringMaker<wchar_t*,void> *this,wchar_t *param_1)
{
size_t sVar1;
long *local_40 [2];
long local_30 [2];
if (param_1 == (wchar_t *)0x0) {
*(StringMaker<wchar_t*,void> **)this = this + 0x10;
std::__cxx11::string::_M_construct<char_const*>(this,"{null string}","");
}
else {
local_40[0] = local_30;
sVar1 = wcslen(param_1);
std::__cxx11::wstring::_M_construct<wchar_t_const*>((wstring *)local_40,param_1,param_1 + sVar1)
;
/* try { // try from 0015829e to 001582a8 has its CatchHandler @ 001582f3 */
StringMaker<std::__cxx11::wstring,void>::convert
((StringMaker<std::__cxx11::wstring,void> *)this,(wstring *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] * 4 + 4);
}
}
return this;
}
| |
52,055 | skip_trailing_space | eloqsql/strings/strings_def.h | static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
} | O0 | c | skip_trailing_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x14, -0x10(%rbp)
jbe 0xa019a
movq -0x18(%rbp), %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0xa00fd
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0xa0198
jmp 0xa010d
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x29(%rbp)
jbe 0xa012d
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xa0136
jmp 0xa0144
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xa010d
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
jne 0xa0196
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xa0196
jmp 0xa015d
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2a(%rbp)
jbe 0xa017d
movq -0x18(%rbp), %rax
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0xa0186
jmp 0xa0194
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0xa015d
jmp 0xa0196
jmp 0xa0198
jmp 0xa019a
jmp 0xa019c
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x2b(%rbp)
jbe 0xa01bc
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0xa01c5
jmp 0xa01d3
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xa019c
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| skip_trailing_space_3:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_10], 14h
jbe loc_A019A
mov rax, [rbp+var_18]
shr rax, 2
shl rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
add rax, 4
sub rax, 1
shr rax, 2
shl rax, 2
mov [rbp+var_28], rax
jmp short $+2
loc_A00FD:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_8]
jbe loc_A0198
jmp short $+2
loc_A010D:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_29], al
jbe short loc_A012D
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_29], al
loc_A012D:
mov al, [rbp+var_29]
test al, 1
jnz short loc_A0136
jmp short loc_A0144
loc_A0136:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_A010D
loc_A0144:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
jnz short loc_A0196
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb short loc_A0196
jmp short $+2
loc_A015D:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_2A], al
jbe short loc_A017D
mov rax, [rbp+var_18]
cmp dword ptr [rax-4], 20202020h
setz al
mov [rbp+var_2A], al
loc_A017D:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_A0186
jmp short loc_A0194
loc_A0186:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rax
jmp short loc_A015D
loc_A0194:
jmp short $+2
loc_A0196:
jmp short $+2
loc_A0198:
jmp short $+2
loc_A019A:
jmp short $+2
loc_A019C:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_2B], al
jbe short loc_A01BC
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_2B], al
loc_A01BC:
mov al, [rbp+var_2B]
test al, 1
jnz short loc_A01C5
jmp short loc_A01D3
loc_A01C5:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_A019C
loc_A01D3:
mov rax, [rbp+var_18]
pop rbp
retn
| unsigned long long skip_trailing_space_3(unsigned long long a1, unsigned long long a2)
{
bool v3; // [rsp+1h] [rbp-2Bh]
bool v4; // [rsp+2h] [rbp-2Ah]
bool v5; // [rsp+3h] [rbp-29h]
unsigned long long v6; // [rsp+4h] [rbp-28h]
unsigned long long v7; // [rsp+Ch] [rbp-20h]
unsigned long long v8; // [rsp+14h] [rbp-18h]
v8 = a2 + a1;
if ( a2 > 0x14 )
{
v7 = 4 * (v8 >> 2);
v6 = 4 * ((a1 + 3) >> 2);
if ( v7 > a1 )
{
while ( 1 )
{
v5 = 0;
if ( v8 > v7 )
v5 = *(_BYTE *)(v8 - 1) == 32;
if ( !v5 )
break;
--v8;
}
if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 )
{
while ( 1 )
{
v4 = 0;
if ( v8 > v6 )
v4 = *(_DWORD *)(v8 - 4) == 538976288;
if ( !v4 )
break;
v8 -= 4LL;
}
}
}
}
while ( 1 )
{
v3 = 0;
if ( v8 > a1 )
v3 = *(_BYTE *)(v8 - 1) == 32;
if ( !v3 )
break;
--v8;
}
return v8;
}
| skip_trailing_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x10],0x14
JBE 0x001a019a
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
SUB RAX,0x1
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001a00fd
LAB_001a00fd:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x001a0198
JMP 0x001a010d
LAB_001a010d:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x29],AL
JBE 0x001a012d
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_001a012d:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x001a0136
JMP 0x001a0144
LAB_001a0136:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001a010d
LAB_001a0144:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
JNZ 0x001a0196
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001a0196
JMP 0x001a015d
LAB_001a015d:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x2a],AL
JBE 0x001a017d
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + -0x4],0x20202020
SETZ AL
MOV byte ptr [RBP + -0x2a],AL
LAB_001a017d:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x001a0186
JMP 0x001a0194
LAB_001a0186:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001a015d
LAB_001a0194:
JMP 0x001a0196
LAB_001a0196:
JMP 0x001a0198
LAB_001a0198:
JMP 0x001a019a
LAB_001a019a:
JMP 0x001a019c
LAB_001a019c:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x2b],AL
JBE 0x001a01bc
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x2b],AL
LAB_001a01bc:
MOV AL,byte ptr [RBP + -0x2b]
TEST AL,0x1
JNZ 0x001a01c5
JMP 0x001a01d3
LAB_001a01c5:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001a019c
LAB_001a01d3:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
ulong skip_trailing_space(ulong param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
bool bVar3;
ulong local_20;
local_20 = param_1 + param_2;
if (0x14 < param_2) {
uVar1 = local_20 & 0xfffffffffffffffc;
uVar2 = param_1 + 3 & 0xfffffffffffffffc;
if (param_1 < uVar1) {
while( true ) {
bVar3 = false;
if (uVar1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) {
while( true ) {
bVar3 = false;
if (uVar2 < local_20) {
bVar3 = *(int *)(local_20 - 4) == 0x20202020;
}
if (!bVar3) break;
local_20 = local_20 - 4;
}
}
}
}
while( true ) {
bVar3 = false;
if (param_1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
return local_20;
}
| |
52,056 | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | llama.cpp/common/minja/minja.hpp | std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
std::vector<std::string> ret;
for (size_t i = 0, n = match.size(); i < n; ++i) {
ret.push_back(match[i].str());
}
return ret;
}
it = start;
return {};
} | O3 | cpp | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0x9a438
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
movl $0x0, (%rsp)
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7b88a
testb %al, %al
je 0x991cd
movq 0x28(%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, %r15
subq %rax, %r15
je 0x991b4
movq (%rax), %rdi
cmpq $0x48, %r15
jne 0x991c5
cmpq %rdx, %rdi
jne 0x991cd
jmp 0x991bb
cmpq %rdx, -0x48(%rax,%r15)
jne 0x991cd
leaq (%rax,%r15), %rsi
addq $-0x48, %rsi
jmp 0x99208
movq %rax, %rsi
cmpq %rdx, %rdi
je 0x99208
movq %r12, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x991f6
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1d160
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsi), %rdi
subq %rdx, %rdi
xorl %edx, %edx
cmpb $0x0, 0x10(%rsi)
cmovneq %rdi, %rdx
addq %rdx, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
cmpq %rcx, %rax
je 0x991df
sarq $0x3, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
addq $-0x3, %r15
je 0x991df
leaq 0x48(%rsp), %r13
xorl %ebp, %ebp
leaq 0x38(%rsp), %r14
xorl %r12d, %r12d
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
je 0x99289
movq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
addq $-0x3, %rcx
cmpq %r12, %rcx
jbe 0x99289
addq %rbp, %rsi
jmp 0x99290
addq %rax, %rsi
addq $-0x48, %rsi
movq %r14, %rdi
callq 0x88ff2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x56354
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x992ba
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1d160
incq %r12
addq $0x18, %rbp
cmpq %r12, %r15
jne 0x99257
jmp 0x991df
movq %rax, %r14
jmp 0x992f7
movq %rax, %r14
jmp 0x992ef
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x992ef
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x1d160
movq %rbx, %rdi
callq 0x23764
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9930e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1d160
movq %r14, %rdi
callq 0x1d8e0
| _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
xorps xmm0, xmm0
lea rdx, [rsp+88h+var_78]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
mov rsi, [r14+18h]
mov rdi, [r14+20h]
mov [rsp+88h+var_88], 0
mov rcx, r15
xor r8d, r8d
xor r9d, r9d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
test al, al
jz short loc_991CD
mov rdx, [rsp+88h+var_60]
mov rax, [rsp+88h+var_78]
mov rcx, [rsp+88h+var_70]
mov r15, rcx
sub r15, rax
jz short loc_991B4
mov rdi, [rax]
cmp r15, 48h ; 'H'
jnz short loc_991C5
cmp rdi, rdx
jnz short loc_991CD
jmp short loc_991BB
loc_991B4:
cmp [rax+r15-48h], rdx
jnz short loc_991CD
loc_991BB:
lea rsi, [rax+r15]
add rsi, 0FFFFFFFFFFFFFFB8h
jmp short loc_99208
loc_991C5:
mov rsi, rax
cmp rdi, rdx
jz short loc_99208
loc_991CD:
mov [r14+20h], r12
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
loc_991DF:
mov rdi, [rsp+88h+var_78]; void *
test rdi, rdi
jz short loc_991F6
mov rsi, [rsp+88h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_991F6:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_99208:
mov rdi, [rsi+8]
sub rdi, rdx
xor edx, edx
cmp byte ptr [rsi+10h], 0
cmovnz rdx, rdi
add [r14+20h], rdx
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
cmp rax, rcx
jz short loc_991DF
sar r15, 3
mov rax, 0AAAAAAAAAAAAAAABh
imul r15, rax
add r15, 0FFFFFFFFFFFFFFFDh
jz short loc_991DF
lea r13, [rsp+88h+var_40]
xor ebp, ebp
lea r14, [rsp+88h+var_50]
xor r12d, r12d
loc_99257:
mov rsi, [rsp+88h+var_78]
mov rax, [rsp+88h+var_70]
sub rax, rsi
jz short loc_99289
mov rcx, rax
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
add rcx, 0FFFFFFFFFFFFFFFDh
cmp rcx, r12
jbe short loc_99289
add rsi, rbp
jmp short loc_99290
loc_99289:
add rsi, rax
add rsi, 0FFFFFFFFFFFFFFB8h
loc_99290:
mov rdi, r14
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void)
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+88h+var_50]; void *
cmp rdi, r13
jz short loc_992BA
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_992BA:
inc r12
add rbp, 18h
cmp r15, r12
jnz short loc_99257
jmp loc_991DF
mov r14, rax
jmp short loc_992F7
mov r14, rax
jmp short loc_992EF
mov r14, rax
mov rdi, [rsp+arg_30]; void *
cmp rdi, r13
jz short loc_992EF
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_992EF:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_992F7:
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_9930E
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9930E:
mov rdi, r14
call __Unwind_Resume
| long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v7; // r12
__int128 v8; // kr00_16
long long v9; // r15
long long v10; // rdi
long long v11; // rsi
long long v13; // rdx
unsigned long long v14; // r15
long long v15; // rbp
unsigned long long i; // r12
long long v17; // rsi
__int128 v18; // [rsp+10h] [rbp-78h] BYREF
__int128 v19; // [rsp+20h] [rbp-68h]
void *v20[2]; // [rsp+38h] [rbp-50h] BYREF
long long v21; // [rsp+48h] [rbp-40h] BYREF
v7 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v19 = 0LL;
v18 = 0LL;
if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
*(long long **)(a2 + 32),
*(_QWORD *)(a2 + 24),
(char **)&v18,
a3,
0,
0,
0) )
goto LABEL_9;
v8 = v18;
v9 = *((_QWORD *)&v18 + 1) - v18;
if ( *((_QWORD *)&v18 + 1) != (_QWORD)v18 )
{
v10 = *(_QWORD *)v18;
if ( v9 == 72 )
{
if ( v10 == *((_QWORD *)&v19 + 1) )
goto LABEL_7;
}
else
{
v11 = v18;
if ( v10 == *((_QWORD *)&v19 + 1) )
goto LABEL_13;
}
LABEL_9:
*(_QWORD *)(a2 + 32) = v7;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
goto LABEL_10;
}
if ( *(_QWORD *)(*((_QWORD *)&v18 + 1) - 72LL) != *((_QWORD *)&v19 + 1) )
goto LABEL_9;
LABEL_7:
v11 = *((_QWORD *)&v18 + 1) - 72LL;
LABEL_13:
v13 = 0LL;
if ( *(_BYTE *)(v11 + 16) )
v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v19 + 1);
*(_QWORD *)(a2 + 32) += v13;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
if ( (_QWORD)v8 != *((_QWORD *)&v8 + 1) )
{
v14 = 0xAAAAAAAAAAAAAAABLL * (v9 >> 3) - 3;
if ( v14 )
{
v15 = 0LL;
for ( i = 0LL; i != v14; ++i )
{
if ( *((_QWORD *)&v18 + 1) == (_QWORD)v18
|| 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v18 + 1) - v18) >> 3) - 3 <= i )
{
v17 = *((_QWORD *)&v18 + 1) - 72LL;
}
else
{
v17 = v15 + v18;
}
std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v20, v17);
std::vector<std::string>::emplace_back<std::string>(a1, v20);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
v15 += 24LL;
}
}
}
LABEL_10:
if ( (_QWORD)v18 )
operator delete((void *)v18, v19 - v18);
return a1;
}
| consumeTokenGroups:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x0019a438
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x10]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [R14 + 0x20]
LAB_00199174:
MOV dword ptr [RSP],0x0
MOV RCX,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0017b88a
TEST AL,AL
JZ 0x001991cd
MOV RDX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV R15,RCX
SUB R15,RAX
JZ 0x001991b4
MOV RDI,qword ptr [RAX]
CMP R15,0x48
JNZ 0x001991c5
CMP RDI,RDX
JNZ 0x001991cd
JMP 0x001991bb
LAB_001991b4:
CMP qword ptr [RAX + R15*0x1 + -0x48],RDX
JNZ 0x001991cd
LAB_001991bb:
LEA RSI,[RAX + R15*0x1]
ADD RSI,-0x48
JMP 0x00199208
LAB_001991c5:
MOV RSI,RAX
CMP RDI,RDX
JZ 0x00199208
LAB_001991cd:
MOV qword ptr [R14 + 0x20],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
LAB_001991df:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001991f6
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011d160
LAB_001991f6:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00199208:
MOV RDI,qword ptr [RSI + 0x8]
SUB RDI,RDX
XOR EDX,EDX
CMP byte ptr [RSI + 0x10],0x0
CMOVNZ RDX,RDI
ADD qword ptr [R14 + 0x20],RDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
CMP RAX,RCX
JZ 0x001991df
SAR R15,0x3
MOV RAX,-0x5555555555555555
IMUL R15,RAX
ADD R15,-0x3
JZ 0x001991df
LEA R13,[RSP + 0x48]
XOR EBP,EBP
LEA R14,[RSP + 0x38]
XOR R12D,R12D
LAB_00199257:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RSI
JZ 0x00199289
MOV RCX,RAX
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
ADD RCX,-0x3
CMP RCX,R12
JBE 0x00199289
ADD RSI,RBP
JMP 0x00199290
LAB_00199289:
ADD RSI,RAX
ADD RSI,-0x48
LAB_00199290:
MOV RDI,R14
CALL 0x00188ff2
LAB_00199298:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00156354
LAB_001992a3:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R13
JZ 0x001992ba
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x0011d160
LAB_001992ba:
INC R12
ADD RBP,0x18
CMP R15,R12
JNZ 0x00199257
JMP 0x001991df
|
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *
minja::Parser::consumeTokenGroups
(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,
Parser *param_2,int8 param_3,int4 param_4)
{
int8 uVar1;
bool bVar2;
long *plVar3;
long lVar4;
long lVar5;
long *local_78;
long *plStack_70;
long local_68;
long lStack_60;
long *local_50 [2];
long local_40 [2];
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
local_68 = 0;
lStack_60 = 0;
local_78 = (long *)0x0;
plStack_70 = (long *)0x0;
/* try { // try from 00199174 to 00199188 has its CatchHandler @ 001992cb */
bVar2 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>>
(*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78,
param_3,0,0,0);
if (bVar2) {
lVar5 = (long)plStack_70 - (long)local_78;
if (lVar5 == 0) {
lVar4 = local_78[-9];
joined_r0x001991b9:
if (lVar4 != lStack_60) goto LAB_001991cd;
plVar3 = (long *)((long)local_78 + lVar5 + -0x48);
}
else {
lVar4 = *local_78;
if (lVar5 == 0x48) goto joined_r0x001991b9;
plVar3 = local_78;
if (lVar4 != lStack_60) goto LAB_001991cd;
}
lVar4 = 0;
if ((char)plVar3[2] != '\0') {
lVar4 = plVar3[1] - lStack_60;
}
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar4;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
if ((local_78 != plStack_70) && (lVar5 = (lVar5 >> 3) * -0x5555555555555555, lVar5 != 3)) {
lVar4 = 0;
do {
/* try { // try from 00199290 to 00199297 has its CatchHandler @ 001992d0 */
std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str
();
/* try { // try from 00199298 to 001992a2 has its CatchHandler @ 001992d5 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>(param_1,(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar4 = lVar4 + 1;
} while (lVar5 + -3 != lVar4);
}
}
else {
LAB_001991cd:
*(int8 *)(param_2 + 0x20) = uVar1;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
}
if (local_78 != (long *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
return param_1;
}
| |
52,057 | AffiliateBar::render() | GhostEscape/src/affiliate/affiliate_bar.cpp | void AffiliateBar::render()
{
auto pos = parent_->getRenderPosition() + offset_;
if (percentage_ > 0.7f){
game_.renderHBar(pos, size_, percentage_, color_high_);
} else if (percentage_ > 0.3f){
game_.renderHBar(pos, size_, percentage_, color_mid_);
} else {
game_.renderHBar(pos, size_, percentage_, color_low_);
}
} | O0 | cpp | AffiliateBar::render():
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0x50(%rax), %rdi
callq 0x16c00
movq -0x58(%rbp), %rsi
movlpd %xmm0, -0x18(%rbp)
addq $0x58, %rsi
leaq -0x18(%rbp), %rdi
callq 0x118e0
movq -0x58(%rbp), %rax
movlpd %xmm0, -0x10(%rbp)
movss 0x6c(%rax), %xmm0
movss 0x6a3b(%rip), %xmm1 # 0x22034
ucomiss %xmm1, %xmm0
jbe 0x1b62f
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rdi
movq %rax, %rdx
addq $0x60, %rdx
movss 0x6c(%rax), %xmm0
movups 0x70(%rax), %xmm1
movaps %xmm1, -0x30(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x28(%rbp), %xmm2
leaq -0x10(%rbp), %rsi
callq 0x7310
jmp 0x1b6ad
movq -0x58(%rbp), %rax
movss 0x6c(%rax), %xmm0
movss 0x69d8(%rip), %xmm1 # 0x22018
ucomiss %xmm1, %xmm0
jbe 0x1b679
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rdi
movq %rax, %rdx
addq $0x60, %rdx
movss 0x6c(%rax), %xmm0
movups 0x80(%rax), %xmm1
movaps %xmm1, -0x40(%rbp)
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm2
leaq -0x10(%rbp), %rsi
callq 0x7310
jmp 0x1b6ab
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rdi
movq %rax, %rdx
addq $0x60, %rdx
movss 0x6c(%rax), %xmm0
movups 0x90(%rax), %xmm1
movaps %xmm1, -0x50(%rbp)
movsd -0x50(%rbp), %xmm1
movsd -0x48(%rbp), %xmm2
leaq -0x10(%rbp), %rsi
callq 0x7310
jmp 0x1b6ad
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN12AffiliateBar6renderEv:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_58], rax
mov rdi, [rax+50h]; this
call _ZNK12ObjectScreen17getRenderPositionEv; ObjectScreen::getRenderPosition(void)
mov rsi, [rbp+var_58]
movlpd [rbp+var_18], xmm0
add rsi, 58h ; 'X'
lea rdi, [rbp+var_18]
call _ZN3glmplIfLNS_9qualifierE0EEENS_3vecILi2ET_XT0_EEERKS4_S6_; glm::operator+<float,(glm::qualifier)0>(glm::vec<2,float,(glm::qualifier)0> const&,glm::vec<2,float,(glm::qualifier)0> const&)
mov rax, [rbp+var_58]
movlpd [rbp+var_10], xmm0
movss xmm0, dword ptr [rax+6Ch]
movss xmm1, cs:flt_22034
ucomiss xmm0, xmm1
jbe short loc_1B62F
mov rax, [rbp+var_58]
mov rdi, [rax+10h]
mov rdx, rax
add rdx, 60h ; '`'
movss xmm0, dword ptr [rax+6Ch]
movups xmm1, xmmword ptr [rax+70h]
movaps [rbp+var_30], xmm1
movsd xmm1, qword ptr [rbp+var_30]
movsd xmm2, qword ptr [rbp+var_30+8]
lea rsi, [rbp+var_10]
call _ZN4Game10renderHBarERKN3glm3vecILi2EfLNS0_9qualifierE0EEES5_f10SDL_FColor; Game::renderHBar(glm::vec<2,float,(glm::qualifier)0> const&,glm::vec<2,float,(glm::qualifier)0> const&,float,SDL_FColor)
jmp short loc_1B6AD
loc_1B62F:
mov rax, [rbp+var_58]
movss xmm0, dword ptr [rax+6Ch]
movss xmm1, cs:dword_22018
ucomiss xmm0, xmm1
jbe short loc_1B679
mov rax, [rbp+var_58]
mov rdi, [rax+10h]
mov rdx, rax
add rdx, 60h ; '`'
movss xmm0, dword ptr [rax+6Ch]
movups xmm1, xmmword ptr [rax+80h]
movaps [rbp+var_40], xmm1
movsd xmm1, qword ptr [rbp+var_40]
movsd xmm2, qword ptr [rbp+var_40+8]
lea rsi, [rbp+var_10]
call _ZN4Game10renderHBarERKN3glm3vecILi2EfLNS0_9qualifierE0EEES5_f10SDL_FColor; Game::renderHBar(glm::vec<2,float,(glm::qualifier)0> const&,glm::vec<2,float,(glm::qualifier)0> const&,float,SDL_FColor)
jmp short loc_1B6AB
loc_1B679:
mov rax, [rbp+var_58]
mov rdi, [rax+10h]
mov rdx, rax
add rdx, 60h ; '`'
movss xmm0, dword ptr [rax+6Ch]
movups xmm1, xmmword ptr [rax+90h]
movaps [rbp+var_50], xmm1
movsd xmm1, qword ptr [rbp+var_50]
movsd xmm2, qword ptr [rbp+var_50+8]
lea rsi, [rbp+var_10]
call _ZN4Game10renderHBarERKN3glm3vecILi2EfLNS0_9qualifierE0EEES5_f10SDL_FColor; Game::renderHBar(glm::vec<2,float,(glm::qualifier)0> const&,glm::vec<2,float,(glm::qualifier)0> const&,float,SDL_FColor)
loc_1B6AB:
jmp short $+2
loc_1B6AD:
add rsp, 60h
pop rbp
retn
| long long AffiliateBar::render(AffiliateBar *this)
{
double RenderPosition; // [rsp+48h] [rbp-18h] BYREF
_QWORD v3[2]; // [rsp+50h] [rbp-10h] BYREF
v3[1] = this;
RenderPosition = ObjectScreen::getRenderPosition(*((ObjectScreen **)this + 10));
v3[0] = glm::operator+<float,(glm::qualifier)0>((float *)&RenderPosition, (float *)this + 22);
if ( *((float *)this + 27) > 0.69999999 )
return Game::renderHBar(
*((_QWORD *)this + 2),
v3,
(_DWORD *)this + 24,
*((float *)this + 27),
*((double *)this + 14),
*((double *)this + 15));
if ( *((float *)this + 27) <= 0.30000001 )
return Game::renderHBar(
*((_QWORD *)this + 2),
v3,
(_DWORD *)this + 24,
*((float *)this + 27),
*((double *)this + 18),
*((double *)this + 19));
return Game::renderHBar(
*((_QWORD *)this + 2),
v3,
(_DWORD *)this + 24,
*((float *)this + 27),
*((double *)this + 16),
*((double *)this + 17));
}
| render:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x00116c00
MOV RSI,qword ptr [RBP + -0x58]
MOVLPD qword ptr [RBP + -0x18],XMM0
ADD RSI,0x58
LEA RDI,[RBP + -0x18]
CALL 0x001118e0
MOV RAX,qword ptr [RBP + -0x58]
MOVLPD qword ptr [RBP + -0x10],XMM0
MOVSS XMM0,dword ptr [RAX + 0x6c]
MOVSS XMM1,dword ptr [0x00122034]
UCOMISS XMM0,XMM1
JBE 0x0011b62f
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0x10]
MOV RDX,RAX
ADD RDX,0x60
MOVSS XMM0,dword ptr [RAX + 0x6c]
MOVUPS XMM1,xmmword ptr [RAX + 0x70]
MOVAPS xmmword ptr [RBP + -0x30],XMM1
MOVSD XMM1,qword ptr [RBP + -0x30]
MOVSD XMM2,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x10]
CALL 0x00107310
JMP 0x0011b6ad
LAB_0011b62f:
MOV RAX,qword ptr [RBP + -0x58]
MOVSS XMM0,dword ptr [RAX + 0x6c]
MOVSS XMM1,dword ptr [0x00122018]
UCOMISS XMM0,XMM1
JBE 0x0011b679
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0x10]
MOV RDX,RAX
ADD RDX,0x60
MOVSS XMM0,dword ptr [RAX + 0x6c]
MOVUPS XMM1,xmmword ptr [RAX + 0x80]
MOVAPS xmmword ptr [RBP + -0x40],XMM1
MOVSD XMM1,qword ptr [RBP + -0x40]
MOVSD XMM2,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x10]
CALL 0x00107310
JMP 0x0011b6ab
LAB_0011b679:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0x10]
MOV RDX,RAX
ADD RDX,0x60
MOVSS XMM0,dword ptr [RAX + 0x6c]
MOVUPS XMM1,xmmword ptr [RAX + 0x90]
MOVAPS xmmword ptr [RBP + -0x50],XMM1
MOVSD XMM1,qword ptr [RBP + -0x50]
MOVSD XMM2,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x10]
CALL 0x00107310
LAB_0011b6ab:
JMP 0x0011b6ad
LAB_0011b6ad:
ADD RSP,0x60
POP RBP
RET
|
/* AffiliateBar::render() */
void __thiscall AffiliateBar::render(AffiliateBar *this)
{
int8 local_20;
int8 local_18;
AffiliateBar *local_10;
local_10 = this;
local_20 = ObjectScreen::getRenderPosition(*(ObjectScreen **)(this + 0x50));
local_18 = glm::operator+((vec *)&local_20,(vec *)(this + 0x58));
if (*(float *)(this + 0x6c) <= DAT_00122034) {
if (*(float *)(this + 0x6c) <= DAT_00122018) {
Game::renderHBar(*(int4 *)(this + 0x6c),(int)*(int8 *)(this + 0x90),
*(int8 *)(this + 0x98),*(int8 *)(this + 0x10),&local_18,
this + 0x60);
}
else {
Game::renderHBar(*(int4 *)(this + 0x6c),(int)*(int8 *)(this + 0x80),
*(int8 *)(this + 0x88),*(int8 *)(this + 0x10),&local_18,
this + 0x60);
}
}
else {
Game::renderHBar(*(int4 *)(this + 0x6c),(int)*(int8 *)(this + 0x70),
*(int8 *)(this + 0x78),*(int8 *)(this + 0x10),&local_18,this + 0x60
);
}
return;
}
| |
52,058 | mysql_once_init | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static int mysql_once_init()
#else
static void mysql_once_init()
#endif
{
ma_init(); /* Will init threads */
init_client_errs();
get_default_configuration_dirs();
set_default_charset_by_name(MARIADB_DEFAULT_CHARSET, 0);
if (mysql_client_plugin_init())
{
#ifdef _WIN32
return 1;
#else
return;
#endif
}
if (!mysql_port)
{
#if !__has_feature(memory_sanitizer) /* work around MSAN deficiency */
struct servent *serv_ptr;
#endif
char *env;
mysql_port = MARIADB_PORT;
#if !__has_feature(memory_sanitizer) /* work around MSAN deficiency */
if ((serv_ptr = getservbyname("mysql", "tcp")))
mysql_port = (uint)ntohs((ushort)serv_ptr->s_port);
#endif
if ((env = getenv("MYSQL_TCP_PORT")))
mysql_port =(uint)atoi(env);
}
if (!mysql_unix_port)
{
char *env;
#ifdef _WIN32
mysql_unix_port = (char*)MARIADB_NAMEDPIPE;
#else
mysql_unix_port = (char*)MARIADB_UNIX_ADDR;
#endif
if ((env = getenv("MYSQL_UNIX_PORT")) ||
(env = getenv("MARIADB_UNIX_PORT")))
mysql_unix_port = env;
} | O3 | c | mysql_once_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x1ebc0
callq 0x33f54
xorl %eax, %eax
callq 0x336da
leaq 0x194f8(%rip), %rdi # 0x36c1a
xorl %esi, %esi
callq 0x3366e
xorl %eax, %eax
callq 0x28cf0
testl %eax, %eax
jne 0x1d7f6
leaq 0x2e881(%rip), %rbx # 0x4bfc0
cmpl $0x0, (%rbx)
jne 0x1d78a
movl $0xcea, (%rbx) # imm = 0xCEA
leaq 0x1bc0d(%rip), %rdi # 0x3935e
leaq 0x196ad(%rip), %rsi # 0x36e05
callq 0x13080
testq %rax, %rax
je 0x1d76f
movzwl 0x10(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rbx)
leaq 0x19693(%rip), %rdi # 0x36e09
callq 0x13590
testq %rax, %rax
je 0x1d78a
movq %rax, %rdi
callq 0x136f0
movl %eax, (%rbx)
leaq 0x2e837(%rip), %rbx # 0x4bfc8
cmpq $0x0, (%rbx)
jne 0x1d7c6
leaq 0x1967a(%rip), %rax # 0x36e18
movq %rax, (%rbx)
leaq 0x19680(%rip), %rdi # 0x36e28
callq 0x13590
testq %rax, %rax
jne 0x1d7c3
leaq 0x1967f(%rip), %rdi # 0x36e38
callq 0x13590
testq %rax, %rax
je 0x1d7c6
movq %rax, (%rbx)
leaq 0x2e823(%rip), %rax # 0x4bff0
cmpb $0x0, (%rax)
jne 0x1d7d7
callq 0x23f7a
xorl %edi, %edi
xorl %esi, %esi
callq 0x297c0
movl $0x1, %esi
movl $0xd, %edi
callq 0x13560
movb $0x1, 0x2e7de(%rip) # 0x4bfd4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| mysql_once_init:
push rbp
mov rbp, rsp
push rbx
push rax
call ma_init
call init_client_errs
xor eax, eax
call get_default_configuration_dirs
lea rdi, aUtf8mb4; "utf8mb4"
xor esi, esi
call set_default_charset_by_name
xor eax, eax
call mysql_client_plugin_init
test eax, eax
jnz loc_1D7F6
lea rbx, mysql_port
cmp dword ptr [rbx], 0
jnz short loc_1D78A
mov dword ptr [rbx], 0CEAh
lea rdi, aEtcMysql+5; "mysql"
lea rsi, aTcp; "tcp"
call _getservbyname
test rax, rax
jz short loc_1D76F
movzx eax, word ptr [rax+10h]
rol ax, 8
movzx eax, ax
mov [rbx], eax
loc_1D76F:
lea rdi, aMysqlTcpPort; "MYSQL_TCP_PORT"
call _getenv
test rax, rax
jz short loc_1D78A
mov rdi, rax
call _atoi
mov [rbx], eax
loc_1D78A:
lea rbx, mysql_unix_port
cmp qword ptr [rbx], 0
jnz short loc_1D7C6
lea rax, aTmpMysqlSock; "/tmp/mysql.sock"
mov [rbx], rax
lea rdi, aMysqlUnixPort; "MYSQL_UNIX_PORT"
call _getenv
test rax, rax
jnz short loc_1D7C3
lea rdi, aMariadbUnixPor; "MARIADB_UNIX_PORT"
call _getenv
test rax, rax
jz short loc_1D7C6
loc_1D7C3:
mov [rbx], rax
loc_1D7C6:
lea rax, mysql_ps_subsystem_initialized
cmp byte ptr [rax], 0
jnz short loc_1D7D7
call mysql_init_ps_subsystem
loc_1D7D7:
xor edi, edi
xor esi, esi
call ma_tls_start
mov esi, 1
mov edi, 0Dh
call _signal
mov cs:mysql_client_init, 1
loc_1D7F6:
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_once_init(long long a1)
{
long long result; // rax
long long v2; // rax
long long v3; // rax
long long v4; // rax
ma_init(a1);
init_client_errs();
get_default_configuration_dirs();
set_default_charset_by_name("utf8mb4", 0LL);
result = mysql_client_plugin_init();
if ( !(_DWORD)result )
{
if ( !mysql_port )
{
mysql_port = 3306;
v2 = getservbyname("mysql", "tcp");
if ( v2 )
mysql_port = (unsigned __int16)__ROL2__(*(_WORD *)(v2 + 16), 8);
v3 = getenv("MYSQL_TCP_PORT");
if ( v3 )
mysql_port = atoi(v3);
}
if ( !mysql_unix_port )
{
mysql_unix_port = "/tmp/mysql.sock";
v4 = getenv("MYSQL_UNIX_PORT");
if ( v4 || (v4 = getenv("MARIADB_UNIX_PORT")) != 0 )
mysql_unix_port = v4;
}
if ( !mysql_ps_subsystem_initialized )
mysql_init_ps_subsystem();
ma_tls_start(0LL, 0LL);
result = signal(13LL, 1LL);
mysql_client_init = 1;
}
return result;
}
| mysql_once_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CALL 0x0011ebc0
CALL 0x00133f54
XOR EAX,EAX
CALL 0x001336da
LEA RDI,[0x136c1a]
XOR ESI,ESI
CALL 0x0013366e
XOR EAX,EAX
CALL 0x00128cf0
TEST EAX,EAX
JNZ 0x0011d7f6
LEA RBX,[0x14bfc0]
CMP dword ptr [RBX],0x0
JNZ 0x0011d78a
MOV dword ptr [RBX],0xcea
LEA RDI,[0x13935e]
LEA RSI,[0x136e05]
CALL 0x00113080
TEST RAX,RAX
JZ 0x0011d76f
MOVZX EAX,word ptr [RAX + 0x10]
ROL AX,0x8
MOVZX EAX,AX
MOV dword ptr [RBX],EAX
LAB_0011d76f:
LEA RDI,[0x136e09]
CALL 0x00113590
TEST RAX,RAX
JZ 0x0011d78a
MOV RDI,RAX
CALL 0x001136f0
MOV dword ptr [RBX],EAX
LAB_0011d78a:
LEA RBX,[0x14bfc8]
CMP qword ptr [RBX],0x0
JNZ 0x0011d7c6
LEA RAX,[0x136e18]
MOV qword ptr [RBX],RAX
LEA RDI,[0x136e28]
CALL 0x00113590
TEST RAX,RAX
JNZ 0x0011d7c3
LEA RDI,[0x136e38]
CALL 0x00113590
TEST RAX,RAX
JZ 0x0011d7c6
LAB_0011d7c3:
MOV qword ptr [RBX],RAX
LAB_0011d7c6:
LEA RAX,[0x14bff0]
CMP byte ptr [RAX],0x0
JNZ 0x0011d7d7
CALL 0x00123f7a
LAB_0011d7d7:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x001297c0
MOV ESI,0x1
MOV EDI,0xd
CALL 0x00113560
MOV byte ptr [0x0014bfd4],0x1
LAB_0011d7f6:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_once_init(void)
{
ushort uVar1;
int iVar2;
servent *psVar3;
char *pcVar4;
ma_init();
init_client_errs();
get_default_configuration_dirs();
set_default_charset_by_name("utf8mb4",0);
iVar2 = mysql_client_plugin_init();
if (iVar2 == 0) {
if (mysql_port == 0) {
mysql_port = 0xcea;
psVar3 = getservbyname("mysql","tcp");
if (psVar3 != (servent *)0x0) {
uVar1 = (ushort)psVar3->s_port;
mysql_port = (uint)(ushort)(uVar1 << 8 | uVar1 >> 8);
}
pcVar4 = getenv("MYSQL_TCP_PORT");
if (pcVar4 != (char *)0x0) {
mysql_port = atoi(pcVar4);
}
}
if (mysql_unix_port == (char *)0x0) {
mysql_unix_port = "/tmp/mysql.sock";
pcVar4 = getenv("MYSQL_UNIX_PORT");
if ((pcVar4 != (char *)0x0) || (pcVar4 = getenv("MARIADB_UNIX_PORT"), pcVar4 != (char *)0x0))
{
mysql_unix_port = pcVar4;
}
}
if (mysql_ps_subsystem_initialized == '\0') {
mysql_init_ps_subsystem();
}
ma_tls_start(0,0);
signal(0xd,(__sighandler_t)0x1);
mysql_client_init = 1;
return;
}
return;
}
| |
52,059 | my_fopen | eloqsql/mysys/my_fopen.c | FILE *my_fopen(const char *filename, int flags, myf MyFlags)
{
FILE *fd;
char type[10];
DBUG_ENTER("my_fopen");
DBUG_PRINT("my",("Name: '%s' flags: %d MyFlags: %lu",
filename, flags, MyFlags));
make_ftype(type,flags);
#ifdef _WIN32
fd= my_win_fopen(filename, type);
#else
fd= fopen(filename, type);
#endif
if (fd != 0)
{
/*
The test works if MY_NFILE < 128. The problem is that fileno() is char
on some OS (SUNOS). Actually the filename save isn't that important
so we can ignore if this doesn't work.
*/
int filedesc= my_fileno(fd);
if ((uint)filedesc >= my_file_limit)
{
statistic_increment(my_stream_opened,&THR_LOCK_open);
DBUG_RETURN(fd); /* safeguard */
}
my_file_info[filedesc].name= my_strdup(key_memory_my_file_info, filename, MyFlags);
statistic_increment(my_stream_opened, &THR_LOCK_open);
statistic_increment(my_file_total_opened, &THR_LOCK_open);
my_file_info[filedesc].type= STREAM_BY_FOPEN;
DBUG_PRINT("exit",("stream: %p", fd));
DBUG_RETURN(fd);
}
else
my_errno=errno;
DBUG_PRINT("error",("Got error %d on open",my_errno));
if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
my_error((flags & O_RDONLY) ? EE_FILENOTFOUND : EE_CANTCREATEFILE,
MYF(ME_BELL), filename, my_errno);
DBUG_RETURN((FILE*) 0);
} | O0 | c | my_fopen:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
jmp 0x30032
leaq -0x12(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x301c0
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x24310
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x30124
movq -0x40(%rbp), %rdi
callq 0x30720
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
leaq 0x1a5260(%rip), %rcx # 0x1d52d0
cmpl (%rcx), %eax
jb 0x30099
leaq 0x35cde5(%rip), %rax # 0x38ce60
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x35cdd7(%rip), %rax # 0x38ce60
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x3018f
leaq 0x35d314(%rip), %rax # 0x38d3b4
movl (%rax), %edi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x28670
movq %rax, %rcx
leaq 0x1a521f(%rip), %rax # 0x1d52d8
movq (%rax), %rax
movslq -0x44(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
leaq 0x35cd8f(%rip), %rax # 0x38ce60
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x35cd81(%rip), %rax # 0x38ce60
movq %rcx, (%rax)
leaq 0x35cd87(%rip), %rax # 0x38ce70
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x35cd79(%rip), %rax # 0x38ce70
movq %rcx, (%rax)
leaq 0x1a51d7(%rip), %rax # 0x1d52d8
movq (%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x3, 0x8(%rax)
jmp 0x30118
jmp 0x3011a
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x3018f
callq 0x24040
movl (%rax), %eax
movl %eax, -0x48(%rbp)
callq 0x28a40
movl -0x48(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x3013a
jmp 0x3013c
movq -0x38(%rbp), %rax
andq $0x19, %rax
cmpq $0x0, %rax
je 0x30185
movl -0x2c(%rbp), %edx
andl $0x0, %edx
movl $0x1, %eax
movl $0x1d, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0x28a40
movl -0x54(%rbp), %edi
movq -0x50(%rbp), %rdx
movl (%rax), %ecx
movl $0x4, %esi
movb $0x0, %al
callq 0x2fae0
jmp 0x30187
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x301b3
movq -0x60(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
callq 0x24300
nopl (%rax,%rax)
| my_fopen:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
jmp short $+2
loc_30032:
lea rdi, [rbp+var_12]
mov esi, [rbp+var_2C]
call make_ftype
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
call _fopen64
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jz loc_30124
mov rdi, [rbp+var_40]
call my_fileno
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
lea rcx, my_file_limit
cmp eax, [rcx]
jb short loc_30099
lea rax, my_stream_opened
mov rcx, [rax]
add rcx, 1
lea rax, my_stream_opened
mov [rax], rcx
mov rax, [rbp+var_40]
mov [rbp+var_20], rax
jmp loc_3018F
loc_30099:
lea rax, key_memory_my_file_info
mov edi, [rax]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call my_strdup
mov rcx, rax
lea rax, my_file_info
mov rax, [rax]
movsxd rdx, [rbp+var_44]
shl rdx, 4
add rax, rdx
mov [rax], rcx
lea rax, my_stream_opened
mov rcx, [rax]
add rcx, 1
lea rax, my_stream_opened
mov [rax], rcx
lea rax, my_file_total_opened
mov rcx, [rax]
add rcx, 1
lea rax, my_file_total_opened
mov [rax], rcx
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_44]
shl rcx, 4
add rax, rcx
mov dword ptr [rax+8], 3
jmp short $+2
loc_30118:
jmp short $+2
loc_3011A:
mov rax, [rbp+var_40]
mov [rbp+var_20], rax
jmp short loc_3018F
loc_30124:
call ___errno_location
mov eax, [rax]
mov [rbp+var_48], eax
call _my_thread_var
mov ecx, [rbp+var_48]
mov [rax], ecx
jmp short $+2
loc_3013A:
jmp short $+2
loc_3013C:
mov rax, [rbp+var_38]
and rax, 19h
cmp rax, 0
jz short loc_30185
mov edx, [rbp+var_2C]
and edx, 0
mov eax, 1
mov ecx, 1Dh
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_54], eax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
call _my_thread_var
mov edi, [rbp+var_54]
mov rdx, [rbp+var_50]
mov ecx, [rax]
mov esi, 4
mov al, 0
call my_error
loc_30185:
jmp short $+2
loc_30187:
mov [rbp+var_20], 0
loc_3018F:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_301B3
mov rax, [rbp+var_60]
add rsp, 60h
pop rbp
retn
loc_301B3:
call ___stack_chk_fail
| long long my_fopen(long long a1, unsigned int a2, int a3)
{
unsigned int *v3; // rax
int v5; // [rsp+18h] [rbp-48h]
unsigned int v6; // [rsp+1Ch] [rbp-44h]
long long v7; // [rsp+20h] [rbp-40h]
_BYTE v10[10]; // [rsp+4Eh] [rbp-12h] BYREF
unsigned long long v11; // [rsp+58h] [rbp-8h]
v11 = __readfsqword(0x28u);
make_ftype(v10, a2);
v7 = fopen64(a1, v10);
if ( v7 )
{
v6 = my_fileno(v7);
if ( v6 < my_file_limit )
{
*((_QWORD *)my_file_info + 2 * (int)v6) = my_strdup(key_memory_my_file_info, a1, a3);
++my_stream_opened;
++my_file_total_opened;
*((_DWORD *)my_file_info + 4 * (int)v6 + 2) = 3;
}
else
{
++my_stream_opened;
}
return v7;
}
else
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
if ( (a3 & 0x19) != 0 )
{
v3 = (unsigned int *)my_thread_var();
my_error(1u, 4LL, a1, *v3);
}
return 0LL;
}
}
| my_fopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
JMP 0x00130032
LAB_00130032:
LEA RDI,[RBP + -0x12]
MOV ESI,dword ptr [RBP + -0x2c]
CALL 0x001301c0
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
CALL 0x00124310
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00130124
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00130720
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
LEA RCX,[0x2d52d0]
CMP EAX,dword ptr [RCX]
JC 0x00130099
LEA RAX,[0x48ce60]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x48ce60]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013018f
LAB_00130099:
LEA RAX,[0x48d3b4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00128670
MOV RCX,RAX
LEA RAX,[0x2d52d8]
MOV RAX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RBP + -0x44]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
LEA RAX,[0x48ce60]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x48ce60]
MOV qword ptr [RAX],RCX
LEA RAX,[0x48ce70]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x48ce70]
MOV qword ptr [RAX],RCX
LEA RAX,[0x2d52d8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x44]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RAX + 0x8],0x3
JMP 0x00130118
LAB_00130118:
JMP 0x0013011a
LAB_0013011a:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013018f
LAB_00130124:
CALL 0x00124040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x48],EAX
CALL 0x00128a40
MOV ECX,dword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
JMP 0x0013013a
LAB_0013013a:
JMP 0x0013013c
LAB_0013013c:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x19
CMP RAX,0x0
JZ 0x00130185
MOV EDX,dword ptr [RBP + -0x2c]
AND EDX,0x0
MOV EAX,0x1
MOV ECX,0x1d
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
CALL 0x00128a40
MOV EDI,dword ptr [RBP + -0x54]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX]
MOV ESI,0x4
MOV AL,0x0
CALL 0x0012fae0
LAB_00130185:
JMP 0x00130187
LAB_00130187:
MOV qword ptr [RBP + -0x20],0x0
LAB_0013018f:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001301b3
MOV RAX,qword ptr [RBP + -0x60]
ADD RSP,0x60
POP RBP
RET
LAB_001301b3:
CALL 0x00124300
|
/* WARNING: Removing unreachable block (ram,0x0013015d) */
FILE * my_fopen(char *param_1,int4 param_2,ulong param_3)
{
int iVar1;
uint uVar2;
int8 uVar3;
int *piVar4;
int4 *puVar5;
long in_FS_OFFSET;
FILE *local_28;
char local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
make_ftype(local_1a,param_2);
local_28 = fopen64(param_1,local_1a);
if (local_28 == (FILE *)0x0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_3 & 0x19) != 0) {
puVar5 = (int4 *)_my_thread_var();
my_error(1,4,param_1,*puVar5);
}
local_28 = (FILE *)0x0;
}
else {
uVar2 = my_fileno(local_28);
if (uVar2 < my_file_limit) {
uVar3 = my_strdup(key_memory_my_file_info,param_1,param_3);
*(int8 *)(my_file_info + (long)(int)uVar2 * 0x10) = uVar3;
my_stream_opened = my_stream_opened + 1;
my_file_total_opened = my_file_total_opened + 1;
*(int4 *)(my_file_info + (long)(int)uVar2 * 0x10 + 8) = 3;
}
else {
my_stream_opened = my_stream_opened + 1;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_28;
}
| |
52,060 | array_append_string_unique | eloqsql/mysys/mf_arr_appstr.c | my_bool array_append_string_unique(const char *str,
const char **array, size_t size)
{
const char **p;
/* end points at the terminating NULL element */
const char **end= array + size - 1;
DBUG_ASSERT(*end == NULL);
for (p= array; *p; ++p)
{
if (strcmp(*p, str) == 0)
break;
}
if (p >= end)
return TRUE; /* Array is full */
DBUG_ASSERT(*p == NULL || strcmp(*p, str) == 0);
while (*(p + 1))
{
*p= *(p + 1);
++p;
}
DBUG_ASSERT(p < end);
*p= str;
return FALSE; /* Success */
} | O3 | c | array_append_string_unique:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq (%rsi,%rdx,8), %r15
addq $-0x8, %r15
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x6a702
movq %r14, %rsi
callq 0x295c0
testl %eax, %eax
je 0x6a702
movq 0x8(%rbx), %rdi
addq $0x8, %rbx
jmp 0x6a6e7
movb $0x1, %al
cmpq %r15, %rbx
jae 0x6a724
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x6a71f
movq %rax, (%rbx)
movq 0x10(%rbx), %rax
addq $0x8, %rbx
jmp 0x6a70d
movq %r14, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| array_append_string_unique:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea r15, [rsi+rdx*8]
add r15, 0FFFFFFFFFFFFFFF8h
mov rdi, [rsi]
loc_6A6E7:
test rdi, rdi
jz short loc_6A702
mov rsi, r14
call _strcmp
test eax, eax
jz short loc_6A702
mov rdi, [rbx+8]
add rbx, 8
jmp short loc_6A6E7
loc_6A702:
mov al, 1
cmp rbx, r15
jnb short loc_6A724
mov rax, [rbx+8]
loc_6A70D:
test rax, rax
jz short loc_6A71F
mov [rbx], rax
mov rax, [rbx+10h]
add rbx, 8
jmp short loc_6A70D
loc_6A71F:
mov [rbx], r14
xor eax, eax
loc_6A724:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char array_append_string_unique(long long a1, _QWORD *a2, long long a3)
{
_QWORD *v3; // rbx
unsigned long long v5; // r15
long long v6; // rdi
char result; // al
long long v8; // rax
v3 = a2;
v5 = (unsigned long long)&a2[a3 - 1];
v6 = *a2;
while ( v6 && (unsigned int)strcmp(v6, a1) )
{
v6 = v3[1];
++v3;
}
result = 1;
if ( (unsigned long long)v3 < v5 )
{
v8 = v3[1];
while ( v8 )
{
*v3 = v8;
v8 = v3[2];
++v3;
}
*v3 = a1;
return 0;
}
return result;
}
| array_append_string_unique:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RSI + RDX*0x8]
ADD R15,-0x8
MOV RDI,qword ptr [RSI]
LAB_0016a6e7:
TEST RDI,RDI
JZ 0x0016a702
MOV RSI,R14
CALL 0x001295c0
TEST EAX,EAX
JZ 0x0016a702
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x8
JMP 0x0016a6e7
LAB_0016a702:
MOV AL,0x1
CMP RBX,R15
JNC 0x0016a724
MOV RAX,qword ptr [RBX + 0x8]
LAB_0016a70d:
TEST RAX,RAX
JZ 0x0016a71f
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RBX + 0x10]
ADD RBX,0x8
JMP 0x0016a70d
LAB_0016a71f:
MOV qword ptr [RBX],R14
XOR EAX,EAX
LAB_0016a724:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 array_append_string_unique(char *param_1,long *param_2,long param_3)
{
long *plVar1;
int iVar2;
int8 uVar3;
long lVar4;
char *__s1;
long *plVar5;
plVar5 = param_2 + param_3 + -1;
__s1 = (char *)*param_2;
while (__s1 != (char *)0x0) {
iVar2 = strcmp(__s1,param_1);
if (iVar2 == 0) break;
plVar1 = param_2 + 1;
param_2 = param_2 + 1;
__s1 = (char *)*plVar1;
}
uVar3 = 1;
if (param_2 < plVar5) {
lVar4 = param_2[1];
while (lVar4 != 0) {
*param_2 = lVar4;
plVar5 = param_2 + 2;
param_2 = param_2 + 1;
lVar4 = *plVar5;
}
*param_2 = (long)param_1;
uVar3 = 0;
}
return uVar3;
}
| |
52,061 | my_uca_copy_page | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_copy_page(MY_CHARSET_LOADER *loader,
const MY_UCA_WEIGHT_LEVEL *src,
MY_UCA_WEIGHT_LEVEL *dst,
size_t page)
{
uint chc, size= 256 * dst->lengths[page] * sizeof(uint16);
if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size)))
return TRUE;
DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]);
memset(dst->weights[page], 0, size);
for (chc=0 ; chc < 256; chc++)
{
memcpy(dst->weights[page] + chc * dst->lengths[page],
src->weights[page] + chc * src->lengths[page],
src->lengths[page] * sizeof(uint16));
}
return FALSE;
} | O0 | c | my_uca_copy_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
cltq
shlq %rax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %edi
callq *%rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x28(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0xf4534
movb $0x1, -0x1(%rbp)
jmp 0xf45f0
jmp 0xf4536
jmp 0xf4538
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x30(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x27310
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp) # imm = 0x100
jae 0xf45ec
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
shlq %rdx
callq 0x270d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf455b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_uca_copy_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
shl eax, 8
cdqe
shl rax, 1
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_30]
mov edi, ecx
call rax
mov rcx, [rbp+var_20]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_28]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_F4534
mov [rbp+var_1], 1
jmp loc_F45F0
loc_F4534:
jmp short $+2
loc_F4536:
jmp short $+2
loc_F4538:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_30]
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_2C], 0
loc_F455B:
cmp [rbp+var_2C], 100h
jnb loc_F45EC
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_20]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rdi, rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rsi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rsi, rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
mov edx, eax
shl rdx, 1
call _memcpy
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_F455B
loc_F45EC:
mov [rbp+var_1], 0
loc_F45F0:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
unsigned int v6; // [rsp+0h] [rbp-30h]
unsigned int i; // [rsp+4h] [rbp-2Ch]
v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9;
v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6);
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6);
for ( i = 0; i < 0x100; ++i )
memcpy(
2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4));
return 0;
}
| my_uca_copy_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
CDQE
SHL RAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x30]
MOV EDI,ECX
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x001f4534
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001f45f0
LAB_001f4534:
JMP 0x001f4536
LAB_001f4536:
JMP 0x001f4538
LAB_001f4538:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00127310
MOV dword ptr [RBP + -0x2c],0x0
LAB_001f455b:
CMP dword ptr [RBP + -0x2c],0x100
JNC 0x001f45ec
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x001270d0
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001f455b
LAB_001f45ec:
MOV byte ptr [RBP + -0x1],0x0
LAB_001f45f0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4)
{
size_t __n;
long lVar1;
int4 local_34;
int1 local_9;
__n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1;
lVar1 = (**(code **)(param_1 + 0x80))(__n);
*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1;
if (lVar1 == 0) {
local_9 = 1;
}
else {
memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n);
for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) {
memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2),
(void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2),
(ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1);
}
local_9 = 0;
}
return local_9;
}
| |
52,062 | ma_field_extension_init_type_info | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_field_extension_init_type_info(MA_MEM_ROOT *memroot,
MA_FIELD_EXTENSION *ext,
const char *ptr, size_t length)
{
const char *end= ptr + length;
for ( ; ptr < end; )
{
uint itype= (uchar) *ptr++;
uint len= (uchar) *ptr++;
if (ptr + len > end || len > 127)
break; /*Badly encoded data*/
if (itype <= 127 && itype <= MARIADB_FIELD_ATTR_LAST)
ext->metadata[itype]= ma_const_string_copy_root(memroot, ptr, len);
ptr+= len;
}
} | O0 | c | ma_field_extension_init_type_info:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x34a67
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
ja 0x34a02
cmpl $0x7f, -0x30(%rbp)
jbe 0x34a04
jmp 0x34a67
cmpl $0x7f, -0x2c(%rbp)
ja 0x34a52
cmpl $0x1, -0x2c(%rbp)
ja 0x34a52
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x30(%rbp), %eax
movl %eax, %edx
callq 0x34490
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x349b4
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| ma_field_extension_init_type_info:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_349B4:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb loc_34A67
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_30]
add rax, rcx
cmp rax, [rbp+var_28]
ja short loc_34A02
cmp [rbp+var_30], 7Fh
jbe short loc_34A04
loc_34A02:
jmp short loc_34A67
loc_34A04:
cmp [rbp+var_2C], 7Fh
ja short loc_34A52
cmp [rbp+var_2C], 1
ja short loc_34A52
mov rax, [rbp+var_10]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_30]
mov edx, eax
call ma_const_string_copy_root
mov rcx, rax
mov rax, [rbp+var_48]
mov [rbp+var_40], rcx
mov [rbp+var_38], rdx
mov rcx, [rbp+var_40]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov [rax+8], rcx
loc_34A52:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp loc_349B4
loc_34A67:
add rsp, 50h
pop rbp
retn
| unsigned __int8 * ma_field_extension_init_type_info(long long a1, long long a2, unsigned __int8 *a3, long long a4)
{
unsigned __int8 *result; // rax
unsigned __int8 *v5; // rax
long long v6; // rdx
long long *v7; // [rsp+8h] [rbp-48h]
unsigned int v8; // [rsp+20h] [rbp-30h]
unsigned int v9; // [rsp+24h] [rbp-2Ch]
unsigned long long v10; // [rsp+28h] [rbp-28h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+38h] [rbp-18h]
v11 = a3;
v10 = (unsigned long long)&a3[a4];
while ( 1 )
{
result = v11;
if ( (unsigned long long)v11 >= v10 )
break;
v9 = *v11;
v5 = v11 + 1;
v12 = (long long)(v11 + 2);
v8 = *v5;
result = (unsigned __int8 *)(*v5 + v12);
if ( (unsigned long long)result > v10 || v8 > 0x7F )
break;
if ( v9 <= 1 )
{
v7 = (long long *)(16LL * v9 + a2);
*v7 = ma_const_string_copy_root(a1, v12, v8);
v7[1] = v6;
}
v11 = (unsigned __int8 *)(v8 + v12);
}
return result;
}
| ma_field_extension_init_type_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_001349b4:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00134a67
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x30]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JA 0x00134a02
CMP dword ptr [RBP + -0x30],0x7f
JBE 0x00134a04
LAB_00134a02:
JMP 0x00134a67
LAB_00134a04:
CMP dword ptr [RBP + -0x2c],0x7f
JA 0x00134a52
CMP dword ptr [RBP + -0x2c],0x1
JA 0x00134a52
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
CALL 0x00134490
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
LAB_00134a52:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001349b4
LAB_00134a67:
ADD RSP,0x50
POP RBP
RET
|
void ma_field_extension_init_type_info(int8 param_1,long param_2,byte *param_3,long param_4)
{
uint uVar1;
uint uVar2;
byte *pbVar3;
int1 auVar4 [16];
byte *local_20;
local_20 = param_3;
while( true ) {
if (param_3 + param_4 <= local_20) {
return;
}
uVar1 = (uint)*local_20;
pbVar3 = local_20 + 2;
uVar2 = (uint)local_20[1];
if (param_3 + param_4 < pbVar3 + uVar2) break;
if (0x7f < uVar2) {
return;
}
if ((uVar1 < 0x80) && (uVar1 < 2)) {
auVar4 = ma_const_string_copy_root(param_1,pbVar3,uVar2);
*(int1 (*) [16])(param_2 + (ulong)uVar1 * 0x10) = auVar4;
}
local_20 = pbVar3 + uVar2;
}
return;
}
| |
52,063 | google::protobuf::internal::ExtensionSet::GetRepeatedMessage(int, int) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc | const MessageLite& ExtensionSet::GetRepeatedMessage(int number,
int index) const {
const Extension* extension = FindOrNull(number);
GOOGLE_CHECK(extension != nullptr) << "Index out-of-bounds (field is empty).";
GOOGLE_DCHECK_TYPE(*extension, REPEATED_FIELD, MESSAGE);
return extension->repeated_message_value->Get(index);
} | O3 | cpp | google::protobuf::internal::ExtensionSet::GetRepeatedMessage(int, int) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebx
callq 0x93e0e
movq %rax, %r14
testq %rax, %rax
jne 0x96439
leaq 0x270ab(%rip), %rdx # 0xbd498
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x3, %esi
movl $0x312, %ecx # imm = 0x312
callq 0x169ca
leaq 0x272a2(%rip), %rsi # 0xbd6ad
movq %r15, %rdi
callq 0x164c8
leaq 0x272b8(%rip), %rsi # 0xbd6d2
movq %rax, %rdi
callq 0x164c8
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x8(%rsp), %rdi
callq 0x169e8
movq (%r14), %rax
movq 0x10(%rax), %rax
movslq %ebx, %rcx
movq 0x8(%rax,%rcx,8), %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x96454
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
nop
| _ZNK6google8protobuf8internal12ExtensionSet18GetRepeatedMessageEii:
push r15
push r14
push rbx
sub rsp, 40h
mov ebx, edx
call _ZNK6google8protobuf8internal12ExtensionSet10FindOrNullEi; google::protobuf::internal::ExtensionSet::FindOrNull(int)
mov r14, rax
test rax, rax
jnz short loc_96439
lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/aimrt_"...
lea r15, [rsp+58h+var_50]
mov rdi, r15
mov esi, 3
mov ecx, 312h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCheckFailedExt; "CHECK failed: extension != nullptr: "
mov rdi, r15
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aIndexOutOfBoun; "Index out-of-bounds (field is empty)."
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+58h+var_51]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+58h+var_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_96439:
mov rax, [r14]
mov rax, [rax+10h]
movsxd rcx, ebx
mov rax, [rax+rcx*8+8]
add rsp, 40h
pop rbx
pop r14
pop r15
retn
jmp short $+2
loc_96454:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::internal::ExtensionSet::GetRepeatedMessage(
google::protobuf::internal::ExtensionSet *this,
int a2,
int a3)
{
long long v4; // r14
long long v5; // rax
google::protobuf::internal::LogMessage *v6; // rax
char v8; // [rsp+7h] [rbp-51h] BYREF
_BYTE v9[80]; // [rsp+8h] [rbp-50h] BYREF
v4 = google::protobuf::internal::ExtensionSet::FindOrNull(this, a2);
if ( !v4 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v9,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc",
786);
v5 = google::protobuf::internal::LogMessage::operator<<(
(long long)v9,
(long long)"CHECK failed: extension != nullptr: ");
v6 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v5,
(long long)"Index out-of-bounds (field is empty).");
google::protobuf::internal::LogFinisher::operator=((long long)&v8, v6);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9);
}
return *(_QWORD *)(*(_QWORD *)(*(_QWORD *)v4 + 16LL) + 8LL * a3 + 8);
}
| GetRepeatedMessage:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV EBX,EDX
CALL 0x00193e0e
MOV R14,RAX
TEST RAX,RAX
JNZ 0x00196439
LEA RDX,[0x1bd498]
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV ESI,0x3
MOV ECX,0x312
CALL 0x001169ca
LAB_00196404:
LEA RSI,[0x1bd6ad]
MOV RDI,R15
CALL 0x001164c8
LEA RSI,[0x1bd6d2]
MOV RDI,RAX
CALL 0x001164c8
LAB_00196422:
LEA RDI,[RSP + 0x7]
MOV RSI,RAX
CALL 0x001165a2
LAB_0019642f:
LEA RDI,[RSP + 0x8]
CALL 0x001169e8
LAB_00196439:
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,EBX
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x8]
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::internal::ExtensionSet::GetRepeatedMessage(int, int) const */
int8 __thiscall
google::protobuf::internal::ExtensionSet::GetRepeatedMessage
(ExtensionSet *this,int param_1,int param_2)
{
long *plVar1;
LogMessage *pLVar2;
LogFinisher local_51;
LogMessage local_50 [56];
plVar1 = (long *)FindOrNull(this,param_1);
if (plVar1 == (long *)0x0) {
LogMessage::LogMessage
(local_50,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc"
,0x312);
/* try { // try from 00196404 to 00196421 has its CatchHandler @ 00196454 */
pLVar2 = (LogMessage *)LogMessage::operator<<(local_50,"CHECK failed: extension != nullptr: ");
pLVar2 = (LogMessage *)LogMessage::operator<<(pLVar2,"Index out-of-bounds (field is empty).");
/* try { // try from 00196422 to 0019642e has its CatchHandler @ 00196452 */
LogFinisher::operator=(&local_51,pLVar2);
LogMessage::~LogMessage(local_50);
}
return *(int8 *)(*(long *)(*plVar1 + 0x10) + 8 + (long)param_2 * 8);
}
| |
52,064 | plutovg_canvas_clip_extents | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c | void plutovg_canvas_clip_extents(const plutovg_canvas_t* canvas, plutovg_rect_t* extents)
{
if(canvas->state->clipping) {
plutovg_span_buffer_extents(&canvas->state->clip_spans, extents);
} else {
extents->x = canvas->clip_rect.x;
extents->y = canvas->clip_rect.y;
extents->w = canvas->clip_rect.w;
extents->h = canvas->clip_rect.h;
}
} | O0 | c | plutovg_canvas_clip_extents:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
testb $0x1, 0x90(%rax)
je 0x5028
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
callq 0x130e0
jmp 0x506f
movq -0x8(%rbp), %rax
movss 0x28(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, (%rax)
movq -0x8(%rbp), %rax
movss 0x2c(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movss 0x30(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movss 0x34(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| plutovg_canvas_clip_extents:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
test byte ptr [rax+90h], 1
jz short loc_5028
mov rax, [rbp+var_8]
mov rdi, [rax+18h]
add rdi, 60h ; '`'
mov rsi, [rbp+var_10]
call plutovg_span_buffer_extents
jmp short loc_506F
loc_5028:
mov rax, [rbp+var_8]
movss xmm0, dword ptr [rax+28h]
mov rax, [rbp+var_10]
movss dword ptr [rax], xmm0
mov rax, [rbp+var_8]
movss xmm0, dword ptr [rax+2Ch]
mov rax, [rbp+var_10]
movss dword ptr [rax+4], xmm0
mov rax, [rbp+var_8]
movss xmm0, dword ptr [rax+30h]
mov rax, [rbp+var_10]
movss dword ptr [rax+8], xmm0
mov rax, [rbp+var_8]
movss xmm0, dword ptr [rax+34h]
mov rax, [rbp+var_10]
movss dword ptr [rax+0Ch], xmm0
loc_506F:
add rsp, 10h
pop rbp
retn
| long long plutovg_canvas_clip_extents(long long a1, _DWORD *a2)
{
long long result; // rax
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 24) + 144LL) & 1) != 0 )
return plutovg_span_buffer_extents(*(_QWORD *)(a1 + 24) + 96LL, a2);
*a2 = *(_DWORD *)(a1 + 40);
a2[1] = *(_DWORD *)(a1 + 44);
a2[2] = *(_DWORD *)(a1 + 48);
result = (long long)a2;
a2[3] = *(_DWORD *)(a1 + 52);
return result;
}
| plutovg_canvas_clip_extents:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
TEST byte ptr [RAX + 0x90],0x1
JZ 0x00105028
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001130e0
JMP 0x0010506f
LAB_00105028:
MOV RAX,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOVSS dword ptr [RAX],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RAX + 0x2c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSS dword ptr [RAX + 0x4],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOVSS dword ptr [RAX + 0x8],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RAX + 0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSS dword ptr [RAX + 0xc],XMM0
LAB_0010506f:
ADD RSP,0x10
POP RBP
RET
|
void plutovg_canvas_clip_extents(long param_1,int4 *param_2)
{
if ((*(byte *)(*(long *)(param_1 + 0x18) + 0x90) & 1) == 0) {
*param_2 = *(int4 *)(param_1 + 0x28);
param_2[1] = *(int4 *)(param_1 + 0x2c);
param_2[2] = *(int4 *)(param_1 + 0x30);
param_2[3] = *(int4 *)(param_1 + 0x34);
}
else {
plutovg_span_buffer_extents(*(long *)(param_1 + 0x18) + 0x60,param_2);
}
return;
}
| |
52,065 | plutovg_canvas_clip_extents | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c | void plutovg_canvas_clip_extents(const plutovg_canvas_t* canvas, plutovg_rect_t* extents)
{
if(canvas->state->clipping) {
plutovg_span_buffer_extents(&canvas->state->clip_spans, extents);
} else {
extents->x = canvas->clip_rect.x;
extents->y = canvas->clip_rect.y;
extents->w = canvas->clip_rect.w;
extents->h = canvas->clip_rect.h;
}
} | O1 | c | plutovg_canvas_clip_extents:
movq 0x18(%rdi), %rax
cmpb $0x1, 0x90(%rax)
jne 0x3efa
addq $0x60, %rax
movq %rax, %rdi
jmp 0xcea2
movss 0x28(%rdi), %xmm0
movss %xmm0, (%rsi)
movss 0x2c(%rdi), %xmm0
movss %xmm0, 0x4(%rsi)
movss 0x30(%rdi), %xmm0
movss %xmm0, 0x8(%rsi)
movss 0x34(%rdi), %xmm0
movss %xmm0, 0xc(%rsi)
retq
| plutovg_canvas_clip_extents:
mov rax, [rdi+18h]
cmp byte ptr [rax+90h], 1
jnz short loc_3EFA
add rax, 60h ; '`'
mov rdi, rax
jmp plutovg_span_buffer_extents
loc_3EFA:
movss xmm0, dword ptr [rdi+28h]
movss dword ptr [rsi], xmm0
movss xmm0, dword ptr [rdi+2Ch]
movss dword ptr [rsi+4], xmm0
movss xmm0, dword ptr [rdi+30h]
movss dword ptr [rsi+8], xmm0
movss xmm0, dword ptr [rdi+34h]
movss dword ptr [rsi+0Ch], xmm0
retn
| long long plutovg_canvas_clip_extents(long long a1, _DWORD *a2)
{
long long result; // rax
result = *(_QWORD *)(a1 + 24);
if ( *(_BYTE *)(result + 144) == 1 )
return plutovg_span_buffer_extents(result + 96);
*a2 = *(_DWORD *)(a1 + 40);
a2[1] = *(_DWORD *)(a1 + 44);
a2[2] = *(_DWORD *)(a1 + 48);
a2[3] = *(_DWORD *)(a1 + 52);
return result;
}
| plutovg_canvas_clip_extents:
MOV RAX,qword ptr [RDI + 0x18]
CMP byte ptr [RAX + 0x90],0x1
JNZ 0x00103efa
ADD RAX,0x60
MOV RDI,RAX
JMP 0x0010cea2
LAB_00103efa:
MOVSS XMM0,dword ptr [RDI + 0x28]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RDI + 0x2c]
MOVSS dword ptr [RSI + 0x4],XMM0
MOVSS XMM0,dword ptr [RDI + 0x30]
MOVSS dword ptr [RSI + 0x8],XMM0
MOVSS XMM0,dword ptr [RDI + 0x34]
MOVSS dword ptr [RSI + 0xc],XMM0
RET
|
void plutovg_canvas_clip_extents(long param_1,int4 *param_2)
{
if (*(char *)(*(long *)(param_1 + 0x18) + 0x90) == '\x01') {
plutovg_span_buffer_extents(*(long *)(param_1 + 0x18) + 0x60);
return;
}
*param_2 = *(int4 *)(param_1 + 0x28);
param_2[1] = *(int4 *)(param_1 + 0x2c);
param_2[2] = *(int4 *)(param_1 + 0x30);
param_2[3] = *(int4 *)(param_1 + 0x34);
return;
}
| |
52,066 | my_strcasecmp_utf8mb3 | eloqsql/strings/ctype-utf8.c | static
int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res;
/*
Scan a multibyte character.
In the future it is worth to write a special version of my_utf8mb3_uni()
for 0-terminated strings which will not take in account length. Now
we call the regular version of my_utf8mb3_uni() with s+3 in the
last argument. s+3 is enough to scan any multibyte sequence.
Calling the regular version of my_utf8mb3_uni is safe for 0-terminated
strings: we will never lose the end of the string:
If we have 0 character in the middle of a multibyte sequence,
then my_utf8mb3_uni will always return a negative number, so the
loop with finish.
*/
res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
/* Convert Unicode code into weight according to collation */
my_tolower_utf8mb3(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3);
if (res <= 0)
return strcmp(s, t);
t+= res;
/* Convert code into weight */
my_tolower_utf8mb3(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int)(uchar)s[0]) - ((int) (uchar) t[0]);
} | O3 | c | my_strcasecmp_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movb (%rsi), %al
testb %al, %al
je 0xcce58
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x30bad3(%rip), %r12 # 0x3d8860
cmpb $0x0, (%r13)
je 0xcce53
testb %al, %al
js 0xccdb1
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %ebx
movq %rbx, -0x30(%rbp)
incq %r14
jmp 0xccdf1
leaq 0x3(%r14), %rcx
leaq -0x30(%rbp), %rsi
movq %r14, %rdx
callq 0xcb907
testl %eax, %eax
jle 0xcce76
movl %eax, %eax
addq %rax, %r14
movq 0x8(%r15), %rax
movq -0x30(%rbp), %rbx
movzbl %bh, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xccdf1
movzbl %bl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %ebx
movq %rbx, -0x30(%rbp)
movsbq (%r13), %rax
testq %rax, %rax
js 0xcce09
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %r13
jmp 0xcce41
leaq 0x3(%r13), %rcx
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0xcb907
testl %eax, %eax
jle 0xcce76
movl %eax, %eax
addq %rax, %r13
movq 0x8(%r15), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xcce41
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %rbx
jne 0xcce72
movb (%r14), %al
testb %al, %al
jne 0xccd8d
xorl %eax, %eax
movzbl %al, %ebx
jmp 0xcce5a
xorl %ebx, %ebx
movzbl (%r13), %eax
subl %eax, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %ebx
jmp 0xcce61
movq %r14, %rdi
movq %r13, %rsi
callq 0x296a0
movl %eax, %ebx
jmp 0xcce61
| my_strcasecmp_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rdx
mov al, [rsi]
test al, al
jz loc_CCE58
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_CCD8D:
cmp byte ptr [r13+0], 0
jz loc_CCE53
test al, al
js short loc_CCDB1
movzx eax, al
lea rax, [rax+rax*2]
mov ebx, [r12+rax*4+4]
mov [rbp+var_30], rbx
inc r14
jmp short loc_CCDF1
loc_CCDB1:
lea rcx, [r14+3]
lea rsi, [rbp+var_30]
mov rdx, r14
call my_utf8mb3_uni
test eax, eax
jle loc_CCE76
mov eax, eax
add r14, rax
mov rax, [r15+8]
mov rbx, [rbp+var_30]
movzx ecx, bh
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_CCDF1
movzx ecx, bl
lea rcx, [rcx+rcx*2]
mov ebx, [rax+rcx*4+4]
mov [rbp+var_30], rbx
loc_CCDF1:
movsx rax, byte ptr [r13+0]
test rax, rax
js short loc_CCE09
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc r13
jmp short loc_CCE41
loc_CCE09:
lea rcx, [r13+3]
lea rsi, [rbp+var_38]
mov rdx, r13
call my_utf8mb3_uni
test eax, eax
jle short loc_CCE76
mov eax, eax
add r13, rax
mov rcx, [r15+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_CCE41
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_CCE41:
cmp rbx, rax
jnz short loc_CCE72
mov al, [r14]
test al, al
jnz loc_CCD8D
xor eax, eax
loc_CCE53:
movzx ebx, al
jmp short loc_CCE5A
loc_CCE58:
xor ebx, ebx
loc_CCE5A:
movzx eax, byte ptr [r13+0]
sub ebx, eax
loc_CCE61:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CCE72:
sub ebx, eax
jmp short loc_CCE61
loc_CCE76:
mov rdi, r14
mov rsi, r13
call _strcmp
mov ebx, eax
jmp short loc_CCE61
| long long my_strcasecmp_utf8mb3(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
long long v6; // r15
unsigned long long v7; // rbx
int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
int v12; // eax
long long v13; // rcx
int v14; // ebx
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_17;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_utf8mb3_uni(a1, &v18, v5, (unsigned long long)(v5 + 3));
if ( v8 <= 0 )
return (unsigned int)strcmp(v5, a3);
v5 += (unsigned int)v8;
v7 = v18;
v9 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v18));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * (unsigned __int8)v18 + 4);
v18 = v7;
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18 = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_utf8mb3_uni(a1, &v17, a3, (unsigned long long)(a3 + 3));
if ( v12 <= 0 )
return (unsigned int)strcmp(v5, a3);
a3 += (unsigned int)v12;
v11 = v17;
v13 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v17));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_17:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
| my_strcasecmp_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x001cce58
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x4d8860]
LAB_001ccd8d:
CMP byte ptr [R13],0x0
JZ 0x001cce53
TEST AL,AL
JS 0x001ccdb1
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EBX,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
INC R14
JMP 0x001ccdf1
LAB_001ccdb1:
LEA RCX,[R14 + 0x3]
LEA RSI,[RBP + -0x30]
MOV RDX,R14
CALL 0x001cb907
TEST EAX,EAX
JLE 0x001cce76
MOV EAX,EAX
ADD R14,RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV RBX,qword ptr [RBP + -0x30]
MOVZX ECX,BH
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001ccdf1
MOVZX ECX,BL
LEA RCX,[RCX + RCX*0x2]
MOV EBX,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
LAB_001ccdf1:
MOVSX RAX,byte ptr [R13]
TEST RAX,RAX
JS 0x001cce09
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC R13
JMP 0x001cce41
LAB_001cce09:
LEA RCX,[R13 + 0x3]
LEA RSI,[RBP + -0x38]
MOV RDX,R13
CALL 0x001cb907
TEST EAX,EAX
JLE 0x001cce76
MOV EAX,EAX
ADD R13,RAX
MOV RCX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001cce41
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_001cce41:
CMP RBX,RAX
JNZ 0x001cce72
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x001ccd8d
XOR EAX,EAX
LAB_001cce53:
MOVZX EBX,AL
JMP 0x001cce5a
LAB_001cce58:
XOR EBX,EBX
LAB_001cce5a:
MOVZX EAX,byte ptr [R13]
SUB EBX,EAX
LAB_001cce61:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cce72:
SUB EBX,EAX
JMP 0x001cce61
LAB_001cce76:
MOV RDI,R14
MOV RSI,R13
CALL 0x001296a0
MOV EBX,EAX
JMP 0x001cce61
|
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
byte bVar3;
uint uVar4;
int iVar5;
ulong uVar6;
ulong local_40;
ulong local_38;
bVar3 = *param_2;
if (bVar3 == 0) {
uVar4 = 0;
}
else {
lVar1 = *(long *)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_001cce53;
if ((char)bVar3 < '\0') {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) goto LAB_001cce76;
param_2 = param_2 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar3 * 0xc + 4);
param_2 = param_2 + 1;
}
bVar3 = *param_3;
if ((long)(char)bVar3 < 0) {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) {
LAB_001cce76:
iVar5 = strcmp((char *)param_2,(char *)param_3);
return iVar5;
}
param_3 = param_3 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
uVar6 = local_40;
if (lVar2 != 0) {
uVar6 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar6 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar3 * 0xc + 4);
}
if (local_38 != uVar6) {
return (int)local_38 - (int)uVar6;
}
bVar3 = *param_2;
} while (bVar3 != 0);
bVar3 = 0;
LAB_001cce53:
uVar4 = (uint)bVar3;
}
return uVar4 - *param_3;
}
| |
52,067 | malloc | seiftnesse[P]memoryallocator/src/custom_alloc_core.c | void *_malloc(size_t size) {
HEAP_LOG("Memory allocation request: %zu bytes\n", size);
if (size == 0) {
HEAP_LOG("Zero-size allocation requested, returning NULL\n");
return NULL;
}
// Try small allocation first for small sizes
if (size <= SMALL_ALLOCATION_THRESHOLD) {
void *ptr = allocate_small(size);
if (ptr) {
return ptr;
}
HEAP_LOG("Small allocation failed, falling back to regular allocation\n");
// If small allocation failed, fall back to regular allocation
}
EnsureHeapInitialized();
// Calculate required blocks including segment header and alignment
int required_blocks = GetNumBlock(size + sizeof(segment_t) + ALIGNMENT);
HEAP_LOG("Required blocks for allocation: %d (incl. overhead)\n", required_blocks);
// Try last free segment first, then full search
segment_t *it = last_free_segment ? SearchFree(last_free_segment, required_blocks) : NULL;
if (!it) {
HEAP_LOG("Last free segment not suitable, performing full search\n");
it = SearchFree(segments, required_blocks);
}
if (!it) {
HEAP_LOG("Memory allocation failed: no suitable segment found for %zu bytes\n", size);
return NULL; // No suitable memory found
}
// Mark segment as used
it->is_free = 0;
// Set debug tracking info
it->allocation_id = next_allocation_id++;
HEAP_LOG("Assigned allocation ID: %u to segment %p\n", it->allocation_id, it);
// Split if we have enough extra space
if (it->size > required_blocks + 1) {
HEAP_LOG("Splitting segment: original size=%d, required=%d\n", it->size, required_blocks);
segment_t *remaining = CutSegment(it, it->size - required_blocks);
remaining->is_free = 1;
last_free_segment = remaining;
} else {
// We're using the whole segment
if (last_free_segment == it) {
HEAP_LOG("Using entire last free segment, resetting last_free_segment\n");
last_free_segment = NULL;
}
}
// Update allocation statistics
update_stats_allocate(it->size * BLOCK_SIZE);
// Update integrity metadata after allocation
initialize_segment_integrity(it);
// Return aligned user pointer
void *result = SegmentToPtr(it);
HEAP_LOG("Memory allocated: %p, size=%zu bytes, segment=%p\n", result, size, it);
return result;
} | O0 | c | malloc:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x15a0
movq $0x0, -0x8(%rbp)
jmp 0x16ee
cmpq $0x100, -0x10(%rbp) # imm = 0x100
ja 0x15cd
movq -0x10(%rbp), %rdi
callq 0x1db0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x15cb
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x16ee
jmp 0x15cd
callq 0x1d80
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
addq $0x10, %rdi
callq 0x22c0
movl %eax, -0x1c(%rbp)
cmpq $0x0, 0x4a8a(%rip) # 0x6078
je 0x1605
movq 0x4a81(%rip), %rdi # 0x6078
movl -0x1c(%rbp), %esi
callq 0x2210
movq %rax, -0x40(%rbp)
jmp 0x160d
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x160d
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x162f
movq 0x4a4d(%rip), %rdi # 0x6070
movl -0x1c(%rbp), %esi
callq 0x2210
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1643
movq $0x0, -0x8(%rbp)
jmp 0x16ee
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movl 0x49fd(%rip), %ecx # 0x6050
movl %ecx, %eax
addl $0x1, %eax
movl %eax, 0x49f2(%rip) # 0x6050
movq -0x28(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x16a4
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %esi
subl -0x1c(%rbp), %esi
callq 0x2300
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
movq %rax, 0x49d6(%rip) # 0x6078
jmp 0x16be
movq 0x49cd(%rip), %rax # 0x6078
cmpq -0x28(%rbp), %rax
jne 0x16bc
movq $0x0, 0x49bc(%rip) # 0x6078
jmp 0x16be
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
shll $0xc, %eax
movslq %eax, %rdi
callq 0x3060
movq -0x28(%rbp), %rdi
callq 0x2440
movq -0x28(%rbp), %rdi
callq 0x25b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _malloc:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_15A0
mov [rbp+var_8], 0
jmp loc_16EE
loc_15A0:
cmp [rbp+var_10], 100h
ja short loc_15CD
mov rdi, [rbp+var_10]
call allocate_small
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_15CB
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp loc_16EE
loc_15CB:
jmp short $+2
loc_15CD:
call EnsureHeapInitialized
mov rdi, [rbp+var_10]
add rdi, 30h ; '0'
add rdi, 10h
call GetNumBlock
mov [rbp+var_1C], eax
cmp cs:last_free_segment, 0
jz short loc_1605
mov rdi, cs:last_free_segment
mov esi, [rbp+var_1C]
call SearchFree
mov [rbp+var_40], rax
jmp short loc_160D
loc_1605:
xor eax, eax
mov [rbp+var_40], rax
jmp short $+2
loc_160D:
mov rax, [rbp+var_40]
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_162F
mov rdi, cs:segments
mov esi, [rbp+var_1C]
call SearchFree
mov [rbp+var_28], rax
loc_162F:
cmp [rbp+var_28], 0
jnz short loc_1643
mov [rbp+var_8], 0
jmp loc_16EE
loc_1643:
mov rax, [rbp+var_28]
mov dword ptr [rax], 0
mov ecx, cs:next_allocation_id
mov eax, ecx
add eax, 1
mov cs:next_allocation_id, eax
mov rax, [rbp+var_28]
mov [rax+24h], ecx
mov rax, [rbp+var_28]
mov eax, [rax+4]
mov ecx, [rbp+var_1C]
add ecx, 1
cmp eax, ecx
jle short loc_16A4
mov rdi, [rbp+var_28]
mov rax, [rbp+var_28]
mov esi, [rax+4]
sub esi, [rbp+var_1C]
call CutSegment
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov dword ptr [rax], 1
mov rax, [rbp+var_30]
mov cs:last_free_segment, rax
jmp short loc_16BE
loc_16A4:
mov rax, cs:last_free_segment
cmp rax, [rbp+var_28]
jnz short loc_16BC
mov cs:last_free_segment, 0
loc_16BC:
jmp short $+2
loc_16BE:
mov rax, [rbp+var_28]
mov eax, [rax+4]
shl eax, 0Ch
movsxd rdi, eax
call update_stats_allocate
mov rdi, [rbp+var_28]
call initialize_segment_integrity
mov rdi, [rbp+var_28]
call SegmentToPtr
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_16EE:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long malloc(unsigned long long a1)
{
int v1; // ecx
long long v3; // [rsp+0h] [rbp-40h]
_DWORD *v4; // [rsp+10h] [rbp-30h]
_DWORD *v5; // [rsp+18h] [rbp-28h]
unsigned int NumBlock; // [rsp+24h] [rbp-1Ch]
long long small; // [rsp+28h] [rbp-18h]
if ( !a1 )
return 0LL;
if ( a1 <= 0x100 )
{
small = allocate_small(a1);
if ( small )
return small;
}
EnsureHeapInitialized();
NumBlock = GetNumBlock(a1 + 64);
if ( last_free_segment )
v3 = SearchFree(last_free_segment, NumBlock);
else
v3 = 0LL;
v5 = (_DWORD *)v3;
if ( !v3 )
v5 = (_DWORD *)SearchFree(segments, NumBlock);
if ( !v5 )
return 0LL;
*v5 = 0;
v1 = next_allocation_id++;
v5[9] = v1;
if ( v5[1] <= (signed int)(NumBlock + 1) )
{
if ( (_DWORD *)last_free_segment == v5 )
last_free_segment = 0LL;
}
else
{
v4 = (_DWORD *)CutSegment(v5, v5[1] - NumBlock);
*v4 = 1;
last_free_segment = (long long)v4;
}
update_stats_allocate((int)(v5[1] << 12));
initialize_segment_integrity(v5);
return SegmentToPtr(v5);
}
| _malloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001015a0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001016ee
LAB_001015a0:
CMP qword ptr [RBP + -0x10],0x100
JA 0x001015cd
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00101db0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001015cb
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001016ee
LAB_001015cb:
JMP 0x001015cd
LAB_001015cd:
CALL 0x00101d80
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30
ADD RDI,0x10
CALL 0x001022c0
MOV dword ptr [RBP + -0x1c],EAX
CMP qword ptr [0x00106078],0x0
JZ 0x00101605
MOV RDI,qword ptr [0x00106078]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00102210
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0010160d
LAB_00101605:
XOR EAX,EAX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0010160d
LAB_0010160d:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0010162f
MOV RDI,qword ptr [0x00106070]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00102210
MOV qword ptr [RBP + -0x28],RAX
LAB_0010162f:
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00101643
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001016ee
LAB_00101643:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x0
MOV ECX,dword ptr [0x00106050]
MOV EAX,ECX
ADD EAX,0x1
MOV dword ptr [0x00106050],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
CMP EAX,ECX
JLE 0x001016a4
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RAX + 0x4]
SUB ESI,dword ptr [RBP + -0x1c]
CALL 0x00102300
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [0x00106078],RAX
JMP 0x001016be
LAB_001016a4:
MOV RAX,qword ptr [0x00106078]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x001016bc
MOV qword ptr [0x00106078],0x0
LAB_001016bc:
JMP 0x001016be
LAB_001016be:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SHL EAX,0xc
MOVSXD RDI,EAX
CALL 0x00103060
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00102440
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001025b0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001016ee:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
void * _malloc(size_t __size)
{
int iVar1;
int iVar2;
int4 *local_48;
int4 *local_30;
void *local_10;
if (__size == 0) {
local_10 = (void *)0x0;
}
else if ((0x100 < __size) || (local_10 = (void *)allocate_small(__size), local_10 == (void *)0x0))
{
EnsureHeapInitialized();
iVar2 = GetNumBlock(__size + 0x40);
if (last_free_segment == (int4 *)0x0) {
local_48 = (int4 *)0x0;
}
else {
local_48 = (int4 *)SearchFree(last_free_segment,iVar2);
}
local_30 = local_48;
if (local_48 == (int4 *)0x0) {
local_30 = (int4 *)SearchFree(segments,iVar2);
}
if (local_30 == (int4 *)0x0) {
local_10 = (void *)0x0;
}
else {
*local_30 = 0;
iVar1 = next_allocation_id + 1;
local_30[9] = next_allocation_id;
next_allocation_id = iVar1;
if (iVar2 + 1 < (int)local_30[1]) {
last_free_segment = (int4 *)CutSegment(local_30,local_30[1] - iVar2);
*last_free_segment = 1;
}
else if (last_free_segment == local_30) {
last_free_segment = (int4 *)0x0;
}
update_stats_allocate((long)(int)(local_30[1] << 0xc));
initialize_segment_integrity(local_30);
local_10 = (void *)SegmentToPtr(local_30);
}
}
return local_10;
}
| |
52,068 | Rotary::paint(juce::Graphics&) | ripplerx/src/ui/Rotary.cpp | void Rotary::paint(juce::Graphics& g) {
g.fillAll(Colour(globals::COLOR_BACKGROUND));
auto param = audioProcessor.params.getParameter(paramId);
auto normValue = param->getValue();
auto value = param->convertFrom0to1(normValue);
draw_rotary_slider(g, normValue);
auto velNorm = -1.0f;
if (!velId.isEmpty()) {
auto velParam = audioProcessor.params.getParameter(velId);
velNorm = velParam->getValue();
draw_vel_arc(g, normValue, velNorm);
}
draw_label(g, value, velNorm);
} | O0 | cpp | Rotary::paint(juce::Graphics&):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movl 0x6ebdae(%rip), %esi # 0x109ea14
leaq -0x14(%rbp), %rdi
callq 0x521ef0
movq -0x60(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x533690
movq -0x50(%rbp), %rsi
movq 0x128(%rsi), %rax
addq $0x2d8, %rax # imm = 0x2D8
movq %rax, -0x58(%rbp)
addq $0x108, %rsi # imm = 0x108
leaq -0x28(%rbp), %rdi
callq 0x88f860
movq -0x58(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1cea40
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movss %xmm0, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movss -0x2c(%rbp), %xmm0
callq 0x1caa20
movq -0x50(%rbp), %rdi
movss %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movss -0x2c(%rbp), %xmm0
callq 0x9b2d80
movq -0x50(%rbp), %rdi
movss 0x12c8a7(%rip), %xmm0 # 0xadf598
movss %xmm0, -0x34(%rbp)
addq $0x110, %rdi # imm = 0x110
callq 0x1de690
testb $0x1, %al
jne 0x9b2d62
movq -0x50(%rbp), %rsi
movq 0x128(%rsi), %rax
addq $0x2d8, %rax # imm = 0x2D8
movq %rax, -0x68(%rbp)
addq $0x110, %rsi # imm = 0x110
leaq -0x48(%rbp), %rdi
callq 0x88f860
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x1cea40
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x50(%rbp), %rdi
movss %xmm0, -0x34(%rbp)
movq -0x10(%rbp), %rsi
movss -0x2c(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
callq 0x9b34b0
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movss -0x30(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
callq 0x9b37a0
addq $0x70, %rsp
popq %rbp
retq
nop
| _ZN6Rotary5paintERN4juce8GraphicsE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov [rbp+var_60], rax
mov esi, cs:_ZN7globals16COLOR_BACKGROUNDE; unsigned int
lea rdi, [rbp+var_14]; this
call _ZN4juce6ColourC2Ej; juce::Colour::Colour(uint)
mov rdi, [rbp+var_60]
mov esi, [rbp+var_14]
call _ZNK4juce8Graphics7fillAllENS_6ColourE; juce::Graphics::fillAll(juce::Colour)
mov rsi, [rbp+var_50]
mov rax, [rsi+128h]
add rax, 2D8h
mov [rbp+var_58], rax
add rsi, 108h; juce::String *
lea rdi, [rbp+var_28]; this
call _ZN4juce9StringRefC2ERKNS_6StringE; juce::StringRef::StringRef(juce::String const&)
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_28]
call _ZNK4juce28AudioProcessorValueTreeState12getParameterENS_9StringRefE; juce::AudioProcessorValueTreeState::getParameter(juce::StringRef)
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
mov rax, [rdi]
call qword ptr [rax+10h]
movss [rbp+var_2C], xmm0
mov rdi, [rbp+var_20]; this
movss xmm0, [rbp+var_2C]; float
call _ZNK4juce20RangedAudioParameter15convertFrom0to1Ef; juce::RangedAudioParameter::convertFrom0to1(float)
mov rdi, [rbp+var_50]; this
movss [rbp+var_30], xmm0
mov rsi, [rbp+var_10]; juce::Graphics *
movss xmm0, [rbp+var_2C]; float
call _ZN6Rotary18draw_rotary_sliderERN4juce8GraphicsEf; Rotary::draw_rotary_slider(juce::Graphics &,float)
mov rdi, [rbp+var_50]
movss xmm0, cs:flt_ADF598
movss [rbp+var_34], xmm0
add rdi, 110h; this
call _ZNK4juce6String7isEmptyEv; juce::String::isEmpty(void)
test al, 1
jnz short loc_9B2D62
mov rsi, [rbp+var_50]
mov rax, [rsi+128h]
add rax, 2D8h
mov [rbp+var_68], rax
add rsi, 110h; juce::String *
lea rdi, [rbp+var_48]; this
call _ZN4juce9StringRefC2ERKNS_6StringE; juce::StringRef::StringRef(juce::String const&)
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_48]
call _ZNK4juce28AudioProcessorValueTreeState12getParameterENS_9StringRefE; juce::AudioProcessorValueTreeState::getParameter(juce::StringRef)
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
mov rax, [rdi]
call qword ptr [rax+10h]
mov rdi, [rbp+var_50]; this
movss [rbp+var_34], xmm0
mov rsi, [rbp+var_10]; juce::Graphics *
movss xmm0, [rbp+var_2C]; float
movss xmm1, [rbp+var_34]; float
call _ZNK6Rotary12draw_vel_arcERN4juce8GraphicsEff; Rotary::draw_vel_arc(juce::Graphics &,float,float)
loc_9B2D62:
mov rdi, [rbp+var_50]; this
mov rsi, [rbp+var_10]; juce::Graphics *
movss xmm0, [rbp+var_30]; float
movss xmm1, [rbp+var_34]; float
call _ZN6Rotary10draw_labelERN4juce8GraphicsEff; Rotary::draw_label(juce::Graphics &,float,float)
add rsp, 70h
pop rbp
retn
| long long Rotary::paint(Rotary *this, juce::Graphics *a2)
{
long long v2; // rsi
long long v3; // rsi
long long v5; // [rsp+28h] [rbp-48h] BYREF
long long v6; // [rsp+30h] [rbp-40h]
float v7; // [rsp+3Ch] [rbp-34h]
float v8; // [rsp+40h] [rbp-30h]
float v9; // [rsp+44h] [rbp-2Ch]
long long v10; // [rsp+48h] [rbp-28h] BYREF
juce::RangedAudioParameter *Parameter; // [rsp+50h] [rbp-20h]
int v12; // [rsp+5Ch] [rbp-14h] BYREF
juce::Graphics *v13; // [rsp+60h] [rbp-10h]
Rotary *v14; // [rsp+68h] [rbp-8h]
v14 = this;
v13 = a2;
juce::Colour::Colour((juce::Colour *)&v12, globals::COLOR_BACKGROUND);
juce::Graphics::fillAll((long long)a2, v12);
juce::StringRef::StringRef((juce::StringRef *)&v10, (Rotary *)((char *)this + 264));
v2 = v10;
Parameter = (juce::RangedAudioParameter *)juce::AudioProcessorValueTreeState::getParameter();
v9 = (*(float ( **)(juce::RangedAudioParameter *, long long))(*(_QWORD *)Parameter + 16LL))(Parameter, v2);
v8 = juce::RangedAudioParameter::convertFrom0to1(Parameter, v9);
Rotary::draw_rotary_slider(this, v13, v9);
v7 = -1.0;
if ( (juce::String::isEmpty((Rotary *)((char *)this + 272)) & 1) == 0 )
{
juce::StringRef::StringRef((juce::StringRef *)&v5, (Rotary *)((char *)this + 272));
v3 = v5;
v6 = juce::AudioProcessorValueTreeState::getParameter();
v7 = (*(float ( **)(long long, long long))(*(_QWORD *)v6 + 16LL))(v6, v3);
Rotary::draw_vel_arc(this, v13, v9, v7);
}
return Rotary::draw_label(this, v13, v8, v7);
}
| releasePersistentReadWriteAccess:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
POP RBP
RET
|
/* juce::AndroidDocumentPermission::releasePersistentReadWriteAccess(juce::URL const&) */
void juce::AndroidDocumentPermission::releasePersistentReadWriteAccess(URL *param_1)
{
return;
}
| |
52,069 | JS_GetGlobalVar | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_GetGlobalVar(JSContext *ctx, JSAtom prop,
BOOL throw_ref_error)
{
JSObject *p;
JSShapeProperty *prs;
JSProperty *pr;
/* no exotic behavior is possible in global_var_obj */
p = JS_VALUE_GET_OBJ(ctx->global_var_obj);
prs = find_own_property(&pr, p, prop);
if (prs) {
/* XXX: should handle JS_PROP_TMASK properties */
if (unlikely(JS_IsUninitialized(pr->u.value)))
return JS_ThrowReferenceErrorUninitialized(ctx, prs->atom);
return js_dup(pr->u.value);
}
return JS_GetPropertyInternal(ctx, ctx->global_obj, prop,
ctx->global_obj, throw_ref_error);
} | O0 | c | JS_GetGlobalVar:
subq $0x88, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x1b0(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rcx
movl 0x2c(%rsp), %eax
leaq 0x10(%rsp), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x60(%rsp)
movl 0x6c(%rsp), %eax
movq 0x60(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
callq 0x63ba0
xorl %ecx, %ecx
subq 0x48(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
callq 0x32570
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x6c80b
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x6c(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x6c7c6
jmp 0x6c7f6
movq 0x70(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x48(%rsp), %rax
subq $0x1, %rax
shlq $0x4, %rax
addq %rax, %rcx
movq 0x78(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x6c823
movq 0x58(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x48(%rsp)
jmp 0x6c78f
movq 0x78(%rsp), %rax
movq $0x0, (%rax)
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x6c89b
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x332f0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6c87e
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x667c0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0x6c8e0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x279c0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0x6c8e0
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl 0x2c(%rsp), %ecx
movq 0x30(%rsp), %r9
movl 0x28(%rsp), %eax
movq 0x1a0(%rdx), %rsi
movq 0x1a8(%rdx), %rdx
movq 0x1a0(%r9), %r8
movq 0x1a8(%r9), %r9
movl %eax, (%rsp)
callq 0x741b0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_GetGlobalVar:
sub rsp, 88h
mov [rsp+88h+var_58], rdi
mov [rsp+88h+var_5C], esi
mov [rsp+88h+var_60], edx
mov rax, [rsp+88h+var_58]
mov rax, [rax+1B0h]
mov [rsp+88h+var_68], rax
mov rcx, [rsp+88h+var_68]
mov eax, [rsp+88h+var_5C]
lea rdx, [rsp+88h+var_78]
mov [rsp+88h+var_10], rdx
mov [rsp+88h+var_18], rcx
mov [rsp+88h+var_1C], eax
mov rax, [rsp+88h+var_18]
mov rax, [rax+18h]
mov [rsp+88h+var_28], rax
mov eax, [rsp+88h+var_1C]
mov rcx, [rsp+88h+var_28]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+88h+var_40], rax
mov rdi, [rsp+88h+var_28]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+88h+var_40]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+88h+var_40], rax
mov rdi, [rsp+88h+var_28]
call get_shape_prop
mov [rsp+88h+var_38], rax
loc_6C78F:
cmp [rsp+88h+var_40], 0
jz short loc_6C80B
mov rax, [rsp+88h+var_38]
mov rcx, [rsp+88h+var_40]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+88h+var_30], rax
mov rax, [rsp+88h+var_30]
mov eax, [rax+4]
cmp eax, [rsp+88h+var_1C]
setz al
test al, 1
jnz short loc_6C7C6
jmp short loc_6C7F6
loc_6C7C6:
mov rax, [rsp+88h+var_18]
mov rcx, [rax+20h]
mov rax, [rsp+88h+var_40]
sub rax, 1
shl rax, 4
add rcx, rax
mov rax, [rsp+88h+var_10]
mov [rax], rcx
mov rax, [rsp+88h+var_30]
mov [rsp+88h+var_8], rax
jmp short loc_6C823
loc_6C7F6:
mov rax, [rsp+88h+var_30]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+88h+var_40], rax
jmp short loc_6C78F
loc_6C80B:
mov rax, [rsp+88h+var_10]
mov qword ptr [rax], 0
mov [rsp+88h+var_8], 0
loc_6C823:
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_70], rax
cmp [rsp+88h+var_70], 0
jz short loc_6C89B
mov rax, [rsp+88h+var_78]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsUninitialized
cmp eax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_6C87E
mov rdi, [rsp+88h+var_58]
mov rax, [rsp+88h+var_70]
mov esi, [rax+4]
call JS_ThrowReferenceErrorUninitialized
mov [rsp+88h+var_50], rax
mov [rsp+88h+var_48], rdx
jmp short loc_6C8E0
loc_6C87E:
mov rax, [rsp+88h+var_78]
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov [rsp+88h+var_50], rax
mov [rsp+88h+var_48], rdx
jmp short loc_6C8E0
loc_6C89B:
mov rdi, [rsp+88h+var_58]
mov rdx, [rsp+88h+var_58]
mov ecx, [rsp+88h+var_5C]
mov r9, [rsp+88h+var_58]
mov eax, [rsp+88h+var_60]
mov rsi, [rdx+1A0h]
mov rdx, [rdx+1A8h]
mov r8, [r9+1A0h]
mov r9, [r9+1A8h]
mov [rsp+88h+var_88], eax
call JS_GetPropertyInternal
mov [rsp+88h+var_50], rax
mov [rsp+88h+var_48], rdx
loc_6C8E0:
mov rax, [rsp+88h+var_50]
mov rdx, [rsp+88h+var_48]
add rsp, 88h
retn
| long long JS_GetGlobalVar(
long long a1,
unsigned int a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v11; // rax
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
long long v18; // rdx
long long v19; // rdx
long long *v21; // [rsp+10h] [rbp-78h] BYREF
_DWORD *v22; // [rsp+18h] [rbp-70h]
long long v23; // [rsp+20h] [rbp-68h]
int v24; // [rsp+28h] [rbp-60h]
unsigned int v25; // [rsp+2Ch] [rbp-5Ch]
long long v26; // [rsp+30h] [rbp-58h]
long long PropertyInternal; // [rsp+38h] [rbp-50h]
long long v28; // [rsp+40h] [rbp-48h]
long long v29; // [rsp+48h] [rbp-40h]
long long shape_prop; // [rsp+50h] [rbp-38h]
_DWORD *v31; // [rsp+58h] [rbp-30h]
long long v32; // [rsp+60h] [rbp-28h]
unsigned int v33; // [rsp+6Ch] [rbp-1Ch]
long long v34; // [rsp+70h] [rbp-18h]
long long **v35; // [rsp+78h] [rbp-10h]
_DWORD *v36; // [rsp+80h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = *(_QWORD *)(a1 + 432);
v35 = &v21;
v34 = v23;
v33 = a2;
v32 = *(_QWORD *)(v23 + 24);
v29 = *(_DWORD *)(v32 + 32) & a2;
v11 = prop_hash_end(v32);
v29 = *(unsigned int *)(v11 + 4 * (-v29 - 1));
shape_prop = get_shape_prop(v32);
while ( v29 )
{
v31 = (_DWORD *)(8 * (v29 - 1) + shape_prop);
if ( v31[1] == v33 )
{
*v35 = (long long *)(16 * (v29 - 1) + *(_QWORD *)(v34 + 32));
v36 = v31;
goto LABEL_7;
}
v29 = *v31 & 0x3FFFFFF;
}
*v35 = 0LL;
v36 = 0LL;
LABEL_7:
v22 = v36;
if ( v36 )
{
if ( JS_IsUninitialized(*v21, v21[1]) )
PropertyInternal = JS_ThrowReferenceErrorUninitialized(
v26,
v22[1],
a4,
a5,
a6,
a7,
v16,
v17,
a10,
a11,
v12,
v13,
v14,
v15);
else
PropertyInternal = (long long)js_dup((_DWORD *)*v21, v21[1]);
v28 = v18;
}
else
{
PropertyInternal = JS_GetPropertyInternal(
v26,
*(_QWORD *)(v26 + 416),
*(_QWORD *)(v26 + 424),
v25,
*(_QWORD *)(v26 + 416),
*(_QWORD *)(v26 + 424),
v24);
v28 = v19;
}
return PropertyInternal;
}
| JS_GetGlobalVar:
SUB RSP,0x88
MOV qword ptr [RSP + 0x30],RDI
MOV dword ptr [RSP + 0x2c],ESI
MOV dword ptr [RSP + 0x28],EDX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV qword ptr [RSP + 0x20],RAX
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x2c]
LEA RDX,[RSP + 0x10]
MOV qword ptr [RSP + 0x78],RDX
MOV qword ptr [RSP + 0x70],RCX
MOV dword ptr [RSP + 0x6c],EAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV RCX,qword ptr [RSP + 0x60]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00163ba0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x48]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00132570
MOV qword ptr [RSP + 0x50],RAX
LAB_0016c78f:
CMP qword ptr [RSP + 0x48],0x0
JZ 0x0016c80b
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x48]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0x6c]
SETZ AL
TEST AL,0x1
JNZ 0x0016c7c6
JMP 0x0016c7f6
LAB_0016c7c6:
MOV RAX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x48]
SUB RAX,0x1
SHL RAX,0x4
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x0016c823
LAB_0016c7f6:
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x48],RAX
JMP 0x0016c78f
LAB_0016c80b:
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RAX],0x0
MOV qword ptr [RSP + 0x80],0x0
LAB_0016c823:
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JZ 0x0016c89b
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001332f0
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0016c87e
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x001667c0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x0016c8e0
LAB_0016c87e:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001279c0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x0016c8e0
LAB_0016c89b:
MOV RDI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x2c]
MOV R9,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0x28]
MOV RSI,qword ptr [RDX + 0x1a0]
MOV RDX,qword ptr [RDX + 0x1a8]
MOV R8,qword ptr [R9 + 0x1a0]
MOV R9,qword ptr [R9 + 0x1a8]
MOV dword ptr [RSP],EAX
CALL 0x001741b0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_0016c8e0:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x88
RET
|
int1 [16] JS_GetGlobalVar(long param_1,uint param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 auVar3 [16];
int8 *local_78;
uint *local_70;
long local_68;
int4 local_60;
uint local_5c;
long local_58;
ulong local_40;
long local_38;
uint *local_30;
long local_28;
uint local_1c;
long local_18;
int8 **local_10;
uint *local_8;
local_68 = *(long *)(param_1 + 0x1b0);
local_10 = &local_78;
local_28 = *(long *)(local_68 + 0x18);
local_40 = (ulong)(param_2 & *(uint *)(local_28 + 0x20));
local_60 = param_3;
local_5c = param_2;
local_58 = param_1;
local_1c = param_2;
local_18 = local_68;
lVar2 = prop_hash_end(local_28);
local_40 = (ulong)*(uint *)(lVar2 + (-1 - local_40) * 4);
local_38 = get_shape_prop(local_28);
do {
if (local_40 == 0) {
*local_10 = (int8 *)0x0;
local_8 = (uint *)0x0;
LAB_0016c823:
local_70 = local_8;
if (local_8 == (uint *)0x0) {
auVar3 = JS_GetPropertyInternal
(local_58,*(int8 *)(local_58 + 0x1a0),
*(int8 *)(local_58 + 0x1a8),local_5c,
*(int8 *)(local_58 + 0x1a0),*(int8 *)(local_58 + 0x1a8),
local_60);
}
else {
iVar1 = JS_IsUninitialized(*local_78,local_78[1]);
if (iVar1 == 0) {
auVar3 = js_dup(*local_78,local_78[1]);
}
else {
auVar3 = JS_ThrowReferenceErrorUninitialized(local_58,local_70[1]);
}
}
return auVar3;
}
local_30 = (uint *)(local_38 + (local_40 - 1) * 8);
if (local_30[1] == local_1c) {
*local_10 = (int8 *)(*(long *)(local_18 + 0x20) + (local_40 - 1) * 0x10);
local_8 = local_30;
goto LAB_0016c823;
}
local_40 = (ulong)(*local_30 & 0x3ffffff);
} while( true );
}
| |
52,070 | 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 0x61be7
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x61bcf
jmp 0x61bd9
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0x61bb9
popq %rbp
retq
nopl (%rax)
| mark_all_entries:
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_61BB9:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_61BE7
mov rax, [rbp+var_18]
cmp dword ptr [rax+8], 0
jz short loc_61BCF
jmp short loc_61BD9
loc_61BCF:
mov ecx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax+8], ecx
loc_61BD9:
mov rax, [rbp+var_18]
add rax, 20h ; ' '
mov [rbp+var_18], rax
jmp short loc_61BB9
loc_61BE7:
pop rbp
retn
| unsigned long long mark_all_entries(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_00161bb9:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00161be7
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00161bcf
JMP 0x00161bd9
LAB_00161bcf:
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x8],ECX
LAB_00161bd9:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x20
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00161bb9
LAB_00161be7:
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;
}
| |
52,071 | aimrt::runtime::core::executor::SimpleThreadExecutor::~SimpleThreadExecutor() | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/executor/simple_thread_executor.h | ~SimpleThreadExecutor() override = default; | O3 | c | aimrt::runtime::core::executor::SimpleThreadExecutor::~SimpleThreadExecutor():
pushq %rbx
movq %rdi, %rbx
leaq 0x1e54cd(%rip), %rax # 0x297650
movq %rax, (%rdi)
movq 0x140(%rdi), %rdi
testq %rdi, %rdi
je 0xb21a6
cmpq $0x0, (%rdi)
jne 0xb221f
movl $0x8, %esi
callq 0x82190
movq $0x0, 0x140(%rbx)
leaq 0xf0(%rbx), %rdi
callq 0xb251e
leaq 0xc0(%rbx), %rdi
callq 0x83cc0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0xb21d7
callq 0x81a00
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0xb21ec
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x82190
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0xb2204
movq (%rax), %rsi
incq %rsi
callq 0x82190
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0xb221d
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x82190
popq %rbx
retq
callq 0x807b0
| _ZN5aimrt7runtime4core8executor20SimpleThreadExecutorD2Ev:
push rbx
mov rbx, rdi
lea rax, off_297650
mov [rdi], rax
mov rdi, [rdi+140h]; void *
test rdi, rdi
jz short loc_B21A6
cmp qword ptr [rdi], 0
jnz loc_B221F
mov esi, 8; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B21A6:
mov qword ptr [rbx+140h], 0
lea rdi, [rbx+0F0h]
call _ZNSt5dequeIN5aimrt4util8FunctionI34aimrt_function_executor_task_ops_tEESaIS4_EED2Ev; std::deque<aimrt::util::Function<aimrt_function_executor_task_ops_t>>::~deque()
lea rdi, [rbx+0C0h]; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rdi, [rbx+78h]
test rdi, rdi
jz short loc_B21D7
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B21D7:
mov rdi, [rbx+48h]; void *
test rdi, rdi
jz short loc_B21EC
mov rsi, [rbx+58h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B21EC:
mov rdi, [rbx+28h]; void *
lea rax, [rbx+38h]
cmp rdi, rax
jz short loc_B2204
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B2204:
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_B221D
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_B221D:
pop rbx
retn
loc_B221F:
call __ZSt9terminatev; std::terminate(void)
| void aimrt::runtime::core::executor::SimpleThreadExecutor::~SimpleThreadExecutor(
aimrt::runtime::core::executor::SimpleThreadExecutor *this)
{
_QWORD *v2; // rdi
long long v3; // rdi
void *v4; // rdi
char *v5; // rdi
_QWORD *v6; // rdi
_QWORD *v7; // rbx
*(_QWORD *)this = off_297650;
v2 = (_QWORD *)*((_QWORD *)this + 40);
if ( v2 )
{
if ( *v2 )
std::terminate();
operator delete(v2, 8uLL);
}
*((_QWORD *)this + 40) = 0LL;
std::deque<aimrt::util::Function<aimrt_function_executor_task_ops_t>>::~deque((char *)this + 240);
std::condition_variable::~condition_variable((aimrt::runtime::core::executor::SimpleThreadExecutor *)((char *)this + 192));
v3 = *((_QWORD *)this + 15);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
v4 = (void *)*((_QWORD *)this + 9);
if ( v4 )
operator delete(v4, *((_QWORD *)this + 11) - (_QWORD)v4);
v5 = (char *)*((_QWORD *)this + 5);
if ( v5 != (char *)this + 56 )
operator delete(v5, *((_QWORD *)this + 7) + 1LL);
v6 = (_QWORD *)*((_QWORD *)this + 1);
v7 = (_QWORD *)((char *)this + 24);
if ( v6 != v7 )
operator delete(v6, *v7 + 1LL);
}
| ~SimpleThreadExecutor:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x397650]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x140]
TEST RDI,RDI
JZ 0x001b21a6
CMP qword ptr [RDI],0x0
JNZ 0x001b221f
MOV ESI,0x8
CALL 0x00182190
LAB_001b21a6:
MOV qword ptr [RBX + 0x140],0x0
LEA RDI,[RBX + 0xf0]
CALL 0x001b251e
LEA RDI,[RBX + 0xc0]
CALL 0x00183cc0
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JZ 0x001b21d7
CALL 0x00181a00
LAB_001b21d7:
MOV RDI,qword ptr [RBX + 0x48]
TEST RDI,RDI
JZ 0x001b21ec
MOV RSI,qword ptr [RBX + 0x58]
SUB RSI,RDI
CALL 0x00182190
LAB_001b21ec:
MOV RDI,qword ptr [RBX + 0x28]
LEA RAX,[RBX + 0x38]
CMP RDI,RAX
JZ 0x001b2204
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00182190
LAB_001b2204:
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x001b221d
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00182190
LAB_001b221d:
POP RBX
RET
LAB_001b221f:
CALL 0x001807b0
|
/* aimrt::runtime::core::executor::SimpleThreadExecutor::~SimpleThreadExecutor() */
void __thiscall
aimrt::runtime::core::executor::SimpleThreadExecutor::~SimpleThreadExecutor
(SimpleThreadExecutor *this)
{
long *plVar1;
void *pvVar2;
*(int ***)this = &PTR__SimpleThreadExecutor_00397650;
plVar1 = *(long **)(this + 0x140);
if (plVar1 != (long *)0x0) {
if (*plVar1 != 0) {
/* WARNING: Subroutine does not return */
std::terminate();
}
operator_delete(plVar1,8);
}
*(int8 *)(this + 0x140) = 0;
std::
deque<aimrt::util::Function<aimrt_function_executor_task_ops_t>,std::allocator<aimrt::util::Function<aimrt_function_executor_task_ops_t>>>
::~deque((deque<aimrt::util::Function<aimrt_function_executor_task_ops_t>,std::allocator<aimrt::util::Function<aimrt_function_executor_task_ops_t>>>
*)(this + 0xf0));
std::condition_variable::~condition_variable((condition_variable *)(this + 0xc0));
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x78) !=
(_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 + 0x78));
}
pvVar2 = *(void **)(this + 0x48);
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,*(long *)(this + 0x58) - (long)pvVar2);
}
if (*(SimpleThreadExecutor **)(this + 0x28) != this + 0x38) {
operator_delete(*(SimpleThreadExecutor **)(this + 0x28),*(long *)(this + 0x38) + 1);
}
if (*(SimpleThreadExecutor **)(this + 8) != this + 0x18) {
operator_delete(*(SimpleThreadExecutor **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
| |
52,072 | Catch::ReporterRegistry::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Catch::ReporterConfig&&) const | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | IEventListenerPtr ReporterRegistry::create( std::string const& name, ReporterConfig&& config ) const {
auto it = m_factories.find( name );
if( it == m_factories.end() )
return nullptr;
return it->second->create( CATCH_MOVE(config) );
} | O3 | cpp | Catch::ReporterRegistry::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Catch::ReporterConfig&&) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsi), %rdi
movq %rdx, %rsi
callq 0x83b72
addq $0x10, %r15
cmpq %r15, %rax
je 0x5d5eb
movq 0x40(%rax), %rsi
movq (%rsi), %rax
movq %rbx, %rdi
movq %r14, %rdx
callq *0x10(%rax)
jmp 0x5d5f2
movq $0x0, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK5Catch16ReporterRegistry6createERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEONS_14ReporterConfigE:
push r15
push r14
push rbx
mov r14, rcx
mov r15, rsi
mov rbx, rdi
lea rdi, [rsi+8]
mov rsi, rdx
call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5Catch6Detail10unique_ptrINS8_16IReporterFactoryEEEESt10_Select1stISD_ENS9_19CaseInsensitiveLessESaISD_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>,std::_Select1st<std::pair<std::string const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>,Catch::Detail::CaseInsensitiveLess,std::allocator<std::pair<std::string const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>>::find(std::string const&)
add r15, 10h
cmp rax, r15
jz short loc_5D5EB
mov rsi, [rax+40h]
mov rax, [rsi]
mov rdi, rbx
mov rdx, r14
call qword ptr [rax+10h]
jmp short loc_5D5F2
loc_5D5EB:
mov qword ptr [rbx], 0
loc_5D5F2:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
| _QWORD * Catch::ReporterRegistry::create(_QWORD *a1, long long a2, long long a3, long long a4)
{
long long v5; // rax
v5 = std::_Rb_tree<std::string,std::pair<std::string const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>,std::_Select1st<std::pair<std::string const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>,Catch::Detail::CaseInsensitiveLess,std::allocator<std::pair<std::string const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>>::find(
a2 + 8,
a3);
if ( v5 == a2 + 16 )
*a1 = 0LL;
else
(*(void ( **)(_QWORD *, _QWORD, long long))(**(_QWORD **)(v5 + 64) + 16LL))(a1, *(_QWORD *)(v5 + 64), a4);
return a1;
}
| create:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RCX
MOV R15,RSI
MOV RBX,RDI
LEA RDI,[RSI + 0x8]
MOV RSI,RDX
CALL 0x00183b72
ADD R15,0x10
CMP RAX,R15
JZ 0x0015d5eb
MOV RSI,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RSI]
MOV RDI,RBX
MOV RDX,R14
CALL qword ptr [RAX + 0x10]
JMP 0x0015d5f2
LAB_0015d5eb:
MOV qword ptr [RBX],0x0
LAB_0015d5f2:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* Catch::ReporterRegistry::create(std::__cxx11::string const&, Catch::ReporterConfig&&) const */
string * Catch::ReporterRegistry::create(string *param_1,ReporterConfig *param_2)
{
ReporterConfig *pRVar1;
string *in_RDX;
pRVar1 = (ReporterConfig *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>,std::_Select1st<std::pair<std::__cxx11::string_const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>,Catch::Detail::CaseInsensitiveLess,std::allocator<std::pair<std::__cxx11::string_const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>,std::_Select1st<std::pair<std::__cxx11::string_const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>,Catch::Detail::CaseInsensitiveLess,std::allocator<std::pair<std::__cxx11::string_const,Catch::Detail::unique_ptr<Catch::IReporterFactory>>>>
*)(param_2 + 8),in_RDX);
if (pRVar1 == param_2 + 0x10) {
*(int8 *)param_1 = 0;
}
else {
(**(code **)(**(long **)(pRVar1 + 0x40) + 0x10))(param_1);
}
return param_1;
}
| |
52,073 | js_promise_then_finally_func | bluesky950520[P]quickjs/quickjs.c | static JSValue js_promise_then_finally_func(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
int magic, JSValue *func_data)
{
JSValue ctor = func_data[0];
JSValue onFinally = func_data[1];
JSValue res, promise, ret, then_func;
res = JS_Call(ctx, onFinally, JS_UNDEFINED, 0, NULL);
if (JS_IsException(res))
return res;
promise = js_promise_resolve(ctx, ctor, 1, &res, 0);
JS_FreeValue(ctx, res);
if (JS_IsException(promise))
return promise;
if (magic == 0) {
then_func = JS_NewCFunctionData(ctx, js_promise_finally_value_thunk, 0,
0, 1, argv);
} else {
then_func = JS_NewCFunctionData(ctx, js_promise_finally_thrower, 0,
0, 1, argv);
}
if (JS_IsException(then_func)) {
JS_FreeValue(ctx, promise);
return then_func;
}
ret = JS_InvokeFree(ctx, promise, JS_ATOM_then, 1, &then_func);
JS_FreeValue(ctx, then_func);
return ret;
} | O0 | c | js_promise_then_finally_func:
subq $0x108, %rsp # imm = 0x108
movq 0x110(%rsp), %rax
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rdi, 0xe0(%rsp)
movl %ecx, 0xdc(%rsp)
movq %r8, 0xd0(%rsp)
movl %r9d, 0xcc(%rsp)
movq 0x110(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0xb8(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0x110(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xe0(%rsp), %rdi
movl $0x0, 0x48(%rsp)
movq $0x3, 0x50(%rsp)
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
xorl %r9d, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x38d90
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x92215
movq 0x98(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x100(%rsp)
jmp 0x92428
movq 0xe0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movl $0x1, %ecx
leaq 0x98(%rsp), %r8
xorl %r9d, %r9d
callq 0x91830
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xe0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x229d0
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x922c2
movq 0x88(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x100(%rsp)
jmp 0x92428
cmpl $0x0, 0xcc(%rsp)
jne 0x92312
movq 0xe0(%rsp), %rdi
movq 0xd0(%rsp), %r9
leaq 0x15d(%rip), %rsi # 0x92440
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %edx
callq 0x294f0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x92356
movq 0xe0(%rsp), %rdi
movq 0xd0(%rsp), %r9
leaq 0x167(%rip), %rsi # 0x92490
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %edx
callq 0x294f0
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x923a6
movq 0xe0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x229d0
movq 0x68(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x100(%rsp)
jmp 0x92428
movq 0xe0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl $0x80, %ecx
movl $0x1, %r8d
leaq 0x68(%rsp), %r9
callq 0x92510
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xe0(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x229d0
movq 0x78(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0xf8(%rsp), %rax
movq 0x100(%rsp), %rdx
addq $0x108, %rsp # imm = 0x108
retq
| js_promise_then_finally_func:
sub rsp, 108h
mov rax, [rsp+108h+arg_0]
mov [rsp+108h+var_20], rsi
mov [rsp+108h+var_18], rdx
mov [rsp+108h+var_28], rdi
mov [rsp+108h+var_2C], ecx
mov [rsp+108h+var_38], r8
mov [rsp+108h+var_3C], r9d
mov rax, [rsp+108h+arg_0]
mov rcx, [rax]
mov [rsp+108h+var_50], rcx
mov rax, [rax+8]
mov [rsp+108h+var_48], rax
mov rax, [rsp+108h+arg_0]
mov rcx, [rax+10h]
mov [rsp+108h+var_60], rcx
mov rax, [rax+18h]
mov [rsp+108h+var_58], rax
mov rdi, [rsp+108h+var_28]
mov dword ptr [rsp+108h+var_C0], 0
mov [rsp+108h+var_B8], 3
mov rsi, [rsp+108h+var_60]
mov rdx, [rsp+108h+var_58]
mov rcx, [rsp+108h+var_C0]
mov r8, [rsp+108h+var_B8]
xor r9d, r9d
xor eax, eax
mov [rsp+108h+var_108], 0
call JS_Call
mov [rsp+108h+var_B0], rax
mov [rsp+108h+var_A8], rdx
mov rax, [rsp+108h+var_B0]
mov [rsp+108h+var_70], rax
mov rax, [rsp+108h+var_A8]
mov [rsp+108h+var_68], rax
mov rdi, [rsp+108h+var_70]
mov rsi, [rsp+108h+var_68]
call JS_IsException_1
cmp eax, 0
jz short loc_92215
mov rax, [rsp+108h+var_70]
mov [rsp+108h+var_10], rax
mov rax, [rsp+108h+var_68]
mov [rsp+108h+var_8], rax
jmp loc_92428
loc_92215:
mov rdi, [rsp+108h+var_28]
mov rsi, [rsp+108h+var_50]
mov rdx, [rsp+108h+var_48]
mov ecx, 1
lea r8, [rsp+108h+var_70]
xor r9d, r9d
call js_promise_resolve
mov [rsp+108h+var_D0], rax
mov [rsp+108h+var_C8], rdx
mov rax, [rsp+108h+var_D0]
mov [rsp+108h+var_80], rax
mov rax, [rsp+108h+var_C8]
mov [rsp+108h+var_78], rax
mov rdi, [rsp+108h+var_28]
mov rsi, [rsp+108h+var_70]
mov rdx, [rsp+108h+var_68]
call JS_FreeValue
mov rdi, [rsp+108h+var_80]
mov rsi, [rsp+108h+var_78]
call JS_IsException_1
cmp eax, 0
jz short loc_922C2
mov rax, [rsp+108h+var_80]
mov [rsp+108h+var_10], rax
mov rax, [rsp+108h+var_78]
mov [rsp+108h+var_8], rax
jmp loc_92428
loc_922C2:
cmp [rsp+108h+var_3C], 0
jnz short loc_92312
mov rdi, [rsp+108h+var_28]
mov r9, [rsp+108h+var_38]
lea rsi, js_promise_finally_value_thunk
xor ecx, ecx
mov r8d, 1
mov edx, ecx
call JS_NewCFunctionData
mov [rsp+108h+var_E0], rax
mov [rsp+108h+var_D8], rdx
mov rax, [rsp+108h+var_E0]
mov [rsp+108h+var_A0], rax
mov rax, [rsp+108h+var_D8]
mov [rsp+108h+var_98], rax
jmp short loc_92356
loc_92312:
mov rdi, [rsp+108h+var_28]
mov r9, [rsp+108h+var_38]
lea rsi, js_promise_finally_thrower
xor ecx, ecx
mov r8d, 1
mov edx, ecx
call JS_NewCFunctionData
mov [rsp+108h+var_F0], rax
mov [rsp+108h+var_E8], rdx
mov rax, [rsp+108h+var_F0]
mov [rsp+108h+var_A0], rax
mov rax, [rsp+108h+var_E8]
mov [rsp+108h+var_98], rax
loc_92356:
mov rdi, [rsp+108h+var_A0]
mov rsi, [rsp+108h+var_98]
call JS_IsException_1
cmp eax, 0
jz short loc_923A6
mov rdi, [rsp+108h+var_28]
mov rsi, [rsp+108h+var_80]
mov rdx, [rsp+108h+var_78]
call JS_FreeValue
mov rax, [rsp+108h+var_A0]
mov [rsp+108h+var_10], rax
mov rax, [rsp+108h+var_98]
mov [rsp+108h+var_8], rax
jmp loc_92428
loc_923A6:
mov rdi, [rsp+108h+var_28]
mov rsi, [rsp+108h+var_80]
mov rdx, [rsp+108h+var_78]
mov ecx, 80h
mov r8d, 1
lea r9, [rsp+108h+var_A0]
call JS_InvokeFree
mov [rsp+108h+var_100], rax
mov [rsp+108h+var_F8], rdx
mov rax, [rsp+108h+var_100]
mov [rsp+108h+var_90], rax
mov rax, [rsp+108h+var_F8]
mov [rsp+108h+var_88], rax
mov rdi, [rsp+108h+var_28]
mov rsi, [rsp+108h+var_A0]
mov rdx, [rsp+108h+var_98]
call JS_FreeValue
mov rax, [rsp+108h+var_90]
mov [rsp+108h+var_10], rax
mov rax, [rsp+108h+var_88]
mov [rsp+108h+var_8], rax
loc_92428:
mov rax, [rsp+108h+var_10]
mov rdx, [rsp+108h+var_8]
add rsp, 108h
retn
| long long js_promise_then_finally_func(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
long long a15)
{
long long v15; // rdx
double v16; // xmm4_8
double v17; // xmm5_8
long long v18; // rdx
long long v19; // rdx
long long v20; // rdx
long long v22; // [rsp+68h] [rbp-A0h] BYREF
long long v23; // [rsp+70h] [rbp-98h]
long long v24; // [rsp+78h] [rbp-90h]
long long v25; // [rsp+80h] [rbp-88h]
long long v26; // [rsp+88h] [rbp-80h]
long long v27; // [rsp+90h] [rbp-78h]
long long v28; // [rsp+98h] [rbp-70h] BYREF
long long v29; // [rsp+A0h] [rbp-68h]
long long v30; // [rsp+A8h] [rbp-60h]
long long v31; // [rsp+B0h] [rbp-58h]
_DWORD *v32; // [rsp+B8h] [rbp-50h]
unsigned long long v33; // [rsp+C0h] [rbp-48h]
int v34; // [rsp+CCh] [rbp-3Ch]
long long v35; // [rsp+D0h] [rbp-38h]
int v36; // [rsp+DCh] [rbp-2Ch]
long long v37; // [rsp+E0h] [rbp-28h]
long long v38; // [rsp+E8h] [rbp-20h]
long long v39; // [rsp+F0h] [rbp-18h]
long long v40; // [rsp+F8h] [rbp-10h]
long long v41; // [rsp+100h] [rbp-8h]
v38 = a2;
v39 = a3;
v37 = a1;
v36 = a4;
v35 = a5;
v34 = a6;
v32 = *(_DWORD **)a15;
v33 = *(_QWORD *)(a15 + 8);
v30 = *(_QWORD *)(a15 + 16);
v31 = *(_QWORD *)(a15 + 24);
v28 = JS_Call(a1, v30, v31, 0, 3, 0, 0LL);
v29 = v15;
if ( JS_IsException_1(v28, v15) )
{
v40 = v28;
v41 = v29;
}
else
{
v26 = js_promise_resolve(v37, v32, v33, 1, &v28, 0, a7, a8, a9, a10, v16, v17, a13, a14);
v27 = v18;
JS_FreeValue(v37, v28, v29);
if ( JS_IsException_1(v26, v27) )
{
v40 = v26;
v41 = v27;
}
else
{
if ( v34 )
v22 = JS_NewCFunctionData(v37, (long long)js_promise_finally_thrower, 0, 0, 1, v35);
else
v22 = JS_NewCFunctionData(v37, (long long)js_promise_finally_value_thunk, 0, 0, 1, v35);
v23 = v19;
if ( JS_IsException_1(v22, v19) )
{
JS_FreeValue(v37, v26, v27);
v40 = v22;
v41 = v23;
}
else
{
v24 = JS_InvokeFree(v37, v26, v27, 128LL, 1LL, &v22);
v25 = v20;
JS_FreeValue(v37, v22, v23);
v40 = v24;
v41 = v25;
}
}
}
return v40;
}
| js_promise_then_finally_func:
SUB RSP,0x108
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0xe8],RSI
MOV qword ptr [RSP + 0xf0],RDX
MOV qword ptr [RSP + 0xe0],RDI
MOV dword ptr [RSP + 0xdc],ECX
MOV qword ptr [RSP + 0xd0],R8
MOV dword ptr [RSP + 0xcc],R9D
MOV RAX,qword ptr [RSP + 0x110]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0xb8],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0xc0],RAX
MOV RAX,qword ptr [RSP + 0x110]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0xa8],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xb0],RAX
MOV RDI,qword ptr [RSP + 0xe0]
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x3
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x50]
XOR R9D,R9D
XOR EAX,EAX
MOV qword ptr [RSP],0x0
CALL 0x00138d90
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x00192215
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x100],RAX
JMP 0x00192428
LAB_00192215:
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
MOV ECX,0x1
LEA R8,[RSP + 0x98]
XOR R9D,R9D
CALL 0x00191830
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x90]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001922c2
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x100],RAX
JMP 0x00192428
LAB_001922c2:
CMP dword ptr [RSP + 0xcc],0x0
JNZ 0x00192312
MOV RDI,qword ptr [RSP + 0xe0]
MOV R9,qword ptr [RSP + 0xd0]
LEA RSI,[0x192440]
XOR ECX,ECX
MOV R8D,0x1
MOV EDX,ECX
CALL 0x001294f0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x00192356
LAB_00192312:
MOV RDI,qword ptr [RSP + 0xe0]
MOV R9,qword ptr [RSP + 0xd0]
LEA RSI,[0x192490]
XOR ECX,ECX
MOV R8D,0x1
MOV EDX,ECX
CALL 0x001294f0
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x70],RAX
LAB_00192356:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001923a6
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x100],RAX
JMP 0x00192428
LAB_001923a6:
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
MOV ECX,0x80
MOV R8D,0x1
LEA R9,[RSP + 0x68]
CALL 0x00192510
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x100],RAX
LAB_00192428:
MOV RAX,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0x100]
ADD RSP,0x108
RET
|
int1 [16]
js_promise_then_finally_func
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5,int param_6,int8 *param_7)
{
int iVar1;
uint uStack_bc;
int1 local_a0 [16];
int1 local_90 [16];
int1 local_80 [16];
int1 local_70 [16];
int8 local_60;
int8 local_58;
int8 local_50;
int8 local_48;
int local_3c;
int8 local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
local_50 = *param_7;
local_48 = param_7[1];
local_60 = param_7[2];
local_58 = param_7[3];
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_70 = JS_Call(param_1,local_60,local_58,(ulong)uStack_bc << 0x20,3,0,0);
iVar1 = JS_IsException(local_70._0_8_,local_70._8_8_);
local_a0 = local_70;
if (iVar1 == 0) {
local_80 = js_promise_resolve(local_28,local_50,local_48,1,local_70,0);
JS_FreeValue(local_28,local_70._0_8_,local_70._8_8_);
iVar1 = JS_IsException(local_80._0_8_,local_80._8_8_);
local_a0 = local_80;
if (iVar1 == 0) {
if (local_3c == 0) {
local_a0 = JS_NewCFunctionData(local_28,js_promise_finally_value_thunk,0,0,1,local_38);
}
else {
local_a0 = JS_NewCFunctionData(local_28,js_promise_finally_thrower,0,0,1,local_38);
}
iVar1 = JS_IsException(local_a0._0_8_,local_a0._8_8_);
if (iVar1 == 0) {
local_90 = JS_InvokeFree(local_28,local_80._0_8_,local_80._8_8_,0x80,1,local_a0);
JS_FreeValue(local_28,local_a0._0_8_,local_a0._8_8_);
local_a0 = local_90;
}
else {
JS_FreeValue(local_28,local_80._0_8_,local_80._8_8_);
}
}
}
return local_a0;
}
| |
52,074 | js_promise_then_finally_func | bluesky950520[P]quickjs/quickjs.c | static JSValue js_promise_then_finally_func(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
int magic, JSValue *func_data)
{
JSValue ctor = func_data[0];
JSValue onFinally = func_data[1];
JSValue res, promise, ret, then_func;
res = JS_Call(ctx, onFinally, JS_UNDEFINED, 0, NULL);
if (JS_IsException(res))
return res;
promise = js_promise_resolve(ctx, ctor, 1, &res, 0);
JS_FreeValue(ctx, res);
if (JS_IsException(promise))
return promise;
if (magic == 0) {
then_func = JS_NewCFunctionData(ctx, js_promise_finally_value_thunk, 0,
0, 1, argv);
} else {
then_func = JS_NewCFunctionData(ctx, js_promise_finally_thrower, 0,
0, 1, argv);
}
if (JS_IsException(then_func)) {
JS_FreeValue(ctx, promise);
return then_func;
}
ret = JS_InvokeFree(ctx, promise, JS_ATOM_then, 1, &then_func);
JS_FreeValue(ctx, then_func);
return ret;
} | O1 | c | js_promise_then_finally_func:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, 0x2c(%rsp)
movq %r8, %rbp
movq %rdi, %rbx
movq 0x90(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %r12
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x3, %r8d
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x278b6
movq %rdx, %r15
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
cmpl $0x6, %r15d
jne 0x52b9d
movq %rax, %r14
jmp 0x52c82
movq %rbp, 0x30(%rsp)
leaq 0x38(%rsp), %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbp, %r8
xorl %r9d, %r9d
callq 0x5273d
movq %rax, %r14
movq %rdx, %r15
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
cmpl $0x6, %r15d
je 0x52c82
cmpl $0x0, 0x2c(%rsp)
je 0x52bec
leaq 0xcb(%rip), %rsi # 0x52cb5
jmp 0x52bf3
leaq 0xa4(%rip), %rsi # 0x52c97
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movq 0x30(%rsp), %r9
callq 0x204d6
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x6, %edx
jne 0x52c34
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1ccb2
movq 0x48(%rsp), %r14
movq 0x50(%rsp), %r15
jmp 0x52c82
leaq 0x48(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x80, %ecx
movl $0x1, %r8d
movq %r12, %r9
callq 0x2f080
movq %rax, %r13
movq %rdx, %rbp
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1ccb2
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq %r13, %r14
movq %rbp, %r15
movq %r14, %rax
movq %r15, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_promise_then_finally_func:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_5C], r9d
mov rbp, r8
mov rbx, rdi
mov rax, [rsp+88h+arg_0]
mov r13, [rax]
mov r12, [rax+8]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov dword ptr [rsp+88h+var_50], 0
mov qword ptr [rsp+88h+var_50+8], 3
movups xmm0, [rsp+88h+var_50]
movups [rsp+88h+var_88], xmm0
mov [rsp+88h+var_70], 2
mov [rsp+88h+var_78], 0
mov r8d, 3
xor ecx, ecx
xor r9d, r9d
call JS_CallInternal
mov r15, rdx
mov qword ptr [rsp+88h+var_50], rax
mov qword ptr [rsp+88h+var_50+8], rdx
cmp r15d, 6
jnz short loc_52B9D
mov r14, rax
jmp loc_52C82
loc_52B9D:
mov [rsp+88h+var_58], rbp
lea rbp, [rsp+88h+var_50]
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov r8, rbp
xor r9d, r9d
call js_promise_resolve
mov r14, rax
mov r15, rdx
mov rsi, [rbp+0]
mov rdx, [rbp+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
cmp r15d, 6
jz loc_52C82
cmp [rsp+88h+var_5C], 0
jz short loc_52BEC
lea rsi, js_promise_finally_thrower
jmp short loc_52BF3
loc_52BEC:
lea rsi, js_promise_finally_value_thunk
loc_52BF3:
mov rdi, rbx
xor edx, edx
xor ecx, ecx
mov r8d, 1
mov r9, [rsp+88h+var_58]
call JS_NewCFunctionData
mov [rsp+88h+var_40], rax
mov [rsp+88h+var_38], rdx
cmp edx, 6
jnz short loc_52C34
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
mov r14, [rsp+88h+var_40]
mov r15, [rsp+88h+var_38]
jmp short loc_52C82
loc_52C34:
lea r12, [rsp+88h+var_40]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, 80h
mov r8d, 1
mov r9, r12
call JS_Invoke
mov r13, rax
mov rbp, rdx
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov r14, r13
mov r15, rbp
loc_52C82:
mov rax, r14
mov rdx, r15
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * js_promise_then_finally_func(
long long *a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
int a14,
long long a15)
{
_DWORD *v16; // r13
long long v17; // r12
long long v18; // rsi
long long v19; // rdx
__m128 v20; // xmm0
__m128 v21; // rax
long long v22; // rcx
__m128 v23; // xmm4
__m128 v24; // xmm5
_DWORD *v25; // r14
long long v26; // rdx
long long v27; // r15
long long ( *v28)(int, int, int, int, int, int, long long); // rsi
long long v29; // rdx
_DWORD *v30; // r13
__m128 v33; // [rsp+38h] [rbp-50h] BYREF
_DWORD *v34; // [rsp+48h] [rbp-40h] BYREF
long long v35; // [rsp+50h] [rbp-38h]
v16 = *(_DWORD **)a15;
v17 = *(_QWORD *)(a15 + 8);
v18 = *(_QWORD *)(a15 + 16);
v19 = *(_QWORD *)(a15 + 24);
v33.m128_i32[0] = 0;
v33.m128_u64[1] = 3LL;
v20 = v33;
v21.m128_u64[0] = JS_CallInternal(
(long long)a1,
v18,
v19,
0LL,
3LL,
0LL,
v33,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
0,
3,
0LL,
2u);
v33 = v21;
if ( v21.m128_i32[2] == 6 )
return (_DWORD *)v21.m128_u64[0];
v25 = js_promise_resolve(a1, v16, v17, v22, (long long)&v33, 0LL, v20, a3, a4, a5, v23, v24, a8, a9);
v27 = v26;
JS_FreeValueRT(a1[3], v33.m128_u64[0], v33.m128_i64[1]);
if ( (_DWORD)v27 != 6 )
{
if ( a14 )
v28 = js_promise_finally_thrower;
else
v28 = js_promise_finally_value_thunk;
v34 = (_DWORD *)JS_NewCFunctionData(a1, (long long)v28, 0, 0, 1, a13);
v35 = v29;
if ( (_DWORD)v29 == 6 )
{
JS_FreeValueRT(a1[3], v25, v27);
return v34;
}
else
{
v30 = JS_Invoke((long long)a1, (long long)v25, v27, 0x80u, 1, (long long)&v34);
JS_FreeValueRT(a1[3], v25, v27);
JS_FreeValueRT(a1[3], v34, v35);
return v30;
}
}
return v25;
}
| js_promise_then_finally_func:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RSP + 0x2c],R9D
MOV RBP,R8
MOV RBX,RDI
MOV RAX,qword ptr [RSP + 0x90]
MOV R13,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x2
MOV qword ptr [RSP + 0x10],0x0
MOV R8D,0x3
XOR ECX,ECX
XOR R9D,R9D
CALL 0x001278b6
MOV R15,RDX
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
CMP R15D,0x6
JNZ 0x00152b9d
MOV R14,RAX
JMP 0x00152c82
LAB_00152b9d:
MOV qword ptr [RSP + 0x30],RBP
LEA RBP,[RSP + 0x38]
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV R8,RBP
XOR R9D,R9D
CALL 0x0015273d
MOV R14,RAX
MOV R15,RDX
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
CMP R15D,0x6
JZ 0x00152c82
CMP dword ptr [RSP + 0x2c],0x0
JZ 0x00152bec
LEA RSI,[0x152cb5]
JMP 0x00152bf3
LAB_00152bec:
LEA RSI,[0x152c97]
LAB_00152bf3:
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x1
MOV R9,qword ptr [RSP + 0x30]
CALL 0x001204d6
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
CMP EDX,0x6
JNZ 0x00152c34
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011ccb2
MOV R14,qword ptr [RSP + 0x48]
MOV R15,qword ptr [RSP + 0x50]
JMP 0x00152c82
LAB_00152c34:
LEA R12,[RSP + 0x48]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,0x80
MOV R8D,0x1
MOV R9,R12
CALL 0x0012f080
MOV R13,RAX
MOV RBP,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011ccb2
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV R14,R13
MOV R15,RBP
LAB_00152c82:
MOV RAX,R14
MOV RDX,R15
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_promise_then_finally_func(long param_1)
{
int8 uVar1;
int8 uVar2;
code *pcVar3;
int8 in_R8;
int in_R9D;
int1 auVar4 [16];
int1 auVar5 [16];
int8 *in_stack_00000008;
int1 local_40 [16];
uVar1 = *in_stack_00000008;
uVar2 = in_stack_00000008[1];
auVar4 = JS_CallInternal(param_1,in_stack_00000008[2],in_stack_00000008[3],0,3,0,0,3,0,2);
if (auVar4._8_4_ != 6) {
auVar5 = js_promise_resolve(param_1,uVar1,uVar2);
uVar2 = auVar5._8_8_;
uVar1 = auVar5._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar4._0_8_,auVar4._8_8_);
auVar4 = auVar5;
if (auVar5._8_4_ != 6) {
if (in_R9D == 0) {
pcVar3 = js_promise_finally_value_thunk;
}
else {
pcVar3 = js_promise_finally_thrower;
}
local_40 = JS_NewCFunctionData(param_1,pcVar3,0,0,1,in_R8);
if (local_40._8_4_ == 6) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar1,uVar2);
auVar4 = local_40;
}
else {
auVar4 = JS_Invoke(param_1,uVar1,uVar2,0x80,1,local_40);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar1,uVar2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_40._0_8_,local_40._8_8_);
}
}
}
return auVar4;
}
| |
52,075 | uf_intervall | eloqsql/storage/myisam/mi_packrec.c | static void uf_intervall(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to,
uchar *end)
{
reg1 uint field_length=(uint) (end-to);
memcpy(to,rec->huff_tree->intervalls+field_length*decode_pos(bit_buff,
rec->huff_tree),
(size_t) field_length);
} | O0 | c | uf_intervall:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xc5780
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdi
movl %eax, %ecx
movl -0x28(%rbp), %eax
imull %ecx, %eax
movl %eax, %eax
addq %rax, %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x29090
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| uf_intervall_0:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax+28h]
call decode_pos_0
mov rsi, [rbp+var_38]
mov rdi, [rbp+var_30]
mov ecx, eax
mov eax, [rbp+var_28]
imul eax, ecx
mov eax, eax
add rsi, rax
mov eax, [rbp+var_24]
mov edx, eax
call _memcpy
add rsp, 40h
pop rbp
retn
| long long uf_intervall_0(long long a1, long long a2, long long a3, int a4)
{
int v4; // eax
long long v6; // [rsp+8h] [rbp-38h]
int v8; // [rsp+18h] [rbp-28h]
unsigned int v9; // [rsp+1Ch] [rbp-24h]
v9 = a4 - a3;
v6 = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 16LL);
v8 = a4 - a3;
v4 = decode_pos_0(a2, *(_QWORD *)(a1 + 40));
return memcpy(a3, (unsigned int)(v4 * v8) + v6, v9);
}
| uf_intervall:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x28]
CALL 0x001c5780
MOV RSI,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x28]
IMUL EAX,ECX
MOV EAX,EAX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
CALL 0x00129090
ADD RSP,0x40
POP RBP
RET
|
void uf_intervall(long param_1,int8 param_2,void *param_3,int param_4)
{
long lVar1;
uint uVar2;
int iVar3;
uVar2 = param_4 - (int)param_3;
lVar1 = *(long *)(*(long *)(param_1 + 0x28) + 0x10);
iVar3 = decode_pos(param_2,*(int8 *)(param_1 + 0x28));
memcpy(param_3,(void *)(lVar1 + (ulong)(uVar2 * iVar3)),(ulong)uVar2);
return;
}
| |
52,076 | whitelist::init_late() | untodesu[P]voxelius/game/server/whitelist.cc | void whitelist::init_late(void)
{
whitelist_map.clear();
if(!whitelist::enabled.get_value()) {
// Not enabled, shouldn't
// even bother with parsing
// the whitelist file
return;
}
if(strtools::is_whitespace(whitelist::filename.get())) {
spdlog::warn("whitelist: enabled but filename is empty, using default ({})", DEFAULT_FILENAME);
whitelist::filename.set(DEFAULT_FILENAME);
}
PHYSFS_File *file = PHYSFS_openRead(whitelist::filename.get());
if(file == nullptr) {
spdlog::warn("whitelist: {}: {}", whitelist::filename.get(), PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
whitelist::enabled.set_value(false);
return;
}
auto source = std::string(PHYSFS_fileLength(file), char(0x00));
PHYSFS_readBytes(file, source.data(), source.size());
PHYSFS_close(file);
std::istringstream stream(source);
std::string line;
while(std::getline(stream, line)) {
const auto location = line.find_last_of(SEPARATOR_CHAR);
if(location == std::string::npos) {
// Entries that don't define a password field default
// to the global server password; this allows easier adding
// of guest accounts which can later be edited to use a better password
whitelist_map[line] = server_game::password_hash;
}
else {
const auto username = line.substr(0, location);
const auto password = line.substr(location + 1);
whitelist_map[username] = crc64::get(password);
}
}
PHYSFS_close(file);
} | O3 | cpp | whitelist::init_late():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
leaq 0xd4bbf(%rip), %rdi # 0x108e30
callq 0x34788
leaq 0xd4b5b(%rip), %rdi # 0x108dd8
callq 0x5096c
testb %al, %al
je 0x345e7
leaq 0xd4b77(%rip), %rdi # 0x108e08
callq 0x50a3a
leaq 0xa0(%rsp), %rdi
leaq 0x18(%rsp), %rdx
movq %rax, %rsi
callq 0x1b480
leaq 0xa0(%rsp), %rdi
callq 0x53468
movl %eax, %ebx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x342db
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x166c0
testb %bl, %bl
je 0x34347
callq 0x81f86
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0xa0(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x866e9(%rip), %rdx # 0xbaa04
leaq 0xcebde(%rip), %r8 # 0x102f00
movl $0x3c, %ecx
movq %rax, %rdi
movl $0x3, %esi
callq 0x34c8c
leaq 0xd4acd(%rip), %rdi # 0x108e08
leaq 0x8668f(%rip), %rsi # 0xba9d1
callq 0x50a06
leaq 0xd4aba(%rip), %rdi # 0x108e08
callq 0x50a3a
movq %rax, %rdi
callq 0x56894
testq %rax, %rax
je 0x3455d
movq %rax, %rbx
movq %rax, %rdi
callq 0x56e74
leaq 0x28(%rsp), %rcx
movq %rcx, -0x10(%rcx)
leaq 0x18(%rsp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x167b0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x56b9e
movq %rbx, %rdi
callq 0x56a4a
movq %rbx, 0x58(%rsp)
leaq 0xa0(%rsp), %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x16bb0
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x38(%rsp), %r15
leaq 0xd4a50(%rip), %r12 # 0x108e30
leaq 0x80(%rsp), %r13
leaq 0x60(%rsp), %rbp
movq 0xa0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x16680
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x16d20
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x344f1
movq %r15, %rdi
movl $0x3a, %esi
movq $-0x1, %rdx
callq 0x16e20
cmpq $-0x1, %rax
je 0x344d4
movq %rax, %rbx
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x166e0
incq %rbx
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x166e0
movq %rbp, %rdi
xorl %esi, %esi
callq 0x51f05
movq %rax, %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x347bc
movq %rbx, (%rax)
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x344a6
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x166c0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x343ed
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x166c0
jmp 0x343ed
leaq 0xd4285(%rip), %rax # 0x108760
movq (%rax), %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0x347bc
movq %rbx, (%rax)
jmp 0x343ed
movq 0x58(%rsp), %rdi
callq 0x56a4a
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
leaq 0x28(%rsp), %rbx
je 0x3451c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x166c0
movq 0xd3a3d(%rip), %rsi # 0x107f60
leaq 0xa0(%rsp), %rdi
callq 0x169a0
leaq 0x118(%rsp), %rdi
callq 0x16210
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x345e7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x166c0
jmp 0x345e7
leaq 0xd48a4(%rip), %rdi # 0x108e08
callq 0x50a3a
leaq 0x18(%rsp), %rbx
movq %rax, (%rbx)
callq 0x53b44
movl %eax, %edi
callq 0x53bbb
leaq 0x38(%rsp), %r14
movq %rax, (%r14)
callq 0x81f86
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0xa0(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x86480(%rip), %rdx # 0xbaa41
movl $0x11, %ecx
movq %rax, %rdi
movl $0x3, %esi
movq %rbx, %r8
movq %r14, %r9
callq 0x34f98
leaq 0xd47f8(%rip), %rdi # 0x108dd8
xorl %esi, %esi
callq 0x50970
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34684
jmp 0x3462f
jmp 0x34627
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x346e0
movq 0xb0(%rsp), %rsi
jmp 0x346d8
movq %rax, %rbx
jmp 0x346e0
movq %rax, %rbx
jmp 0x346c4
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3465b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x166c0
jmp 0x3465b
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x34687
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x166c0
jmp 0x34687
jmp 0x34684
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x346a3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x166c0
movq 0xd38b6(%rip), %rsi # 0x107f60
leaq 0xa0(%rsp), %rdi
callq 0x169a0
leaq 0x118(%rsp), %rdi
callq 0x16210
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x346e0
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x166c0
movq %rbx, %rdi
callq 0x16c90
| _ZN9whitelist9init_lateEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
lea rdi, _ZL13whitelist_mapB5cxx11; whitelist_map
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS6_ESt8equal_toIS6_EE5clearEv; emhash8::HashMap<std::string,ulong,std::hash<std::string>,std::equal_to<std::string>>::clear(void)
lea rdi, _ZN9whitelist7enabledE; this
call _ZNK13ConfigBoolean9get_valueEv; ConfigBoolean::get_value(void)
test al, al
jz loc_345E7
lea rdi, _ZN9whitelist8filenameE; this
call _ZNK12ConfigString3getEv; ConfigString::get(void)
lea rdi, [rsp+258h+var_1B8]
lea rdx, [rsp+258h+var_240]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+258h+var_1B8]
call _ZN8strtools13is_whitespaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; strtools::is_whitespace(std::string const&)
mov ebx, eax
lea rax, [rsp+258h+var_1A8]
mov rdi, [rax-10h]; this
cmp rdi, rax
jz short loc_342DB
mov rsi, [rsp+258h+var_1A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_342DB:
test bl, bl
jz short loc_34347
call _ZN6spdlog18default_logger_rawEv; spdlog::default_logger_raw(void)
xorps xmm0, xmm0
movaps [rsp+258h+var_1B8], xmm0
mov [rsp+258h+var_1A8], 0
mov rcx, [rsp+258h+var_1A8]
mov [rsp+258h+var_248], rcx
movaps xmm0, [rsp+258h+var_1B8]
movups [rsp+258h+var_258], xmm0
lea rdx, aWhitelistEnabl_0; "whitelist: enabled but filename is empt"...
lea r8, _ZL16DEFAULT_FILENAME; DEFAULT_FILENAME
mov ecx, 3Ch ; '<'
mov rdi, rax
mov esi, 3
call _ZN6spdlog6logger4log_IJRKPKcEEEvNS_10source_locENS_5level10level_enumEN3fmt3v1117basic_string_viewIcEEDpOT_; spdlog::logger::log_<char const* const&>(spdlog::source_loc,spdlog::level::level_enum,fmt::v11::basic_string_view<char>,char const* const&)
lea rdi, _ZN9whitelist8filenameE; this
lea rsi, aWhitelistTxt; "whitelist.txt"
call _ZN12ConfigString3setEPKc; ConfigString::set(char const*)
loc_34347:
lea rdi, _ZN9whitelist8filenameE; this
call _ZNK12ConfigString3getEv; ConfigString::get(void)
mov rdi, rax
call PHYSFS_openRead
test rax, rax
jz loc_3455D
mov rbx, rax
mov rdi, rax
call PHYSFS_fileLength
lea rcx, [rsp+258h+var_230]
mov [rcx-10h], rcx
lea rdi, [rsp+258h+var_240]
mov rsi, rax
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+258h+var_240]
mov rdx, [rsp+258h+var_238]
mov rdi, rbx
call PHYSFS_readBytes
mov rdi, rbx
call PHYSFS_close
mov [rsp+258h+var_200], rbx
lea r14, [rsp+258h+var_1B8]
lea rsi, [rsp+258h+var_240]
mov rdi, r14
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+258h+var_210]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea r15, [rsp+258h+var_220]
lea r12, _ZL13whitelist_mapB5cxx11; whitelist_map
lea r13, [rsp+258h+var_1D8]
lea rbp, [rsp+258h+var_1F8]
loc_343ED:
mov rax, qword ptr [rsp+258h+var_1B8]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
mov rdi, r14
mov rsi, r15
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_344F1
mov rdi, r15
mov esi, 3Ah ; ':'
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_344D4
mov rbx, rax
mov rdi, r13
mov rsi, r15
xor edx, edx
mov rcx, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
inc rbx
mov rdi, rbp
mov rsi, r15
mov rdx, rbx
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbp
xor esi, esi
call _ZN5crc643getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; crc64::get(std::string const&,ulong)
mov rbx, rax
mov rdi, r12
mov rsi, r13
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS6_ESt8equal_toIS6_EEixERKS6_; emhash8::HashMap<std::string,ulong,std::hash<std::string>,std::equal_to<std::string>>::operator[](std::string const&)
mov [rax], rbx
mov rdi, [rsp+258h+var_1F8]; void *
lea rax, [rsp+258h+var_1E8]
cmp rdi, rax
jz short loc_344A6
mov rsi, [rsp+258h+var_1E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_344A6:
mov rdi, [rsp+258h+var_1D8]; void *
lea rax, [rsp+258h+var_1C8]
cmp rdi, rax
jz loc_343ED
mov rsi, [rsp+258h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_343ED
loc_344D4:
lea rax, _ZN11server_game13password_hashE; server_game::password_hash
mov rbx, [rax]
mov rdi, r12
mov rsi, r15
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS6_ESt8equal_toIS6_EEixERKS6_; emhash8::HashMap<std::string,ulong,std::hash<std::string>,std::equal_to<std::string>>::operator[](std::string const&)
mov [rax], rbx
jmp loc_343ED
loc_344F1:
mov rdi, [rsp+258h+var_200]
call PHYSFS_close
mov rdi, [rsp+258h+var_220]; void *
lea rax, [rsp+258h+var_210]
cmp rdi, rax
lea rbx, [rsp+258h+var_230]
jz short loc_3451C
mov rsi, [rsp+258h+var_210]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3451C:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+258h+var_1B8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+258h+var_140]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, [rsp+258h+var_240]; void *
cmp rdi, rbx
jz loc_345E7
mov rsi, [rsp+258h+var_230]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_345E7
loc_3455D:
lea rdi, _ZN9whitelist8filenameE; this
call _ZNK12ConfigString3getEv; ConfigString::get(void)
lea rbx, [rsp+258h+var_240]
mov [rbx], rax
call PHYSFS_getLastErrorCode
mov edi, eax; this
call PHYSFS_getErrorByCode
lea r14, [rsp+258h+var_220]
mov [r14], rax
call _ZN6spdlog18default_logger_rawEv; spdlog::default_logger_raw(void)
xorps xmm0, xmm0
movaps [rsp+258h+var_1B8], xmm0
mov [rsp+258h+var_1A8], 0
mov rcx, [rsp+258h+var_1A8]
mov [rsp+258h+var_248], rcx
movaps xmm0, [rsp+258h+var_1B8]
movups [rsp+258h+var_258], xmm0
lea rdx, aWhitelist; "whitelist: {}: {}"
mov ecx, 11h
mov rdi, rax
mov esi, 3
mov r8, rbx
mov r9, r14
call _ZN6spdlog6logger4log_IJPKcS3_EEEvNS_10source_locENS_5level10level_enumEN3fmt3v1117basic_string_viewIcEEDpOT_; spdlog::logger::log_<char const*,char const*>(spdlog::source_loc,spdlog::level::level_enum,fmt::v11::basic_string_view<char>,char const*,char const* &&)
lea rdi, _ZN9whitelist7enabledE; this
xor esi, esi; bool
call _ZN13ConfigBoolean9set_valueEb; ConfigBoolean::set_value(bool)
loc_345E7:
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_34684
jmp short loc_3462F
jmp short loc_34627
mov rbx, rax
lea rax, [rsp+arg_A8]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_346E0
mov rsi, [rsp+arg_A8]
jmp loc_346D8
loc_34627:
mov rbx, rax
jmp loc_346E0
loc_3462F:
mov rbx, rax
jmp loc_346C4
mov rbx, rax
mov rdi, [rsp+arg_58]; void *
lea rax, [rsp+arg_68]
cmp rdi, rax
jz short loc_3465B
mov rsi, [rsp+arg_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3465B
mov rbx, rax
loc_3465B:
mov rdi, [rsp+arg_78]; void *
lea rax, [rsp+arg_88]
cmp rdi, rax
jz short loc_34687
mov rsi, [rsp+arg_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_34687
jmp short $+2
loc_34684:
mov rbx, rax
loc_34687:
mov rdi, [rsp+arg_30]; void *
lea rax, [rsp+arg_40]
cmp rdi, rax
jz short loc_346A3
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_346A3:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_98]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_110]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_346C4:
mov rdi, [rsp+arg_10]; void *
lea rax, [rsp+arg_20]
cmp rdi, rax
jz short loc_346E0
mov rsi, [rsp+arg_20]
loc_346D8:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_346E0:
mov rdi, rbx
call __Unwind_Resume
| void whitelist::init_late(whitelist *this)
{
long long v1; // rsi
char is_whitespace; // bl
spdlog *v3; // rdi
int v4; // eax
int v5; // r9d
long long v6; // rax
long long v7; // rax
long long v8; // rbx
long long v9; // rax
char v10; // al
_QWORD *v11; // rax
long long v12; // rax
long long v13; // rbx
long long v14; // rbx
long long v15; // rbx
spdlog *LastErrorCode; // rdi
int v17; // eax
void *v18[2]; // [rsp+18h] [rbp-240h] BYREF
_QWORD v19[2]; // [rsp+28h] [rbp-230h] BYREF
void *v20[2]; // [rsp+38h] [rbp-220h] BYREF
_QWORD v21[2]; // [rsp+48h] [rbp-210h] BYREF
long long v22; // [rsp+58h] [rbp-200h]
void *v23[2]; // [rsp+60h] [rbp-1F8h] BYREF
long long v24; // [rsp+70h] [rbp-1E8h] BYREF
void *v25[2]; // [rsp+80h] [rbp-1D8h] BYREF
long long v26; // [rsp+90h] [rbp-1C8h] BYREF
__int128 v27; // [rsp+A0h] [rbp-1B8h] BYREF
long long v28; // [rsp+B0h] [rbp-1A8h] BYREF
char v29[320]; // [rsp+118h] [rbp-140h] BYREF
emhash8::HashMap<std::string,unsigned long,std::hash<std::string>,std::equal_to<std::string>>::clear(&whitelist_map[abi:cxx11]);
if ( (unsigned __int8)ConfigBoolean::get_value((ConfigBoolean *)&whitelist::enabled) )
{
v1 = ConfigString::get((ConfigString *)&whitelist::filename);
std::string::basic_string<std::allocator<char>>(&v27, v1);
is_whitespace = strtools::is_whitespace(&v27);
v3 = (spdlog *)v27;
if ( (long long *)v27 != &v28 )
operator delete((void *)v27, v28 + 1);
if ( is_whitespace )
{
v4 = spdlog::default_logger_raw(v3);
v27 = 0LL;
v28 = 0LL;
spdlog::logger::log_<char const* const&>(
v4,
3,
(unsigned int)"whitelist: enabled but filename is empty, using default ({})",
60,
(unsigned int)&DEFAULT_FILENAME,
v5,
0LL,
0LL,
0LL);
ConfigString::set((ConfigString *)&whitelist::filename, "whitelist.txt");
}
v6 = ConfigString::get((ConfigString *)&whitelist::filename);
v7 = PHYSFS_openRead(v6);
if ( v7 )
{
v8 = v7;
v9 = PHYSFS_fileLength(v7);
v18[0] = v19;
std::string::_M_construct(v18, v9, 0LL);
PHYSFS_readBytes(v8, v18[0], v18[1]);
PHYSFS_close(v8);
v22 = v8;
std::istringstream::basic_istringstream(&v27, v18, 8LL);
v20[0] = v21;
v20[1] = 0LL;
LOBYTE(v21[0]) = 0;
while ( 1 )
{
v10 = std::ios::widen((char *)&v27 + *(_QWORD *)(v27 - 24), 10LL);
v11 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v27, v20, (unsigned int)v10);
if ( (*((_BYTE *)v11 + *(_QWORD *)(*v11 - 24LL) + 32) & 5) != 0 )
break;
v12 = std::string::rfind(v20, 58LL, -1LL);
if ( v12 == -1 )
{
v15 = server_game::password_hash;
*(_QWORD *)emhash8::HashMap<std::string,unsigned long,std::hash<std::string>,std::equal_to<std::string>>::operator[](
&whitelist_map[abi:cxx11],
v20) = v15;
}
else
{
v13 = v12;
std::string::substr(v25, v20, 0LL, v12);
std::string::substr(v23, v20, v13 + 1, -1LL);
v14 = crc64::get(v23, 0LL);
*(_QWORD *)emhash8::HashMap<std::string,unsigned long,std::hash<std::string>,std::equal_to<std::string>>::operator[](
&whitelist_map[abi:cxx11],
v25) = v14;
if ( v23[0] != &v24 )
operator delete(v23[0], v24 + 1);
if ( v25[0] != &v26 )
operator delete(v25[0], v26 + 1);
}
}
PHYSFS_close(v22);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
std::istringstream::~istringstream(&v27, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v29);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
}
else
{
v18[0] = (void *)ConfigString::get((ConfigString *)&whitelist::filename);
LastErrorCode = (spdlog *)(unsigned int)PHYSFS_getLastErrorCode();
v20[0] = (void *)PHYSFS_getErrorByCode(LastErrorCode);
v17 = spdlog::default_logger_raw(LastErrorCode);
v27 = 0LL;
v28 = 0LL;
spdlog::logger::log_<char const*,char const*>(
v17,
3,
(unsigned int)"whitelist: {}: {}",
17,
(unsigned int)v18,
(unsigned int)v20,
0);
ConfigBoolean::set_value((ConfigBoolean *)&whitelist::enabled, 0);
}
}
}
| init_late:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
LEA RDI,[0x208e30]
CALL 0x00134788
LEA RDI,[0x208dd8]
CALL 0x0015096c
TEST AL,AL
JZ 0x001345e7
LEA RDI,[0x208e08]
CALL 0x00150a3a
LAB_00134296:
LEA RDI,[RSP + 0xa0]
LEA RDX,[RSP + 0x18]
MOV RSI,RAX
CALL 0x0011b480
LAB_001342ab:
LEA RDI,[RSP + 0xa0]
CALL 0x00153468
LAB_001342b8:
MOV EBX,EAX
LEA RAX,[RSP + 0xb0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001342db
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x001166c0
LAB_001342db:
TEST BL,BL
JZ 0x00134347
CALL 0x00181f86
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOV qword ptr [RSP + 0xb0],0x0
MOV RCX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x10],RCX
MOVAPS XMM0,xmmword ptr [RSP + 0xa0]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[0x1baa04]
LEA R8,[0x202f00]
MOV ECX,0x3c
MOV RDI,RAX
MOV ESI,0x3
CALL 0x00134c8c
LEA RDI,[0x208e08]
LEA RSI,[0x1ba9d1]
CALL 0x00150a06
LAB_00134347:
LEA RDI,[0x208e08]
CALL 0x00150a3a
MOV RDI,RAX
CALL 0x00156894
TEST RAX,RAX
JZ 0x0013455d
MOV RBX,RAX
MOV RDI,RAX
CALL 0x00156e74
LEA RCX,[RSP + 0x28]
MOV qword ptr [RCX + -0x10],RCX
LAB_00134378:
LEA RDI,[RSP + 0x18]
MOV RSI,RAX
XOR EDX,EDX
CALL 0x001167b0
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_00134391:
MOV RDI,RBX
CALL 0x00156b9e
MOV RDI,RBX
CALL 0x00156a4a
LAB_001343a1:
MOV qword ptr [RSP + 0x58],RBX
LEA R14,[RSP + 0xa0]
LEA RSI,[RSP + 0x18]
MOV RDI,R14
MOV EDX,0x8
CALL 0x00116bb0
LEA RAX,[RSP + 0x48]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA R15,[RSP + 0x38]
LEA R12,[0x208e30]
LEA R13,[RSP + 0x80]
LEA RBP,[RSP + 0x60]
LAB_001343ed:
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
LAB_001343fc:
MOV ESI,0xa
CALL 0x00116680
MOVSX EDX,AL
MOV RDI,R14
MOV RSI,R15
CALL 0x00116d20
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001344f1
MOV RDI,R15
MOV ESI,0x3a
MOV RDX,-0x1
CALL 0x00116e20
CMP RAX,-0x1
JZ 0x001344d4
LAB_00134444:
MOV RBX,RAX
MOV RDI,R13
MOV RSI,R15
XOR EDX,EDX
MOV RCX,RAX
CALL 0x001166e0
INC RBX
LAB_0013445a:
MOV RDI,RBP
MOV RSI,R15
MOV RDX,RBX
MOV RCX,-0x1
CALL 0x001166e0
LAB_0013446f:
MOV RDI,RBP
XOR ESI,ESI
CALL 0x00151f05
MOV RBX,RAX
MOV RDI,R12
MOV RSI,R13
CALL 0x001347bc
MOV qword ptr [RAX],RBX
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001344a6
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x001166c0
LAB_001344a6:
MOV RDI,qword ptr [RSP + 0x80]
LEA RAX,[RSP + 0x90]
CMP RDI,RAX
JZ 0x001343ed
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x001166c0
JMP 0x001343ed
LAB_001344d4:
LEA RAX,[0x208760]
MOV RBX,qword ptr [RAX]
MOV RDI,R12
MOV RSI,R15
CALL 0x001347bc
MOV qword ptr [RAX],RBX
JMP 0x001343ed
LAB_001344f1:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00156a4a
LAB_001344fb:
MOV RDI,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
LEA RBX,[RSP + 0x28]
JZ 0x0013451c
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001166c0
LAB_0013451c:
MOV RSI,qword ptr [0x00207f60]
LEA RDI,[RSP + 0xa0]
CALL 0x001169a0
LEA RDI,[RSP + 0x118]
CALL 0x00116210
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,RBX
JZ 0x001345e7
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x001166c0
JMP 0x001345e7
LAB_0013455d:
LEA RDI,[0x208e08]
CALL 0x00150a3a
LEA RBX,[RSP + 0x18]
MOV qword ptr [RBX],RAX
CALL 0x00153b44
MOV EDI,EAX
CALL 0x00153bbb
LEA R14,[RSP + 0x38]
MOV qword ptr [R14],RAX
CALL 0x00181f86
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOV qword ptr [RSP + 0xb0],0x0
MOV RCX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x10],RCX
MOVAPS XMM0,xmmword ptr [RSP + 0xa0]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[0x1baa41]
MOV ECX,0x11
MOV RDI,RAX
MOV ESI,0x3
MOV R8,RBX
MOV R9,R14
CALL 0x00134f98
LEA RDI,[0x208dd8]
XOR ESI,ESI
CALL 0x00150970
LAB_001345e7:
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* whitelist::init_late() */
void whitelist::init_late(void)
{
char cVar1;
int4 uVar2;
char *pcVar3;
int8 uVar4;
long lVar5;
istream *piVar6;
int8 *puVar7;
long *local_240;
int8 local_238;
long local_230 [2];
int1 *local_220;
int8 local_218;
int1 local_210;
int7 uStack_20f;
long local_200;
long *local_1f8 [2];
long local_1e8 [2];
long *local_1d8 [2];
long local_1c8 [2];
long *local_1b8;
int8 uStack_1b0;
long local_1a8 [13];
ios_base local_140 [272];
emhash8::
HashMap<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::clear((HashMap<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)whitelist_map_abi_cxx11_);
cVar1 = ConfigBoolean::get_value((ConfigBoolean *)enabled);
if (cVar1 != '\0') {
pcVar3 = (char *)ConfigString::get((ConfigString *)filename);
/* try { // try from 00134296 to 001342aa has its CatchHandler @ 00134627 */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_1b8,pcVar3,(allocator *)&local_240);
/* try { // try from 001342ab to 001342b7 has its CatchHandler @ 00134602 */
cVar1 = strtools::is_whitespace((string *)&local_1b8);
if (local_1b8 != local_1a8) {
operator_delete(local_1b8,local_1a8[0] + 1);
}
if (cVar1 != '\0') {
uVar4 = spdlog::default_logger_raw();
local_1b8 = (long *)0x0;
uStack_1b0 = 0;
local_1a8[0] = 0;
spdlog::logger::log_<char_const*const&>
(uVar4,3,"whitelist: enabled but filename is empty, using default ({})",0x3c,
&DEFAULT_FILENAME);
ConfigString::set((ConfigString *)filename,"whitelist.txt");
}
uVar4 = ConfigString::get((ConfigString *)filename);
lVar5 = PHYSFS_openRead(uVar4);
if (lVar5 == 0) {
local_240 = (long *)ConfigString::get((ConfigString *)filename);
uVar2 = PHYSFS_getLastErrorCode();
local_220 = (int1 *)PHYSFS_getErrorByCode(uVar2);
uVar4 = spdlog::default_logger_raw();
local_1b8 = (long *)0x0;
uStack_1b0 = 0;
local_1a8[0] = 0;
spdlog::logger::log_<char_const*,char_const*>
(uVar4,3,"whitelist: {}: {}",0x11,&local_240,&local_220,0,0,0);
ConfigBoolean::set_value((ConfigBoolean *)enabled,false);
}
else {
cVar1 = PHYSFS_fileLength(lVar5);
local_240 = local_230;
/* try { // try from 00134378 to 00134386 has its CatchHandler @ 00134600 */
std::__cxx11::string::_M_construct((ulong)&local_240,cVar1);
/* try { // try from 00134391 to 001343a0 has its CatchHandler @ 0013462f */
PHYSFS_readBytes(lVar5,local_240,local_238);
PHYSFS_close(lVar5);
/* try { // try from 001343a1 to 001343bf has its CatchHandler @ 001345fe */
local_200 = lVar5;
std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,&local_240,8);
local_220 = &local_210;
local_218 = 0;
local_210 = 0;
while( true ) {
/* try { // try from 001343fc to 00134413 has its CatchHandler @ 00134684 */
cVar1 = std::ios::widen((char)local_1b8[-3] + (char)(istream *)&local_1b8);
piVar6 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)&local_1b8,(string *)&local_220,cVar1);
if (((byte)piVar6[*(long *)(*(long *)piVar6 + -0x18) + 0x20] & 5) != 0) break;
lVar5 = std::__cxx11::string::rfind((char)(string *)&local_220,0x3a);
uVar4 = server_game::password_hash;
if (lVar5 == -1) {
puVar7 = (int8 *)
emhash8::
HashMap<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::operator[]((HashMap<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)whitelist_map_abi_cxx11_,(string *)&local_220);
*puVar7 = uVar4;
}
else {
/* try { // try from 00134444 to 00134456 has its CatchHandler @ 00134682 */
std::__cxx11::string::substr((ulong)local_1d8,(ulong)&local_220);
/* try { // try from 0013445a to 0013446e has its CatchHandler @ 00134658 */
std::__cxx11::string::substr((ulong)local_1f8,(ulong)&local_220);
/* try { // try from 0013446f to 00134478 has its CatchHandler @ 00134637 */
uVar4 = crc64::get((string *)local_1f8,0);
puVar7 = (int8 *)
emhash8::
HashMap<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::operator[]((HashMap<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)whitelist_map_abi_cxx11_,(string *)local_1d8);
*puVar7 = uVar4;
if (local_1f8[0] != local_1e8) {
operator_delete(local_1f8[0],local_1e8[0] + 1);
}
if (local_1d8[0] != local_1c8) {
operator_delete(local_1d8[0],local_1c8[0] + 1);
}
}
}
/* try { // try from 001344f1 to 001344fa has its CatchHandler @ 001345f9 */
PHYSFS_close(local_200);
if (local_220 != &local_210) {
operator_delete(local_220,CONCAT71(uStack_20f,local_210) + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8);
std::ios_base::~ios_base(local_140);
if (local_240 != local_230) {
operator_delete(local_240,local_230[0] + 1);
}
}
}
return;
}
| |
52,077 | diff | eloqsql/strings/dtoa.c | static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int i, wa, wb;
ULong *xa, *xae, *xb, *xbe, *xc;
ULLong borrow, y;
i= cmp(a,b);
if (!i)
{
c= Balloc(0, alloc);
c->wds= 1;
c->p.x[0]= 0;
return c;
}
if (i < 0)
{
c= a;
a= b;
b= c;
i= 1;
}
else
i= 0;
c= Balloc(a->k, alloc);
c->sign= i;
wa= a->wds;
xa= a->p.x;
xae= xa + wa;
wb= b->wds;
xb= b->p.x;
xbe= xb + wb;
xc= c->p.x;
borrow= 0;
do
{
y= (ULLong)*xa++ - *xb++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (xb < xbe);
while (xa < xae)
{
y= *xa++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (!*--xc)
wa--;
c->wds= wa;
return c;
} | O0 | c | diff:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa8990
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xa87ce
movq -0x20(%rbp), %rsi
xorl %edi, %edi
callq 0xa7ea0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa897a
cmpl $0x0, -0x2c(%rbp)
jge 0xa87f5
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x2c(%rbp)
jmp 0xa87fc
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rsi
callq 0xa7ea0
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
movq -0x50(%rbp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, -0x50(%rbp)
movl (%rcx), %ecx
subq %rcx, %rax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jb 0xa887d
jmp 0xa88e7
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0xa893d
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
jmp 0xa88e7
jmp 0xa893f
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa895d
jmp 0xa8968
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa893f
movl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| diff:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call cmp
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_A87CE
mov rsi, [rbp+var_20]
xor edi, edi
call Balloc
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov rax, [rbp+var_28]
mov rax, [rax]
mov dword ptr [rax], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp loc_A897A
loc_A87CE:
cmp [rbp+var_2C], 0
jge short loc_A87F5
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_10], rax
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov [rbp+var_2C], 1
jmp short loc_A87FC
loc_A87F5:
mov [rbp+var_2C], 0
loc_A87FC:
mov rax, [rbp+var_10]
mov edi, [rax+8]
mov rsi, [rbp+var_20]
call Balloc
mov [rbp+var_28], rax
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov eax, [rax+14h]
mov [rbp+var_34], eax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_34]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_60], rax
mov [rbp+var_68], 0
loc_A887D:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
mov rcx, [rbp+var_50]
mov rdx, rcx
add rdx, 4
mov [rbp+var_50], rdx
mov ecx, [rcx]
sub rax, rcx
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jb short loc_A887D
jmp short $+2
loc_A88E7:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnb short loc_A893D
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
jmp short loc_A88E7
loc_A893D:
jmp short $+2
loc_A893F:
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_A895D
jmp short loc_A8968
loc_A895D:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_A893F
loc_A8968:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+14h], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_A897A:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long diff(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rcx
_DWORD *v5; // rax
unsigned int *v6; // rax
_DWORD *v7; // rax
_DWORD *v8; // rax
unsigned long long v10; // [rsp+0h] [rbp-70h]
unsigned long long v11; // [rsp+0h] [rbp-70h]
long long v12; // [rsp+8h] [rbp-68h]
_DWORD *v13; // [rsp+10h] [rbp-60h]
unsigned long long v14; // [rsp+18h] [rbp-58h]
unsigned int *v15; // [rsp+20h] [rbp-50h]
unsigned long long v16; // [rsp+28h] [rbp-48h]
unsigned int *v17; // [rsp+30h] [rbp-40h]
int v18; // [rsp+40h] [rbp-30h]
int v19; // [rsp+44h] [rbp-2Ch]
int v20; // [rsp+44h] [rbp-2Ch]
long long v21; // [rsp+48h] [rbp-28h]
long long v22; // [rsp+48h] [rbp-28h]
unsigned int **v24; // [rsp+58h] [rbp-18h]
unsigned int **v25; // [rsp+60h] [rbp-10h]
v25 = a1;
v24 = a2;
v19 = cmp(a1, a2);
if ( v19 )
{
if ( v19 >= 0 )
{
v20 = 0;
}
else
{
v25 = a2;
v24 = a1;
v20 = 1;
}
v22 = Balloc(*((_DWORD *)v25 + 2), a3);
*(_DWORD *)(v22 + 16) = v20;
v18 = *((_DWORD *)v25 + 5);
v17 = *v25;
v16 = (unsigned long long)&(*v25)[v18];
v15 = *v24;
v14 = (unsigned long long)&(*v24)[*((int *)v24 + 5)];
v13 = *(_DWORD **)v22;
v12 = 0LL;
do
{
v3 = v17++;
v4 = v15++;
v10 = *v3 - (unsigned long long)*v4 - v12;
v12 = HIDWORD(v10) & 1;
v5 = v13++;
*v5 = v10;
}
while ( (unsigned long long)v15 < v14 );
while ( (unsigned long long)v17 < v16 )
{
v6 = v17++;
v11 = *v6 - v12;
v12 = HIDWORD(v11) & 1;
v7 = v13++;
*v7 = v11;
}
while ( 1 )
{
v8 = v13--;
if ( *(v8 - 1) )
break;
--v18;
}
*(_DWORD *)(v22 + 20) = v18;
return v22;
}
else
{
v21 = Balloc(0, a3);
*(_DWORD *)(v21 + 20) = 1;
**(_DWORD **)v21 = 0;
return v21;
}
}
| diff:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a8990
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001a87ce
MOV RSI,qword ptr [RBP + -0x20]
XOR EDI,EDI
CALL 0x001a7ea0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a897a
LAB_001a87ce:
CMP dword ptr [RBP + -0x2c],0x0
JGE 0x001a87f5
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x001a87fc
LAB_001a87f5:
MOV dword ptr [RBP + -0x2c],0x0
LAB_001a87fc:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a7ea0
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x34]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x68],0x0
LAB_001a887d:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x50]
MOV RDX,RCX
ADD RDX,0x4
MOV qword ptr [RBP + -0x50],RDX
MOV ECX,dword ptr [RCX]
SUB RAX,RCX
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JC 0x001a887d
JMP 0x001a88e7
LAB_001a88e7:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x001a893d
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
JMP 0x001a88e7
LAB_001a893d:
JMP 0x001a893f
LAB_001a893f:
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001a895d
JMP 0x001a8968
LAB_001a895d:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001a893f
LAB_001a8968:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001a897a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
int8 * diff(int8 *param_1,int8 *param_2,int8 param_3)
{
uint *puVar1;
uint *puVar2;
int iVar3;
ulong uVar4;
uint *puVar5;
uint *puVar6;
int4 *puVar7;
ulong local_70;
int4 *local_68;
uint *local_58;
uint *local_48;
int local_38;
uint local_34;
int8 *local_20;
int8 *local_18;
int8 *local_10;
iVar3 = cmp(param_1,param_2);
if (iVar3 == 0) {
local_10 = (int8 *)Balloc(0,param_3);
*(int4 *)((long)local_10 + 0x14) = 1;
*(int4 *)*local_10 = 0;
}
else {
local_20 = param_2;
local_18 = param_1;
if (iVar3 < 0) {
local_20 = param_1;
local_18 = param_2;
}
local_34 = (uint)(iVar3 < 0);
local_10 = (int8 *)Balloc(*(int4 *)(local_18 + 1),param_3);
*(uint *)(local_10 + 2) = local_34;
local_38 = *(int *)((long)local_18 + 0x14);
puVar1 = (uint *)*local_18;
iVar3 = *(int *)((long)local_20 + 0x14);
puVar2 = (uint *)*local_20;
local_70 = 0;
local_68 = (int4 *)*local_10;
local_58 = puVar2;
local_48 = puVar1;
do {
puVar5 = local_48 + 1;
puVar6 = local_58 + 1;
uVar4 = ((ulong)*local_48 - (ulong)*local_58) - local_70;
local_70 = uVar4 >> 0x20 & 1;
puVar7 = local_68 + 1;
*local_68 = (int)uVar4;
local_68 = puVar7;
local_58 = puVar6;
local_48 = puVar5;
} while (puVar6 < puVar2 + iVar3);
while (local_48 < puVar1 + local_38) {
uVar4 = *local_48 - local_70;
local_70 = uVar4 >> 0x20 & 1;
*local_68 = (int)uVar4;
local_68 = local_68 + 1;
local_48 = local_48 + 1;
}
while (local_68[-1] == 0) {
local_38 = local_38 + -1;
local_68 = local_68 + -1;
}
*(int *)((long)local_10 + 0x14) = local_38;
}
return local_10;
}
| |
52,078 | lexer_create | eshkol/src/frontend/lexer/lexer.c | Lexer* lexer_create(Arena* arena, StringTable* strings, DiagnosticContext* diag, const char* source) {
assert(arena != NULL);
assert(strings != NULL);
assert(diag != NULL);
assert(source != NULL);
Lexer* lexer = arena_alloc(arena, sizeof(Lexer));
if (!lexer) {
return NULL;
}
lexer->arena = arena;
lexer->strings = strings;
lexer->diag = diag;
lexer->source = source;
lexer->start = source;
lexer->current = source;
lexer->line = 1;
lexer->column = 1;
lexer->had_error = false;
return lexer;
} | O3 | c | lexer_create:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x4107
movq %rsi, %r15
testq %rsi, %rsi
je 0x4126
movq %rdx, %r14
testq %rdx, %rdx
je 0x4145
movq %rcx, %rbx
testq %rcx, %rcx
je 0x4164
movq %rdi, %r12
movl $0x48, %esi
callq 0x32ff
testq %rax, %rax
je 0x40fe
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq %rbx, 0x20(%rax)
movq %rbx, 0x28(%rax)
movl $0x1, %ecx
movq %rcx, 0x30(%rax)
movq %rcx, 0x38(%rax)
movb $0x0, 0x40(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x613c(%rip), %rdi # 0xa24a
leaq 0x784b(%rip), %rsi # 0xb960
leaq 0x7887(%rip), %rcx # 0xb9a3
movl $0x17, %edx
callq 0x10b0
leaq 0x6191(%rip), %rdi # 0xa2be
leaq 0x782c(%rip), %rsi # 0xb960
leaq 0x7868(%rip), %rcx # 0xb9a3
movl $0x18, %edx
callq 0x10b0
leaq 0x6183(%rip), %rdi # 0xa2cf
leaq 0x780d(%rip), %rsi # 0xb960
leaq 0x7849(%rip), %rcx # 0xb9a3
movl $0x19, %edx
callq 0x10b0
leaq 0x7887(%rip), %rdi # 0xb9f2
leaq 0x77ee(%rip), %rsi # 0xb960
leaq 0x782a(%rip), %rcx # 0xb9a3
movl $0x1a, %edx
callq 0x10b0
| lexer_create:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
test rdi, rdi
jz short loc_4107
mov r15, rsi
test rsi, rsi
jz short loc_4126
mov r14, rdx
test rdx, rdx
jz loc_4145
mov rbx, rcx
test rcx, rcx
jz loc_4164
mov r12, rdi
mov esi, 48h ; 'H'
call arena_alloc
test rax, rax
jz short loc_40FE
mov [rax], r12
mov [rax+8], r15
mov [rax+10h], r14
mov [rax+18h], rbx
mov [rax+20h], rbx
mov [rax+28h], rbx
mov ecx, 1
mov [rax+30h], rcx
mov [rax+38h], rcx
mov byte ptr [rax+40h], 0
loc_40FE:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_4107:
lea rdi, aArenaNull+1; "arena != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aLexerLexerCrea; "Lexer *lexer_create(Arena *, StringTabl"...
mov edx, 17h
call ___assert_fail
loc_4126:
lea rdi, aStringsNull+1; "strings != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aLexerLexerCrea; "Lexer *lexer_create(Arena *, StringTabl"...
mov edx, 18h
call ___assert_fail
loc_4145:
lea rdi, aDiagNull+1; "diag != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aLexerLexerCrea; "Lexer *lexer_create(Arena *, StringTabl"...
mov edx, 19h
call ___assert_fail
loc_4164:
lea rdi, aSourceNull; "source != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aLexerLexerCrea; "Lexer *lexer_create(Arena *, StringTabl"...
mov edx, 1Ah
call ___assert_fail
| long long lexer_create(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",
23LL,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
if ( !a2 )
__assert_fail(
"strings != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",
24LL,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
if ( !a3 )
__assert_fail(
"diag != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",
25LL,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
if ( !a4 )
__assert_fail(
"source != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",
26LL,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
result = arena_alloc(a1, 72LL);
if ( result )
{
*(_QWORD *)result = a1;
*(_QWORD *)(result + 8) = a2;
*(_QWORD *)(result + 16) = a3;
*(_QWORD *)(result + 24) = a4;
*(_QWORD *)(result + 32) = a4;
*(_QWORD *)(result + 40) = a4;
*(_QWORD *)(result + 48) = 1LL;
*(_QWORD *)(result + 56) = 1LL;
*(_BYTE *)(result + 64) = 0;
}
return result;
}
| lexer_create:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST RDI,RDI
JZ 0x00104107
MOV R15,RSI
TEST RSI,RSI
JZ 0x00104126
MOV R14,RDX
TEST RDX,RDX
JZ 0x00104145
MOV RBX,RCX
TEST RCX,RCX
JZ 0x00104164
MOV R12,RDI
MOV ESI,0x48
CALL 0x001032ff
TEST RAX,RAX
JZ 0x001040fe
MOV qword ptr [RAX],R12
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [RAX + 0x10],R14
MOV qword ptr [RAX + 0x18],RBX
MOV qword ptr [RAX + 0x20],RBX
MOV qword ptr [RAX + 0x28],RBX
MOV ECX,0x1
MOV qword ptr [RAX + 0x30],RCX
MOV qword ptr [RAX + 0x38],RCX
MOV byte ptr [RAX + 0x40],0x0
LAB_001040fe:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00104107:
LEA RDI,[0x10a24a]
LEA RSI,[0x10b960]
LEA RCX,[0x10b9a3]
MOV EDX,0x17
CALL 0x001010b0
LAB_00104126:
LEA RDI,[0x10a2be]
LEA RSI,[0x10b960]
LEA RCX,[0x10b9a3]
MOV EDX,0x18
CALL 0x001010b0
LAB_00104145:
LEA RDI,[0x10a2cf]
LEA RSI,[0x10b960]
LEA RCX,[0x10b9a3]
MOV EDX,0x19
CALL 0x001010b0
LAB_00104164:
LEA RDI,[0x10b9f2]
LEA RSI,[0x10b960]
LEA RCX,[0x10b9a3]
MOV EDX,0x1a
CALL 0x001010b0
|
void lexer_create(long param_1,long param_2,long param_3,long param_4)
{
long *plVar1;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",0x17,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
}
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("strings != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",0x18,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
}
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("diag != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",0x19,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
}
if (param_4 != 0) {
plVar1 = (long *)arena_alloc(param_1,0x48);
if (plVar1 != (long *)0x0) {
*plVar1 = param_1;
plVar1[1] = param_2;
plVar1[2] = param_3;
plVar1[3] = param_4;
plVar1[4] = param_4;
plVar1[5] = param_4;
plVar1[6] = 1;
plVar1[7] = 1;
*(int1 *)(plVar1 + 8) = 0;
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("source != NULL",
"/workspace/llm4binary/github2025/eshkol/src/frontend/lexer/lexer.c",0x1a,
"Lexer *lexer_create(Arena *, StringTable *, DiagnosticContext *, const char *)");
}
| |
52,079 | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void
Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O0 | c | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x3, %eax
ja 0x1af2c0
movq -0x10(%rbp), %rax
leaq 0x4b4cd(%rip), %rcx # 0x1fa758
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0xd78e0
jmp 0x1af2c9
movq -0x8(%rbp), %rdi
callq 0xcce60
jmp 0x1af2c9
movq -0x8(%rbp), %rdi
callq 0xcb5d0
jmp 0x1af2c9
movq -0x8(%rbp), %rdi
callq 0xcfa80
jmp 0x1af2c9
movq -0x8(%rbp), %rdi
callq 0xcbbf0
addq $0x10, %rsp
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5ApplyERKNS4_10ParametersE:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov eax, [rax+8]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_10], rcx
sub eax, 3
ja short def_1AF292; jumptable 00000000001AF292 default case
mov rax, [rbp+var_10]
lea rcx, jpt_1AF292
movsxd rax, ds:(jpt_1AF292 - 1FA758h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1AF294:
mov rdi, [rbp+var_8]; jumptable 00000000001AF292 case 1
call __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi1EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<1>(OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Parameters const&)
jmp short loc_1AF2C9
loc_1AF29F:
mov rdi, [rbp+var_8]; jumptable 00000000001AF292 case 2
call __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi2EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Parameters const&)
jmp short loc_1AF2C9
loc_1AF2AA:
mov rdi, [rbp+var_8]; jumptable 00000000001AF292 case 3
call __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi3EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<3>(OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Parameters const&)
jmp short loc_1AF2C9
loc_1AF2B5:
mov rdi, [rbp+var_8]; jumptable 00000000001AF292 case 4
call __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi4EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<4>(OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Parameters const&)
jmp short loc_1AF2C9
def_1AF292:
mov rdi, [rbp+var_8]; jumptable 00000000001AF292 default case
call __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi0EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Parameters const&)
loc_1AF2C9:
add rsp, 10h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<1>(a1);
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<2>(a1);
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<3>(a1);
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<4>(a1);
break;
default:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<0>(a1);
break;
}
return result;
}
| |||
52,080 | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void
Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O1 | c | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&):
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x39d80
leaq 0x28d19(%rip), %rcx # 0xc1478
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x3c440
jmp 0x39c10
jmp 0x3a9a0
jmp 0x3a190
| _ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5ApplyERKNS4_10ParametersE:
mov eax, [rdi+8]
dec eax; switch 4 cases
cmp eax, 3
ja __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi0EEEvRKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Parameters const&)
lea rcx, jpt_98766
movsxd rax, ds:(jpt_98766 - 0C1478h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_98768:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi1EEEvRKNS4_10ParametersE; jumptable 0000000000098766 case 1
loc_9876D:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi3EEEvRKNS4_10ParametersE; jumptable 0000000000098766 case 3
loc_98772:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi4EEEvRKNS4_10ParametersE; jumptable 0000000000098766 case 4
loc_98777:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points18CombineConsecutiveIdE5applyILi2EEEvRKNS4_10ParametersE; jumptable 0000000000098766 case 2
| long long OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<1>();
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<2>();
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<3>();
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::apply<4>();
break;
default:
JUMPOUT(0x39D80LL);
}
return result;
}
| Apply:
MOV EAX,dword ptr [RDI + 0x8]
DEC EAX
CMP EAX,0x3
JA 0x00139d80
LEA RCX,[0x1c1478]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
JMP 0x0013c440
caseD_3:
JMP 0x00139c10
caseD_4:
JMP 0x0013a9a0
caseD_2:
JMP 0x0013a190
|
/* OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Parameters
const&) */
void OpenSubdiv::v3_6_0::Bfr::points::CombineConsecutive<double>::Apply(Parameters *param_1)
{
switch(*(int4 *)(param_1 + 8)) {
case 1:
apply<1>(param_1);
return;
case 2:
apply<2>(param_1);
return;
case 3:
apply<3>(param_1);
return;
case 4:
apply<4>(param_1);
return;
default:
(*(code *)PTR_apply<0>_001deec0)();
return;
}
}
| |
52,081 | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void
Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O2 | c | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&):
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x522d0
leaq 0x27339(%rip), %rcx # 0xcbfd4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x51e90
jmp 0x51bb0
jmp 0x500b0
jmp 0x51280
| _ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5ApplyERKNS2_27CommonCombinationParametersIdEE:
mov eax, [rdi+8]
dec eax; switch 4 cases
cmp eax, 3
ja __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi0EEEvRKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&)
lea rcx, jpt_A4CA2
movsxd rax, ds:(jpt_A4CA2 - 0CBFD4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_A4CA4:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi1EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 00000000000A4CA2 case 1
loc_A4CA9:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi3EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 00000000000A4CA2 case 3
loc_A4CAE:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi4EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 00000000000A4CA2 case 4
loc_A4CB3:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi2EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 00000000000A4CA2 case 2
| long long OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<1>();
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<2>();
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<3>();
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<4>();
break;
default:
JUMPOUT(0x522D0LL);
}
return result;
}
| Apply:
MOV EAX,dword ptr [RDI + 0x8]
DEC EAX
CMP EAX,0x3
JA 0x001522d0
LEA RCX,[0x1cbfd4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
JMP 0x00151e90
caseD_3:
JMP 0x00151bb0
caseD_4:
JMP 0x001500b0
caseD_2:
JMP 0x00151280
|
/* OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double>
const&) */
void OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply
(CommonCombinationParameters *param_1)
{
switch(*(int4 *)(param_1 + 8)) {
case 1:
apply<1>(param_1);
return;
case 2:
apply<2>(param_1);
return;
case 3:
apply<3>(param_1);
return;
case 4:
apply<4>(param_1);
return;
default:
(*(code *)PTR_apply<0>_001f2968)();
return;
}
}
| |
52,082 | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h | static void
Apply(Parameters const & parameters) {
switch (parameters.pointSize) {
case 1: apply<1>(parameters); break;
case 2: apply<2>(parameters); break;
case 3: apply<3>(parameters); break;
case 4: apply<4>(parameters); break;
default: apply<>(parameters); break;
}
} | O3 | c | OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&):
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x3, %eax
ja 0x39f00
leaq 0x29f53(%rip), %rcx # 0xc4cb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x39c90
jmp 0x39aa0
jmp 0x38aa0
jmp 0x39530
| _ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5ApplyERKNS2_27CommonCombinationParametersIdEE:
mov eax, [rdi+8]
dec eax; switch 4 cases
cmp eax, 3
ja __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi0EEEvRKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&)
lea rcx, jpt_9AD64
movsxd rax, ds:(jpt_9AD64 - 0C4CB0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9AD66:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi1EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 000000000009AD64 case 1
loc_9AD6B:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi3EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 000000000009AD64 case 3
loc_9AD70:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi4EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 000000000009AD64 case 4
loc_9AD75:
jmp __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5applyILi2EEEvRKNS2_27CommonCombinationParametersIdEE; jumptable 000000000009AD64 case 2
| long long OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(long long a1)
{
long long result; // rax
switch ( *(_DWORD *)(a1 + 8) )
{
case 1:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<1>();
break;
case 2:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<2>();
break;
case 3:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<3>();
break;
case 4:
result = OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::apply<4>();
break;
default:
JUMPOUT(0x39F00LL);
}
return result;
}
| Apply:
MOV EAX,dword ptr [RDI + 0x8]
DEC EAX
CMP EAX,0x3
JA 0x00139f00
LEA RCX,[0x1c4cb0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
JMP 0x00139c90
caseD_3:
JMP 0x00139aa0
caseD_4:
JMP 0x00138aa0
caseD_2:
JMP 0x00139530
|
/* OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double>
const&) */
void OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply
(CommonCombinationParameters *param_1)
{
switch(*(int4 *)(param_1 + 8)) {
case 1:
apply<1>(param_1);
return;
case 2:
apply<2>(param_1);
return;
case 3:
apply<3>(param_1);
return;
case 4:
apply<4>(param_1);
return;
default:
(*(code *)PTR_apply<0>_001e2f80)();
return;
}
}
| |
52,083 | GetSplinePointBezierQuad | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | Vector2 GetSplinePointBezierQuad(Vector2 startPos, Vector2 controlPos, Vector2 endPos, float t)
{
Vector2 point = { 0 };
float a = powf(1.0f - t, 2);
float b = 2.0f*(1.0f - t)*t;
float c = powf(t, 2);
point.y = a*startPos.y + b*controlPos.y + c*endPos.y;
point.x = a*startPos.x + b*controlPos.x + c*endPos.x;
return point;
} | O2 | c | GetSplinePointBezierQuad:
movss 0x4dfb8(%rip), %xmm4 # 0xb969c
subss %xmm3, %xmm4
movaps %xmm4, %xmm5
mulss %xmm4, %xmm5
addss %xmm4, %xmm4
mulss %xmm3, %xmm4
mulss %xmm3, %xmm3
shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0]
mulps %xmm1, %xmm4
shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0]
mulps %xmm5, %xmm0
addps %xmm4, %xmm0
shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0]
mulps %xmm2, %xmm3
addps %xmm3, %xmm0
retq
| GetSplinePointBezierQuad:
movss xmm4, cs:dword_B969C
subss xmm4, xmm3
movaps xmm5, xmm4
mulss xmm5, xmm4
addss xmm4, xmm4
mulss xmm4, xmm3
mulss xmm3, xmm3
shufps xmm4, xmm4, 0
mulps xmm4, xmm1
shufps xmm5, xmm5, 0
mulps xmm0, xmm5
addps xmm0, xmm4
shufps xmm3, xmm3, 0
mulps xmm3, xmm2
addps xmm0, xmm3
retn
| __m128 GetSplinePointBezierQuad(__m128 a1, __m128 a2, __m128 a3, __m128 a4)
{
__m128 v4; // xmm4
__m128 v5; // xmm5
v4 = (__m128)0x3F800000u;
v4.m128_f32[0] = 1.0 - a4.m128_f32[0];
v5 = v4;
v5.m128_f32[0] = v4.m128_f32[0] * v4.m128_f32[0];
v4.m128_f32[0] = (float)(v4.m128_f32[0] + v4.m128_f32[0]) * a4.m128_f32[0];
a4.m128_f32[0] = a4.m128_f32[0] * a4.m128_f32[0];
return _mm_add_ps(
_mm_add_ps(_mm_mul_ps(a1, _mm_shuffle_ps(v5, v5, 0)), _mm_mul_ps(_mm_shuffle_ps(v4, v4, 0), a2)),
_mm_mul_ps(_mm_shuffle_ps(a4, a4, 0), a3));
}
| GetSplinePointBezierQuad:
MOVSS XMM4,dword ptr [0x001b969c]
SUBSS XMM4,XMM3
MOVAPS XMM5,XMM4
MULSS XMM5,XMM4
ADDSS XMM4,XMM4
MULSS XMM4,XMM3
MULSS XMM3,XMM3
SHUFPS XMM4,XMM4,0x0
MULPS XMM4,XMM1
SHUFPS XMM5,XMM5,0x0
MULPS XMM0,XMM5
ADDPS XMM0,XMM4
SHUFPS XMM3,XMM3,0x0
MULPS XMM3,XMM2
ADDPS XMM0,XMM3
RET
|
int8
GetSplinePointBezierQuad(int8 param_1,int8 param_2,int8 param_3,float param_4)
{
float fVar1;
float fVar2;
fVar1 = DAT_001b969c - param_4;
fVar2 = (fVar1 + fVar1) * param_4;
return CONCAT44((float)((ulong)param_1 >> 0x20) * fVar1 * fVar1 +
fVar2 * (float)((ulong)param_2 >> 0x20) +
param_4 * param_4 * (float)((ulong)param_3 >> 0x20),
(float)param_1 * fVar1 * fVar1 + fVar2 * (float)param_2 +
param_4 * param_4 * (float)param_3);
}
| |
52,084 | GetSplinePointBezierQuad | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | Vector2 GetSplinePointBezierQuad(Vector2 startPos, Vector2 controlPos, Vector2 endPos, float t)
{
Vector2 point = { 0 };
float a = powf(1.0f - t, 2);
float b = 2.0f*(1.0f - t)*t;
float c = powf(t, 2);
point.y = a*startPos.y + b*controlPos.y + c*endPos.y;
point.x = a*startPos.x + b*controlPos.x + c*endPos.x;
return point;
} | O3 | c | GetSplinePointBezierQuad:
movss 0x558cd(%rip), %xmm4 # 0xd3b1c
subss %xmm3, %xmm4
movaps %xmm4, %xmm5
mulss %xmm4, %xmm5
addss %xmm4, %xmm4
mulss %xmm3, %xmm4
mulss %xmm3, %xmm3
shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0]
mulps %xmm1, %xmm4
shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0]
mulps %xmm5, %xmm0
addps %xmm4, %xmm0
shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0]
mulps %xmm2, %xmm3
addps %xmm3, %xmm0
retq
| GetSplinePointBezierQuad:
movss xmm4, cs:dword_D3B1C
subss xmm4, xmm3
movaps xmm5, xmm4
mulss xmm5, xmm4
addss xmm4, xmm4
mulss xmm4, xmm3
mulss xmm3, xmm3
shufps xmm4, xmm4, 0
mulps xmm4, xmm1
shufps xmm5, xmm5, 0
mulps xmm0, xmm5
addps xmm0, xmm4
shufps xmm3, xmm3, 0
mulps xmm3, xmm2
addps xmm0, xmm3
retn
| __m128 GetSplinePointBezierQuad(__m128 a1, __m128 a2, __m128 a3, __m128 a4)
{
__m128 v4; // xmm4
__m128 v5; // xmm5
v4 = (__m128)0x3F800000u;
v4.m128_f32[0] = 1.0 - a4.m128_f32[0];
v5 = v4;
v5.m128_f32[0] = v4.m128_f32[0] * v4.m128_f32[0];
v4.m128_f32[0] = (float)(v4.m128_f32[0] + v4.m128_f32[0]) * a4.m128_f32[0];
a4.m128_f32[0] = a4.m128_f32[0] * a4.m128_f32[0];
return _mm_add_ps(
_mm_add_ps(_mm_mul_ps(a1, _mm_shuffle_ps(v5, v5, 0)), _mm_mul_ps(_mm_shuffle_ps(v4, v4, 0), a2)),
_mm_mul_ps(_mm_shuffle_ps(a4, a4, 0), a3));
}
| GetSplinePointBezierQuad:
MOVSS XMM4,dword ptr [0x001d3b1c]
SUBSS XMM4,XMM3
MOVAPS XMM5,XMM4
MULSS XMM5,XMM4
ADDSS XMM4,XMM4
MULSS XMM4,XMM3
MULSS XMM3,XMM3
SHUFPS XMM4,XMM4,0x0
MULPS XMM4,XMM1
SHUFPS XMM5,XMM5,0x0
MULPS XMM0,XMM5
ADDPS XMM0,XMM4
SHUFPS XMM3,XMM3,0x0
MULPS XMM3,XMM2
ADDPS XMM0,XMM3
RET
|
int8
GetSplinePointBezierQuad(int8 param_1,int8 param_2,int8 param_3,float param_4)
{
float fVar1;
float fVar2;
fVar1 = DAT_001d3b1c - param_4;
fVar2 = (fVar1 + fVar1) * param_4;
return CONCAT44((float)((ulong)param_1 >> 0x20) * fVar1 * fVar1 +
fVar2 * (float)((ulong)param_2 >> 0x20) +
param_4 * param_4 * (float)((ulong)param_3 >> 0x20),
(float)param_1 * fVar1 * fVar1 + fVar2 * (float)param_2 +
param_4 * param_4 * (float)param_3);
}
| |
52,085 | GLOBAL__sub_I_crc32c.cc | eloqsql/mysys/crc32/crc32c.cc | static uint32_t cpuid_ecx()
{
#ifdef __GNUC__
uint32_t reax= 0, rebx= 0, recx= 0, redx= 0;
__cpuid(1, reax, rebx, recx, redx);
return recx;
#elif defined _MSC_VER
int regs[4];
__cpuid(regs, 1);
return regs[2];
#else
# error "unknown compiler"
#endif
} | O3 | cpp | GLOBAL__sub_I_crc32c.cc:
movl $0x1, %eax
xchgq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl $0x100002, %edx # imm = 0x100002
andl %edx, %ecx
cmpl $0x100000, %ecx # imm = 0x100000
leaq 0x7e575(%rip), %rsi # 0xb0043
leaq 0x7e64f(%rip), %rax # 0xb0124
cmoveq %rsi, %rax
cmpl %edx, %ecx
jne 0x31ae9
pushq %rbp
movq %rsp, %rbp
leaq 0x7e884(%rip), %rax # 0xb036c
popq %rbp
movq %rax, 0xbe0570(%rip) # 0xc12060
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _GLOBAL__sub_I_crc32c_cc:
mov eax, 1
xchg rsi, rbx
cpuid
xchg rsi, rbx
mov edx, 100002h
and ecx, edx
cmp ecx, offset xmmword_100000
lea rsi, _ZN15mysys_namespace6crc32cL12crc32c_sse42EjPKcm; mysys_namespace::crc32c::crc32c_sse42(uint,char const*,ulong)
lea rax, _ZN15mysys_namespace6crc32cL11crc32c_slowEjPKcm; mysys_namespace::crc32c::crc32c_slow(uint,char const*,ulong)
cmovz rax, rsi
cmp ecx, edx
jnz short loc_31AE9
push rbp
mov rbp, rsp
lea rax, crc32c_3way
pop rbp
loc_31AE9:
mov cs:_ZN15mysys_namespace6crc32cL12ChosenExtendE, rax; mysys_namespace::crc32c::ChosenExtend
retn
| long long ( *GLOBAL__sub_I_crc32c_cc())()
{
int v5; // ecx
long long ( *result)(); // rax
_RAX = 1LL;
__asm { cpuid }
v5 = _RCX & 0x100002;
result = (long long ( *)())mysys_namespace::crc32c::crc32c_slow;
if ( v5 == (_DWORD)&xmmword_100000 )
result = (long long ( *)())mysys_namespace::crc32c::crc32c_sse42;
if ( v5 == 1048578 )
result = crc32c_3way;
mysys_namespace::crc32c::ChosenExtend = (long long)result;
return result;
}
| _GLOBAL__sub_I_crc32c.cc:
MOV EAX,0x1
XCHG RBX,RSI
CPUID
XCHG RBX,RSI
MOV EDX,0x100002
AND ECX,EDX
CMP ECX,0x100000
LEA RSI,[0x1b0043]
LEA RAX,[0x1b0124]
CMOVZ RAX,RSI
CMP ECX,EDX
JNZ 0x00131ae9
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x1b036c]
POP RBP
LAB_00131ae9:
MOV qword ptr [0x00d12060],RAX
RET
|
/* WARNING: Removing unreachable block (ram,0x00131ab5) */
void _GLOBAL__sub_I_crc32c_cc(void)
{
long lVar1;
uint uVar2;
lVar1 = cpuid_Version_info(1);
uVar2 = *(uint *)(lVar1 + 0xc) & 0x100002;
mysys_namespace::crc32c::ChosenExtend = mysys_namespace::crc32c::crc32c_slow;
if (uVar2 == 0x100000) {
mysys_namespace::crc32c::ChosenExtend = mysys_namespace::crc32c::crc32c_sse42;
}
if (uVar2 == 0x100002) {
mysys_namespace::crc32c::ChosenExtend = crc32c_3way;
}
return;
}
| |
52,086 | evmone::Memory::allocate_capacity() | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/execution_state.hpp | void allocate_capacity() noexcept
{
m_data.reset(static_cast<uint8_t*>(std::realloc(m_data.release(), m_capacity)));
if (!m_data) [[unlikely]]
handle_out_of_memory();
} | O3 | cpp | evmone::Memory::allocate_capacity():
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x10(%rbx), %rsi
movq $0x0, (%rbx)
callq 0x21380
movq (%rbx), %rdi
movq %rax, (%rbx)
testq %rdi, %rdi
je 0x2f056
callq 0x21260
movq (%rbx), %rax
testq %rax, %rax
je 0x2f05d
popq %rbx
retq
callq 0x214d8
nop
| _ZN6evmone6Memory17allocate_capacityEv:
push rbx
mov rbx, rdi
mov rdi, [rdi]
mov rsi, [rbx+10h]
mov qword ptr [rbx], 0
call _realloc
mov rdi, [rbx]; this
mov [rbx], rax
test rdi, rdi
jz short loc_2F056
call _free
mov rax, [rbx]
loc_2F056:
test rax, rax
jz short loc_2F05D
pop rbx
retn
loc_2F05D:
call _ZN6evmone6Memory20handle_out_of_memoryEv; evmone::Memory::handle_out_of_memory(void)
| long long evmone::Memory::allocate_capacity(evmone::Memory *this)
{
long long v2; // rdi
long long v3; // rsi
long long result; // rax
evmone::Memory *v5; // rdi
v2 = *(_QWORD *)this;
v3 = *((_QWORD *)this + 2);
*(_QWORD *)this = 0LL;
result = realloc(v2, v3);
v5 = *(evmone::Memory **)this;
*(_QWORD *)this = result;
if ( v5 )
{
free();
result = *(_QWORD *)this;
}
if ( !result )
evmone::Memory::handle_out_of_memory(v5);
return result;
}
| allocate_capacity:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RBX + 0x10]
MOV qword ptr [RBX],0x0
CALL 0x00121380
MOV RDI,qword ptr [RBX]
MOV qword ptr [RBX],RAX
TEST RDI,RDI
JZ 0x0012f056
CALL 0x00121260
MOV RAX,qword ptr [RBX]
LAB_0012f056:
TEST RAX,RAX
JZ 0x0012f05d
POP RBX
RET
LAB_0012f05d:
CALL 0x001214d8
NOP
|
/* evmone::Memory::allocate_capacity() */
uint * __thiscall evmone::Memory::allocate_capacity(Memory *this)
{
uint uVar1;
long lVar2;
size_t __size;
long lVar3;
uint *puVar4;
int8 *puVar5;
void *pvVar6;
int8 *extraout_RDX;
int8 *__size_00;
int8 uVar7;
uint *__ptr;
int8 uVar8;
pvVar6 = *(void **)this;
__size_00 = *(int8 **)(this + 0x10);
*(int8 *)this = 0;
puVar4 = (uint *)realloc(pvVar6,(size_t)__size_00);
__ptr = *(uint **)this;
*(uint **)this = puVar4;
if (__ptr != (uint *)0x0) {
free(__ptr);
puVar4 = *(uint **)this;
}
if (puVar4 != (uint *)0x0) {
return puVar4;
}
handle_out_of_memory();
__size_00[0x3f] = extraout_RDX;
for (puVar5 = (int8 *)*extraout_RDX; puVar5 != (int8 *)0x0;
puVar5 = (int8 *)(*(code *)*puVar5)(puVar5)) {
}
uVar1 = *(uint *)(__size_00 + 0xf);
if ((uVar1 & 0xfffffffd) == 0) {
uVar8 = __size_00[0x44];
}
else {
uVar8 = 0;
}
if (uVar1 == 0) {
uVar7 = *__size_00;
}
else {
uVar7 = 0;
}
lVar2 = __size_00[0x10];
__size = __size_00[0x11];
if (lVar2 == 0 || __size != 0) {
lVar3 = __size_00[1];
__ptr[0xc] = 0;
__ptr[0xd] = 0;
__ptr[0xe] = 0;
__ptr[0xf] = 0;
__ptr[8] = 0;
__ptr[9] = 0;
__ptr[10] = 0;
__ptr[0xb] = 0;
__ptr[4] = 0;
__ptr[5] = 0;
__ptr[6] = 0;
__ptr[7] = 0;
__ptr[0] = 0;
__ptr[1] = 0;
__ptr[2] = 0;
__ptr[3] = 0;
__ptr[0x10] = 0;
__ptr[0x11] = 0;
if (__size != 0) {
pvVar6 = malloc(__size);
if (pvVar6 == (void *)0x0) {
*__ptr = 0xfffffffd;
return __ptr;
}
memcpy(pvVar6,(void *)(lVar2 + lVar3),__size);
*(void **)(__ptr + 6) = pvVar6;
*(size_t *)(__ptr + 8) = __size;
*(code **)(__ptr + 10) = evmc_free_result_memory;
}
*__ptr = uVar1;
*(int8 *)(__ptr + 2) = uVar8;
*(int8 *)(__ptr + 4) = uVar7;
return __ptr;
}
/* WARNING: Subroutine does not return */
__assert_fail("state.output_size != 0 || state.output_offset == 0",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/advanced_execution.cpp"
,0x18,
"evmc_result evmone::advanced::execute(AdvancedExecutionState &, const AdvancedCodeAnalysis &)"
);
}
| |
52,087 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&) | monkey531[P]llama/common/json.hpp | basic_json(basic_json&& other) noexcept
: json_base_class_t(std::forward<json_base_class_t>(other)),
m_data(std::move(other.m_data))
{
// check that passed value is valid
other.assert_invariant(false);
// invalidate payload
other.m_data.m_type = value_t::null;
other.m_data.m_value = {};
set_parents();
assert_invariant();
} | 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rcx
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x9fda0
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
callq 0xae910
jmp 0xae6ba
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x9fda0
addq $0x28, %rsp
retq
movq %rax, %rdi
callq 0x62ba0
nopw %cs:(%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov rcx, [rsp+28h+var_10]
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rax], xmm0
mov rdi, [rsp+28h+var_10]
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rsp+28h+var_20]
mov rax, [rsp+28h+var_10]
mov byte ptr [rax], 0
mov [rsp+28h+var_18], 0
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov [rax+8], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parents(void)
jmp short $+2
loc_AE6BA:
mov rdi, [rsp+28h+var_20]
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
add rsp, 28h
retn
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
_OWORD *a1,
long long a2)
{
*a1 = *(_OWORD *)a2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a2);
*(_BYTE *)a2 = 0;
*(_QWORD *)(a2 + 8) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents(a1);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((long long)a1);
}
| basic_json:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x18]
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RAX],XMM0
MOV RDI,qword ptr [RSP + 0x18]
XOR ESI,ESI
CALL 0x0019fda0
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_001ae6b3:
CALL 0x001ae910
JMP 0x001ae6ba
LAB_001ae6ba:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x0019fda0
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
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>
::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 uVar1;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
assert_invariant(SUB81(param_1,0));
*param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
/* try { // try from 001ae6b3 to 001ae6b7 has its CatchHandler @ 001ae6ce */
set_parents();
assert_invariant(SUB81(this,0));
return;
}
| |
52,088 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&) | monkey531[P]llama/common/json.hpp | basic_json(basic_json&& other) noexcept
: json_base_class_t(std::forward<json_base_class_t>(other)),
m_data(std::move(other.m_data))
{
// check that passed value is valid
other.assert_invariant(false);
// invalidate payload
other.m_data.m_type = value_t::null;
other.m_data.m_value = {};
set_parents();
assert_invariant();
} | 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3d20e
movb $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
pushq $0x1
popq %rsi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3d20e
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov rdi, rsi
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [rbx], 0
and qword ptr [rbx+8], 0
push 1
pop rsi
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp _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)
| 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>::basic_json(
char *a1,
long long a2)
{
*(_OWORD *)a1 = *(_OWORD *)a2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a2);
*(_BYTE *)a2 = 0;
*(_QWORD *)(a2 + 8) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1);
}
| basic_json:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,RSI
XOR ESI,ESI
CALL 0x0013d20e
MOV byte ptr [RBX],0x0
AND qword ptr [RBX + 0x8],0x0
PUSH 0x1
POP RSI
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0013d20e
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
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>
::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 uVar1;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
assert_invariant(SUB81(param_1,0));
*param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
assert_invariant(SUB81(this,0));
return;
}
| |
52,089 | my_free | eloqsql/mysys/my_malloc.c | void my_free(void *ptr)
{
my_memory_header *mh;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_free");
DBUG_PRINT("my",("ptr: %p", ptr));
if (ptr == NULL)
DBUG_VOID_RETURN;
mh= USER_TO_HEADER(ptr);
old_size= mh->m_size & ~1;
old_flags= mh->m_size & 1;
PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner);
update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags);
#ifndef SAFEMALLOC
/*
Trash memory if not safemalloc. We don't have to do this if safemalloc
is used as safemalloc will also do trashing
*/
TRASH_FREE(ptr, old_size);
#endif
sf_free(mh);
DBUG_VOID_RETURN;
} | O3 | c | my_free:
testq %rdi, %rdi
je 0xa4bf7
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq -0x18(%rdi), %rbx
movq -0x18(%rdi), %rdx
movq -0x10(%rdi), %r14
movq %r14, %r15
andq $-0x2, %r15
leaq 0x2e9609(%rip), %rax # 0x38e1c8
movq (%rax), %rax
movl -0x8(%rdi), %edi
movq %r15, %rsi
callq *0x3f8(%rax)
movq $-0x18, %rdi
subq %r15, %rdi
andl $0x1, %r14d
movl %r14d, %esi
callq *0x2e907b(%rip) # 0x38dc60
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2a160
retq
| my_free:
test rdi, rdi
jz short locret_A4BF7
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea rbx, [rdi-18h]
mov rdx, [rdi-18h]
mov r14, [rdi-10h]
mov r15, r14
and r15, 0FFFFFFFFFFFFFFFEh
lea rax, PSI_server
mov rax, [rax]
mov edi, [rdi-8]
mov rsi, r15
call qword ptr [rax+3F8h]
mov rdi, 0FFFFFFFFFFFFFFE8h
sub rdi, r15
and r14d, 1
mov esi, r14d
call cs:update_malloc_size
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _free
locret_A4BF7:
retn
| long long my_free(long long a1)
{
long long result; // rax
if ( a1 )
{
((void ( *)(_QWORD, unsigned long long, _QWORD))PSI_server[127])(
*(unsigned int *)(a1 - 8),
*(_QWORD *)(a1 - 16) & 0xFFFFFFFFFFFFFFFELL,
*(_QWORD *)(a1 - 24));
update_malloc_size();
return free(a1 - 24);
}
return result;
}
| my_free:
TEST RDI,RDI
JZ 0x001a4bf7
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA RBX,[RDI + -0x18]
MOV RDX,qword ptr [RDI + -0x18]
MOV R14,qword ptr [RDI + -0x10]
MOV R15,R14
AND R15,-0x2
LEA RAX,[0x48e1c8]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RDI + -0x8]
MOV RSI,R15
CALL qword ptr [RAX + 0x3f8]
MOV RDI,-0x18
SUB RDI,R15
AND R14D,0x1
MOV ESI,R14D
CALL qword ptr [0x0048dc60]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0012a160
LAB_001a4bf7:
RET
|
void my_free(long param_1)
{
ulong uVar1;
ulong uVar2;
if (param_1 != 0) {
uVar1 = *(ulong *)(param_1 + -0x10);
uVar2 = uVar1 & 0xfffffffffffffffe;
(**(code **)(PSI_server + 0x3f8))
(*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18));
(*(code *)update_malloc_size)(-0x18 - uVar2,(uint)uVar1 & 1);
free((void *)(param_1 + -0x18));
return;
}
return;
}
| |
52,090 | ma_hashtbl_delete | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | my_bool ma_hashtbl_delete(MA_HASHTBL *hash,uchar *record)
{
uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index;
MA_HASHTBL_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty;
if (!hash->records)
return(1);
blength=hash->blength;
data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*);
/* Search after record with key */
pos=data+ hash_mask(rec_hashnr(hash,record),blength,hash->records);
gpos = 0;
while (pos->data != record)
{
gpos=pos;
if (pos->next == NO_RECORD)
return(1); /* Key not found */
pos=data+pos->next;
}
if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1;
hash->current_record= NO_RECORD;
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->data=empty->data;
pos->next=empty->next;
}
if (empty == lastpos) /* last key at wrong pos or no next link */
goto exit;
/* Move the last key (lastpos) */
lastpos_hashnr=rec_hashnr(hash,lastpos->data);
/* pos is where lastpos should be */
pos=data+hash_mask(lastpos_hashnr,hash->blength,hash->records);
if (pos == empty) /* Move to empty position. */
{
empty[0]=lastpos[0];
goto exit;
}
pos_hashnr=rec_hashnr(hash,pos->data);
/* pos3 is where the pos should be */
pos3= data+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= hash_mask(lastpos_hashnr,blength,hash->records+1);
if (pos2 == 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:
ma_pop_dynamic(&hash->array);
if (hash->free)
(*hash->free)((uchar*) record);
return(0);
} | O0 | c | ma_hashtbl_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x45246
movb $0x1, -0x1(%rbp)
jmp 0x455c1
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x451a0
movl %eax, %edi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x44bc0
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x452dc
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x452c5
movb $0x1, -0x1(%rbp)
jmp 0x455c1
movq -0x38(%rbp), %rax
movq -0x50(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
jmp 0x4529d
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x8(%rcx)
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
shrl %ecx
cmpl %ecx, %eax
jae 0x45302
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
shrl %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x30(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x45352
movq -0x50(%rbp), %rax
movl (%rax), %ecx
movq -0x48(%rbp), %rax
movl %ecx, (%rax)
jmp 0x45393
movq -0x50(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x45391
movq -0x38(%rbp), %rax
movq -0x50(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x30(%rbp)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rax
movl (%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
jmp 0x45393
movq -0x60(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x453a2
jmp 0x45597
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x451a0
movl %eax, -0x28(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x28(%rbp), %edi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x44bc0
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0x4540c
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x45597
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x451a0
movl %eax, -0x24(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x24(%rbp), %edi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x44bc0
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x454ba
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x30(%rbp), %ecx
callq 0x451e0
jmp 0x45597
movl -0x28(%rbp), %edi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
callq 0x44bc0
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x24(%rbp), %edi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
addl $0x1, %edx
callq 0x44bc0
movl %eax, %ecx
movl -0x7c(%rbp), %eax
cmpl %ecx, %eax
jne 0x4555c
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x45548
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x30(%rbp), %ecx
callq 0x451e0
jmp 0x45597
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x2c(%rbp)
jmp 0x45563
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movq -0x50(%rbp), %rax
movl (%rax), %ecx
callq 0x451e0
movl -0x30(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x42bc0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x455bd
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| ma_hashtbl_delete:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp dword ptr [rax+8], 0
jnz short loc_45246
mov [rbp+var_1], 1
jmp loc_455C1
loc_45246:
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_68], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rec_hashnr
mov edi, eax
mov esi, [rbp+var_1C]
mov rax, [rbp+var_10]
mov edx, [rax+8]
call hash_mask
mov ecx, eax
mov rax, [rbp+var_68]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_50], rax
mov [rbp+var_48], 0
loc_4529D:
mov rax, [rbp+var_50]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jz short loc_452DC
mov rax, [rbp+var_50]
mov [rbp+var_48], rax
mov rax, [rbp+var_50]
cmp dword ptr [rax], 0FFFFFFFFh
jnz short loc_452C5
mov [rbp+var_1], 1
jmp loc_455C1
loc_452C5:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_50]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov [rbp+var_50], rax
jmp short loc_4529D
loc_452DC:
mov rcx, [rbp+var_10]
mov eax, [rcx+8]
add eax, 0FFFFFFFFh
mov [rcx+8], eax
mov rcx, [rbp+var_10]
mov ecx, [rcx+0Ch]
shr ecx, 1
cmp eax, ecx
jnb short loc_45302
mov rax, [rbp+var_10]
mov ecx, [rax+0Ch]
shr ecx, 1
mov [rax+0Ch], ecx
loc_45302:
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0FFFFFFFFh
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_50]
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_38]
sub rax, rcx
sar rax, 4
mov [rbp+var_30], eax
cmp [rbp+var_48], 0
jz short loc_45352
mov rax, [rbp+var_50]
mov ecx, [rax]
mov rax, [rbp+var_48]
mov [rax], ecx
jmp short loc_45393
loc_45352:
mov rax, [rbp+var_50]
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_45391
mov rax, [rbp+var_38]
mov rcx, [rbp+var_50]
mov ecx, [rcx]
mov [rbp+var_30], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov rcx, [rax+8]
mov rax, [rbp+var_50]
mov [rax+8], rcx
mov rax, [rbp+var_60]
mov ecx, [rax]
mov rax, [rbp+var_50]
mov [rax], ecx
loc_45391:
jmp short $+2
loc_45393:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_40]
jnz short loc_453A2
jmp loc_45597
loc_453A2:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_40]
mov rsi, [rax+8]
call rec_hashnr
mov [rbp+var_28], eax
mov rax, [rbp+var_38]
mov [rbp+var_70], rax
mov edi, [rbp+var_28]
mov rax, [rbp+var_10]
mov esi, [rax+0Ch]
mov rax, [rbp+var_10]
mov edx, [rax+8]
call hash_mask
mov ecx, eax
mov rax, [rbp+var_70]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
cmp rax, [rbp+var_60]
jnz short loc_4540C
mov rax, [rbp+var_60]
mov rcx, [rbp+var_40]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
jmp loc_45597
loc_4540C:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_50]
mov rsi, [rax+8]
call rec_hashnr
mov [rbp+var_24], eax
mov rax, [rbp+var_38]
mov [rbp+var_78], rax
mov edi, [rbp+var_24]
mov rax, [rbp+var_10]
mov esi, [rax+0Ch]
mov rax, [rbp+var_10]
mov edx, [rax+8]
call 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_50]
cmp rax, [rbp+var_58]
jz short loc_454BA
mov rax, [rbp+var_60]
mov rcx, [rbp+var_50]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_50]
mov rcx, [rbp+var_40]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_38]
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_38]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_30]
call movelink
jmp loc_45597
loc_454BA:
mov edi, [rbp+var_28]
mov esi, [rbp+var_1C]
mov rax, [rbp+var_10]
mov edx, [rax+8]
add edx, 1
call hash_mask
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
mov [rbp+var_7C], eax
mov edi, [rbp+var_24]
mov esi, [rbp+var_1C]
mov rax, [rbp+var_10]
mov edx, [rax+8]
add edx, 1
call hash_mask
mov ecx, eax
mov eax, [rbp+var_7C]
cmp eax, ecx
jnz short loc_4555C
mov eax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp eax, [rcx+8]
jz short loc_45548
mov rax, [rbp+var_60]
mov rcx, [rbp+var_40]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_38]
mov rax, [rbp+var_40]
mov rcx, [rbp+var_38]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_30]
call movelink
jmp short loc_45597
loc_45548:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
sub rax, rcx
sar rax, 4
mov [rbp+var_2C], eax
jmp short loc_45563
loc_4555C:
mov [rbp+var_2C], 0FFFFFFFFh
loc_45563:
mov rax, [rbp+var_60]
mov rcx, [rbp+var_40]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_38]
mov esi, [rbp+var_2C]
mov edx, [rbp+var_30]
mov rax, [rbp+var_50]
mov ecx, [rax]
call movelink
mov ecx, [rbp+var_30]
mov rax, [rbp+var_50]
mov [rax], ecx
loc_45597:
mov rdi, [rbp+var_10]
add rdi, 18h
call ma_pop_dynamic
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_455BD
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rdi, [rbp+var_18]
call rax
loc_455BD:
mov [rbp+var_1], 0
loc_455C1:
mov al, [rbp+var_1]
add rsp, 80h
pop rbp
retn
| char ma_hashtbl_delete(long long a1, long long a2)
{
unsigned int v2; // eax
unsigned int v3; // eax
_QWORD *v5; // [rsp+20h] [rbp-60h]
long long v6; // [rsp+28h] [rbp-58h]
unsigned int *v7; // [rsp+30h] [rbp-50h]
long long v8; // [rsp+30h] [rbp-50h]
_DWORD *v9; // [rsp+38h] [rbp-48h]
_QWORD *v10; // [rsp+40h] [rbp-40h]
long long v11; // [rsp+48h] [rbp-38h]
unsigned int v12; // [rsp+50h] [rbp-30h]
int v13; // [rsp+54h] [rbp-2Ch]
unsigned int v14; // [rsp+58h] [rbp-28h]
unsigned int v15; // [rsp+5Ch] [rbp-24h]
int v16; // [rsp+60h] [rbp-20h]
unsigned int v17; // [rsp+64h] [rbp-1Ch]
if ( !*(_DWORD *)(a1 + 8) )
return 1;
v17 = *(_DWORD *)(a1 + 12);
v11 = *(_QWORD *)(a1 + 24);
v2 = rec_hashnr(a1, a2);
v7 = (unsigned int *)(16LL * (unsigned int)hash_mask(v2, v17, *(_DWORD *)(a1 + 8)) + v11);
v9 = 0LL;
while ( *((_QWORD *)v7 + 1) != a2 )
{
v9 = v7;
if ( *v7 == -1 )
return 1;
v7 = (unsigned int *)(16LL * *v7 + v11);
}
v3 = *(_DWORD *)(a1 + 8) - 1;
*(_DWORD *)(a1 + 8) = v3;
if ( v3 < *(_DWORD *)(a1 + 12) >> 1 )
*(_DWORD *)(a1 + 12) >>= 1;
*(_DWORD *)(a1 + 16) = -1;
v10 = (_QWORD *)(16LL * *(unsigned int *)(a1 + 8) + v11);
v5 = v7;
v12 = ((long long)v7 - v11) >> 4;
if ( v9 )
{
*v9 = *v7;
}
else if ( *v7 != -1 )
{
v12 = *v7;
v5 = (_QWORD *)(16LL * *v7 + v11);
*((_QWORD *)v7 + 1) = v5[1];
*v7 = *(_DWORD *)v5;
}
if ( v5 != v10 )
{
v14 = rec_hashnr(a1, v10[1]);
v8 = 16LL * (unsigned int)hash_mask(v14, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11;
if ( (_QWORD *)v8 == v5 )
{
*v5 = *v10;
v5[1] = v10[1];
}
else
{
v15 = rec_hashnr(a1, *(_QWORD *)(v8 + 8));
v6 = 16LL * (unsigned int)hash_mask(v15, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11;
if ( v8 == v6 )
{
v16 = hash_mask(v14, v17, *(_DWORD *)(a1 + 8) + 1);
if ( v16 == (unsigned int)hash_mask(v15, v17, *(_DWORD *)(a1 + 8) + 1) )
{
if ( v16 != *(_DWORD *)(a1 + 8) )
{
*v5 = *v10;
v5[1] = v10[1];
movelink(v11, ((long long)v10 - v11) >> 4, (v8 - v11) >> 4, v12);
goto LABEL_25;
}
v13 = (v8 - v11) >> 4;
}
else
{
v13 = -1;
}
*v5 = *v10;
v5[1] = v10[1];
movelink(v11, v13, v12, *(_DWORD *)v8);
*(_DWORD *)v8 = v12;
goto LABEL_25;
}
*v5 = *(_QWORD *)v8;
v5[1] = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = *v10;
*(_QWORD *)(v8 + 8) = v10[1];
movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v12);
}
}
LABEL_25:
ma_pop_dynamic((long long *)(a1 + 24));
if ( *(_QWORD *)(a1 + 56) )
(*(void ( **)(long long))(a1 + 56))(a2);
return 0;
}
| ma_hashtbl_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x8],0x0
JNZ 0x00145246
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001455c1
LAB_00145246:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001451a0
MOV EDI,EAX
MOV ESI,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x8]
CALL 0x00144bc0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x48],0x0
LAB_0014529d:
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x001452dc
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP dword ptr [RAX],-0x1
JNZ 0x001452c5
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001455c1
LAB_001452c5:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0014529d
LAB_001452dc:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x8]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x8],EAX
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0xc]
SHR ECX,0x1
CMP EAX,ECX
JNC 0x00145302
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0xc]
SHR ECX,0x1
MOV dword ptr [RAX + 0xc],ECX
LAB_00145302:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0xffffffff
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x30],EAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00145352
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
JMP 0x00145393
LAB_00145352:
MOV RAX,qword ptr [RBP + -0x50]
CMP dword ptr [RAX],-0x1
JZ 0x00145391
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x30],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_00145391:
JMP 0x00145393
LAB_00145393:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x40]
JNZ 0x001453a2
JMP 0x00145597
LAB_001453a2:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001451a0
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x70],RAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x8]
CALL 0x00144bc0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x60]
JNZ 0x0014540c
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x00145597
LAB_0014540c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001451a0
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x78],RAX
MOV EDI,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x8]
CALL 0x00144bc0
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 + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JZ 0x001454ba
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x50]
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 + -0x50]
MOV RCX,qword ptr [RBP + -0x40]
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 + -0x38]
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x30]
CALL 0x001451e0
JMP 0x00145597
LAB_001454ba:
MOV EDI,dword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x8]
ADD EDX,0x1
CALL 0x00144bc0
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x7c],EAX
MOV EDI,dword ptr [RBP + -0x24]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x8]
ADD EDX,0x1
CALL 0x00144bc0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x7c]
CMP EAX,ECX
JNZ 0x0014555c
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x8]
JZ 0x00145548
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x40]
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 + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x30]
CALL 0x001451e0
JMP 0x00145597
LAB_00145548:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00145563
LAB_0014555c:
MOV dword ptr [RBP + -0x2c],0xffffffff
LAB_00145563:
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x40]
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 + -0x38]
MOV ESI,dword ptr [RBP + -0x2c]
MOV EDX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX]
CALL 0x001451e0
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_00145597:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
CALL 0x00142bc0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x001455bd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
LAB_001455bd:
MOV byte ptr [RBP + -0x1],0x0
LAB_001455c1:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x80
POP RBP
RET
|
int1 ma_hashtbl_delete(long param_1,long param_2)
{
int4 uVar1;
long lVar2;
int4 uVar3;
uint uVar4;
int4 uVar5;
int iVar6;
int iVar7;
uint *puVar8;
uint *puVar9;
uint *puVar10;
uint *local_68;
uint *local_58;
uint *local_50;
uint local_38;
int4 local_34;
if (*(int *)(param_1 + 8) == 0) {
return 1;
}
uVar1 = *(int4 *)(param_1 + 0xc);
lVar2 = *(long *)(param_1 + 0x18);
uVar3 = rec_hashnr(param_1,param_2);
uVar4 = hash_mask(uVar3,uVar1,*(int4 *)(param_1 + 8));
local_50 = (uint *)0x0;
while (local_58 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_58 + 2) != param_2) {
local_50 = local_58;
if (*local_58 == 0xffffffff) {
return 1;
}
uVar4 = *local_58;
}
uVar4 = *(int *)(param_1 + 8) - 1;
*(uint *)(param_1 + 8) = uVar4;
if (uVar4 < *(uint *)(param_1 + 0xc) >> 1) {
*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) >> 1;
}
*(int4 *)(param_1 + 0x10) = 0xffffffff;
puVar8 = (uint *)(lVar2 + (ulong)*(uint *)(param_1 + 8) * 0x10);
local_68 = local_58;
local_38 = (uint)((long)local_58 - lVar2 >> 4);
if (local_50 == (uint *)0x0) {
if (*local_58 != 0xffffffff) {
local_38 = *local_58;
local_68 = (uint *)(lVar2 + (ulong)local_38 * 0x10);
*(int8 *)(local_58 + 2) = *(int8 *)(local_68 + 2);
*local_58 = *local_68;
}
}
else {
*local_50 = *local_58;
}
if (local_68 != puVar8) {
uVar3 = rec_hashnr(param_1,*(int8 *)(puVar8 + 2));
uVar4 = hash_mask(uVar3,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8));
puVar9 = (uint *)(lVar2 + (ulong)uVar4 * 0x10);
if (puVar9 == local_68) {
*(int8 *)local_68 = *(int8 *)puVar8;
*(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2);
}
else {
uVar5 = rec_hashnr(param_1,*(int8 *)(puVar9 + 2));
uVar4 = hash_mask(uVar5,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8));
puVar10 = (uint *)(lVar2 + (ulong)uVar4 * 0x10);
if (puVar9 == puVar10) {
iVar6 = hash_mask(uVar3,uVar1,*(int *)(param_1 + 8) + 1);
iVar7 = hash_mask(uVar5,uVar1,*(int *)(param_1 + 8) + 1);
if (iVar6 == iVar7) {
if (iVar6 != *(int *)(param_1 + 8)) {
*(int8 *)local_68 = *(int8 *)puVar8;
*(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff,
(long)puVar9 - lVar2 >> 4 & 0xffffffff,local_38);
goto LAB_00145597;
}
local_34 = (int4)((long)puVar9 - lVar2 >> 4);
}
else {
local_34 = 0xffffffff;
}
*(int8 *)local_68 = *(int8 *)puVar8;
*(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,local_34,local_38,*puVar9);
*puVar9 = local_38;
}
else {
*(int8 *)local_68 = *(int8 *)puVar9;
*(int8 *)(local_68 + 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_38);
}
}
}
LAB_00145597:
ma_pop_dynamic(param_1 + 0x18);
if (*(long *)(param_1 + 0x38) != 0) {
(**(code **)(param_1 + 0x38))(param_2);
}
return 0;
}
| |
52,091 | my_b_safe_write | eloqsql/mysys/mf_iocache.c | int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
/*
Sasha: We are not writing this with the ? operator to avoid hitting
a possible compiler bug. At least gcc 2.95 cannot deal with
several layers of ternary operators that evaluated comma(,) operator
expressions inside - I do have a test case if somebody wants it
*/
if (info->type == SEQ_READ_APPEND)
return my_b_append(info, Buffer, Count);
return my_b_write(info, Buffer, Count);
} | O0 | c | my_b_safe_write:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3, 0xb0(%rax)
jne 0xe1af7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe17a0
movl %eax, -0x4(%rbp)
jmp 0xe1b0b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe1b20
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_b_safe_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_10]
cmp dword ptr [rax+0B0h], 3
jnz short loc_E1AF7
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_b_append
mov [rbp+var_4], eax
jmp short loc_E1B0B
loc_E1AF7:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_b_write_3
mov [rbp+var_4], eax
loc_E1B0B:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_b_safe_write(long long a1, long long a2, unsigned long long a3)
{
if ( *(_DWORD *)(a1 + 176) == 3 )
return (unsigned int)my_b_append(a1, a2, a3);
else
return (unsigned int)my_b_write_3(a1, a2, a3);
}
| my_b_safe_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xb0],0x3
JNZ 0x001e1af7
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001e17a0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001e1b0b
LAB_001e1af7:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001e1b20
MOV dword ptr [RBP + -0x4],EAX
LAB_001e1b0b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_b_safe_write(long param_1,int8 param_2,int8 param_3)
{
int4 local_c;
if (*(int *)(param_1 + 0xb0) == 3) {
local_c = my_b_append(param_1,param_2,param_3);
}
else {
local_c = my_b_write(param_1,param_2,param_3);
}
return local_c;
}
| |
52,092 | nglog::LogDestination::LogToStderr() | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::LogToStderr() {
// *Don't* put this stuff in a mutex lock, since SetStderrLogging &
// SetLogDestination already do the locking!
SetStderrLogging(NGLOG_INFO); // thus everything is "also" logged to stderr
for (int i = 0; i < NUM_SEVERITIES; ++i) {
SetLogDestination(static_cast<LogSeverity>(i),
""); // "" turns off logging to a logfile
}
} | O0 | cpp | nglog::LogDestination::LogToStderr():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
callq 0x185e0
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x186c6
movl -0x4(%rbp), %edi
leaq 0x35552(%rip), %rsi # 0x4dc08
callq 0x18060
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x186a6
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN5nglog14LogDestination11LogToStderrEv:
push rbp
mov rbp, rsp
sub rsp, 10h
xor edi, edi
call _ZN5nglog14LogDestination16SetStderrLoggingENS_11LogSeverityE; nglog::LogDestination::SetStderrLogging(nglog::LogSeverity)
mov [rbp+var_4], 0
loc_186A6:
cmp [rbp+var_4], 4
jge short loc_186C6
mov edi, [rbp+var_4]
lea rsi, asc_4DC06+2; ""
call _ZN5nglog14LogDestination17SetLogDestinationENS_11LogSeverityEPKc; nglog::LogDestination::SetLogDestination(nglog::LogSeverity,char const*)
mov eax, [rbp+var_4]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_186A6
loc_186C6:
add rsp, 10h
pop rbp
retn
| long long nglog::LogDestination::LogToStderr(nglog::LogDestination *this)
{
long long result; // rax
signed int i; // [rsp+Ch] [rbp-4h]
result = nglog::LogDestination::SetStderrLogging(0);
for ( i = 0; i < 4; ++i )
{
nglog::LogDestination::SetLogDestination(i, "");
result = (unsigned int)(i + 1);
}
return result;
}
| LogToStderr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
XOR EDI,EDI
CALL 0x001185e0
MOV dword ptr [RBP + -0x4],0x0
LAB_001186a6:
CMP dword ptr [RBP + -0x4],0x4
JGE 0x001186c6
MOV EDI,dword ptr [RBP + -0x4]
LEA RSI,[0x14dc08]
CALL 0x00118060
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001186a6
LAB_001186c6:
ADD RSP,0x10
POP RBP
RET
|
/* nglog::LogDestination::LogToStderr() */
void nglog::LogDestination::LogToStderr(void)
{
int local_c;
SetStderrLogging(0);
for (local_c = 0; local_c < 4; local_c = local_c + 1) {
SetLogDestination(local_c,&DAT_0014dc08);
}
return;
}
| |
52,093 | evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)245>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp | const Instruction* op_create(const Instruction* instr, AdvancedExecutionState& state) noexcept
{
const auto gas_left_correction = state.current_block_cost - instr->arg.number;
state.gas_left += gas_left_correction;
const auto status = instr::impl<Op>(state);
if (status != EVMC_SUCCESS)
return state.exit(status);
if ((state.gas_left -= gas_left_correction) < 0)
return state.exit(EVMC_OUT_OF_GAS);
return ++instr;
} | O0 | cpp | evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)245>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x230(%rax), %eax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x220(%rax), %rcx
movq %rcx, 0x220(%rax)
movq -0x18(%rbp), %rdi
callq 0x98100
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x94d10
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x94f80
movq %rax, -0x8(%rbp)
jmp 0x94d53
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq 0x220(%rcx), %rax
subq %rdx, %rax
movq %rax, 0x220(%rcx)
cmpq $0x0, %rax
jge 0x94d43
movq -0x18(%rbp), %rdi
movl $0x3, %esi
callq 0x94f80
movq %rax, -0x8(%rbp)
jmp 0x94d53
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN6evmone8advanced12_GLOBAL__N_19op_createILNS_6OpcodeE245EEEPKNS0_11InstructionES6_RNS0_22AdvancedExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov eax, [rax+230h]
mov rcx, [rbp+var_10]
sub rax, [rcx+8]
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
add rcx, [rax+220h]
mov [rax+220h], rcx
mov rdi, [rbp+var_18]
call _ZN6evmone8advanced5instr4implILNS_6OpcodeE245EXadL_ZNS_5instr4core11create_implILS3_245EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateEEEEE16evmc_status_codeRNS0_22AdvancedExecutionStateE; evmone::advanced::instr::impl<(evmone::Opcode)245,&evmone::instr::core::create_impl<(evmone::Opcode)245>>(evmone::advanced::AdvancedExecutionState &)
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz short loc_94D10
mov rdi, [rbp+var_18]
mov esi, [rbp+var_24]
call _ZN6evmone8advanced22AdvancedExecutionState4exitE16evmc_status_code; evmone::advanced::AdvancedExecutionState::exit(evmc_status_code)
mov [rbp+var_8], rax
jmp short loc_94D53
loc_94D10:
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_18]
mov rax, [rcx+220h]
sub rax, rdx
mov [rcx+220h], rax
cmp rax, 0
jge short loc_94D43
mov rdi, [rbp+var_18]
mov esi, 3
call _ZN6evmone8advanced22AdvancedExecutionState4exitE16evmc_status_code; evmone::advanced::AdvancedExecutionState::exit(evmc_status_code)
mov [rbp+var_8], rax
jmp short loc_94D53
loc_94D43:
mov rax, [rbp+var_10]
add rax, 10h
mov [rbp+var_10], rax
mov [rbp+var_8], rax
loc_94D53:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long evmone::advanced::`anonymous namespace'::op_create<(evmone::Opcode)245>(long long a1, long long a2)
{
long long v2; // rax
unsigned int v4; // [rsp+Ch] [rbp-24h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *(unsigned int *)(a2 + 560) - *(_QWORD *)(a1 + 8);
*(_QWORD *)(a2 + 544) += v5;
v4 = evmone::advanced::instr::impl<(evmone::Opcode)245,&evmone::Result evmone::instr::core::create_impl<(evmone::Opcode)245>>(a2);
if ( v4 )
return evmone::advanced::AdvancedExecutionState::exit(a2, v4);
v2 = *(_QWORD *)(a2 + 544) - v5;
*(_QWORD *)(a2 + 544) = v2;
if ( v2 >= 0 )
return a1 + 16;
else
return evmone::advanced::AdvancedExecutionState::exit(a2, 3LL);
}
| op_create<(evmone::Opcode)245>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x230]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX + 0x220]
MOV qword ptr [RAX + 0x220],RCX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00198100
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00194d10
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x24]
CALL 0x00194f80
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00194d53
LAB_00194d10:
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RCX + 0x220]
SUB RAX,RDX
MOV qword ptr [RCX + 0x220],RAX
CMP RAX,0x0
JGE 0x00194d43
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x3
CALL 0x00194f80
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00194d53
LAB_00194d43:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x8],RAX
LAB_00194d53:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
/* evmone::advanced::Instruction const* evmone::advanced::(anonymous
namespace)::op_create<(evmone::Opcode)245>(evmone::advanced::Instruction const*,
evmone::advanced::AdvancedExecutionState&) */
Instruction *
evmone::advanced::(anonymous_namespace)::op_create<(evmone::Opcode)245>
(Instruction *param_1,AdvancedExecutionState *param_2)
{
uint uVar1;
int iVar2;
long lVar3;
Instruction *local_10;
uVar1 = *(uint *)(param_2 + 0x230);
lVar3 = *(long *)(param_1 + 8);
*(ulong *)(param_2 + 0x220) = ((ulong)uVar1 - lVar3) + *(long *)(param_2 + 0x220);
iVar2 = instr::
impl<(evmone::Opcode)245,&(evmone::Result_evmone::instr::core::create_impl<(evmone::Opcode)245>(evmone::StackTop,long,evmone::ExecutionState&))>
(param_2);
if (iVar2 == 0) {
lVar3 = *(long *)(param_2 + 0x220) - ((ulong)uVar1 - lVar3);
*(long *)(param_2 + 0x220) = lVar3;
if (lVar3 < 0) {
local_10 = (Instruction *)AdvancedExecutionState::exit(param_2,3);
}
else {
local_10 = param_1 + 0x10;
}
}
else {
local_10 = (Instruction *)AdvancedExecutionState::exit(param_2,iVar2);
}
return local_10;
}
| |
52,094 | check_mb_gb18030_valid | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_gb18030_valid(const char * start, const char * end)
{
if (end - start <= 1 || !is_gb18030_odd(start[0])) {
return 0;
}
if (is_gb18030_even_2(start[1])) {
return 2;
} else if (end - start > 3 && is_gb18030_even_4(start[1]) && is_gb18030_odd(start[2]) && is_gb18030_even_4(start[3])) {
return 4;
}
return 0;
} | O0 | c | check_mb_gb18030_valid:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x1c42b
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x1c42b
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jle 0x1c437
movl $0x0, -0x4(%rbp)
jmp 0x1c4fd
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x1c455
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7e, %eax
jle 0x1c475
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x80, %eax
cmpl %ecx, %eax
jg 0x1c47e
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
jg 0x1c47e
movl $0x2, -0x4(%rbp)
jmp 0x1c4fd
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x3, %rax
jle 0x1c4f4
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x1c4f4
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x39, %eax
jg 0x1c4f4
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x1c4f4
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
jg 0x1c4f4
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x1c4f4
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x39, %eax
jg 0x1c4f4
movl $0x4, -0x4(%rbp)
jmp 0x1c4fd
jmp 0x1c4f6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_mb_gb18030_valid:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 1
jle short loc_1C42B
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax]
mov eax, 81h
cmp eax, ecx
jg short loc_1C42B
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jle short loc_1C437
loc_1C42B:
mov [rbp+var_4], 0
jmp loc_1C4FD
loc_1C437:
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_1C455
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jle short loc_1C475
loc_1C455:
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+1]
mov eax, 80h
cmp eax, ecx
jg short loc_1C47E
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
jg short loc_1C47E
loc_1C475:
mov [rbp+var_4], 2
jmp short loc_1C4FD
loc_1C47E:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 3
jle short loc_1C4F4
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+1]
mov eax, 30h ; '0'
cmp eax, ecx
jg short loc_1C4F4
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 39h ; '9'
jg short loc_1C4F4
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+2]
mov eax, 81h
cmp eax, ecx
jg short loc_1C4F4
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
jg short loc_1C4F4
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax+3]
mov eax, 30h ; '0'
cmp eax, ecx
jg short loc_1C4F4
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+3]
cmp eax, 39h ; '9'
jg short loc_1C4F4
mov [rbp+var_4], 4
jmp short loc_1C4FD
loc_1C4F4:
jmp short $+2
loc_1C4F6:
mov [rbp+var_4], 0
loc_1C4FD:
mov eax, [rbp+var_4]
pop rbp
retn
| long long check_mb_gb18030_valid(unsigned __int8 *a1, long long a2)
{
if ( a2 - (long long)a1 <= 1 || *a1 < 0x81u || *a1 == 255 )
{
return 0;
}
else if ( (a1[1] < 0x40u || a1[1] > 0x7Eu) && (a1[1] < 0x80u || a1[1] == 255) )
{
if ( a2 - (long long)a1 <= 3
|| a1[1] < 0x30u
|| a1[1] > 0x39u
|| a1[2] < 0x81u
|| a1[2] == 255
|| a1[3] < 0x30u
|| a1[3] > 0x39u )
{
return 0;
}
else
{
return 4;
}
}
else
{
return 2;
}
}
| check_mb_gb18030_valid:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x0011c42b
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX]
MOV EAX,0x81
CMP EAX,ECX
JG 0x0011c42b
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JLE 0x0011c437
LAB_0011c42b:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0011c4fd
LAB_0011c437:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x0011c455
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JLE 0x0011c475
LAB_0011c455:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x80
CMP EAX,ECX
JG 0x0011c47e
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
JG 0x0011c47e
LAB_0011c475:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0011c4fd
LAB_0011c47e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x3
JLE 0x0011c4f4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x30
CMP EAX,ECX
JG 0x0011c4f4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x39
JG 0x0011c4f4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV EAX,0x81
CMP EAX,ECX
JG 0x0011c4f4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
JG 0x0011c4f4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV EAX,0x30
CMP EAX,ECX
JG 0x0011c4f4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x39
JG 0x0011c4f4
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0011c4fd
LAB_0011c4f4:
JMP 0x0011c4f6
LAB_0011c4f6:
MOV dword ptr [RBP + -0x4],0x0
LAB_0011c4fd:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 check_mb_gb18030_valid(byte *param_1,long param_2)
{
int4 local_c;
if (((param_2 - (long)param_1 < 2) || (*param_1 < 0x81)) || (*param_1 == 0xff)) {
local_c = 0;
}
else if (((param_1[1] < 0x40) || (0x7e < param_1[1])) &&
((param_1[1] < 0x80 || (param_1[1] == 0xff)))) {
if (((param_2 - (long)param_1 < 4) || (param_1[1] < 0x30)) ||
((0x39 < param_1[1] ||
((((param_1[2] < 0x81 || (0xfe < param_1[2])) || (param_1[3] < 0x30)) || (0x39 < param_1[3])
))))) {
local_c = 0;
}
else {
local_c = 4;
}
}
else {
local_c = 2;
}
return local_c;
}
| |
52,095 | memcmp16_8 | bluesky950520[P]quickjs/quickjs.c | static int memcmp16_8(const uint16_t *src1, const uint8_t *src2, int len)
{
int c, i;
for(i = 0; i < len; i++) {
c = src1[i] - src2[i];
if (c != 0)
return c;
}
return 0;
} | O0 | c | memcmp16_8:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl %edx, -0x1c(%rsp)
movl $0x0, -0x24(%rsp)
movl -0x24(%rsp), %eax
cmpl -0x1c(%rsp), %eax
jge 0x63702
movq -0x10(%rsp), %rax
movslq -0x24(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rsp), %rcx
movslq -0x24(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x20(%rsp)
cmpl $0x0, -0x20(%rsp)
je 0x636f3
movl -0x20(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x6370a
jmp 0x636f5
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x636b6
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nop
| memcmp16_8:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov [rsp+var_1C], edx
mov [rsp+var_24], 0
loc_636B6:
mov eax, [rsp+var_24]
cmp eax, [rsp+var_1C]
jge short loc_63702
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_24]
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rsp+var_18]
movsxd rdx, [rsp+var_24]
movzx ecx, byte ptr [rcx+rdx]
sub eax, ecx
mov [rsp+var_20], eax
cmp [rsp+var_20], 0
jz short loc_636F3
mov eax, [rsp+var_20]
mov [rsp+var_4], eax
jmp short loc_6370A
loc_636F3:
jmp short $+2
loc_636F5:
mov eax, [rsp+var_24]
add eax, 1
mov [rsp+var_24], eax
jmp short loc_636B6
loc_63702:
mov [rsp+var_4], 0
loc_6370A:
mov eax, [rsp+var_4]
retn
| long long memcmp16_8(long long a1, long long a2, int a3)
{
int i; // [rsp+0h] [rbp-24h]
for ( i = 0; i < a3; ++i )
{
if ( *(_WORD *)(a1 + 2LL * i) != *(unsigned __int8 *)(a2 + i) )
return (unsigned int)(*(unsigned __int16 *)(a1 + 2LL * i) - *(unsigned __int8 *)(a2 + i));
}
return 0;
}
| memcmp16_8:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV dword ptr [RSP + -0x1c],EDX
MOV dword ptr [RSP + -0x24],0x0
LAB_001636b6:
MOV EAX,dword ptr [RSP + -0x24]
CMP EAX,dword ptr [RSP + -0x1c]
JGE 0x00163702
MOV RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x24]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RSP + -0x18]
MOVSXD RDX,dword ptr [RSP + -0x24]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SUB EAX,ECX
MOV dword ptr [RSP + -0x20],EAX
CMP dword ptr [RSP + -0x20],0x0
JZ 0x001636f3
MOV EAX,dword ptr [RSP + -0x20]
MOV dword ptr [RSP + -0x4],EAX
JMP 0x0016370a
LAB_001636f3:
JMP 0x001636f5
LAB_001636f5:
MOV EAX,dword ptr [RSP + -0x24]
ADD EAX,0x1
MOV dword ptr [RSP + -0x24],EAX
JMP 0x001636b6
LAB_00163702:
MOV dword ptr [RSP + -0x4],0x0
LAB_0016370a:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
int memcmp16_8(long param_1,long param_2,int param_3)
{
int iVar1;
int local_24;
local_24 = 0;
while( true ) {
if (param_3 <= local_24) {
return 0;
}
iVar1 = (uint)*(ushort *)(param_1 + (long)local_24 * 2) - (uint)*(byte *)(param_2 + local_24);
if (iVar1 != 0) break;
local_24 = local_24 + 1;
}
return iVar1;
}
| |
52,096 | memcmp16_8 | bluesky950520[P]quickjs/quickjs.c | static int memcmp16_8(const uint16_t *src1, const uint8_t *src2, int len)
{
int c, i;
for(i = 0; i < len; i++) {
c = src1[i] - src2[i];
if (c != 0)
return c;
}
return 0;
} | O2 | c | memcmp16_8:
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
cmpq %rcx, %rdx
je 0x385d7
movzwl (%rdi,%rcx,2), %eax
movzbl (%rsi,%rcx), %r8d
incq %rcx
subl %r8d, %eax
je 0x385c0
retq
xorl %eax, %eax
retq
| memcmp16_8:
xor ecx, ecx
test edx, edx
cmovle edx, ecx
loc_385C0:
cmp rdx, rcx
jz short loc_385D7
movzx eax, word ptr [rdi+rcx*2]
movzx r8d, byte ptr [rsi+rcx]
inc rcx
sub eax, r8d
jz short loc_385C0
retn
loc_385D7:
xor eax, eax
retn
| long long memcmp16_8(long long a1, long long a2, long long a3)
{
long long v3; // rcx
int v4; // eax
int v5; // r8d
long long result; // rax
v3 = 0LL;
if ( (int)a3 <= 0 )
a3 = 0LL;
while ( a3 != v3 )
{
v4 = *(unsigned __int16 *)(a1 + 2 * v3);
v5 = *(unsigned __int8 *)(a2 + v3++);
result = (unsigned int)(v4 - v5);
if ( (_DWORD)result )
return result;
}
return 0LL;
}
| memcmp16_8:
XOR ECX,ECX
TEST EDX,EDX
CMOVLE EDX,ECX
LAB_001385c0:
CMP RDX,RCX
JZ 0x001385d7
MOVZX EAX,word ptr [RDI + RCX*0x2]
MOVZX R8D,byte ptr [RSI + RCX*0x1]
INC RCX
SUB EAX,R8D
JZ 0x001385c0
RET
LAB_001385d7:
XOR EAX,EAX
RET
|
int memcmp16_8(long param_1,long param_2,uint param_3)
{
long lVar1;
byte *pbVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
uVar4 = 0;
uVar5 = (ulong)param_3;
if ((int)param_3 < 1) {
uVar5 = uVar4;
}
do {
if (uVar5 == uVar4) {
return 0;
}
lVar1 = uVar4 * 2;
pbVar2 = (byte *)(param_2 + uVar4);
uVar4 = uVar4 + 1;
iVar3 = (uint)*(ushort *)(param_1 + lVar1) - (uint)*pbVar2;
} while (iVar3 == 0);
return iVar3;
}
| |
52,097 | _gnu_cxx::__normal_iterator<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>>*, std::vector<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>>, 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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [10], 0>(char const (&) [10]) | monkey531[P]llama/common/json.hpp | iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O2 | cpp | _gnu_cxx::__normal_iterator<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>>*, std::vector<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>>, 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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [10], 0>(char const (&) [10]):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x94347
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3968e
testb %al, %al
jne 0x94344
addq $0x30, %r14
jmp 0x94326
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_94326:
mov rax, [r15+8]
cmp r14, rax
jz short loc_94347
mov rdi, r14
mov rsi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_94344
add r14, 30h ; '0'
jmp short loc_94326
loc_94344:
mov rax, r14
loc_94347:
pop rbx
pop r14
pop r15
retn
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long *a1)
{
long long i; // r14
long long result; // rax
for ( i = *a1; ; i += 48LL )
{
result = a1[1];
if ( i == result )
break;
if ( std::operator==<char>(i) )
return i;
}
return result;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_00194326:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x00194347
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013968e
TEST AL,AL
JNZ 0x00194344
ADD R14,0x30
JMP 0x00194326
LAB_00194344:
MOV RAX,R14
LAB_00194347:
POP RBX
POP R14
POP R15
RET
|
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(int8 *param_1,char *param_2)
{
bool bVar1;
string *psVar2;
string *psVar3;
psVar3 = (string *)*param_1;
while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] &&
(bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
| |
52,098 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O2 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x2d
popq %rsi
xorl %edx, %edx
callq 0x24b40
movq %rax, %r12
testq %rax, %rax
je 0x54078
cmpq $-0x1, %r12
jne 0x5407d
leaq 0xae3ea(%rip), %rax # 0x102448
cmpl $0x0, (%rax)
js 0x54153
callq 0x970d6
leaq 0x6093c(%rip), %rdx # 0xb49af
jmp 0x54131
movq %r12, %r14
jmp 0x540cf
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x24920
pushq $0xa
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x59321
movq %rax, %r14
movq %rsp, %rdi
callq 0x251d8
cmpq $0x200, %r14 # imm = 0x200
jb 0x540cf
leaq 0xae390(%rip), %rax # 0x102448
cmpl $0x0, (%rax)
js 0x54153
callq 0x970d6
leaq 0x6091f(%rip), %rdx # 0xb49ec
jmp 0x54131
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0x5414a
incq %r12
movq %rsp, %r13
pushq $-0x1
popq %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x24920
pushq $0xa
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x59321
movq %rax, %r13
movq %rsp, %rdi
callq 0x251d8
cmpq $0x200, %r13 # imm = 0x200
jb 0x5414a
leaq 0xae328(%rip), %rax # 0x102448
cmpl $0x0, (%rax)
js 0x54153
callq 0x970d6
leaq 0x608d7(%rip), %rdx # 0xb4a08
xorl %ebx, %ebx
pushq $0x4
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x9716e
jmp 0x54155
movb $0x1, (%rbx,%r14)
incq %r14
cmpq %r13, %r14
jbe 0x54142
movb $0x1, %bl
jmp 0x54155
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x54167
movq %rax, %rbx
movq %rsp, %rdi
callq 0x251d8
movq %rbx, %rdi
callq 0x24f80
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rbx, rsi
mov r15, rdi
push 2Dh ; '-'
pop rsi
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_54078
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_5407D
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_54153
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_54131
loc_54078:
mov r14, r12
jmp short loc_540CF
loc_5407D:
mov r14, rsp
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r14
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r14, 200h
jb short loc_540CF
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_54153
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp short loc_54131
loc_540CF:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz short loc_5414A
inc r12
mov r13, rsp
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rdi, r13
mov rsi, r15
mov rdx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
push 0Ah
pop rdx
mov rdi, r13
xor esi, esi
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov r13, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r13, 200h
jb short loc_5414A
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_54153
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_54131:
xor ebx, ebx
push 4
pop rsi
mov rdi, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_54155
loc_54142:
mov byte ptr [rbx+r14], 1
inc r14
loc_5414A:
cmp r14, r13
jbe short loc_54142
mov bl, 1
jmp short loc_54155
loc_54153:
xor ebx, ebx
loc_54155:
mov eax, ebx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_54167:
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long parse_cpu_range(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v3; // rax
long long v4; // r12
int v5; // eax
int v6; // ecx
int v7; // r8d
int v8; // r9d
const char *v9; // rdx
unsigned long long v10; // r14
unsigned long long v11; // r13
char v13[72]; // [rsp+0h] [rbp-48h] BYREF
v2 = a2;
v3 = std::string::find(a1, 45LL, 0LL);
v4 = v3;
if ( v3 )
{
if ( v3 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_13:
v2 = 0;
common_log_add(v5, 4, (_DWORD)v9, v6, v7, v8, v13[0]);
return v2;
}
return 0;
}
std::string::substr(v13, a1, 0LL, v3);
v10 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v10 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "Start index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
else
{
v10 = 0LL;
}
v11 = 511LL;
if ( v4 != *(_QWORD *)(a1 + 8) - 1LL )
{
std::string::substr(v13, a1, v4 + 1, -1LL);
v11 = std::stoull(v13, 0LL, 10LL);
std::string::~string(v13);
if ( v11 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v5 = common_log_main();
v9 = "End index out of bounds!\n";
goto LABEL_13;
}
return 0;
}
}
while ( v10 <= v11 )
*(_BYTE *)(a2 + v10++) = 1;
LOBYTE(v2) = 1;
return v2;
}
| parse_cpu_range:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RSI
MOV R15,RDI
PUSH 0x2d
POP RSI
XOR EDX,EDX
CALL 0x00124b40
MOV R12,RAX
TEST RAX,RAX
JZ 0x00154078
CMP R12,-0x1
JNZ 0x0015407d
LEA RAX,[0x202448]
CMP dword ptr [RAX],0x0
JS 0x00154153
CALL 0x001970d6
LEA RDX,[0x1b49af]
JMP 0x00154131
LAB_00154078:
MOV R14,R12
JMP 0x001540cf
LAB_0015407d:
MOV R14,RSP
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x00124920
LAB_00154090:
PUSH 0xa
POP RDX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159321
LAB_0015409d:
MOV R14,RAX
MOV RDI,RSP
CALL 0x001251d8
CMP R14,0x200
JC 0x001540cf
LEA RAX,[0x202448]
CMP dword ptr [RAX],0x0
JS 0x00154153
CALL 0x001970d6
LEA RDX,[0x1b49ec]
JMP 0x00154131
LAB_001540cf:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x0015414a
INC R12
MOV R13,RSP
PUSH -0x1
POP RCX
MOV RDI,R13
MOV RSI,R15
MOV RDX,R12
CALL 0x00124920
LAB_001540f8:
PUSH 0xa
POP RDX
MOV RDI,R13
XOR ESI,ESI
CALL 0x00159321
LAB_00154105:
MOV R13,RAX
MOV RDI,RSP
CALL 0x001251d8
CMP R13,0x200
JC 0x0015414a
LEA RAX,[0x202448]
CMP dword ptr [RAX],0x0
JS 0x00154153
CALL 0x001970d6
LEA RDX,[0x1b4a08]
LAB_00154131:
XOR EBX,EBX
PUSH 0x4
POP RSI
MOV RDI,RAX
XOR EAX,EAX
CALL 0x0019716e
JMP 0x00154155
LAB_00154142:
MOV byte ptr [RBX + R14*0x1],0x1
INC R14
LAB_0015414a:
CMP R14,R13
JBE 0x00154142
MOV BL,0x1
JMP 0x00154155
LAB_00154153:
XOR EBX,EBX
LAB_00154155:
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
long lVar1;
int8 uVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
string asStack_48 [32];
lVar1 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar1 == 0) {
uVar3 = 0;
LAB_001540cf:
uVar5 = 0x1ff;
if (lVar1 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 001540f8 to 00154104 has its CatchHandler @ 00154165 */
uVar5 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (0x1ff < uVar5) {
if (common_log_verbosity_thold < 0) goto LAB_00154153;
uVar2 = common_log_main();
pcVar4 = "End index out of bounds!\n";
goto LAB_00154131;
}
}
for (; uVar3 <= uVar5; uVar3 = uVar3 + 1) {
param_2[uVar3] = true;
}
uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),1);
}
else {
if (lVar1 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_00154153:
uVar3 = 0;
goto LAB_00154155;
}
uVar2 = common_log_main();
pcVar4 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1);
/* try { // try from 00154090 to 0015409c has its CatchHandler @ 00154167 */
uVar3 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10);
std::__cxx11::string::~string(asStack_48);
if (uVar3 < 0x200) goto LAB_001540cf;
if (common_log_verbosity_thold < 0) goto LAB_00154153;
uVar2 = common_log_main();
pcVar4 = "Start index out of bounds!\n";
}
LAB_00154131:
uVar3 = 0;
common_log_add(uVar2,4,pcVar4);
}
LAB_00154155:
return uVar3 & 0xffffffff;
}
| |
52,099 | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]) | monkey531[P]llama/common/common.cpp | bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) {
size_t dash_loc = range.find('-');
if (dash_loc == std::string::npos) {
LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n");
return false;
}
size_t start_i;
size_t end_i;
if (dash_loc == 0) {
start_i = 0;
} else {
start_i = std::stoull(range.substr(0, dash_loc));
if (start_i >= GGML_MAX_N_THREADS) {
LOG_ERR("Start index out of bounds!\n");
return false;
}
}
if (dash_loc == range.length() - 1) {
end_i = GGML_MAX_N_THREADS - 1;
} else {
end_i = std::stoull(range.substr(dash_loc + 1));
if (end_i >= GGML_MAX_N_THREADS) {
LOG_ERR("End index out of bounds!\n");
return false;
}
}
for (size_t i = start_i; i <= end_i; i++) {
boolmask[i] = true;
}
return true;
} | O3 | cpp | parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2d, %esi
xorl %edx, %edx
callq 0x1bb10
movq %rax, %r12
testq %rax, %rax
je 0x71f9e
cmpq $-0x1, %r12
jne 0x71fab
leaq 0xbd4a4(%rip), %rax # 0x12f428
cmpl $0x0, (%rax)
js 0x7215c
callq 0xcc4d7
leaq 0x7ea26(%rip), %rdx # 0xf09bf
jmp 0x72124
movq %rbx, 0x10(%rsp)
movq %r12, %r14
jmp 0x72065
movq %rbx, 0x10(%rsp)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x1b910
movq (%r14), %rbp
callq 0x1b060
movq %rax, %r13
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r13)
leaq 0x8(%rsp), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x1bb50
cmpq %rbp, (%rbx)
je 0x7216f
movq %rax, %r14
movl (%r13), %eax
testl %eax, %eax
je 0x72018
cmpl $0x22, %eax
jne 0x72020
leaq 0x7f56d(%rip), %rdi # 0xf1580
callq 0x1bc90
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7203b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8c0
cmpq $0x200, %r14 # imm = 0x200
jb 0x72065
leaq 0xbd3dd(%rip), %rax # 0x12f428
cmpl $0x0, (%rax)
js 0x7215c
callq 0xcc4d7
leaq 0x7e99c(%rip), %rdx # 0xf09fc
jmp 0x72124
movq 0x8(%r15), %rax
decq %rax
movl $0x1ff, %r13d # imm = 0x1FF
cmpq %rax, %r12
je 0x72137
incq %r12
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x1b910
movq (%rbx), %rbx
callq 0x1b060
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x1bb50
cmpq %rbx, (%r12)
je 0x7217b
movq %rax, %r13
movl (%r15), %eax
testl %eax, %eax
je 0x720e5
cmpl $0x22, %eax
jne 0x720e8
leaq 0x7f4a0(%rip), %rdi # 0xf1580
callq 0x1bc90
movl %ebp, (%r15)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72103
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1b8c0
cmpq $0x200, %r13 # imm = 0x200
jb 0x72137
leaq 0xbd315(%rip), %rax # 0x12f428
cmpl $0x0, (%rax)
js 0x7215c
callq 0xcc4d7
leaq 0x7e8f4(%rip), %rdx # 0xf0a18
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
xorl %eax, %eax
callq 0xcc574
jmp 0x7215e
movb $0x1, %bpl
cmpq %r13, %r14
ja 0x7215e
movq 0x10(%rsp), %rdi
addq %r14, %rdi
subq %r14, %r13
incq %r13
movl $0x1, %esi
movq %r13, %rdx
callq 0x1b4e0
jmp 0x7215e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f40a(%rip), %rdi # 0xf1580
callq 0x1b540
leaq 0x7f3fe(%rip), %rdi # 0xf1580
callq 0x1b540
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x72193
movl %ebp, (%r15)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1c9fe
jmp 0x721c5
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x721b6
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1ca1b
movq %rbx, %rdi
callq 0x1bf90
| _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov r15, rdi
mov esi, 2Dh ; '-'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
test rax, rax
jz short loc_71F9E
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_71FAB
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_7215C
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"...
jmp loc_72124
loc_71F9E:
mov [rsp+68h+var_58], rbx
mov r14, r12
jmp loc_72065
loc_71FAB:
mov [rsp+68h+var_58], rbx
lea r14, [rsp+68h+var_50]
mov rdi, r14
mov rsi, r15
xor edx, edx
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbp, [r14]
call ___errno_location
mov r13, rax
mov eax, [rax]
mov [rsp+68h+var_64], eax
mov dword ptr [r13+0], 0
lea rbx, [rsp+68h+var_60]
mov rdi, rbp
mov rsi, rbx
mov edx, 0Ah
call _strtoull
cmp [rbx], rbp
jz loc_7216F
mov r14, rax
mov eax, [r13+0]
test eax, eax
jz short loc_72018
cmp eax, 22h ; '"'
jnz short loc_72020
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_72018:
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_72020:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7203B
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7203B:
cmp r14, 200h
jb short loc_72065
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_7215C
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aStartIndexOutO; "Start index out of bounds!\n"
jmp loc_72124
loc_72065:
mov rax, [r15+8]
dec rax
mov r13d, 1FFh
cmp r12, rax
jz loc_72137
inc r12
lea rbx, [rsp+68h+var_50]
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rbx, [rbx]
call ___errno_location
mov r15, rax
mov ebp, [rax]
mov dword ptr [rax], 0
lea r12, [rsp+68h+var_60]
mov rdi, rbx
mov rsi, r12
mov edx, 0Ah
call _strtoull
cmp [r12], rbx
jz loc_7217B
mov r13, rax
mov eax, [r15]
test eax, eax
jz short loc_720E5
cmp eax, 22h ; '"'
jnz short loc_720E8
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_720E5:
mov [r15], ebp
loc_720E8:
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72103
mov rsi, [rsp+68h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72103:
cmp r13, 200h
jb short loc_72137
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_7215C
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aEndIndexOutOfB; "End index out of bounds!\n"
loc_72124:
xor ebp, ebp
mov rdi, rax
mov esi, 4
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short loc_7215E
loc_72137:
mov bpl, 1
cmp r14, r13
ja short loc_7215E
mov rdi, [rsp+68h+var_58]
add rdi, r14
sub r13, r14
inc r13
mov esi, 1
mov rdx, r13
call _memset
jmp short loc_7215E
loc_7215C:
xor ebp, ebp
loc_7215E:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7216F:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
loc_7217B:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
mov rbx, rax
cmp dword ptr [r15], 0
jnz short loc_72193
mov [r15], ebp
loc_72193:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_1; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
jmp short loc_721C5
mov rbx, rax
cmp dword ptr [r13+0], 0
jnz short loc_721B6
mov eax, [rsp+68h+var_64]
mov [r13+0], eax
loc_721B6:
lea rdi, [rsp+68h+var_60]
lea rsi, [rsp+68h+var_50]
call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_2; parse_cpu_range(std::string const&,bool (&)[512]) [clone]
loc_721C5:
mov rdi, rbx
call __Unwind_Resume
| long long parse_cpu_range(long long a1, long long a2, double a3)
{
void *v3; // rbp
_DWORD *v4; // r15
long long v5; // rax
long long v6; // r12
int v7; // eax
int v8; // ecx
int v9; // r8d
int v10; // r9d
const char *v11; // rdx
unsigned long long v12; // r14
int *v13; // r13
long long v14; // rax
unsigned long long v15; // r13
void *v16; // rbx
long long v17; // rax
long long v19; // rbx
int v20; // [rsp+4h] [rbp-64h]
void *v21; // [rsp+8h] [rbp-60h] BYREF
long long v22; // [rsp+10h] [rbp-58h]
void *v23[2]; // [rsp+18h] [rbp-50h] BYREF
_QWORD v24[8]; // [rsp+28h] [rbp-40h] BYREF
v4 = (_DWORD *)a1;
v5 = std::string::find(a1, 45LL, 0LL);
v6 = v5;
if ( v5 )
{
if ( v5 == -1 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
LABEL_27:
LODWORD(v3) = 0;
common_log_add(v7, 4, (_DWORD)v11, v8, v9, v10);
return (unsigned int)v3;
}
goto LABEL_30;
}
v22 = a2;
std::string::substr(v23, a1, 0LL, v5);
v3 = v23[0];
v13 = (int *)__errno_location(a3);
v20 = *v13;
*v13 = 0;
v14 = strtoull(v3, &v21, 10LL);
if ( v21 == v3 )
{
std::__throw_invalid_argument("stoull");
goto LABEL_33;
}
v12 = v14;
if ( *v13 )
{
if ( *v13 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v13 = v20;
}
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
if ( v12 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "Start index out of bounds!\n";
goto LABEL_27;
}
LABEL_30:
LODWORD(v3) = 0;
return (unsigned int)v3;
}
}
else
{
v22 = a2;
v12 = 0LL;
}
v15 = 511LL;
if ( v6 == *(_QWORD *)(a1 + 8) - 1LL )
goto LABEL_28;
std::string::substr(v23, a1, v6 + 1, -1LL);
v16 = v23[0];
v4 = (_DWORD *)__errno_location(a3);
LODWORD(v3) = *v4;
*v4 = 0;
v17 = strtoull(v16, &v21, 10LL);
if ( v21 == v16 )
{
LABEL_33:
v19 = std::__throw_invalid_argument("stoull");
if ( !*v4 )
*v4 = (_DWORD)v3;
parse_cpu_range((long long)&v21, v23);
_Unwind_Resume(v19);
}
v15 = v17;
if ( *v4 )
{
if ( *v4 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v4 = (_DWORD)v3;
}
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
if ( v15 >= 0x200 )
{
if ( common_log_verbosity_thold >= 0 )
{
v7 = common_log_main();
v11 = "End index out of bounds!\n";
goto LABEL_27;
}
goto LABEL_30;
}
LABEL_28:
LOBYTE(v3) = 1;
if ( v12 <= v15 )
memset(v12 + v22, 1LL, v15 - v12 + 1);
return (unsigned int)v3;
}
| parse_cpu_range:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV R15,RDI
MOV ESI,0x2d
XOR EDX,EDX
CALL 0x0011bb10
MOV R12,RAX
TEST RAX,RAX
JZ 0x00171f9e
CMP R12,-0x1
JNZ 0x00171fab
LEA RAX,[0x22f428]
CMP dword ptr [RAX],0x0
JS 0x0017215c
CALL 0x001cc4d7
LEA RDX,[0x1f09bf]
JMP 0x00172124
LAB_00171f9e:
MOV qword ptr [RSP + 0x10],RBX
MOV R14,R12
JMP 0x00172065
LAB_00171fab:
MOV qword ptr [RSP + 0x10],RBX
LEA R14,[RSP + 0x18]
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x0011b910
MOV RBP,qword ptr [R14]
CALL 0x0011b060
MOV R13,RAX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
MOV dword ptr [R13],0x0
LEA RBX,[RSP + 0x8]
MOV RDI,RBP
MOV RSI,RBX
MOV EDX,0xa
CALL 0x0011bb50
CMP qword ptr [RBX],RBP
JZ 0x0017216f
MOV R14,RAX
MOV EAX,dword ptr [R13]
TEST EAX,EAX
JZ 0x00172018
CMP EAX,0x22
JNZ 0x00172020
LAB_0017200c:
LEA RDI,[0x1f1580]
CALL 0x0011bc90
LAB_00172018:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R13],EAX
LAB_00172020:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0017203b
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b8c0
LAB_0017203b:
CMP R14,0x200
JC 0x00172065
LEA RAX,[0x22f428]
CMP dword ptr [RAX],0x0
JS 0x0017215c
CALL 0x001cc4d7
LEA RDX,[0x1f09fc]
JMP 0x00172124
LAB_00172065:
MOV RAX,qword ptr [R15 + 0x8]
DEC RAX
MOV R13D,0x1ff
CMP R12,RAX
JZ 0x00172137
INC R12
LEA RBX,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,-0x1
CALL 0x0011b910
MOV RBX,qword ptr [RBX]
CALL 0x0011b060
MOV R15,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R12,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV EDX,0xa
CALL 0x0011bb50
CMP qword ptr [R12],RBX
JZ 0x0017217b
MOV R13,RAX
MOV EAX,dword ptr [R15]
TEST EAX,EAX
JZ 0x001720e5
CMP EAX,0x22
JNZ 0x001720e8
LAB_001720d9:
LEA RDI,[0x1f1580]
CALL 0x0011bc90
LAB_001720e5:
MOV dword ptr [R15],EBP
LAB_001720e8:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00172103
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011b8c0
LAB_00172103:
CMP R13,0x200
JC 0x00172137
LEA RAX,[0x22f428]
CMP dword ptr [RAX],0x0
JS 0x0017215c
CALL 0x001cc4d7
LEA RDX,[0x1f0a18]
LAB_00172124:
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
XOR EAX,EAX
CALL 0x001cc574
JMP 0x0017215e
LAB_00172137:
MOV BPL,0x1
CMP R14,R13
JA 0x0017215e
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,R14
SUB R13,R14
INC R13
MOV ESI,0x1
MOV RDX,R13
CALL 0x0011b4e0
JMP 0x0017215e
LAB_0017215c:
XOR EBP,EBP
LAB_0017215e:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017216f:
LEA RDI,[0x1f1580]
CALL 0x0011b540
LAB_0017217b:
LEA RDI,[0x1f1580]
CALL 0x0011b540
LAB_00172187:
MOV RBX,RAX
CMP dword ptr [R15],0x0
JNZ 0x00172193
MOV dword ptr [R15],EBP
LAB_00172193:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x18]
CALL 0x0011c9fe
JMP 0x001721c5
LAB_001721c5:
MOV RDI,RBX
CALL 0x0011bf90
|
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */
ulong parse_cpu_range(string *param_1,bool *param_2)
{
int iVar1;
uint uVar2;
long *__nptr;
long lVar3;
int8 uVar4;
int *piVar5;
ulong uVar6;
char *pcVar7;
long *unaff_RBP;
ulong uVar8;
ulonglong uVar9;
long *local_60;
bool *local_58;
long *local_50 [2];
long local_40 [2];
lVar3 = std::__cxx11::string::find((char)param_1,0x2d);
if (lVar3 == 0) {
uVar6 = 0;
local_58 = param_2;
LAB_00172065:
uVar9 = 0x1ff;
if (lVar3 != *(long *)(param_1 + 8) + -1) {
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
__nptr = local_50[0];
param_1 = (string *)__errno_location();
uVar2 = *(uint *)param_1;
unaff_RBP = (long *)(ulong)uVar2;
*(uint *)param_1 = 0;
uVar9 = strtoull((char *)__nptr,(char **)&local_60,10);
if (local_60 == __nptr) {
LAB_0017217b:
/* try { // try from 0017217b to 00172186 has its CatchHandler @ 00172187 */
uVar4 = std::__throw_invalid_argument("stoull");
/* catch() { ... } // from try @ 001720d9 with catch @ 00172187
catch() { ... } // from try @ 0017217b with catch @ 00172187 */
if (*(uint *)param_1 == 0) {
*(uint *)param_1 = (uint)unaff_RBP;
}
parse_cpu_range((string *)&local_60,(bool *)local_50);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar4);
}
if (*(uint *)param_1 == 0) {
LAB_001720e5:
*(uint *)param_1 = uVar2;
}
else if (*(uint *)param_1 == 0x22) {
/* try { // try from 001720d9 to 001720e4 has its CatchHandler @ 00172187 */
std::__throw_out_of_range("stoull");
goto LAB_001720e5;
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (0x1ff < uVar9) {
if (common_log_verbosity_thold < 0) goto LAB_0017215c;
uVar4 = common_log_main();
pcVar7 = "End index out of bounds!\n";
goto LAB_00172124;
}
}
uVar8 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
if (uVar6 <= uVar9) {
memset(local_58 + uVar6,1,(uVar9 - uVar6) + 1);
}
}
else {
if (lVar3 == -1) {
if (common_log_verbosity_thold < 0) {
LAB_0017215c:
uVar8 = 0;
goto LAB_0017215e;
}
uVar4 = common_log_main();
pcVar7 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n";
}
else {
local_58 = param_2;
std::__cxx11::string::substr((ulong)local_50,(ulong)param_1);
unaff_RBP = local_50[0];
piVar5 = __errno_location();
iVar1 = *piVar5;
*piVar5 = 0;
uVar6 = strtoull((char *)unaff_RBP,(char **)&local_60,10);
if (local_60 == unaff_RBP) {
/* try { // try from 0017216f to 0017217a has its CatchHandler @ 001721a4 */
std::__throw_invalid_argument("stoull");
goto LAB_0017217b;
}
if (*piVar5 == 0) {
LAB_00172018:
*piVar5 = iVar1;
}
else if (*piVar5 == 0x22) {
/* try { // try from 0017200c to 00172017 has its CatchHandler @ 001721a4 */
std::__throw_out_of_range("stoull");
goto LAB_00172018;
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (uVar6 < 0x200) goto LAB_00172065;
if (common_log_verbosity_thold < 0) goto LAB_0017215c;
uVar4 = common_log_main();
pcVar7 = "Start index out of bounds!\n";
}
LAB_00172124:
uVar8 = 0;
common_log_add(uVar4,4,pcVar7);
}
LAB_0017215e:
return uVar8 & 0xffffffff;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
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++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.