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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,500 | testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper() | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-test-part.cc | HasNewFatalFailureHelper::HasNewFatalFailureHelper()
: has_new_fatal_failure_(false),
original_reporter_(
GetUnitTestImpl()->GetTestPartResultReporterForCurrentThread()) {
GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this);
} | O0 | cpp | testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper():
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x47a80
movq 0x18(%rsp), %rax
leaq 0x7cb54(%rip), %rcx # 0x9ab48
addq $0x10, %rcx
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x20(%rsp)
callq 0x450c0
movq %rax, 0x28(%rsp)
jmp 0x1e014
movq 0x28(%rsp), %rdi
callq 0x1e080
movq %rax, 0x10(%rsp)
jmp 0x1e025
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
callq 0x450c0
movq %rax, 0x8(%rsp)
jmp 0x1e03e
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x1e0a0
jmp 0x1e04f
addq $0x48, %rsp
retq
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x52430
movq 0x38(%rsp), %rdi
callq 0xb910
nopw %cs:(%rax,%rax)
| _ZN7testing8internal24HasNewFatalFailureHelperC2Ev:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rdi, [rsp+48h+var_8]; this
mov [rsp+48h+var_30], rdi
call _ZN7testing31TestPartResultReporterInterfaceC2Ev; testing::TestPartResultReporterInterface::TestPartResultReporterInterface(void)
mov rax, [rsp+48h+var_30]
lea rcx, _ZTVN7testing8internal24HasNewFatalFailureHelperE; `vtable for'testing::internal::HasNewFatalFailureHelper
add rcx, 10h
mov [rax], rcx
mov byte ptr [rax+8], 0
add rax, 10h
mov [rsp+48h+var_28], rax
call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void)
mov [rsp+48h+var_20], rax
jmp short $+2
loc_1E014:
mov rdi, [rsp+48h+var_20]; this
call _ZN7testing8internal12UnitTestImpl41GetTestPartResultReporterForCurrentThreadEv; testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(void)
mov [rsp+48h+var_38], rax
jmp short $+2
loc_1E025:
mov rax, [rsp+48h+var_28]
mov rcx, [rsp+48h+var_38]
mov [rax], rcx
call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void)
mov [rsp+48h+var_40], rax
jmp short $+2
loc_1E03E:
mov rsi, [rsp+48h+var_30]; testing::TestPartResultReporterInterface *
mov rdi, [rsp+48h+var_40]; this
call _ZN7testing8internal12UnitTestImpl41SetTestPartResultReporterForCurrentThreadEPNS_31TestPartResultReporterInterfaceE; testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread(testing::TestPartResultReporterInterface *)
jmp short $+2
loc_1E04F:
add rsp, 48h
retn
mov rdi, [rsp+arg_10]; this
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
call _ZN7testing31TestPartResultReporterInterfaceD2Ev; testing::TestPartResultReporterInterface::~TestPartResultReporterInterface()
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| long long testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper(
testing::internal::HasNewFatalFailureHelper *this)
{
testing::internal::UnitTestImpl *UnitTestImpl; // rdi
testing::internal::UnitTestImpl *v3; // [rsp+8h] [rbp-40h]
_QWORD *v5; // [rsp+20h] [rbp-28h]
testing::TestPartResultReporterInterface::TestPartResultReporterInterface(this);
*(_QWORD *)this = &`vtable for'testing::internal::HasNewFatalFailureHelper + 2;
*((_BYTE *)this + 8) = 0;
v5 = (_QWORD *)((char *)this + 16);
UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl(this);
*v5 = testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(UnitTestImpl);
v3 = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl(UnitTestImpl);
return testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread(v3, this);
}
| HasNewFatalFailureHelper:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00147a80
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x19ab48]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV byte ptr [RAX + 0x8],0x0
ADD RAX,0x10
MOV qword ptr [RSP + 0x20],RAX
LAB_0011e008:
CALL 0x001450c0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x0011e014
LAB_0011e014:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0011e080
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0011e025
LAB_0011e025:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
CALL 0x001450c0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0011e03e
LAB_0011e03e:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011e0a0
LAB_0011e04d:
JMP 0x0011e04f
LAB_0011e04f:
ADD RSP,0x48
RET
|
/* testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper() */
void __thiscall
testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper
(HasNewFatalFailureHelper *this)
{
UnitTestImpl *pUVar1;
int8 uVar2;
TestPartResultReporterInterface::TestPartResultReporterInterface
((TestPartResultReporterInterface *)this);
*(int ***)this = &PTR__HasNewFatalFailureHelper_0019ab58;
this[8] = (HasNewFatalFailureHelper)0x0;
/* try { // try from 0011e008 to 0011e04c has its CatchHandler @ 0011e054 */
pUVar1 = (UnitTestImpl *)GetUnitTestImpl();
uVar2 = UnitTestImpl::GetTestPartResultReporterForCurrentThread(pUVar1);
*(int8 *)(this + 0x10) = uVar2;
pUVar1 = (UnitTestImpl *)GetUnitTestImpl();
UnitTestImpl::SetTestPartResultReporterForCurrentThread
(pUVar1,(TestPartResultReporterInterface *)this);
return;
}
| |
34,501 | ma_clear_session_state | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_clear_session_state(MYSQL *mysql)
{
uint i;
if (!mysql || !mysql->extension)
return;
for (i= SESSION_TRACK_BEGIN; i <= SESSION_TRACK_END; i++)
{
list_free(mysql->extension->session_state[i].list, 0);
}
memset(mysql->extension->session_state, 0, sizeof(struct st_mariadb_session_state) * SESSION_TRACK_TYPES);
} | O0 | c | ma_clear_session_state:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x43531
movq -0x8(%rbp), %rax
cmpq $0x0, 0x4f0(%rax)
jne 0x43533
jmp 0x43589
movl $0x0, -0xc(%rbp)
cmpl $0x5, -0xc(%rbp)
ja 0x4356e
movq -0x8(%rbp), %rax
movq 0x4f0(%rax), %rax
addq $0x8, %rax
movl -0xc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x48120
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4353a
movq -0x8(%rbp), %rax
movq 0x4f0(%rax), %rdi
addq $0x8, %rdi
xorl %esi, %esi
movl $0x60, %edx
callq 0x362e0
addq $0x10, %rsp
popq %rbp
retq
nop
| ma_clear_session_state:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jz short loc_43531
mov rax, [rbp+var_8]
cmp qword ptr [rax+4F0h], 0
jnz short loc_43533
loc_43531:
jmp short loc_43589
loc_43533:
mov [rbp+var_C], 0
loc_4353A:
cmp [rbp+var_C], 5
ja short loc_4356E
mov rax, [rbp+var_8]
mov rax, [rax+4F0h]
add rax, 8
mov ecx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
xor esi, esi
call list_free
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_4353A
loc_4356E:
mov rax, [rbp+var_8]
mov rdi, [rax+4F0h]
add rdi, 8
xor esi, esi
mov edx, 60h ; '`'
call _memset
loc_43589:
add rsp, 10h
pop rbp
retn
| long long ma_clear_session_state(long long a1)
{
long long result; // rax
unsigned int i; // [rsp+4h] [rbp-Ch]
if ( a1 )
{
result = a1;
if ( *(_QWORD *)(a1 + 1264) )
{
for ( i = 0; i <= 5; ++i )
list_free(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 1264) + 8LL), 0LL);
return memset(*(_QWORD *)(a1 + 1264) + 8LL, 0LL, 96LL);
}
}
return result;
}
| ma_clear_session_state:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00143531
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x4f0],0x0
JNZ 0x00143533
LAB_00143531:
JMP 0x00143589
LAB_00143533:
MOV dword ptr [RBP + -0xc],0x0
LAB_0014353a:
CMP dword ptr [RBP + -0xc],0x5
JA 0x0014356e
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x4f0]
ADD RAX,0x8
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
XOR ESI,ESI
CALL 0x00148120
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0014353a
LAB_0014356e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x4f0]
ADD RDI,0x8
XOR ESI,ESI
MOV EDX,0x60
CALL 0x001362e0
LAB_00143589:
ADD RSP,0x10
POP RBP
RET
|
void ma_clear_session_state(long param_1)
{
uint local_14;
if ((param_1 != 0) && (*(long *)(param_1 + 0x4f0) != 0)) {
for (local_14 = 0; local_14 < 6; local_14 = local_14 + 1) {
list_free(*(int8 *)(*(long *)(param_1 + 0x4f0) + 8 + (ulong)local_14 * 0x10));
}
memset((void *)(*(long *)(param_1 + 0x4f0) + 8),0,0x60);
}
return;
}
| |
34,502 | common_arg::set_env(char const*) | monkey531[P]llama/common/arg.cpp | common_arg & common_arg::set_env(const char * env) {
help = help + "\n(env: " + env + ")";
this->env = env;
return *this;
} | O2 | cpp | common_arg::set_env(char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x90(%rdi), %r15
leaq 0x81de1(%rip), %rdx # 0xa9b80
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x380db
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x380bc
leaq 0x8f97d(%rip), %rdx # 0xb7743
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x380bc
leaq 0x48(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x23ac0
movq %r12, %rdi
callq 0x241b8
leaq 0x8(%rsp), %rdi
callq 0x241b8
leaq 0x28(%rsp), %rdi
callq 0x241b8
movq %r14, 0x88(%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241b8
jmp 0x27e29
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x241b8
movq %rbx, %rdi
callq 0x23f80
nop
| _ZN10common_arg7set_envEPKc:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+90h]
lea rdx, aEnv; "\n(env: "
lea r12, [rsp+88h+var_60]
mov rdi, r12
mov rsi, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r12
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rdx, a09401910201912+51h; ")"
lea rdi, [rsp+88h+var_40]
lea rsi, [rsp+88h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea r12, [rsp+88h+var_40]
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov [rbx+88h], r14
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_27E29
mov rbx, rax
loc_27E29:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| common_arg * common_arg::set_env(common_arg *this, const char *a2)
{
_BYTE v3[32]; // [rsp+8h] [rbp-80h] BYREF
_BYTE v4[32]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v5[64]; // [rsp+48h] [rbp-40h] BYREF
std::operator+<char>(v4, (char *)this + 144, "\n(env: ");
std::operator+<char>(v3, v4, a2);
std::operator+<char>(v5, v3, ")");
std::string::operator=((char *)this + 144, v5);
std::string::~string(v5);
std::string::~string(v3);
std::string::~string(v4);
*((_QWORD *)this + 17) = a2;
return this;
}
| set_env:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x90]
LEA RDX,[0x1a9b80]
LEA R12,[RSP + 0x28]
MOV RDI,R12
MOV RSI,R15
CALL 0x001380db
LAB_00127daf:
LEA RDI,[RSP + 0x8]
MOV RSI,R12
MOV RDX,R14
CALL 0x001380bc
LAB_00127dbf:
LEA RDX,[0x1b7743]
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x8]
CALL 0x001380bc
LAB_00127dd5:
LEA R12,[RSP + 0x48]
MOV RDI,R15
MOV RSI,R12
CALL 0x00123ac0
MOV RDI,R12
CALL 0x001241b8
LEA RDI,[RSP + 0x8]
CALL 0x001241b8
LEA RDI,[RSP + 0x28]
CALL 0x001241b8
MOV qword ptr [RBX + 0x88],R14
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
/* common_arg::set_env(char const*) */
common_arg * __thiscall common_arg::set_env(common_arg *this,char *param_1)
{
string local_80 [32];
string local_60 [32];
string local_40 [32];
std::operator+(local_60,(char *)(this + 0x90));
/* try { // try from 00127daf to 00127dbe has its CatchHandler @ 00127e26 */
std::operator+(local_80,(char *)local_60);
/* try { // try from 00127dbf to 00127dd4 has its CatchHandler @ 00127e17 */
std::operator+(local_40,(char *)local_80);
std::__cxx11::string::operator=((string *)(this + 0x90),local_40);
std::__cxx11::string::~string(local_40);
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string(local_60);
*(char **)(this + 0x88) = param_1;
return this;
}
| |
34,503 | mi_ft_segiterator | eloqsql/storage/myisam/ft_update.c | uint _mi_ft_segiterator(register FT_SEG_ITERATOR *ftsi)
{
DBUG_ENTER("_mi_ft_segiterator");
if (!ftsi->num)
DBUG_RETURN(0);
ftsi->num--;
if (!ftsi->seg)
DBUG_RETURN(1);
ftsi->seg--;
if (ftsi->seg->null_bit &&
(ftsi->rec[ftsi->seg->null_pos] & ftsi->seg->null_bit))
{
ftsi->pos=0;
DBUG_RETURN(1);
}
ftsi->pos= ftsi->rec+ftsi->seg->start;
if (ftsi->seg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= (ftsi->seg->bit_start);
ftsi->len= (pack_length == 1 ? (uint) *(uchar*) ftsi->pos :
uint2korr(ftsi->pos));
ftsi->pos+= pack_length; /* Skip VARCHAR length */
DBUG_RETURN(1);
}
if (ftsi->seg->flag & HA_BLOB_PART)
{
ftsi->len=_mi_calc_blob_length(ftsi->seg->bit_start,ftsi->pos);
memcpy((char**) &ftsi->pos, ftsi->pos+ftsi->seg->bit_start, sizeof(char*));
DBUG_RETURN(1);
}
ftsi->len=ftsi->seg->length;
DBUG_RETURN(1);
} | O3 | c | mi_ft_segiterator:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl (%rdi), %eax
testl %eax, %eax
je 0x75059
movq %rdi, %r14
decl %eax
movl %eax, (%rdi)
movq 0x8(%rdi), %rax
movl $0x1, %ebx
testq %rax, %rax
je 0x750bf
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r14)
movb -0x7(%rax), %cl
movq 0x10(%r14), %rsi
testb %cl, %cl
je 0x7505d
movl -0x14(%rax), %edx
testb %cl, (%rsi,%rdx)
je 0x7505d
movq $0x0, 0x18(%r14)
jmp 0x750bf
xorl %ebx, %ebx
jmp 0x750bf
movl -0x18(%rax), %ecx
addq %rcx, %rsi
movq %rsi, 0x18(%r14)
movzwl -0xe(%rax), %ecx
testb $0x8, %cl
jne 0x7507f
testb $0x20, %cl
jne 0x7508e
movzwl -0xc(%rax), %eax
movl %eax, 0x4(%r14)
jmp 0x750bf
movzbl -0x6(%rax), %eax
cmpq $0x1, %rax
jne 0x750b1
movzbl (%rsi), %ecx
jmp 0x750b4
movzbl -0x6(%rax), %edi
callq 0x79bbd
movl %eax, 0x4(%r14)
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movzbl 0x1a(%rax), %eax
movq (%rcx,%rax), %rax
movq %rax, 0x18(%r14)
jmp 0x750bf
movzwl (%rsi), %ecx
movl %ecx, 0x4(%r14)
addq %rax, %rsi
movq %rsi, 0x18(%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
| _mi_ft_segiterator:
push rbp
mov rbp, rsp
push r14
push rbx
mov eax, [rdi]
test eax, eax
jz short loc_75059
mov r14, rdi
dec eax
mov [rdi], eax
mov rax, [rdi+8]
mov ebx, 1
test rax, rax
jz loc_750BF
lea rcx, [rax-20h]
mov [r14+8], rcx
mov cl, [rax-7]
mov rsi, [r14+10h]
test cl, cl
jz short loc_7505D
mov edx, [rax-14h]
test [rsi+rdx], cl
jz short loc_7505D
mov qword ptr [r14+18h], 0
jmp short loc_750BF
loc_75059:
xor ebx, ebx
jmp short loc_750BF
loc_7505D:
mov ecx, [rax-18h]
add rsi, rcx
mov [r14+18h], rsi
movzx ecx, word ptr [rax-0Eh]
test cl, 8
jnz short loc_7507F
test cl, 20h
jnz short loc_7508E
movzx eax, word ptr [rax-0Ch]
mov [r14+4], eax
jmp short loc_750BF
loc_7507F:
movzx eax, byte ptr [rax-6]
cmp rax, 1
jnz short loc_750B1
movzx ecx, byte ptr [rsi]
jmp short loc_750B4
loc_7508E:
movzx edi, byte ptr [rax-6]
call _mi_calc_blob_length
mov [r14+4], eax
mov rax, [r14+8]
mov rcx, [r14+18h]
movzx eax, byte ptr [rax+1Ah]
mov rax, [rcx+rax]
mov [r14+18h], rax
jmp short loc_750BF
loc_750B1:
movzx ecx, word ptr [rsi]
loc_750B4:
mov [r14+4], ecx
add rsi, rax
mov [r14+18h], rsi
loc_750BF:
mov eax, ebx
pop rbx
pop r14
pop rbp
retn
| long long mi_ft_segiterator(long long a1)
{
long long v1; // rax
unsigned int v2; // ebx
unsigned __int8 v3; // cl
long long v4; // rsi
unsigned __int8 *v5; // rsi
__int16 v6; // cx
long long v7; // rax
int v8; // ecx
if ( *(_DWORD *)a1 )
{
--*(_DWORD *)a1;
v1 = *(_QWORD *)(a1 + 8);
v2 = 1;
if ( v1 )
{
*(_QWORD *)(a1 + 8) = v1 - 32;
v3 = *(_BYTE *)(v1 - 7);
v4 = *(_QWORD *)(a1 + 16);
if ( v3 && (v3 & *(_BYTE *)(v4 + *(unsigned int *)(v1 - 20))) != 0 )
{
*(_QWORD *)(a1 + 24) = 0LL;
}
else
{
v5 = (unsigned __int8 *)(*(unsigned int *)(v1 - 24) + v4);
*(_QWORD *)(a1 + 24) = v5;
v6 = *(_WORD *)(v1 - 14);
if ( (v6 & 8) != 0 )
{
v7 = *(unsigned __int8 *)(v1 - 6);
if ( v7 == 1 )
v8 = *v5;
else
v8 = *(unsigned __int16 *)v5;
*(_DWORD *)(a1 + 4) = v8;
*(_QWORD *)(a1 + 24) = &v5[v7];
}
else if ( (v6 & 0x20) != 0 )
{
*(_DWORD *)(a1 + 4) = mi_calc_blob_length(*(unsigned __int8 *)(v1 - 6));
*(_QWORD *)(a1 + 24) = *(_QWORD *)(*(_QWORD *)(a1 + 24) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + 26LL));
}
else
{
*(_DWORD *)(a1 + 4) = *(unsigned __int16 *)(v1 - 12);
}
}
}
}
else
{
return 0;
}
return v2;
}
| _mi_ft_segiterator:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EAX,dword ptr [RDI]
TEST EAX,EAX
JZ 0x00175059
MOV R14,RDI
DEC EAX
MOV dword ptr [RDI],EAX
MOV RAX,qword ptr [RDI + 0x8]
MOV EBX,0x1
TEST RAX,RAX
JZ 0x001750bf
LEA RCX,[RAX + -0x20]
MOV qword ptr [R14 + 0x8],RCX
MOV CL,byte ptr [RAX + -0x7]
MOV RSI,qword ptr [R14 + 0x10]
TEST CL,CL
JZ 0x0017505d
MOV EDX,dword ptr [RAX + -0x14]
TEST byte ptr [RSI + RDX*0x1],CL
JZ 0x0017505d
MOV qword ptr [R14 + 0x18],0x0
JMP 0x001750bf
LAB_00175059:
XOR EBX,EBX
JMP 0x001750bf
LAB_0017505d:
MOV ECX,dword ptr [RAX + -0x18]
ADD RSI,RCX
MOV qword ptr [R14 + 0x18],RSI
MOVZX ECX,word ptr [RAX + -0xe]
TEST CL,0x8
JNZ 0x0017507f
TEST CL,0x20
JNZ 0x0017508e
MOVZX EAX,word ptr [RAX + -0xc]
MOV dword ptr [R14 + 0x4],EAX
JMP 0x001750bf
LAB_0017507f:
MOVZX EAX,byte ptr [RAX + -0x6]
CMP RAX,0x1
JNZ 0x001750b1
MOVZX ECX,byte ptr [RSI]
JMP 0x001750b4
LAB_0017508e:
MOVZX EDI,byte ptr [RAX + -0x6]
CALL 0x00179bbd
MOV dword ptr [R14 + 0x4],EAX
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x18]
MOVZX EAX,byte ptr [RAX + 0x1a]
MOV RAX,qword ptr [RCX + RAX*0x1]
MOV qword ptr [R14 + 0x18],RAX
JMP 0x001750bf
LAB_001750b1:
MOVZX ECX,word ptr [RSI]
LAB_001750b4:
MOV dword ptr [R14 + 0x4],ECX
ADD RSI,RAX
MOV qword ptr [R14 + 0x18],RSI
LAB_001750bf:
MOV EAX,EBX
POP RBX
POP R14
POP RBP
RET
|
int8 _mi_ft_segiterator(int *param_1)
{
byte bVar1;
long lVar2;
int iVar3;
uint uVar4;
int8 uVar5;
ushort *puVar6;
if (*param_1 == 0) {
uVar5 = 0;
}
else {
*param_1 = *param_1 + -1;
lVar2 = *(long *)(param_1 + 2);
uVar5 = 1;
if (lVar2 != 0) {
*(long *)(param_1 + 2) = lVar2 + -0x20;
if ((*(byte *)(lVar2 + -7) == 0) ||
((*(byte *)(*(long *)(param_1 + 4) + (ulong)*(uint *)(lVar2 + -0x14)) &
*(byte *)(lVar2 + -7)) == 0)) {
puVar6 = (ushort *)(*(long *)(param_1 + 4) + (ulong)*(uint *)(lVar2 + -0x18));
*(ushort **)(param_1 + 6) = puVar6;
if ((*(ushort *)(lVar2 + -0xe) & 8) == 0) {
if ((*(ushort *)(lVar2 + -0xe) & 0x20) == 0) {
param_1[1] = (uint)*(ushort *)(lVar2 + -0xc);
}
else {
iVar3 = _mi_calc_blob_length(*(int1 *)(lVar2 + -6));
param_1[1] = iVar3;
*(int8 *)(param_1 + 6) =
*(int8 *)
(*(long *)(param_1 + 6) + (ulong)*(byte *)(*(long *)(param_1 + 2) + 0x1a));
}
}
else {
bVar1 = *(byte *)(lVar2 + -6);
if ((ulong)bVar1 == 1) {
uVar4 = (uint)(byte)*puVar6;
}
else {
uVar4 = (uint)*puVar6;
}
param_1[1] = uVar4;
*(byte **)(param_1 + 6) = (byte *)((long)puVar6 + (ulong)bVar1);
}
}
else {
param_1[6] = 0;
param_1[7] = 0;
}
}
}
return uVar5;
}
| |
34,504 | mi_ft_erase | eloqsql/storage/myisam/ft_update.c | static int _mi_ft_erase(MI_INFO *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
uint key_length, err=0;
DBUG_ENTER("_mi_ft_erase");
for (; wlist->pos; wlist++)
{
key_length=_ft_make_key(info,keynr,keybuf,wlist,filepos);
if (_mi_ck_delete(info,keynr,(uchar*) keybuf,key_length))
err=1;
}
DBUG_RETURN(err);
} | O3 | c | mi_ft_erase:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, (%rcx)
je 0x48422
movq %rcx, %r15
movq %rdi, -0x48(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
xorl %r13d, %r13d
movq %r8, -0x40(%rbp)
movq -0x48(%rbp), %r12
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r14
movq %r12, %rdi
movl %ebx, %esi
movq %r14, %rdx
movq %r15, %rcx
movq -0x40(%rbp), %r8
callq 0x48315
movq %r12, %rdi
movl %ebx, %esi
movq %r14, %rdx
movl %eax, %ecx
callq 0x48e91
testl %eax, %eax
movl $0x1, %eax
cmovnel %eax, %r13d
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x483e7
jmp 0x48425
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_erase:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp qword ptr [rcx], 0
jz short loc_48422
mov r15, rcx
mov [rbp+var_48], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
xor r13d, r13d
mov [rbp+var_40], r8
mov r12, [rbp+var_48]
mov ebx, [rbp+var_2C]
mov r14, [rbp+var_38]
loc_483E7:
mov rdi, r12
mov esi, ebx
mov rdx, r14
mov rcx, r15
mov r8, [rbp+var_40]
call _ft_make_key
mov rdi, r12
mov esi, ebx
mov rdx, r14
mov ecx, eax
call _mi_ck_delete
test eax, eax
mov eax, 1
cmovnz r13d, eax
cmp qword ptr [r15+18h], 0
lea r15, [r15+18h]
jnz short loc_483E7
jmp short loc_48425
loc_48422:
xor r13d, r13d
loc_48425:
mov eax, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_ft_erase(long long a1, unsigned int a2, char *a3, _QWORD *a4, long long a5, __m128i a6)
{
long long v6; // r15
unsigned int v7; // r13d
unsigned int key; // eax
bool v10; // zf
if ( *a4 )
{
v6 = (long long)a4;
v7 = 0;
do
{
key = ft_make_key(a1, a2, a3, v6, a5, a6);
if ( (unsigned int)mi_ck_delete(a1, a2, a3, key) )
v7 = 1;
v10 = *(_QWORD *)(v6 + 24) == 0LL;
v6 += 24LL;
}
while ( !v10 );
}
else
{
return 0;
}
return v7;
}
| _mi_ft_erase:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP qword ptr [RCX],0x0
JZ 0x00148422
MOV R15,RCX
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
XOR R13D,R13D
MOV qword ptr [RBP + -0x40],R8
MOV R12,qword ptr [RBP + -0x48]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R14,qword ptr [RBP + -0x38]
LAB_001483e7:
MOV RDI,R12
MOV ESI,EBX
MOV RDX,R14
MOV RCX,R15
MOV R8,qword ptr [RBP + -0x40]
CALL 0x00148315
MOV RDI,R12
MOV ESI,EBX
MOV RDX,R14
MOV ECX,EAX
CALL 0x00148e91
TEST EAX,EAX
MOV EAX,0x1
CMOVNZ R13D,EAX
CMP qword ptr [R15 + 0x18],0x0
LEA R15,[R15 + 0x18]
JNZ 0x001483e7
JMP 0x00148425
LAB_00148422:
XOR R13D,R13D
LAB_00148425:
MOV EAX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
_mi_ft_erase(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5)
{
long *plVar1;
int4 uVar2;
int iVar3;
int4 uVar4;
if (*param_4 == 0) {
uVar4 = 0;
}
else {
uVar4 = 0;
do {
uVar2 = _ft_make_key(param_1,param_2,param_3,param_4,param_5);
iVar3 = _mi_ck_delete(param_1,param_2,param_3,uVar2);
if (iVar3 != 0) {
uVar4 = 1;
}
plVar1 = param_4 + 3;
param_4 = param_4 + 3;
} while (*plVar1 != 0);
}
return uVar4;
}
| |
34,505 | js_async_module_execution_rejected | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_module_execution_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSModuleDef *module = JS_VALUE_GET_PTR(func_data[0]);
JSValueConst error = argv[0];
int i;
if (js_check_stack_overflow(ctx->rt, 0))
return JS_ThrowStackOverflow(ctx);
if (module->status == JS_MODULE_STATUS_EVALUATED) {
assert(module->eval_has_exception);
return JS_UNDEFINED;
}
assert(module->status == JS_MODULE_STATUS_EVALUATING_ASYNC);
assert(!module->eval_has_exception);
assert(module->async_evaluation);
module->eval_has_exception = TRUE;
module->eval_exception = JS_DupValue(ctx, error);
module->status = JS_MODULE_STATUS_EVALUATED;
for(i = 0; i < module->async_parent_modules_count; i++) {
JSModuleDef *m = module->async_parent_modules[i];
JSValue m_obj = JS_NewModuleValue(ctx, m);
js_async_module_execution_rejected(ctx, JS_UNDEFINED, 1, &error, 0,
&m_obj);
JS_FreeValue(ctx, m_obj);
}
if (!JS_IsUndefined(module->promise)) {
JSValue ret_val;
assert(module->cycle_root == module);
ret_val = JS_Call(ctx, module->resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret_val);
}
return JS_UNDEFINED;
} | O1 | c | js_async_module_execution_rejected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x10(%rbp), %rax
movq (%rax), %r13
movups (%r8), %xmm0
movaps %xmm0, -0x50(%rbp)
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
jbe 0x4501d
leaq 0x59fce(%rip), %rsi # 0x9efd6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20add
movl $0x6, %r14d
jmp 0x45137
movzbl 0x83(%r13), %eax
shll $0x18, %eax
movl $0x3, %r14d
cmpl $0x5000000, %eax # imm = 0x5000000
je 0x45137
movb $0x1, 0xf0(%r13)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rax, -0x38(%rbp)
cmpl $-0x9, %ecx
jb 0x45058
movq -0x38(%rbp), %rdx
incl (%rdx)
movq %rax, 0xf8(%r13)
movq %rcx, 0x100(%r13)
movb $0x5, 0x83(%r13)
cmpl $0x0, 0xa0(%r13)
jle 0x450cf
xorl %r14d, %r14d
leaq -0x50(%rbp), %r15
movq 0x98(%r13), %rax
movq (%rax,%r14,8), %r12
incl (%r12)
movq %r12, -0x38(%rbp)
movq $-0x3, -0x30(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r15, %r8
callq 0x44fd1
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq $-0x3, %rdx
callq 0x1d8c6
incq %r14
movslq 0xa0(%r13), %rax
cmpq %rax, %r14
jl 0x4507f
cmpl $0x3, 0xc8(%r13)
movl $0x3, %r14d
je 0x45137
movq 0xe0(%r13), %rsi
movq 0xe8(%r13), %rdx
movl $0x0, -0x38(%rbp)
movq $0x3, -0x30(%rbp)
movups -0x38(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x50(%rbp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x284ca
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1d8c6
xorl %eax, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_async_module_execution_rejected:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
mov rax, [rbp+arg_0]
mov r13, [rax]
movups xmm0, xmmword ptr [r8]
movaps [rbp+var_50], xmm0
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
jbe short loc_4501D
lea rsi, aMaximumCallSta; "Maximum call stack size exceeded"
mov rdi, rbx
xor eax, eax
call JS_ThrowRangeError
mov r14d, 6
jmp loc_45137
loc_4501D:
movzx eax, byte ptr [r13+83h]
shl eax, 18h
mov r14d, 3
cmp eax, 5000000h
jz loc_45137
mov byte ptr [r13+0F0h], 1
mov rax, qword ptr [rbp+var_50]
mov rcx, qword ptr [rbp+var_50+8]
mov qword ptr [rbp+var_38], rax
cmp ecx, 0FFFFFFF7h
jb short loc_45058
mov rdx, qword ptr [rbp+var_38]
inc dword ptr [rdx]
loc_45058:
mov [r13+0F8h], rax
mov [r13+100h], rcx
mov byte ptr [r13+83h], 5
cmp dword ptr [r13+0A0h], 0
jle short loc_450CF
xor r14d, r14d
lea r15, [rbp+var_50]
loc_4507F:
mov rax, [r13+98h]
mov r12, [rax+r14*8]
inc dword ptr [r12]
mov qword ptr [rbp+var_38], r12
mov qword ptr [rbp+var_38+8], 0FFFFFFFFFFFFFFFDh
lea rax, [rbp+var_38]
mov qword ptr [rsp+70h+var_70], rax
mov rdi, rbx
mov r8, r15
call js_async_module_execution_rejected
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, 0FFFFFFFFFFFFFFFDh
call JS_FreeValueRT
inc r14
movsxd rax, dword ptr [r13+0A0h]
cmp r14, rax
jl short loc_4507F
loc_450CF:
cmp dword ptr [r13+0C8h], 3
mov r14d, 3
jz short loc_45137
mov rsi, [r13+0E0h]
mov rdx, [r13+0E8h]
mov dword ptr [rbp+var_38], 0
mov qword ptr [rbp+var_38+8], 3
movups xmm0, [rbp+var_38]
movups [rsp+70h+var_70], xmm0
lea rax, [rbp+var_50]
mov [rsp+70h+var_60], rax
mov [rsp+70h+var_58], 2
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
loc_45137:
xor eax, eax
mov rdx, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_async_module_execution_rejected(
long long a1,
int a2,
long long a3,
long long a4,
__m128 *a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
long long *a15)
{
long long v15; // r13
__m128 v16; // xmm0
unsigned long long v17; // rax
unsigned long long v18; // rcx
long long v19; // r14
_DWORD *v20; // r12
long long v21; // rsi
long long v22; // rdx
_DWORD *v23; // rax
long long v24; // rdx
char v26; // [rsp+0h] [rbp-70h]
__m128 v27; // [rsp+20h] [rbp-50h] BYREF
__m128 v28; // [rsp+38h] [rbp-38h] BYREF
long long savedregs; // [rsp+70h] [rbp+0h] BYREF
v15 = *a15;
v16 = *a5;
v27 = *a5;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs )
{
if ( *(unsigned __int8 *)(v15 + 131) << 24 != 83886080 )
{
*(_BYTE *)(v15 + 240) = 1;
v18 = v27.m128_u64[1];
v17 = v27.m128_u64[0];
v28.m128_u64[0] = v27.m128_u64[0];
if ( v27.m128_i32[2] >= 0xFFFFFFF7 )
{
LODWORD(a3) = v28.m128_i32[0];
++*(_DWORD *)v28.m128_u64[0];
}
*(_QWORD *)(v15 + 248) = v17;
*(_QWORD *)(v15 + 256) = v18;
*(_BYTE *)(v15 + 131) = 5;
if ( *(int *)(v15 + 160) > 0 )
{
v19 = 0LL;
do
{
v20 = *(_DWORD **)(*(_QWORD *)(v15 + 152) + 8 * v19);
++*v20;
v28.m128_u64[0] = (unsigned long long)v20;
v28.m128_u64[1] = -3LL;
js_async_module_execution_rejected(a1, a2, a3, v18, (int)&v27, a6, (long long)&v28);
a2 = (int)v20;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v20, -3LL);
++v19;
}
while ( v19 < *(int *)(v15 + 160) );
}
if ( *(_DWORD *)(v15 + 200) != 3 )
{
v21 = *(_QWORD *)(v15 + 224);
v22 = *(_QWORD *)(v15 + 232);
v28.m128_i32[0] = 0;
v28.m128_u64[1] = 3LL;
v23 = (_DWORD *)JS_CallInternal(
a1,
v21,
v22,
0LL,
3LL,
1LL,
v28,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
0,
3,
(long long)&v27,
2u);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v24);
}
}
}
else
{
JS_ThrowRangeError(
a1,
(long long)"Maximum call stack size exceeded",
a3,
a4,
(long long)a5,
a6,
v16,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v26);
}
return 0LL;
}
| js_async_module_execution_rejected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RAX,qword ptr [RBP + 0x10]
MOV R13,qword ptr [RAX]
MOVUPS XMM0,xmmword ptr [R8]
MOVAPS xmmword ptr [RBP + -0x50],XMM0
MOV RAX,qword ptr [RDI + 0x18]
CMP qword ptr [RAX + 0xe8],RBP
JBE 0x0014501d
LEA RSI,[0x19efd6]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00120add
MOV R14D,0x6
JMP 0x00145137
LAB_0014501d:
MOVZX EAX,byte ptr [R13 + 0x83]
SHL EAX,0x18
MOV R14D,0x3
CMP EAX,0x5000000
JZ 0x00145137
MOV byte ptr [R13 + 0xf0],0x1
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
CMP ECX,-0x9
JC 0x00145058
MOV RDX,qword ptr [RBP + -0x38]
INC dword ptr [RDX]
LAB_00145058:
MOV qword ptr [R13 + 0xf8],RAX
MOV qword ptr [R13 + 0x100],RCX
MOV byte ptr [R13 + 0x83],0x5
CMP dword ptr [R13 + 0xa0],0x0
JLE 0x001450cf
XOR R14D,R14D
LEA R15,[RBP + -0x50]
LAB_0014507f:
MOV RAX,qword ptr [R13 + 0x98]
MOV R12,qword ptr [RAX + R14*0x8]
INC dword ptr [R12]
MOV qword ptr [RBP + -0x38],R12
MOV qword ptr [RBP + -0x30],-0x3
LEA RAX,[RBP + -0x38]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV R8,R15
CALL 0x00144fd1
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,-0x3
CALL 0x0011d8c6
INC R14
MOVSXD RAX,dword ptr [R13 + 0xa0]
CMP R14,RAX
JL 0x0014507f
LAB_001450cf:
CMP dword ptr [R13 + 0xc8],0x3
MOV R14D,0x3
JZ 0x00145137
MOV RSI,qword ptr [R13 + 0xe0]
MOV RDX,qword ptr [R13 + 0xe8]
MOV dword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x30],0x3
MOVUPS XMM0,xmmword ptr [RBP + -0x38]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RBP + -0x50]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,RBX
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001284ca
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
CALL 0x0011d8c6
LAB_00145137:
XOR EAX,EAX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_async_module_execution_rejected(long param_1)
{
long lVar1;
int *piVar2;
int1 auVar3 [16];
int8 uVar4;
int8 *in_R8;
ulong uVar5;
long lVar6;
long *in_stack_00000008;
int4 local_58;
int4 uStack_54;
uint uStack_50;
int4 uStack_4c;
int *local_40;
int8 uStack_38;
lVar1 = *in_stack_00000008;
local_58 = *(int4 *)in_R8;
uStack_54 = *(int4 *)((long)in_R8 + 4);
local_40 = (int *)*in_R8;
uStack_50 = *(uint *)(in_R8 + 1);
uStack_4c = *(int4 *)((long)in_R8 + 0xc);
uVar4 = in_R8[1];
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) {
JS_ThrowRangeError(param_1,"Maximum call stack size exceeded");
uVar5 = 6;
}
else {
uVar5 = 3;
if (*(char *)(lVar1 + 0x83) != '\x05') {
*(int1 *)(lVar1 + 0xf0) = 1;
if (0xfffffff6 < uStack_50) {
*local_40 = *local_40 + 1;
}
*(int **)(lVar1 + 0xf8) = local_40;
*(int8 *)(lVar1 + 0x100) = uVar4;
*(int1 *)(lVar1 + 0x83) = 5;
if (0 < *(int *)(lVar1 + 0xa0)) {
lVar6 = 0;
do {
piVar2 = *(int **)(*(long *)(lVar1 + 0x98) + lVar6 * 8);
*piVar2 = *piVar2 + 1;
uStack_38 = 0xfffffffffffffffd;
local_40 = piVar2;
js_async_module_execution_rejected(param_1);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar2,0xfffffffffffffffd);
lVar6 = lVar6 + 1;
} while (lVar6 < *(int *)(lVar1 + 0xa0));
}
piVar2 = local_40;
uVar5 = 3;
if (*(int *)(lVar1 + 200) != 3) {
local_40 = (int *)((ulong)local_40 & 0xffffffff00000000);
uStack_38 = 3;
uVar4 = JS_CallInternal(param_1,*(int8 *)(lVar1 + 0xe0),*(int8 *)(lVar1 + 0xe8),
0,3,1,(ulong)piVar2 & 0xffffffff00000000,3,&local_58,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4);
}
}
}
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar5;
return auVar3 << 0x40;
}
| |
34,506 | js_async_module_execution_rejected | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_module_execution_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSModuleDef *module = JS_VALUE_GET_PTR(func_data[0]);
JSValueConst error = argv[0];
int i;
if (js_check_stack_overflow(ctx->rt, 0))
return JS_ThrowStackOverflow(ctx);
if (module->status == JS_MODULE_STATUS_EVALUATED) {
assert(module->eval_has_exception);
return JS_UNDEFINED;
}
assert(module->status == JS_MODULE_STATUS_EVALUATING_ASYNC);
assert(!module->eval_has_exception);
assert(module->async_evaluation);
module->eval_has_exception = TRUE;
module->eval_exception = JS_DupValue(ctx, error);
module->status = JS_MODULE_STATUS_EVALUATED;
for(i = 0; i < module->async_parent_modules_count; i++) {
JSModuleDef *m = module->async_parent_modules[i];
JSValue m_obj = JS_NewModuleValue(ctx, m);
js_async_module_execution_rejected(ctx, JS_UNDEFINED, 1, &error, 0,
&m_obj);
JS_FreeValue(ctx, m_obj);
}
if (!JS_IsUndefined(module->promise)) {
JSValue ret_val;
assert(module->cycle_root == module);
ret_val = JS_Call(ctx, module->resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret_val);
}
return JS_UNDEFINED;
} | O2 | c | js_async_module_execution_rejected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x10(%rbp), %rax
movq (%rax), %r14
movups (%r8), %xmm0
movaps %xmm0, -0x40(%rbp)
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
jbe 0x3cc37
movq %rbx, %rdi
callq 0x35d91
pushq $0x6
popq %r15
jmp 0x3cd28
movl 0x80(%r14), %eax
movl %eax, %ecx
andl $0xff000000, %ecx # imm = 0xFF000000
pushq $0x3
popq %r15
cmpl $0x5000000, %ecx # imm = 0x5000000
je 0x3cd28
movb $0x1, 0xf0(%r14)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdx
cmpl $-0x9, %edx
jb 0x3cc74
incl (%rcx)
movl 0x80(%r14), %eax
movq %rcx, 0xf8(%r14)
movq %rdx, 0x100(%r14)
andl $0xffffff, %eax # imm = 0xFFFFFF
orl $0x5000000, %eax # imm = 0x5000000
movl %eax, 0x80(%r14)
xorl %r15d, %r15d
pushq $-0x3
popq %r12
movslq 0xa0(%r14), %rax
cmpq %rax, %r15
jge 0x3cce8
movq 0x98(%r14), %rax
movq (%rax,%r15,8), %r13
incl (%r13)
movq %r13, -0x50(%rbp)
movq $-0x3, -0x48(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0x40(%rbp), %r8
callq 0x3cbf6
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1801e
incq %r15
jmp 0x3cc9a
cmpl $0x3, 0xc8(%r14)
pushq $0x3
popq %r15
je 0x3cd28
movq 0xe0(%r14), %rsi
movq 0xe8(%r14), %rdx
leaq -0x40(%rbp), %rax
movq %rax, (%rsp)
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x21eb6
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1801e
xorl %eax, %eax
movq %r15, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_async_module_execution_rejected:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov rax, [rbp+arg_0]
mov r14, [rax]
movups xmm0, xmmword ptr [r8]
movaps [rbp+var_40], xmm0
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
jbe short loc_3CC37
mov rdi, rbx
call JS_ThrowStackOverflow
push 6
pop r15
jmp loc_3CD28
loc_3CC37:
mov eax, [r14+80h]
mov ecx, eax
and ecx, 0FF000000h
push 3
pop r15
cmp ecx, 5000000h
jz loc_3CD28
mov byte ptr [r14+0F0h], 1
mov rcx, qword ptr [rbp+var_40]
mov rdx, qword ptr [rbp+var_40+8]
cmp edx, 0FFFFFFF7h
jb short loc_3CC74
inc dword ptr [rcx]
mov eax, [r14+80h]
loc_3CC74:
mov [r14+0F8h], rcx
mov [r14+100h], rdx
and eax, 0FFFFFFh
or eax, 5000000h
mov [r14+80h], eax
xor r15d, r15d
push 0FFFFFFFFFFFFFFFDh
pop r12
loc_3CC9A:
movsxd rax, dword ptr [r14+0A0h]
cmp r15, rax
jge short loc_3CCE8
mov rax, [r14+98h]
mov r13, [rax+r15*8]
inc dword ptr [r13+0]
mov [rbp+var_50], r13
mov [rbp+var_48], 0FFFFFFFFFFFFFFFDh
lea rax, [rbp+var_50]
mov [rsp+60h+var_60], rax
mov rdi, rbx
lea r8, [rbp+var_40]
call js_async_module_execution_rejected
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_FreeValue
inc r15
jmp short loc_3CC9A
loc_3CCE8:
cmp dword ptr [r14+0C8h], 3
push 3
pop r15
jz short loc_3CD28
mov rsi, [r14+0E0h]
mov rdx, [r14+0E8h]
lea rax, [rbp+var_40]
mov [rsp+60h+var_60], rax
push 1
pop r9
mov rdi, rbx
xor ecx, ecx
mov r8, r15
call JS_Call
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
loc_3CD28:
xor eax, eax
mov rdx, r15
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_async_module_execution_rejected(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 *a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
long long *a15)
{
long long v15; // r14
__m128 v16; // xmm0
int v17; // eax
long long v18; // rdx
unsigned long long v19; // rcx
long long i; // r15
_DWORD *v21; // r13
long long v22; // rax
long long v23; // rdx
char v25; // [rsp+0h] [rbp-60h]
_QWORD v26[2]; // [rsp+10h] [rbp-50h] BYREF
__m128 v27; // [rsp+20h] [rbp-40h] BYREF
long long savedregs; // [rsp+60h] [rbp+0h] BYREF
v15 = *a15;
v16 = *a5;
v27 = *a5;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs )
{
v17 = *(_DWORD *)(v15 + 128);
if ( (v17 & 0xFF000000) != 0x5000000 )
{
*(_BYTE *)(v15 + 240) = 1;
v18 = v27.m128_i64[1];
v19 = v27.m128_u64[0];
if ( v27.m128_i32[2] >= 0xFFFFFFF7 )
{
++*(_DWORD *)v27.m128_u64[0];
v17 = *(_DWORD *)(v15 + 128);
}
*(_QWORD *)(v15 + 248) = v19;
*(_QWORD *)(v15 + 256) = v18;
*(_DWORD *)(v15 + 128) = v17 & 0xFFFFFF | 0x5000000;
for ( i = 0LL; i < *(int *)(v15 + 160); ++i )
{
v21 = *(_DWORD **)(*(_QWORD *)(v15 + 152) + 8 * i);
++*v21;
v26[0] = v21;
v26[1] = -3LL;
js_async_module_execution_rejected(a1, a2, v18, v19, (int)&v27, a6, (long long)v26);
LODWORD(a2) = (_DWORD)v21;
JS_FreeValue(a1, (long long)v21, -3LL);
}
if ( *(_DWORD *)(v15 + 200) != 3 )
{
v22 = JS_Call(a1, *(_QWORD *)(v15 + 224), *(_QWORD *)(v15 + 232), 0, 3, 1, (long long)&v27);
JS_FreeValue(a1, v22, v23);
}
}
}
else
{
JS_ThrowStackOverflow(a1, v16, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, (long long)a5, a6, v25);
}
return 0LL;
}
| js_async_module_execution_rejected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV RAX,qword ptr [RBP + 0x10]
MOV R14,qword ptr [RAX]
MOVUPS XMM0,xmmword ptr [R8]
MOVAPS xmmword ptr [RBP + -0x40],XMM0
MOV RAX,qword ptr [RDI + 0x18]
CMP qword ptr [RAX + 0xe8],RBP
JBE 0x0013cc37
MOV RDI,RBX
CALL 0x00135d91
PUSH 0x6
POP R15
JMP 0x0013cd28
LAB_0013cc37:
MOV EAX,dword ptr [R14 + 0x80]
MOV ECX,EAX
AND ECX,0xff000000
PUSH 0x3
POP R15
CMP ECX,0x5000000
JZ 0x0013cd28
MOV byte ptr [R14 + 0xf0],0x1
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
CMP EDX,-0x9
JC 0x0013cc74
INC dword ptr [RCX]
MOV EAX,dword ptr [R14 + 0x80]
LAB_0013cc74:
MOV qword ptr [R14 + 0xf8],RCX
MOV qword ptr [R14 + 0x100],RDX
AND EAX,0xffffff
OR EAX,0x5000000
MOV dword ptr [R14 + 0x80],EAX
XOR R15D,R15D
PUSH -0x3
POP R12
LAB_0013cc9a:
MOVSXD RAX,dword ptr [R14 + 0xa0]
CMP R15,RAX
JGE 0x0013cce8
MOV RAX,qword ptr [R14 + 0x98]
MOV R13,qword ptr [RAX + R15*0x8]
INC dword ptr [R13]
MOV qword ptr [RBP + -0x50],R13
MOV qword ptr [RBP + -0x48],-0x3
LEA RAX,[RBP + -0x50]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
LEA R8,[RBP + -0x40]
CALL 0x0013cbf6
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x0011801e
INC R15
JMP 0x0013cc9a
LAB_0013cce8:
CMP dword ptr [R14 + 0xc8],0x3
PUSH 0x3
POP R15
JZ 0x0013cd28
MOV RSI,qword ptr [R14 + 0xe0]
MOV RDX,qword ptr [R14 + 0xe8]
LEA RAX,[RBP + -0x40]
MOV qword ptr [RSP],RAX
PUSH 0x1
POP R9
MOV RDI,RBX
XOR ECX,ECX
MOV R8,R15
CALL 0x00121eb6
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011801e
LAB_0013cd28:
XOR EAX,EAX
MOV RDX,R15
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_async_module_execution_rejected(long param_1)
{
long lVar1;
int *piVar2;
int1 auVar3 [16];
uint uVar4;
int8 uVar5;
int8 *in_R8;
long lVar6;
ulong uVar7;
long *in_stack_00000008;
int4 local_48;
int4 uStack_44;
uint uStack_40;
int4 uStack_3c;
lVar1 = *in_stack_00000008;
local_48 = *(int4 *)in_R8;
uStack_44 = *(int4 *)((long)in_R8 + 4);
piVar2 = (int *)*in_R8;
uStack_40 = *(uint *)(in_R8 + 1);
uStack_3c = *(int4 *)((long)in_R8 + 0xc);
uVar5 = in_R8[1];
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) {
JS_ThrowStackOverflow(param_1);
uVar7 = 6;
}
else {
uVar4 = *(uint *)(lVar1 + 0x80);
uVar7 = 3;
if ((uVar4 & 0xff000000) != 0x5000000) {
*(int1 *)(lVar1 + 0xf0) = 1;
if (0xfffffff6 < uStack_40) {
*piVar2 = *piVar2 + 1;
uVar4 = *(uint *)(lVar1 + 0x80);
}
*(int **)(lVar1 + 0xf8) = piVar2;
*(int8 *)(lVar1 + 0x100) = uVar5;
*(uint *)(lVar1 + 0x80) = uVar4 & 0xffffff | 0x5000000;
for (lVar6 = 0; lVar6 < *(int *)(lVar1 + 0xa0); lVar6 = lVar6 + 1) {
piVar2 = *(int **)(*(long *)(lVar1 + 0x98) + lVar6 * 8);
*piVar2 = *piVar2 + 1;
js_async_module_execution_rejected(param_1);
JS_FreeValue(param_1,piVar2,0xfffffffffffffffd);
}
uVar7 = 3;
if (*(int *)(lVar1 + 200) != 3) {
uVar5 = JS_Call(param_1,*(int8 *)(lVar1 + 0xe0),*(int8 *)(lVar1 + 0xe8),0,3,1,
&local_48);
JS_FreeValue(param_1,uVar5);
}
}
}
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar7;
return auVar3 << 0x40;
}
| |
34,507 | mi_ck_write | eloqsql/storage/myisam/mi_write.c | int _mi_ck_write(MI_INFO *info, uint keynr, uchar *key, uint key_length)
{
DBUG_ENTER("_mi_ck_write");
if (info->bulk_insert && is_tree_inited(&info->bulk_insert[keynr]))
{
DBUG_RETURN(_mi_ck_write_tree(info, keynr, key, key_length));
}
else
{
DBUG_RETURN(_mi_ck_write_btree(info, keynr, key, key_length));
}
} | O3 | c | mi_ck_write:
movq %rdi, %rax
movq 0x80(%rdi), %rdi
testq %rdi, %rdi
je 0x88156
movl %esi, %r8d
imulq $0x298, %r8, %r8 # imm = 0x298
cmpq $0x0, (%rdi,%r8)
je 0x88156
pushq %rbp
movq %rsp, %rbp
addq %r8, %rdi
movq (%rax), %rax
addl 0x338(%rax), %ecx
movq 0x230(%rdi), %rax
movq %rdx, %rsi
movl %ecx, %edx
movq %rax, %rcx
callq 0xa4736
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
shll $0x7, %ecx
movl %ecx, %eax
popq %rbp
retq
movq %rax, %rdi
jmp 0x881a3
| _mi_ck_write:
mov rax, rdi
mov rdi, [rdi+80h]
test rdi, rdi
jz short loc_88156
mov r8d, esi
imul r8, 298h
cmp qword ptr [rdi+r8], 0
jz short loc_88156
push rbp
mov rbp, rsp
add rdi, r8
mov rax, [rax]
add ecx, [rax+338h]
mov rax, [rdi+230h]
mov rsi, rdx
mov edx, ecx
mov rcx, rax
call tree_insert
xor ecx, ecx
test rax, rax
setz cl
shl ecx, 7
mov eax, ecx
pop rbp
retn
loc_88156:
mov rdi, rax
jmp _mi_ck_write_btree
| long long mi_ck_write(_QWORD *a1, unsigned int a2, long long a3, int a4)
{
long long v5; // rdi
long long v6; // r8
v5 = a1[16];
if ( v5 && (v6 = 664LL * a2, *(_QWORD *)(v5 + v6)) )
return (unsigned __int8)(tree_insert(
v6 + v5,
a3,
(unsigned int)(*(_DWORD *)(*a1 + 824LL) + a4),
*(_QWORD *)(v6 + v5 + 560)) == 0) << 7;
else
return mi_ck_write_btree(a1);
}
| _mi_ck_write:
MOV RAX,RDI
MOV RDI,qword ptr [RDI + 0x80]
TEST RDI,RDI
JZ 0x00188156
MOV R8D,ESI
IMUL R8,R8,0x298
CMP qword ptr [RDI + R8*0x1],0x0
JZ 0x00188156
PUSH RBP
MOV RBP,RSP
ADD RDI,R8
MOV RAX,qword ptr [RAX]
ADD ECX,dword ptr [RAX + 0x338]
MOV RAX,qword ptr [RDI + 0x230]
MOV RSI,RDX
MOV EDX,ECX
MOV RCX,RAX
CALL 0x001a4736
XOR ECX,ECX
TEST RAX,RAX
SETZ CL
SHL ECX,0x7
MOV EAX,ECX
POP RBP
RET
LAB_00188156:
MOV RDI,RAX
JMP 0x001881a3
|
long _mi_ck_write(long *param_1,ulong param_2,int8 param_3,int param_4)
{
long lVar1;
long lVar2;
lVar1 = param_1[0x10];
if ((lVar1 != 0) && (lVar2 = (param_2 & 0xffffffff) * 0x298, *(long *)(lVar1 + lVar2) != 0)) {
lVar1 = lVar1 + lVar2;
lVar1 = tree_insert(lVar1,param_3,param_4 + *(int *)(*param_1 + 0x338),
*(int8 *)(lVar1 + 0x230));
return (ulong)(lVar1 == 0) << 7;
}
lVar1 = _mi_ck_write_btree(param_1);
return lVar1;
}
| |
34,508 | testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float> const&) const | yoga-mod/tests/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h | bool AlmostEquals(const FloatingPoint& rhs) const {
// The IEEE standard says that any comparison operation involving
// a NAN must return false.
if (is_nan() || rhs.is_nan()) return false;
return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) <=
kMaxUlps;
} | O3 | c | testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float> const&) const:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
movl %eax, %ecx
notl %ecx
testl $0x7f800000, %ecx # imm = 0x7F800000
sete %cl
testl $0x7fffff, %eax # imm = 0x7FFFFF
setne %dl
testb %dl, %cl
jne 0x736f9
movl (%rsi), %ecx
movl %ecx, %edx
notl %edx
testl $0x7f800000, %edx # imm = 0x7F800000
sete %dl
testl $0x7fffff, %ecx # imm = 0x7FFFFF
setne %sil
testb %sil, %dl
je 0x736fd
xorl %eax, %eax
jmp 0x7372b
movl %eax, %edx
negl %edx
movl $0x80000000, %esi # imm = 0x80000000
movl %eax, %edi
orl %esi, %edi
testl %eax, %eax
cmovsl %edx, %edi
movl %ecx, %eax
negl %eax
orl %ecx, %esi
testl %ecx, %ecx
cmovsl %eax, %esi
movl %edi, %eax
subl %esi, %eax
negl %eax
subl %esi, %edi
cmovbl %eax, %edi
cmpl $0x5, %edi
setb %al
popq %rbp
retq
nop
| _ZNK7testing8internal13FloatingPointIfE12AlmostEqualsERKS2_:
push rbp
mov rbp, rsp
mov eax, [rdi]
mov ecx, eax
not ecx
test ecx, 7F800000h
setz cl
test eax, 7FFFFFh
setnz dl
test cl, dl
jnz short loc_736F9
mov ecx, [rsi]
mov edx, ecx
not edx
test edx, 7F800000h
setz dl
test ecx, 7FFFFFh
setnz sil
test dl, sil
jz short loc_736FD
loc_736F9:
xor eax, eax
jmp short loc_7372B
loc_736FD:
mov edx, eax
neg edx
mov esi, 80000000h
mov edi, eax
or edi, esi
test eax, eax
cmovs edi, edx
mov eax, ecx
neg eax
or esi, ecx
test ecx, ecx
cmovs esi, eax
mov eax, edi
sub eax, esi
neg eax
sub edi, esi
cmovb edi, eax
cmp edi, 5
setb al
loc_7372B:
pop rbp
retn
| bool testing::internal::FloatingPoint<float>::AlmostEquals(int *a1, int *a2)
{
int v2; // eax
int v3; // ecx
unsigned int v5; // edi
unsigned int v6; // esi
unsigned int v7; // eax
bool v8; // cf
unsigned int v9; // edi
v2 = *a1;
if ( (*a1 & 0x7FFFFF) != 0 && (~*a1 & 0x7F800000) == 0 )
return 0;
v3 = *a2;
if ( (*a2 & 0x7FFFFF) != 0 && (~*a2 & 0x7F800000) == 0 )
return 0;
v5 = v2 | 0x80000000;
if ( v2 < 0 )
v5 = -v2;
v6 = v3 | 0x80000000;
if ( v3 < 0 )
v6 = -v3;
v7 = v6 - v5;
v8 = v5 < v6;
v9 = v5 - v6;
if ( v8 )
v9 = v7;
return v9 < 5;
}
| AlmostEquals:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI]
MOV ECX,EAX
NOT ECX
TEST ECX,0x7f800000
SETZ CL
TEST EAX,0x7fffff
SETNZ DL
TEST CL,DL
JNZ 0x001736f9
MOV ECX,dword ptr [RSI]
MOV EDX,ECX
NOT EDX
TEST EDX,0x7f800000
SETZ DL
TEST ECX,0x7fffff
SETNZ SIL
TEST DL,SIL
JZ 0x001736fd
LAB_001736f9:
XOR EAX,EAX
JMP 0x0017372b
LAB_001736fd:
MOV EDX,EAX
NEG EDX
MOV ESI,0x80000000
MOV EDI,EAX
OR EDI,ESI
TEST EAX,EAX
CMOVS EDI,EDX
MOV EAX,ECX
NEG EAX
OR ESI,ECX
TEST ECX,ECX
CMOVS ESI,EAX
MOV EAX,EDI
SUB EAX,ESI
NEG EAX
SUB EDI,ESI
CMOVC EDI,EAX
CMP EDI,0x5
SETC AL
LAB_0017372b:
POP RBP
RET
|
/* testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float>
const&) const */
int4 __thiscall
testing::internal::FloatingPoint<float>::AlmostEquals
(FloatingPoint<float> *this,FloatingPoint *param_1)
{
uint uVar1;
uint uVar2;
int4 uVar3;
uint uVar4;
uVar1 = *(uint *)this;
if (((~uVar1 & 0x7f800000) == 0 && (uVar1 & 0x7fffff) != 0) ||
(uVar4 = *(uint *)param_1, (~uVar4 & 0x7f800000) == 0 && (uVar4 & 0x7fffff) != 0)) {
uVar3 = 0;
}
else {
uVar2 = uVar1 | 0x80000000;
if ((int)uVar1 < 0) {
uVar2 = -uVar1;
}
uVar1 = uVar4 | 0x80000000;
if ((int)uVar4 < 0) {
uVar1 = -uVar4;
}
uVar4 = uVar2 - uVar1;
if (uVar2 < uVar1) {
uVar4 = -(uVar2 - uVar1);
}
uVar3 = CONCAT31((int3)(-(uVar2 - uVar1) >> 8),uVar4 < 5);
}
return uVar3;
}
| |
34,509 | testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | static std::string PrintTestPartResultToString(
const TestPartResult& test_part_result) {
return (Message() << internal::FormatFileLocation(
test_part_result.file_name(),
test_part_result.line_number())
<< " "
<< TestPartResultTypeToString(test_part_result.type())
<< test_part_result.message())
.GetString();
} | O1 | cpp | testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1cd64
movq 0x10(%r15), %rsi
testq %rsi, %rsi
je 0x20a1b
movq 0x8(%r15), %rsi
movl 0x28(%r15), %edx
leaq 0x10(%rsp), %rdi
callq 0x169a6
movq 0x8(%rsp), %r14
leaq 0x10(%r14), %r12
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r12, %rdi
callq 0x85b0
leaq 0x220fa(%rip), %rsi # 0x42b45
movl $0x1, %edx
movq %r12, %rdi
callq 0x85b0
movl (%r15), %eax
cmpq $0x3, %rax
ja 0x20a71
leaq 0x21380(%rip), %rcx # 0x41de8
movslq (%rcx,%rax,4), %r13
addq %rcx, %r13
jmp 0x20a78
leaq 0x237b3(%rip), %r13 # 0x4422b
movq %r13, %rdi
callq 0x8200
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x85b0
movq 0x50(%r15), %r15
testq %r15, %r15
je 0x20aa4
movq %r15, %rdi
callq 0x8200
movq %rax, %rdx
jmp 0x20ab0
movl $0x6, %edx
leaq 0x1fb39(%rip), %r15 # 0x405e9
movq %r12, %rdi
movq %r15, %rsi
callq 0x85b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cfc7
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20ae1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
testq %r14, %r14
je 0x20aef
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x20b09
movq %rax, %rbx
jmp 0x20b27
jmp 0x20b09
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20b27
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x20b37
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x8990
nop
| _ZN7testing8internalL27PrintTestPartResultToStringB5cxx11ERKNS_14TestPartResultE:
push r15; __int64
push r14; int
push r13; int
push r12; int
push rbx; __int64
sub rsp, 30h
mov r15, rsi
mov rbx, rdi
lea rdi, [rsp+58h+var_50]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rsi, [r15+10h]
test rsi, rsi
jz short loc_20A1B
mov rsi, [r15+8]; int
loc_20A1B:
mov edx, [r15+28h]; int
lea rdi, [rsp+58h+var_48]; int
call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int)
mov r14, [rsp+58h+var_50]
lea r12, [r14+10h]
mov rsi, qword ptr [rsp+58h+var_48]
mov rdx, [rsp+58h+var_40]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_42B43+2; " "
mov edx, 1
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov eax, [r15]
cmp rax, 3
ja short loc_20A71
lea rcx, aD; "D\a"
movsxd r13, dword ptr [rcx+rax*4]
add r13, rcx
jmp short loc_20A78
loc_20A71:
lea r13, aUnknownResultT; "Unknown result type"
loc_20A78:
mov rdi, r13
call _strlen
mov rdi, r12
mov rsi, r13
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, [r15+50h]
test r15, r15
jz short loc_20AA4
mov rdi, r15
call _strlen
mov rdx, rax
jmp short loc_20AB0
loc_20AA4:
mov edx, 6
lea r15, aNull; "(null)"
loc_20AB0:
mov rdi, r12
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov rsi, r14
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
lea rax, [rsp+58h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_20AE1
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20AE1:
test r14, r14
jz short loc_20AEF
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_20AEF:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_20B09
mov rbx, rax
jmp short loc_20B27
jmp short $+2
loc_20B09:
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_20B27
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20B27:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_20B37
mov rax, [rdi]
call qword ptr [rax+8]
loc_20B37:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::PrintTestPartResultToString[abi:cxx11](long long a1, unsigned int *a2)
{
const char *v3; // rsi
long long v4; // r14
long long v5; // r12
unsigned long long v6; // rax
char *v7; // r13
long long v8; // rax
const char *v9; // r15
long long v10; // rdx
long long v12; // [rsp+8h] [rbp-50h] BYREF
int v13[2]; // [rsp+10h] [rbp-48h] BYREF
long long v14; // [rsp+18h] [rbp-40h]
long long v15; // [rsp+20h] [rbp-38h] BYREF
testing::Message::Message((testing::Message *)&v12);
v3 = (const char *)*((_QWORD *)a2 + 2);
if ( v3 )
v3 = (const char *)*((_QWORD *)a2 + 1);
testing::internal::FormatFileLocation[abi:cxx11]((long long)v13, v3, a2[10]);
v4 = v12;
v5 = v12 + 16;
std::__ostream_insert<char,std::char_traits<char>>(v12 + 16, *(_QWORD *)v13, v14);
std::__ostream_insert<char,std::char_traits<char>>(v5, " ", 1LL);
v6 = *a2;
if ( v6 > 3 )
v7 = "Unknown result type";
else
v7 = &aD[*(int *)&aD[4 * v6]];
v8 = strlen(v7);
std::__ostream_insert<char,std::char_traits<char>>(v5, v7, v8);
v9 = (const char *)*((_QWORD *)a2 + 10);
if ( v9 )
{
v10 = strlen(v9);
}
else
{
v10 = 6LL;
v9 = "(null)";
}
std::__ostream_insert<char,std::char_traits<char>>(v5, v9, v10);
testing::internal::StringStreamToString(a1, v4);
if ( *(long long **)v13 != &v15 )
operator delete(*(void **)v13, v15 + 1);
if ( v4 )
(*(void ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4);
return a1;
}
| PrintTestPartResultToString[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R15,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x8]
CALL 0x0011cd64
MOV RSI,qword ptr [R15 + 0x10]
TEST RSI,RSI
JZ 0x00120a1b
MOV RSI,qword ptr [R15 + 0x8]
LAB_00120a1b:
MOV EDX,dword ptr [R15 + 0x28]
LAB_00120a1f:
LEA RDI,[RSP + 0x10]
CALL 0x001169a6
MOV R14,qword ptr [RSP + 0x8]
LEA R12,[R14 + 0x10]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_00120a3c:
MOV RDI,R12
CALL 0x001085b0
LEA RSI,[0x142b45]
MOV EDX,0x1
MOV RDI,R12
CALL 0x001085b0
MOV EAX,dword ptr [R15]
CMP RAX,0x3
JA 0x00120a71
LEA RCX,[0x141de8]
MOVSXD R13,dword ptr [RCX + RAX*0x4]
ADD R13,RCX
JMP 0x00120a78
LAB_00120a71:
LEA R13,[0x14422b]
LAB_00120a78:
MOV RDI,R13
CALL 0x00108200
LAB_00120a80:
MOV RDI,R12
MOV RSI,R13
MOV RDX,RAX
CALL 0x001085b0
MOV R15,qword ptr [R15 + 0x50]
TEST R15,R15
JZ 0x00120aa4
MOV RDI,R15
CALL 0x00108200
MOV RDX,RAX
JMP 0x00120ab0
LAB_00120aa4:
MOV EDX,0x6
LEA R15,[0x1405e9]
LAB_00120ab0:
MOV RDI,R12
MOV RSI,R15
CALL 0x001085b0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011cfc7
LAB_00120ac6:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00120ae1
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001084e0
LAB_00120ae1:
TEST R14,R14
JZ 0x00120aef
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX + 0x8]
LAB_00120aef:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&) */
internal * __thiscall
testing::internal::PrintTestPartResultToString_abi_cxx11_(internal *this,TestPartResult *param_1)
{
ostream *poVar1;
size_t sVar2;
char *pcVar3;
long *local_50;
long *local_48;
long local_40;
long local_38 [2];
Message::Message((Message *)&local_50);
pcVar3 = *(char **)(param_1 + 0x10);
if (pcVar3 != (char *)0x0) {
pcVar3 = *(char **)(param_1 + 8);
}
/* try { // try from 00120a1f to 00120a28 has its CatchHandler @ 00120b02 */
FormatFileLocation_abi_cxx11_((internal *)&local_48,pcVar3,*(int *)(param_1 + 0x28));
poVar1 = (ostream *)(local_50 + 2);
/* try { // try from 00120a3c to 00120a57 has its CatchHandler @ 00120b09 */
std::__ostream_insert<char,std::char_traits<char>>(poVar1,(char *)local_48,local_40);
std::__ostream_insert<char,std::char_traits<char>>(poVar1," ",1);
if ((ulong)*(uint *)param_1 < 4) {
pcVar3 = &DAT_00141de8 + *(int *)(&DAT_00141de8 + (ulong)*(uint *)param_1 * 4);
}
else {
pcVar3 = "Unknown result type";
}
sVar2 = strlen(pcVar3);
/* try { // try from 00120a80 to 00120a8d has its CatchHandler @ 00120b00 */
std::__ostream_insert<char,std::char_traits<char>>(poVar1,pcVar3,sVar2);
pcVar3 = *(char **)(param_1 + 0x50);
if (pcVar3 == (char *)0x0) {
sVar2 = 6;
pcVar3 = "(null)";
}
else {
sVar2 = strlen(pcVar3);
}
/* try { // try from 00120ab0 to 00120ac5 has its CatchHandler @ 00120b07 */
std::__ostream_insert<char,std::char_traits<char>>(poVar1,pcVar3,sVar2);
StringStreamToString((stringstream *)this);
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
if (local_50 != (long *)0x0) {
(**(code **)(*local_50 + 8))(local_50);
}
return this;
}
| |
34,510 | MyCTX_gcm::finish(unsigned char*, unsigned int*) | eloqsql/mysys_ssl/my_crypt.cc | int finish(uchar *dst, uint *dlen)
{
int fin;
if (!EVP_CipherFinal_ex(ctx, dst, &fin))
return MY_AES_BAD_DATA;
DBUG_ASSERT(fin == 0);
if (EVP_CIPHER_CTX_encrypting(ctx))
{
if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, MY_AES_BLOCK_SIZE, dst))
return MY_AES_OPENSSL_ERROR;
*dlen= MY_AES_BLOCK_SIZE;
}
else
*dlen= 0;
return MY_AES_OK;
} | O3 | cpp | MyCTX_gcm::finish(unsigned char*, unsigned int*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq 0xc8(%rdi), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x29240
testl %eax, %eax
je 0x94782
movq 0xc8(%r12), %rdi
callq 0x297e0
xorl %r15d, %r15d
movl $0x0, %r13d
testl %eax, %eax
je 0x9477d
movq 0xc8(%r12), %rdi
movl $0x10, %r13d
movl $0x10, %esi
movl $0x10, %edx
movq %r14, %rcx
callq 0x29280
testl %eax, %eax
je 0x9478a
movl %r13d, (%rbx)
jmp 0x94790
movl $0xffffff9c, %r15d # imm = 0xFFFFFF9C
jmp 0x94790
movl $0xffffff9b, %r15d # imm = 0xFFFFFF9B
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN9MyCTX_gcm6finishEPhPj:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r12, rdi
mov rdi, [rdi+0C8h]
lea rdx, [rbp+var_2C]
call _EVP_CipherFinal_ex
test eax, eax
jz short loc_94782
mov rdi, [r12+0C8h]
call _EVP_CIPHER_CTX_is_encrypting
xor r15d, r15d
mov r13d, 0
test eax, eax
jz short loc_9477D
mov rdi, [r12+0C8h]
mov r13d, 10h
mov esi, 10h
mov edx, 10h
mov rcx, r14
call _EVP_CIPHER_CTX_ctrl
test eax, eax
jz short loc_9478A
loc_9477D:
mov [rbx], r13d
jmp short loc_94790
loc_94782:
mov r15d, 0FFFFFF9Ch
jmp short loc_94790
loc_9478A:
mov r15d, 0FFFFFF9Bh
loc_94790:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long MyCTX_gcm::finish(MyCTX_gcm *this, unsigned __int8 *a2, unsigned int *a3)
{
long long v3; // rax
unsigned int v5; // r15d
unsigned int v6; // r13d
_DWORD v8[11]; // [rsp+0h] [rbp-2Ch] BYREF
v8[0] = HIDWORD(v3);
if ( (unsigned int)EVP_CipherFinal_ex(*((_QWORD *)this + 25), a2, v8) )
{
v5 = 0;
v6 = 0;
if ( (unsigned int)EVP_CIPHER_CTX_is_encrypting(*((_QWORD *)this + 25))
&& (v6 = 16, !(unsigned int)EVP_CIPHER_CTX_ctrl(*((_QWORD *)this + 25), 16LL, 16LL, a2)) )
{
return (unsigned int)-101;
}
else
{
*a3 = v6;
}
}
else
{
return (unsigned int)-100;
}
return v5;
}
| finish:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R12,RDI
MOV RDI,qword ptr [RDI + 0xc8]
LEA RDX,[RBP + -0x2c]
CALL 0x00129240
TEST EAX,EAX
JZ 0x00194782
MOV RDI,qword ptr [R12 + 0xc8]
CALL 0x001297e0
XOR R15D,R15D
MOV R13D,0x0
TEST EAX,EAX
JZ 0x0019477d
MOV RDI,qword ptr [R12 + 0xc8]
MOV R13D,0x10
MOV ESI,0x10
MOV EDX,0x10
MOV RCX,R14
CALL 0x00129280
TEST EAX,EAX
JZ 0x0019478a
LAB_0019477d:
MOV dword ptr [RBX],R13D
JMP 0x00194790
LAB_00194782:
MOV R15D,0xffffff9c
JMP 0x00194790
LAB_0019478a:
MOV R15D,0xffffff9b
LAB_00194790:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MyCTX_gcm::finish(unsigned char*, unsigned int*) */
int8 __thiscall MyCTX_gcm::finish(MyCTX_gcm *this,uchar *param_1,uint *param_2)
{
int iVar1;
uint uVar2;
int8 uVar3;
int local_34;
iVar1 = EVP_CipherFinal_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,&local_34);
if (iVar1 == 0) {
uVar3 = 0xffffff9c;
}
else {
iVar1 = EVP_CIPHER_CTX_is_encrypting(*(int8 *)(this + 200));
uVar3 = 0;
uVar2 = 0;
if (iVar1 != 0) {
uVar2 = 0x10;
iVar1 = EVP_CIPHER_CTX_ctrl(*(EVP_CIPHER_CTX **)(this + 200),0x10,0x10,param_1);
if (iVar1 == 0) {
return 0xffffff9b;
}
}
*param_2 = uVar2;
}
return uVar3;
}
| |
34,511 | my_once_alloc | eloqsql/mysys/my_once.c | void* my_once_alloc(size_t Size, myf MyFlags)
{
size_t get_size, max_left;
uchar* point;
reg1 USED_MEM *next;
reg2 USED_MEM **prev;
Size= ALIGN_SIZE(Size);
prev= &my_once_root_block;
max_left=0;
for (next=my_once_root_block ; next && next->left < Size ; next= next->next)
{
if (next->left > max_left)
max_left=next->left;
prev= &next->next;
}
if (! next)
{ /* Time to alloc new block */
get_size= Size+ALIGN_SIZE(sizeof(USED_MEM));
if (max_left*4 < my_once_extra && get_size < my_once_extra)
get_size=my_once_extra; /* Normal alloc */
if ((next = (USED_MEM*) malloc(get_size)) == 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size);
return((uchar*) 0);
}
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));
next->next= 0;
next->size= get_size;
next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM));
*prev=next;
}
point= (uchar*) ((char*) next+ (next->size-next->left));
next->left-= Size;
if (MyFlags & MY_ZEROFILL)
bzero(point, Size);
return((void*) point);
} | O3 | c | my_once_alloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x7, %r14
andq $-0x8, %r14
leaq 0xb68471(%rip), %r13 # 0xc08690
movq (%r13), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0xa024a
movq %rcx, %r13
movq 0x8(%rcx), %rcx
cmpq %r14, %rcx
jae 0xa0293
cmpq %rax, %rcx
cmovaq %rcx, %rax
movq (%r13), %rcx
testq %rcx, %rcx
jne 0xa022a
shlq $0x2, %rax
leaq 0x18(%r14), %rcx
leaq 0x2e58db(%rip), %rdx # 0x385b30
movl (%rdx), %edx
cmpq %rdx, %rcx
movq %rdx, %r15
cmovaq %rcx, %r15
cmpq %rdx, %rax
cmovaeq %rcx, %r15
movq %r15, %rdi
callq 0x29710
testq %rax, %rax
je 0xa02c4
movq $0x0, (%rax)
movq %r15, 0x10(%rax)
addq $-0x18, %r15
movq %r15, 0x8(%rax)
movq %rax, (%r13)
movq 0x8(%rax), %rcx
movq %rax, %r13
movq 0x10(%r13), %r12
subq %rcx, %r12
addq %r13, %r12
subq %r14, %rcx
movq %rcx, 0x8(%r13)
testb $0x20, %bl
je 0xa02f0
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
callq 0x297b0
movl (%rax), %r14d
callq 0xa1afa
movl %r14d, (%rax)
xorl %r12d, %r12d
testb $0x18, %bl
je 0xa02f0
movl $0x1004, %esi # imm = 0x1004
movl $0x5, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x9e1af
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_once_alloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add r14, 7
and r14, 0FFFFFFFFFFFFFFF8h
lea r13, my_once_root_block
mov rcx, [r13+0]
xor eax, eax
test rcx, rcx
jz short loc_A024A
loc_A022A:
mov r13, rcx
mov rcx, [rcx+8]
cmp rcx, r14
jnb short loc_A0293
cmp rcx, rax
cmova rax, rcx
mov rcx, [r13+0]
test rcx, rcx
jnz short loc_A022A
shl rax, 2
loc_A024A:
lea rcx, [r14+18h]
lea rdx, my_once_extra
mov edx, [rdx]
cmp rcx, rdx
mov r15, rdx
cmova r15, rcx
cmp rax, rdx
cmovnb r15, rcx
mov rdi, r15
call _malloc
test rax, rax
jz short loc_A02C4
mov qword ptr [rax], 0
mov [rax+10h], r15
add r15, 0FFFFFFFFFFFFFFE8h
mov [rax+8], r15
mov [r13+0], rax
mov rcx, [rax+8]
mov r13, rax
loc_A0293:
mov r12, [r13+10h]
sub r12, rcx
add r12, r13
sub rcx, r14
mov [r13+8], rcx
test bl, 20h
jz short loc_A02F0
mov rdi, r12
xor esi, esi
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_A02C4:
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
xor r12d, r12d
test bl, 18h
jz short loc_A02F0
mov esi, 1004h
mov edi, 5
mov rdx, r15
xor eax, eax
call my_error
loc_A02F0:
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_once_alloc(long long a1, const char *a2)
{
unsigned long long v2; // r14
_QWORD *v3; // r13
_QWORD *v4; // rcx
unsigned long long v5; // rax
unsigned long long v6; // rcx
unsigned long long v7; // r15
_QWORD *v8; // rax
char *v9; // r12
int v11; // r14d
v2 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v3 = &my_once_root_block;
v4 = (_QWORD *)my_once_root_block;
v5 = 0LL;
if ( my_once_root_block )
{
while ( 1 )
{
v3 = v4;
v6 = v4[1];
if ( v6 >= v2 )
break;
if ( v6 > v5 )
v5 = v6;
v4 = (_QWORD *)*v3;
if ( !*v3 )
{
v5 *= 4LL;
goto LABEL_7;
}
}
}
else
{
LABEL_7:
v7 = my_once_extra;
if ( v2 + 24 > my_once_extra )
v7 = v2 + 24;
if ( v5 >= my_once_extra )
v7 = v2 + 24;
v8 = (_QWORD *)malloc(v7);
if ( !v8 )
{
v11 = *(_DWORD *)__errno_location(v7);
*(_DWORD *)my_thread_var(v7, a2) = v11;
v9 = 0LL;
if ( ((unsigned __int8)a2 & 0x18) != 0 )
my_error(5u, 4100LL, v7);
return (long long)v9;
}
*v8 = 0LL;
v8[2] = v7;
v8[1] = v7 - 24;
*v3 = v8;
v6 = v8[1];
v3 = v8;
}
v9 = (char *)v3 + v3[2] - v6;
v3[1] = v6 - v2;
if ( ((unsigned __int8)a2 & 0x20) != 0 )
return memset(v9, 0LL, v2);
return (long long)v9;
}
| my_once_alloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD R14,0x7
AND R14,-0x8
LEA R13,[0xd08690]
MOV RCX,qword ptr [R13]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x001a024a
LAB_001a022a:
MOV R13,RCX
MOV RCX,qword ptr [RCX + 0x8]
CMP RCX,R14
JNC 0x001a0293
CMP RCX,RAX
CMOVA RAX,RCX
MOV RCX,qword ptr [R13]
TEST RCX,RCX
JNZ 0x001a022a
SHL RAX,0x2
LAB_001a024a:
LEA RCX,[R14 + 0x18]
LEA RDX,[0x485b30]
MOV EDX,dword ptr [RDX]
CMP RCX,RDX
MOV R15,RDX
CMOVA R15,RCX
CMP RAX,RDX
CMOVNC R15,RCX
MOV RDI,R15
CALL 0x00129710
TEST RAX,RAX
JZ 0x001a02c4
MOV qword ptr [RAX],0x0
MOV qword ptr [RAX + 0x10],R15
ADD R15,-0x18
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [R13],RAX
MOV RCX,qword ptr [RAX + 0x8]
MOV R13,RAX
LAB_001a0293:
MOV R12,qword ptr [R13 + 0x10]
SUB R12,RCX
ADD R12,R13
SUB RCX,R14
MOV qword ptr [R13 + 0x8],RCX
TEST BL,0x20
JZ 0x001a02f0
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
LAB_001a02c4:
CALL 0x001297b0
MOV R14D,dword ptr [RAX]
CALL 0x001a1afa
MOV dword ptr [RAX],R14D
XOR R12D,R12D
TEST BL,0x18
JZ 0x001a02f0
MOV ESI,0x1004
MOV EDI,0x5
MOV RDX,R15
XOR EAX,EAX
CALL 0x0019e1af
LAB_001a02f0:
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * my_once_alloc(long param_1,ulong param_2)
{
int iVar1;
int8 *puVar2;
ulong uVar3;
int8 *puVar4;
int *piVar5;
ulong uVar6;
ulong uVar7;
void *pvVar8;
int8 *puVar9;
ulong __n;
ulong __size;
__n = param_1 + 7U & 0xfffffffffffffff8;
uVar3 = 0;
puVar2 = my_once_root_block;
puVar9 = &my_once_root_block;
if (my_once_root_block != (int8 *)0x0) {
do {
puVar4 = puVar2;
uVar6 = puVar4[1];
if (__n <= uVar6) goto LAB_001a0293;
if (uVar3 < uVar6) {
uVar3 = uVar6;
}
puVar2 = (int8 *)*puVar4;
} while ((int8 *)*puVar4 != (int8 *)0x0);
uVar3 = uVar3 << 2;
puVar9 = puVar4;
}
uVar6 = __n + 0x18;
uVar7 = (ulong)my_once_extra;
__size = uVar7;
if (uVar7 < uVar6) {
__size = uVar6;
}
if (uVar7 <= uVar3) {
__size = uVar6;
}
puVar4 = (int8 *)malloc(__size);
if (puVar4 == (int8 *)0x0) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
pvVar8 = (void *)0x0;
if ((param_2 & 0x18) != 0) {
my_error(5,0x1004,__size);
}
}
else {
*puVar4 = 0;
puVar4[2] = __size;
puVar4[1] = __size - 0x18;
*puVar9 = puVar4;
uVar6 = puVar4[1];
LAB_001a0293:
pvVar8 = (void *)((puVar4[2] - uVar6) + (long)puVar4);
puVar4[1] = uVar6 - __n;
if ((param_2 & 0x20) != 0) {
pvVar8 = memset(pvVar8,0,__n);
return pvVar8;
}
}
return pvVar8;
}
| |
34,512 | re_parse_disjunction | bluesky950520[P]quickjs/libregexp.c | static int re_parse_disjunction(REParseState *s, BOOL is_backward_dir)
{
int start, len, pos;
if (lre_check_stack_overflow(s->opaque, 0))
return re_parse_error(s, "stack overflow");
start = s->byte_code.size;
if (re_parse_alternative(s, is_backward_dir))
return -1;
while (*s->buf_ptr == '|') {
s->buf_ptr++;
len = s->byte_code.size - start;
/* insert a split before the first alternative */
if (dbuf_insert(&s->byte_code, start, 5)) {
return re_parse_out_of_memory(s);
}
s->byte_code.buf[start] = REOP_split_next_first;
put_u32(s->byte_code.buf + start + 1, len + 5);
pos = re_emit_op_u32(s, REOP_goto, 0);
if (re_parse_alternative(s, is_backward_dir))
return -1;
/* patch the goto */
len = s->byte_code.size - (pos + 4);
put_u32(s->byte_code.buf + pos, len);
}
return 0;
} | O0 | c | re_parse_disjunction:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4dcb0
cmpl $0x0, %eax
je 0xfd8c0
movq 0x18(%rsp), %rdi
leaq 0x15053(%rip), %rsi # 0x112903
movb $0x0, %al
callq 0xfda10
movl %eax, 0x24(%rsp)
jmp 0xfd9f8
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1002c0
cmpl $0x0, %eax
je 0xfd8ed
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0xfd9f8
jmp 0xfd8ef
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rax
movzbl (%rax), %eax
cmpl $0x7c, %eax
jne 0xfd9f0
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x10(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
movl $0x5, %edx
callq 0x100400
cmpl $0x0, %eax
je 0xfd955
movq 0x18(%rsp), %rdi
callq 0xfdaf0
movl %eax, 0x24(%rsp)
jmp 0xfd9f8
movq 0x18(%rsp), %rax
movq (%rax), %rax
movslq 0x10(%rsp), %rcx
movb $0xa, (%rax,%rcx)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movslq 0x10(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
movl 0xc(%rsp), %esi
addl $0x5, %esi
callq 0xfdc70
movq 0x18(%rsp), %rdi
movl $0x8, %esi
xorl %edx, %edx
callq 0xfd7c0
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1002c0
cmpl $0x0, %eax
je 0xfd9b8
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0xfd9f8
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x8(%rsp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movslq 0x8(%rsp), %rax
addq %rax, %rdi
movl 0xc(%rsp), %esi
callq 0xfdc70
jmp 0xfd8ef
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| re_parse_disjunction:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
mov rax, [rsp+28h+var_10]
mov rdi, [rax+68h]
xor eax, eax
mov esi, eax
call lre_check_stack_overflow
cmp eax, 0
jz short loc_FD8C0
mov rdi, [rsp+28h+var_10]
lea rsi, aStackOverflow; "stack overflow"
mov al, 0
call re_parse_error
mov [rsp+28h+var_4], eax
jmp loc_FD9F8
loc_FD8C0:
mov rax, [rsp+28h+var_10]
mov rax, [rax+8]
mov [rsp+28h+var_18], eax
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_14]
call re_parse_alternative
cmp eax, 0
jz short loc_FD8ED
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp loc_FD9F8
loc_FD8ED:
jmp short $+2
loc_FD8EF:
mov rax, [rsp+28h+var_10]
mov rax, [rax+30h]
movzx eax, byte ptr [rax]
cmp eax, 7Ch ; '|'
jnz loc_FD9F0
mov rax, [rsp+28h+var_10]
mov rcx, [rax+30h]
add rcx, 1
mov [rax+30h], rcx
mov rax, [rsp+28h+var_10]
mov rax, [rax+8]
movsxd rcx, [rsp+28h+var_18]
sub rax, rcx
mov [rsp+28h+var_1C], eax
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_18]
mov edx, 5
call dbuf_insert
cmp eax, 0
jz short loc_FD955
mov rdi, [rsp+28h+var_10]
call re_parse_out_of_memory
mov [rsp+28h+var_4], eax
jmp loc_FD9F8
loc_FD955:
mov rax, [rsp+28h+var_10]
mov rax, [rax]
movsxd rcx, [rsp+28h+var_18]
mov byte ptr [rax+rcx], 0Ah
mov rax, [rsp+28h+var_10]
mov rdi, [rax]
movsxd rax, [rsp+28h+var_18]
add rdi, rax
add rdi, 1
mov esi, [rsp+28h+var_1C]
add esi, 5
call put_u32_0
mov rdi, [rsp+28h+var_10]
mov esi, 8
xor edx, edx
call re_emit_op_u32
mov [rsp+28h+var_20], eax
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_14]
call re_parse_alternative
cmp eax, 0
jz short loc_FD9B8
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_FD9F8
loc_FD9B8:
mov rax, [rsp+28h+var_10]
mov rax, [rax+8]
mov ecx, [rsp+28h+var_20]
add ecx, 4
movsxd rcx, ecx
sub rax, rcx
mov [rsp+28h+var_1C], eax
mov rax, [rsp+28h+var_10]
mov rdi, [rax]
movsxd rax, [rsp+28h+var_20]
add rdi, rax
mov esi, [rsp+28h+var_1C]
call put_u32_0
jmp loc_FD8EF
loc_FD9F0:
mov [rsp+28h+var_4], 0
loc_FD9F8:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long re_parse_disjunction(_QWORD *a1, unsigned int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v7; // [rsp+8h] [rbp-20h]
int v8; // [rsp+Ch] [rbp-1Ch]
unsigned int v9; // [rsp+10h] [rbp-18h]
if ( (unsigned int)lre_check_stack_overflow(a1[13], 0LL) )
{
return (unsigned int)re_parse_error((_DWORD)a1, (unsigned int)"stack overflow", v2, v3, v4, v5);
}
else
{
v9 = a1[1];
if ( (unsigned int)re_parse_alternative(a1, a2) )
{
return (unsigned int)-1;
}
else
{
while ( *(_BYTE *)a1[6] == 124 )
{
++a1[6];
v8 = a1[1] - v9;
if ( (unsigned int)dbuf_insert(a1, v9, 5LL) )
return (unsigned int)re_parse_out_of_memory(a1);
*(_BYTE *)(*a1 + (int)v9) = 10;
put_u32_0((int)v9 + *a1 + 1LL, (unsigned int)(v8 + 5));
v7 = re_emit_op_u32(a1, 8, 0);
if ( (unsigned int)re_parse_alternative(a1, a2) )
return (unsigned int)-1;
put_u32_0(v7 + *a1, (unsigned int)a1[1] - (v7 + 4));
}
return 0;
}
}
}
| re_parse_disjunction:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x68]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0014dcb0
CMP EAX,0x0
JZ 0x001fd8c0
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x212903]
MOV AL,0x0
CALL 0x001fda10
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001fd9f8
LAB_001fd8c0:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x10],EAX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x002002c0
CMP EAX,0x0
JZ 0x001fd8ed
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x001fd9f8
LAB_001fd8ed:
JMP 0x001fd8ef
LAB_001fd8ef:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7c
JNZ 0x001fd9f0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x30]
ADD RCX,0x1
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x10]
SUB RAX,RCX
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x10]
MOV EDX,0x5
CALL 0x00200400
CMP EAX,0x0
JZ 0x001fd955
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001fdaf0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001fd9f8
LAB_001fd955:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0x10]
MOV byte ptr [RAX + RCX*0x1],0xa
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX]
MOVSXD RAX,dword ptr [RSP + 0x10]
ADD RDI,RAX
ADD RDI,0x1
MOV ESI,dword ptr [RSP + 0xc]
ADD ESI,0x5
CALL 0x001fdc70
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x8
XOR EDX,EDX
CALL 0x001fd7c0
MOV dword ptr [RSP + 0x8],EAX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x002002c0
CMP EAX,0x0
JZ 0x001fd9b8
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x001fd9f8
LAB_001fd9b8:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RSP + 0x8]
ADD ECX,0x4
MOVSXD RCX,ECX
SUB RAX,RCX
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX]
MOVSXD RAX,dword ptr [RSP + 0x8]
ADD RDI,RAX
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x001fdc70
JMP 0x001fd8ef
LAB_001fd9f0:
MOV dword ptr [RSP + 0x24],0x0
LAB_001fd9f8:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 re_parse_disjunction(long *param_1,int4 param_2)
{
long lVar1;
int iVar2;
int iVar3;
int4 uVar4;
int iVar5;
int4 local_4;
iVar2 = lre_check_stack_overflow(param_1[0xd],0);
if (iVar2 == 0) {
iVar2 = (int)param_1[1];
iVar3 = re_parse_alternative(param_1,param_2);
if (iVar3 == 0) {
while (*(char *)param_1[6] == '|') {
param_1[6] = param_1[6] + 1;
lVar1 = param_1[1];
iVar3 = dbuf_insert(param_1,iVar2,5);
if (iVar3 != 0) {
uVar4 = re_parse_out_of_memory(param_1);
return uVar4;
}
*(int1 *)(*param_1 + (long)iVar2) = 10;
put_u32(*param_1 + (long)iVar2 + 1,((int)lVar1 - iVar2) + 5);
iVar3 = re_emit_op_u32(param_1,8,0);
iVar5 = re_parse_alternative(param_1,param_2);
if (iVar5 != 0) {
return 0xffffffff;
}
put_u32(*param_1 + (long)iVar3,(int)param_1[1] - (iVar3 + 4));
}
local_4 = 0;
}
else {
local_4 = 0xffffffff;
}
}
else {
local_4 = re_parse_error(param_1,"stack overflow");
}
return local_4;
}
| |
34,513 | re_parse_disjunction | bluesky950520[P]quickjs/libregexp.c | static int re_parse_disjunction(REParseState *s, BOOL is_backward_dir)
{
int start, len, pos;
if (lre_check_stack_overflow(s->opaque, 0))
return re_parse_error(s, "stack overflow");
start = s->byte_code.size;
if (re_parse_alternative(s, is_backward_dir))
return -1;
while (*s->buf_ptr == '|') {
s->buf_ptr++;
len = s->byte_code.size - start;
/* insert a split before the first alternative */
if (dbuf_insert(&s->byte_code, start, 5)) {
return re_parse_out_of_memory(s);
}
s->byte_code.buf[start] = REOP_split_next_first;
put_u32(s->byte_code.buf + start + 1, len + 5);
pos = re_emit_op_u32(s, REOP_goto, 0);
if (re_parse_alternative(s, is_backward_dir))
return -1;
/* patch the goto */
len = s->byte_code.size - (pos + 4);
put_u32(s->byte_code.buf + pos, len);
}
return 0;
} | O1 | c | re_parse_disjunction:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
xorl %esi, %esi
callq 0x3352e
testl %eax, %eax
je 0x94b8b
leaq 0xe91b(%rip), %rsi # 0xa3491
movq %rbx, %rdi
xorl %eax, %eax
callq 0x94c6a
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x94c4c
movq 0x8(%rbx), %r15
movq %rbx, %rdi
movl %ebp, %esi
callq 0x95ead
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x94c4c
movq 0x30(%rbx), %rax
cmpb $0x7c, (%rax)
jne 0x94c49
movslq %r15d, %r13
incq %rax
movq %rax, 0x30(%rbx)
movq 0x8(%rbx), %r12
movq %rbx, %rdi
movl %r15d, %esi
movl $0x5, %edx
callq 0x973da
testl %eax, %eax
jne 0x94c5e
subl %r15d, %r12d
movq (%rbx), %rax
movb $0xa, (%rax,%r13)
movq (%rbx), %rax
addl $0x5, %r12d
movl %r12d, 0x1(%rax,%r13)
movq %rbx, %rdi
movl $0x8, %esi
callq 0x1b4d0
movq 0x8(%rbx), %r12
movl $0x0, 0x4(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0x1b422
movq %rbx, %rdi
movl %ebp, %esi
callq 0x95ead
testl %eax, %eax
jne 0x94c4c
movl 0x8(%rbx), %eax
subl %r12d, %eax
addl $-0x4, %eax
movq (%rbx), %rcx
movslq %r12d, %rdx
movl %eax, (%rcx,%rdx)
movq 0x30(%rbx), %rax
cmpb $0x7c, (%rax)
je 0x94bb7
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa01b(%rip), %rsi # 0x9ec80
jmp 0x94b76
| re_parse_disjunction:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, esi
mov rbx, rdi
mov rdi, [rdi+68h]
xor esi, esi
call lre_check_stack_overflow
test eax, eax
jz short loc_94B8B
lea rsi, aStackOverflow; "stack overflow"
loc_94B76:
mov rdi, rbx
xor eax, eax
call re_parse_error
mov r14d, 0FFFFFFFFh
jmp loc_94C4C
loc_94B8B:
mov r15, [rbx+8]
mov rdi, rbx
mov esi, ebp
call re_parse_alternative
mov r14d, 0FFFFFFFFh
test eax, eax
jnz loc_94C4C
mov rax, [rbx+30h]
cmp byte ptr [rax], 7Ch ; '|'
jnz loc_94C49
movsxd r13, r15d
loc_94BB7:
inc rax
mov [rbx+30h], rax
mov r12, [rbx+8]
mov rdi, rbx
mov esi, r15d
mov edx, 5
call dbuf_insert
test eax, eax
jnz loc_94C5E
sub r12d, r15d
mov rax, [rbx]
mov byte ptr [rax+r13], 0Ah
mov rax, [rbx]
add r12d, 5
mov [rax+r13+1], r12d
mov rdi, rbx
mov esi, 8
call dbuf_putc
mov r12, [rbx+8]
mov [rsp+38h+var_34], 0
mov edx, 4
mov rdi, rbx
lea rsi, [rsp+38h+var_34]
call dbuf_put
mov rdi, rbx
mov esi, ebp
call re_parse_alternative
test eax, eax
jnz short loc_94C4C
mov eax, [rbx+8]
sub eax, r12d
add eax, 0FFFFFFFCh
mov rcx, [rbx]
movsxd rdx, r12d
mov [rcx+rdx], eax
mov rax, [rbx+30h]
cmp byte ptr [rax], 7Ch ; '|'
jz loc_94BB7
loc_94C49:
xor r14d, r14d
loc_94C4C:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_94C5E:
lea rsi, aOutOfMemory; "out of memory"
jmp loc_94B76
| long long re_parse_disjunction(_QWORD *a1, unsigned int a2)
{
long long v2; // rax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
const char *v7; // rsi
unsigned int v8; // r14d
long long v9; // r15
_BYTE *v10; // rax
long long v11; // r12
long long v12; // r12
_DWORD v14[13]; // [rsp+0h] [rbp-34h] BYREF
v14[0] = HIDWORD(v2);
if ( lre_check_stack_overflow(a1[13], 0LL) )
{
v7 = "stack overflow";
}
else
{
v9 = a1[1];
v8 = -1;
if ( (unsigned int)re_parse_alternative(a1, a2) )
return v8;
v10 = (_BYTE *)a1[6];
if ( *v10 != 124 )
return 0;
while ( 1 )
{
a1[6] = v10 + 1;
v11 = a1[1];
if ( (unsigned int)dbuf_insert(a1, (unsigned int)v9, 5LL) )
break;
*(_BYTE *)(*a1 + (int)v9) = 10;
*(_DWORD *)(*a1 + (int)v9 + 1LL) = v11 - v9 + 5;
dbuf_putc(a1, 8);
v12 = a1[1];
v14[0] = 0;
dbuf_put(a1, (long long)v14, 4LL);
if ( (unsigned int)re_parse_alternative(a1, a2) )
return v8;
*(_DWORD *)(*a1 + (int)v12) = *((_DWORD *)a1 + 2) - v12 - 4;
v10 = (_BYTE *)a1[6];
if ( *v10 != 124 )
return 0;
}
v7 = "out of memory";
}
re_parse_error((_DWORD)a1, (_DWORD)v7, v3, v4, v5, v6);
return (unsigned int)-1;
}
| |||
34,514 | re_parse_disjunction | bluesky950520[P]quickjs/libregexp.c | static int re_parse_disjunction(REParseState *s, BOOL is_backward_dir)
{
int start, len, pos;
if (lre_check_stack_overflow(s->opaque, 0))
return re_parse_error(s, "stack overflow");
start = s->byte_code.size;
if (re_parse_alternative(s, is_backward_dir))
return -1;
while (*s->buf_ptr == '|') {
s->buf_ptr++;
len = s->byte_code.size - start;
/* insert a split before the first alternative */
if (dbuf_insert(&s->byte_code, start, 5)) {
return re_parse_out_of_memory(s);
}
s->byte_code.buf[start] = REOP_split_next_first;
put_u32(s->byte_code.buf + start + 1, len + 5);
pos = re_emit_op_u32(s, REOP_goto, 0);
if (re_parse_alternative(s, is_backward_dir))
return -1;
/* patch the goto */
len = s->byte_code.size - (pos + 4);
put_u32(s->byte_code.buf + pos, len);
}
return 0;
} | O2 | c | re_parse_disjunction:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
xorl %esi, %esi
callq 0x2cb89
testl %eax, %eax
je 0x7bf15
leaq 0xe49e(%rip), %rsi # 0x8a3a3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7bfc4
pushq $-0x1
popq %r14
jmp 0x7bf2b
movq 0x8(%rbx), %r15
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7d18d
pushq $-0x1
popq %r14
testl %eax, %eax
je 0x7bf3d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %r15d, %r12
movq 0x30(%rbx), %rax
cmpb $0x7c, (%rax)
jne 0x7bfaf
incq %rax
movq %rax, 0x30(%rbx)
movq 0x8(%rbx), %r13
movq %rbx, %rdi
movl %r15d, %esi
pushq $0x5
popq %rdx
callq 0x7e257
testl %eax, %eax
jne 0x7bfb7
subl %r15d, %r13d
movq (%rbx), %rax
movb $0xa, (%rax,%r12)
movq (%rbx), %rax
addl $0x5, %r13d
movl %r13d, 0x1(%rax,%r12)
movq %rbx, %rdi
pushq $0x8
popq %rsi
xorl %edx, %edx
callq 0x7be93
movl %eax, %r13d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7d18d
testl %eax, %eax
jne 0x7bf2b
movl 0x8(%rbx), %eax
subl %r13d, %eax
addl $-0x4, %eax
movq (%rbx), %rcx
movslq %r13d, %rdx
movl %eax, (%rcx,%rdx)
jmp 0x7bf40
xorl %r14d, %r14d
jmp 0x7bf2b
movq %rbx, %rdi
callq 0x7c05a
jmp 0x7bf2b
| re_parse_disjunction:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, esi
mov rbx, rdi
mov rdi, [rdi+68h]
xor esi, esi
call lre_check_stack_overflow
test eax, eax
jz short loc_7BF15
lea rsi, aStackOverflow; "stack overflow"
mov rdi, rbx
xor eax, eax
call re_parse_error
push 0FFFFFFFFFFFFFFFFh
pop r14
jmp short loc_7BF2B
loc_7BF15:
mov r15, [rbx+8]
mov rdi, rbx
mov esi, ebp
call re_parse_alternative
push 0FFFFFFFFFFFFFFFFh
pop r14
test eax, eax
jz short loc_7BF3D
loc_7BF2B:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7BF3D:
movsxd r12, r15d
loc_7BF40:
mov rax, [rbx+30h]
cmp byte ptr [rax], 7Ch ; '|'
jnz short loc_7BFAF
inc rax
mov [rbx+30h], rax
mov r13, [rbx+8]
mov rdi, rbx
mov esi, r15d
push 5
pop rdx
call dbuf_insert
test eax, eax
jnz short loc_7BFB7
sub r13d, r15d
mov rax, [rbx]
mov byte ptr [rax+r12], 0Ah
mov rax, [rbx]
add r13d, 5
mov [rax+r12+1], r13d
mov rdi, rbx
push 8
pop rsi
xor edx, edx
call re_emit_op_u32
mov r13d, eax
mov rdi, rbx
mov esi, ebp
call re_parse_alternative
test eax, eax
jnz short loc_7BF2B
mov eax, [rbx+8]
sub eax, r13d
add eax, 0FFFFFFFCh
mov rcx, [rbx]
movsxd rdx, r13d
mov [rcx+rdx], eax
jmp short loc_7BF40
loc_7BFAF:
xor r14d, r14d
jmp loc_7BF2B
loc_7BFB7:
mov rdi, rbx
call re_parse_out_of_memory
jmp loc_7BF2B
| long long re_parse_disjunction(_QWORD *a1, unsigned int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
unsigned int v6; // r14d
long long v7; // r15
_BYTE *v9; // rax
long long v10; // r13
int v11; // r13d
if ( lre_check_stack_overflow(a1[13], 0LL) )
{
re_parse_error((_DWORD)a1, (unsigned int)"stack overflow", v2, v3, v4, v5);
return (unsigned int)-1;
}
else
{
v7 = a1[1];
v6 = -1;
if ( !(unsigned int)re_parse_alternative(a1, a2) )
{
while ( 1 )
{
v9 = (_BYTE *)a1[6];
if ( *v9 != 124 )
return 0;
a1[6] = v9 + 1;
v10 = a1[1];
if ( (unsigned int)dbuf_insert(a1, (unsigned int)v7, 5LL) )
break;
*(_BYTE *)(*a1 + (int)v7) = 10;
*(_DWORD *)(*a1 + (int)v7 + 1LL) = v10 - v7 + 5;
v11 = re_emit_op_u32((long long)a1, 8, 0);
if ( (unsigned int)re_parse_alternative(a1, a2) )
return v6;
*(_DWORD *)(*a1 + v11) = *((_DWORD *)a1 + 2) - v11 - 4;
}
re_parse_out_of_memory(a1);
}
}
return v6;
}
| re_parse_disjunction:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x68]
XOR ESI,ESI
CALL 0x0012cb89
TEST EAX,EAX
JZ 0x0017bf15
LEA RSI,[0x18a3a3]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0017bfc4
PUSH -0x1
POP R14
JMP 0x0017bf2b
LAB_0017bf15:
MOV R15,qword ptr [RBX + 0x8]
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0017d18d
PUSH -0x1
POP R14
TEST EAX,EAX
JZ 0x0017bf3d
LAB_0017bf2b:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017bf3d:
MOVSXD R12,R15D
LAB_0017bf40:
MOV RAX,qword ptr [RBX + 0x30]
CMP byte ptr [RAX],0x7c
JNZ 0x0017bfaf
INC RAX
MOV qword ptr [RBX + 0x30],RAX
MOV R13,qword ptr [RBX + 0x8]
MOV RDI,RBX
MOV ESI,R15D
PUSH 0x5
POP RDX
CALL 0x0017e257
TEST EAX,EAX
JNZ 0x0017bfb7
SUB R13D,R15D
MOV RAX,qword ptr [RBX]
MOV byte ptr [RAX + R12*0x1],0xa
MOV RAX,qword ptr [RBX]
ADD R13D,0x5
MOV dword ptr [RAX + R12*0x1 + 0x1],R13D
MOV RDI,RBX
PUSH 0x8
POP RSI
XOR EDX,EDX
CALL 0x0017be93
MOV R13D,EAX
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0017d18d
TEST EAX,EAX
JNZ 0x0017bf2b
MOV EAX,dword ptr [RBX + 0x8]
SUB EAX,R13D
ADD EAX,-0x4
MOV RCX,qword ptr [RBX]
MOVSXD RDX,R13D
MOV dword ptr [RCX + RDX*0x1],EAX
JMP 0x0017bf40
LAB_0017bfaf:
XOR R14D,R14D
JMP 0x0017bf2b
LAB_0017bfb7:
MOV RDI,RBX
CALL 0x0017c05a
JMP 0x0017bf2b
|
int4 re_parse_disjunction(long *param_1,int4 param_2)
{
ulong uVar1;
long lVar2;
int iVar3;
int iVar4;
int iVar5;
int4 uVar6;
iVar3 = lre_check_stack_overflow(param_1[0xd],0);
if (iVar3 == 0) {
uVar1 = param_1[1];
iVar3 = re_parse_alternative(param_1,param_2);
uVar6 = 0xffffffff;
if (iVar3 == 0) {
iVar3 = (int)uVar1;
while (*(char *)param_1[6] == '|') {
param_1[6] = (long)((char *)param_1[6] + 1);
lVar2 = param_1[1];
iVar4 = dbuf_insert(param_1,uVar1 & 0xffffffff,5);
if (iVar4 != 0) {
re_parse_out_of_memory(param_1);
return 0xffffffff;
}
*(int1 *)(*param_1 + (long)iVar3) = 10;
*(int *)(*param_1 + 1 + (long)iVar3) = ((int)lVar2 - iVar3) + 5;
iVar4 = re_emit_op_u32(param_1,8,0);
iVar5 = re_parse_alternative(param_1,param_2);
if (iVar5 != 0) {
return 0xffffffff;
}
*(int *)(*param_1 + (long)iVar4) = ((int)param_1[1] - iVar4) + -4;
}
uVar6 = 0;
}
}
else {
re_parse_error(param_1,"stack overflow");
uVar6 = 0xffffffff;
}
return uVar6;
}
| |
34,515 | ma_kpos | eloqsql/storage/maria/ma_search.c | my_off_t _ma_kpos(uint nod_flag, const uchar *after_key)
{
after_key-=nod_flag;
switch (nod_flag) {
#if SIZEOF_OFF_T > 4
case 7:
return mi_uint7korr(after_key)*maria_block_size;
case 6:
return mi_uint6korr(after_key)*maria_block_size;
case 5:
return mi_uint5korr(after_key)*maria_block_size;
#else
case 7:
after_key++;
case 6:
after_key++;
case 5:
after_key++;
#endif
case 4:
return ((my_off_t) mi_uint4korr(after_key))*maria_block_size;
case 3:
return ((my_off_t) mi_uint3korr(after_key))*maria_block_size;
case 2:
return (my_off_t) (mi_uint2korr(after_key)*maria_block_size);
case 1:
return (uint) (*after_key)*maria_block_size;
case 0: /* At leaf page */
default: /* Impossible */
return(HA_OFFSET_ERROR);
}
} | O0 | c | ma_kpos:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0x975dd
movq -0x20(%rbp), %rax
leaq 0xcc109(%rip), %rcx # 0x1635c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
callq 0x975f0
leaq 0x230f0c(%rip), %rcx # 0x2c83e0
imulq (%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x975e5
movq -0x18(%rbp), %rdi
callq 0x97650
leaq 0x230eef(%rip), %rcx # 0x2c83e0
imulq (%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x975e5
movq -0x18(%rbp), %rdi
callq 0x976a0
leaq 0x230ed2(%rip), %rcx # 0x2c83e0
imulq (%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x975e5
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
leaq 0x230e8e(%rip), %rcx # 0x2c83e0
imulq (%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x975e5
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
leaq 0x230e57(%rip), %rcx # 0x2c83e0
imulq (%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x975e5
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
leaq 0x230e29(%rip), %rcx # 0x2c83e0
imulq (%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x975e5
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
leaq 0x230e0f(%rip), %rcx # 0x2c83e0
imulq (%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x975e5
jmp 0x975dd
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| _ma_kpos:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov eax, [rbp+var_C]
mov ecx, eax
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
mov eax, [rbp+var_C]
mov [rbp+var_20], rax
sub rax, 7; switch 8 cases
ja def_974C2; jumptable 00000000000974C2 default case
mov rax, [rbp+var_20]
lea rcx, jpt_974C2
movsxd rax, ds:(jpt_974C2 - 1635C4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_974C4:
mov rdi, [rbp+var_18]; jumptable 00000000000974C2 case 7
call mi_uint7korr
lea rcx, maria_block_size
imul rax, [rcx]
mov [rbp+var_8], rax
jmp loc_975E5
loc_974E1:
mov rdi, [rbp+var_18]; jumptable 00000000000974C2 case 6
call mi_uint6korr
lea rcx, maria_block_size
imul rax, [rcx]
mov [rbp+var_8], rax
jmp loc_975E5
loc_974FE:
mov rdi, [rbp+var_18]; jumptable 00000000000974C2 case 5
call mi_uint5korr
lea rcx, maria_block_size
imul rax, [rcx]
mov [rbp+var_8], rax
jmp loc_975E5
loc_9751B:
mov rax, [rbp+var_18]; jumptable 00000000000974C2 case 4
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 18h
or eax, ecx
mov eax, eax
lea rcx, maria_block_size
imul rax, [rcx]
mov [rbp+var_8], rax
jmp loc_975E5
loc_9755F:
mov rax, [rbp+var_18]; jumptable 00000000000974C2 case 3
movzx eax, byte ptr [rax+2]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 10h
or eax, ecx
mov eax, eax
lea rcx, maria_block_size
imul rax, [rcx]
mov [rbp+var_8], rax
jmp short loc_975E5
loc_97593:
mov rax, [rbp+var_18]; jumptable 00000000000974C2 case 2
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
lea rcx, maria_block_size
imul rax, [rcx]
mov [rbp+var_8], rax
jmp short loc_975E5
loc_975C1:
mov rax, [rbp+var_18]; jumptable 00000000000974C2 case 1
movzx eax, byte ptr [rax]
mov eax, eax
lea rcx, maria_block_size
imul rax, [rcx]
mov [rbp+var_8], rax
jmp short loc_975E5
loc_975DB:
jmp short $+2; jumptable 00000000000974C2 case 0
def_974C2:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh; jumptable 00000000000974C2 default case
loc_975E5:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_kpos(unsigned int a1, long long a2)
{
unsigned __int8 *v3; // [rsp+8h] [rbp-18h]
long long v4; // [rsp+18h] [rbp-8h]
v3 = (unsigned __int8 *)(a2 - a1);
switch ( a1 )
{
case 1u:
v4 = *(_QWORD *)&maria_block_size * *v3;
break;
case 2u:
v4 = *(_QWORD *)&maria_block_size * _byteswap_ushort(*(_WORD *)v3);
break;
case 3u:
v4 = *(_QWORD *)&maria_block_size * ((*v3 << 16) | (v3[1] << 8) | (unsigned int)v3[2]);
break;
case 4u:
v4 = *(_QWORD *)&maria_block_size * _byteswap_ulong(*(_DWORD *)v3);
break;
case 5u:
v4 = *(_QWORD *)&maria_block_size * mi_uint5korr(v3);
break;
case 6u:
v4 = *(_QWORD *)&maria_block_size * mi_uint6korr(v3);
break;
case 7u:
v4 = *(_QWORD *)&maria_block_size * mi_uint7korr(v3);
break;
default:
v4 = -1LL;
break;
}
return v4;
}
| _ma_kpos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x7
JA 0x001975dd
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x2635c4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001975f0
LEA RCX,[0x3c83e0]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001975e5
caseD_6:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00197650
LEA RCX,[0x3c83e0]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001975e5
caseD_5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001976a0
LEA RCX,[0x3c83e0]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001975e5
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
LEA RCX,[0x3c83e0]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001975e5
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
LEA RCX,[0x3c83e0]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001975e5
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
LEA RCX,[0x3c83e0]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001975e5
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
LEA RCX,[0x3c83e0]
IMUL RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001975e5
caseD_0:
JMP 0x001975dd
default:
MOV qword ptr [RBP + -0x8],-0x1
LAB_001975e5:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long _ma_kpos(uint param_1,long param_2)
{
byte *pbVar1;
long local_10;
pbVar1 = (byte *)(param_2 - (ulong)param_1);
switch(param_1) {
case 0:
default:
local_10 = -1;
break;
case 1:
local_10 = (ulong)*pbVar1 * maria_block_size;
break;
case 2:
local_10 = (ulong)CONCAT11(*pbVar1,pbVar1[1]) * maria_block_size;
break;
case 3:
local_10 = (ulong)CONCAT12(*pbVar1,CONCAT11(pbVar1[1],pbVar1[2])) * maria_block_size;
break;
case 4:
local_10 = (ulong)CONCAT13(*pbVar1,CONCAT12(pbVar1[1],CONCAT11(pbVar1[2],pbVar1[3]))) *
maria_block_size;
break;
case 5:
local_10 = mi_uint5korr(pbVar1);
local_10 = local_10 * maria_block_size;
break;
case 6:
local_10 = mi_uint6korr(pbVar1);
local_10 = local_10 * maria_block_size;
break;
case 7:
local_10 = mi_uint7korr(pbVar1);
local_10 = local_10 * maria_block_size;
}
return local_10;
}
| |
34,516 | bfdec_normalize_and_round | bluesky950520[P]quickjs/libbf.c | int bfdec_normalize_and_round(bfdec_t *r, limb_t prec1, bf_flags_t flags)
{
limb_t l, v;
int shift, ret;
// bfdec_print_str("bf_renorm", r);
l = r->len;
while (l > 0 && r->tab[l - 1] == 0)
l--;
if (l == 0) {
/* zero */
r->expn = BF_EXP_ZERO;
bfdec_resize(r, 0); /* cannot fail */
ret = 0;
} else {
r->expn -= (r->len - l) * LIMB_DIGITS;
/* shift to have the MSB set to '1' */
v = r->tab[l - 1];
shift = clz_dec(v);
if (shift != 0) {
mp_shl_dec(r->tab, r->tab, l, shift, 0);
r->expn -= shift;
}
ret = __bfdec_round(r, prec1, flags, l);
}
// bf_print_str("r_final", r);
return ret;
} | O0 | c | bfdec_normalize_and_round:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x18(%rsp)
movb %al, 0x7(%rsp)
jbe 0xf219c
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
cmpq $0x0, (%rax,%rcx,8)
sete %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xf21a6
jmp 0xf21b6
movq 0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0xf2170
cmpq $0x0, 0x18(%rsp)
jne 0xf21ec
movq 0x30(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf22a0
movl $0x0, 0x8(%rsp)
jmp 0xf2295
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
subq 0x18(%rsp), %rax
imulq $0x13, %rax, %rdx
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xf22d0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xf2279
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x18(%rsp), %rdx
movslq 0xc(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xf2810
movslq 0xc(%rsp), %rdx
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movq 0x18(%rsp), %rcx
callq 0xf1d00
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
addq $0x38, %rsp
retq
nop
| bfdec_normalize_and_round:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_14], edx
mov rax, [rsp+38h+var_8]
mov rax, [rax+18h]
mov [rsp+38h+var_20], rax
loc_F2170:
xor eax, eax
cmp [rsp+38h+var_20], 0
mov [rsp+38h+var_31], al
jbe short loc_F219C
mov rax, [rsp+38h+var_8]
mov rax, [rax+20h]
mov rcx, [rsp+38h+var_20]
sub rcx, 1
cmp qword ptr [rax+rcx*8], 0
setz al
mov [rsp+38h+var_31], al
loc_F219C:
mov al, [rsp+38h+var_31]
test al, 1
jnz short loc_F21A6
jmp short loc_F21B6
loc_F21A6:
mov rax, [rsp+38h+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+38h+var_20], rax
jmp short loc_F2170
loc_F21B6:
cmp [rsp+38h+var_20], 0
jnz short loc_F21EC
mov rax, [rsp+38h+var_8]
mov rcx, 8000000000000000h
mov [rax+10h], rcx
mov rdi, [rsp+38h+var_8]
xor eax, eax
mov esi, eax
call bfdec_resize
mov [rsp+38h+var_30], 0
jmp loc_F2295
loc_F21EC:
mov rax, [rsp+38h+var_8]
mov rax, [rax+18h]
sub rax, [rsp+38h+var_20]
imul rdx, rax, 13h
mov rax, [rsp+38h+var_8]
mov rcx, [rax+10h]
sub rcx, rdx
mov [rax+10h], rcx
mov rax, [rsp+38h+var_8]
mov rax, [rax+20h]
mov rcx, [rsp+38h+var_20]
sub rcx, 1
mov rax, [rax+rcx*8]
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_28]
call clz_dec
mov [rsp+38h+var_2C], eax
cmp [rsp+38h+var_2C], 0
jz short loc_F2279
mov rax, [rsp+38h+var_8]
mov rdi, [rax+20h]
mov rax, [rsp+38h+var_8]
mov rsi, [rax+20h]
mov rdx, [rsp+38h+var_20]
movsxd rcx, [rsp+38h+var_2C]
xor eax, eax
mov r8d, eax
call mp_shl_dec
movsxd rdx, [rsp+38h+var_2C]
mov rax, [rsp+38h+var_8]
mov rcx, [rax+10h]
sub rcx, rdx
mov [rax+10h], rcx
loc_F2279:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
mov edx, [rsp+38h+var_14]
mov rcx, [rsp+38h+var_20]
call __bfdec_round
mov [rsp+38h+var_30], eax
loc_F2295:
mov eax, [rsp+38h+var_30]
add rsp, 38h
retn
| long long bfdec_normalize_and_round(_QWORD *a1, long long a2, unsigned int a3)
{
bool v4; // [rsp+7h] [rbp-31h]
int v6; // [rsp+Ch] [rbp-2Ch]
long long i; // [rsp+18h] [rbp-20h]
for ( i = a1[3]; ; --i )
{
v4 = 0;
if ( i )
v4 = *(_QWORD *)(a1[4] + 8 * (i - 1)) == 0LL;
if ( !v4 )
break;
}
if ( i )
{
a1[2] -= 19 * (a1[3] - i);
v6 = clz_dec(*(_QWORD *)(a1[4] + 8 * (i - 1)));
if ( v6 )
{
mp_shl_dec(a1[4], a1[4], i, v6, 0LL);
a1[2] -= v6;
}
return (unsigned int)_bfdec_round((long long)a1, a2, a3, i);
}
else
{
a1[2] = 0x8000000000000000LL;
bfdec_resize(a1, 0LL);
return 0;
}
}
| bfdec_normalize_and_round:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0x24],EDX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
LAB_001f2170:
XOR EAX,EAX
CMP qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSP + 0x7],AL
JBE 0x001f219c
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RSP + 0x18]
SUB RCX,0x1
CMP qword ptr [RAX + RCX*0x8],0x0
SETZ AL
MOV byte ptr [RSP + 0x7],AL
LAB_001f219c:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x001f21a6
JMP 0x001f21b6
LAB_001f21a6:
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001f2170
LAB_001f21b6:
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x001f21ec
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,-0x8000000000000000
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RSP + 0x30]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001f22a0
MOV dword ptr [RSP + 0x8],0x0
JMP 0x001f2295
LAB_001f21ec:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x18]
SUB RAX,qword ptr [RSP + 0x18]
IMUL RDX,RAX,0x13
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RSP + 0x18]
SUB RCX,0x1
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001f22d0
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JZ 0x001f2279
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0xc]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001f2810
MOVSXD RDX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
LAB_001f2279:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x18]
CALL 0x001f1d00
MOV dword ptr [RSP + 0x8],EAX
LAB_001f2295:
MOV EAX,dword ptr [RSP + 0x8]
ADD RSP,0x38
RET
|
int4 bfdec_normalize_and_round(long param_1,int8 param_2,int4 param_3)
{
int iVar1;
bool bVar2;
int4 local_30;
int8 local_20;
local_20 = *(long *)(param_1 + 0x18);
while( true ) {
bVar2 = false;
if (local_20 != 0) {
bVar2 = *(long *)(*(long *)(param_1 + 0x20) + (local_20 + -1) * 8) == 0;
}
if (!bVar2) break;
local_20 = local_20 + -1;
}
if (local_20 == 0) {
*(int8 *)(param_1 + 0x10) = 0x8000000000000000;
bfdec_resize(param_1,0);
local_30 = 0;
}
else {
*(long *)(param_1 + 0x10) =
*(long *)(param_1 + 0x10) + (*(long *)(param_1 + 0x18) - local_20) * -0x13;
iVar1 = clz_dec(*(int8 *)(*(long *)(param_1 + 0x20) + (local_20 + -1) * 8));
if (iVar1 != 0) {
mp_shl_dec(*(int8 *)(param_1 + 0x20),*(int8 *)(param_1 + 0x20),local_20,
(long)iVar1,0);
*(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) - (long)iVar1;
}
local_30 = __bfdec_round(param_1,param_2,param_3,local_20);
}
return local_30;
}
| |
34,517 | mi_ck_real_delete | eloqsql/storage/myisam/mi_delete.c | static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo,
uchar *key, uint key_length, my_off_t *root)
{
int error;
uint nod_flag;
my_off_t old_root;
uchar *root_buff;
DBUG_ENTER("_mi_ck_real_delete");
if ((old_root=*root) == HA_OFFSET_ERROR)
{
mi_print_error(info->s, HA_ERR_CRASHED);
DBUG_RETURN(my_errno=HA_ERR_CRASHED);
}
if (!(root_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
HA_MAX_KEY_BUFF*2)))
{
DBUG_PRINT("error",("Couldn't allocate memory"));
DBUG_RETURN(my_errno=ENOMEM);
}
DBUG_PRINT("info",("root_page: %ld", (long) old_root));
if (!_mi_fetch_keypage(info,keyinfo,old_root,DFLT_INIT_HITS,root_buff,0))
{
error= -1;
goto err;
}
if ((error=d_search(info,keyinfo,
(keyinfo->flag & HA_FULLTEXT ?
SEARCH_FIND | SEARCH_UPDATE | SEARCH_INSERT :
SEARCH_SAME),
key,key_length,old_root,root_buff)) >0)
{
if (error == 2)
{
DBUG_PRINT("test",("Enlarging of root when deleting"));
error=_mi_enlarge_root(info,keyinfo,key,root);
}
else /* error == 1 */
{
if (mi_getint(root_buff) <= (nod_flag=mi_test_if_nod(root_buff))+3)
{
error=0;
if (nod_flag)
*root=_mi_kpos(nod_flag,root_buff+2+nod_flag);
else
*root=HA_OFFSET_ERROR;
if (_mi_dispose(info,keyinfo,old_root,DFLT_INIT_HITS))
error= -1;
}
else
error=_mi_write_keypage(info,keyinfo,old_root,
DFLT_INIT_HITS,root_buff);
}
}
err:
my_afree((uchar*) root_buff);
DBUG_PRINT("exit",("Return: %d",error));
DBUG_RETURN(error);
} | O3 | c | mi_ck_real_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x40(%rbp)
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%r8), %r12
cmpq $-0x1, %r12
je 0x7a0c1
movl %ecx, %r14d
movq %rsi, %rbx
movq %r8, -0x38(%rbp)
movzwl 0xe(%rsi), %eax
movq %rsp, %r13
addl $0x97f, %eax # imm = 0x97F
andl $-0x10, %eax
subq %rax, %r13
movq %r13, %rsp
movq %r15, %rdi
movq %r12, %rdx
movl $0x3, %ecx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x88f9c
testq %rax, %rax
je 0x7a0eb
cmpb $0x0, 0xa(%rbx)
movl $0x4, %eax
movl $0x20041, %edx # imm = 0x20041
cmovnsl %eax, %edx
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq -0x40(%rbp), %rcx
movl %r14d, %r8d
movq %r12, %r9
pushq %r13
callq 0x7a1a9
addq $0x10, %rsp
movl %eax, %r14d
testl %eax, %eax
jle 0x7a183
cmpl $0x2, %r14d
jne 0x7a0f6
movq %r15, %rdi
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x8da80
jmp 0x7a141
movq (%r15), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %r14d
movl $0x7e, %edi
callq 0x80212
callq 0xa8ec2
movl $0x7e, (%rax)
jmp 0x7a183
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x7a183
movzbl 0x1(%r13), %eax
movl (%r13), %edx
movl %edx, %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
testb %dl, %dl
js 0x7a11b
movq $-0x1, %rax
cmpl $0x3, %ecx
ja 0x7a12b
jmp 0x7a161
movq (%r15), %rax
movl 0x17c(%rax), %edi
leal 0x3(%rdi), %eax
cmpl %eax, %ecx
jbe 0x7a146
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x3, %ecx
movq %r13, %r8
callq 0x89048
movl %eax, %r14d
jmp 0x7a183
testq %rdi, %rdi
je 0x7a15a
leaq (%rdi,%r13), %rsi
addq $0x2, %rsi
callq 0x89916
jmp 0x7a161
movq $-0x1, %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x3, %ecx
callq 0x8911b
xorl %r14d, %r14d
negl %eax
sbbl %r14d, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x7a1a4
movl %r14d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a240
| _mi_ck_real_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], rdx
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r12, [r8]
cmp r12, 0FFFFFFFFFFFFFFFFh
jz loc_7A0C1
mov r14d, ecx
mov rbx, rsi
mov [rbp+var_38], r8
movzx eax, word ptr [rsi+0Eh]
mov r13, rsp
add eax, 97Fh
and eax, 0FFFFFFF0h
sub r13, rax
mov rsp, r13
mov rdi, r15
mov rdx, r12
mov ecx, 3
mov r8, r13
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_7A0EB
cmp byte ptr [rbx+0Ah], 0
mov eax, 4
mov edx, 20041h
cmovns edx, eax
sub rsp, 8
mov rdi, r15
mov rsi, rbx
mov rcx, [rbp+var_40]
mov r8d, r14d
mov r9, r12
push r13
call d_search_0
add rsp, 10h
mov r14d, eax
test eax, eax
jle loc_7A183
cmp r14d, 2
jnz short loc_7A0F6
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_40]
mov rcx, [rbp+var_38]
call _mi_enlarge_root
jmp loc_7A141
loc_7A0C1:
mov rax, [r15]
mov rsi, [rax+268h]
mov r14d, 7Eh ; '~'
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
jmp loc_7A183
loc_7A0EB:
mov r14d, 0FFFFFFFFh
jmp loc_7A183
loc_7A0F6:
movzx eax, byte ptr [r13+1]
mov edx, [r13+0]
mov ecx, edx
and ecx, 7Fh
shl ecx, 8
or ecx, eax
test dl, dl
js short loc_7A11B
mov rax, 0FFFFFFFFFFFFFFFFh
cmp ecx, 3
ja short loc_7A12B
jmp short loc_7A161
loc_7A11B:
mov rax, [r15]
mov edi, [rax+17Ch]
lea eax, [rdi+3]
cmp ecx, eax
jbe short loc_7A146
loc_7A12B:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 3
mov r8, r13
call _mi_write_keypage
loc_7A141:
mov r14d, eax
jmp short loc_7A183
loc_7A146:
test rdi, rdi
jz short loc_7A15A
lea rsi, [rdi+r13]
add rsi, 2
call _mi_kpos
jmp short loc_7A161
loc_7A15A:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_7A161:
mov rcx, [rbp+var_38]
mov [rcx], rax
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 3
call _mi_dispose
xor r14d, r14d
neg eax
sbb r14d, r14d
loc_7A183:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_7A1A4
mov eax, r14d
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7A1A4:
call ___stack_chk_fail
| long long mi_ck_real_delete(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v6; // r12
char *v8; // r13
int v9; // edx
int v10; // r14d
unsigned int v12; // ecx
long long v13; // rax
long long v14; // rdi
long long v16; // [rsp+0h] [rbp-40h] BYREF
long long *v17; // [rsp+8h] [rbp-38h]
unsigned long long v18; // [rsp+10h] [rbp-30h]
v16 = a3;
v18 = __readfsqword(0x28u);
v6 = *a5;
if ( *a5 == -1 )
{
v10 = 126;
mi_report_error(126LL, *(_QWORD *)(*(_QWORD *)a1 + 616LL));
*(_DWORD *)my_thread_var(126LL) = 126;
}
else
{
v17 = a5;
v8 = (char *)&v16 - ((*(unsigned __int16 *)(a2 + 14) + 2431) & 0xFFFFFFF0);
if ( mi_fetch_keypage(a1, a2, v6, 3LL, v8, 0LL) )
{
v9 = 131137;
if ( *(char *)(a2 + 10) >= 0 )
v9 = 4;
v10 = d_search_0(a1, a2, v9, v16, a4, v6, (long long)v8);
if ( v10 > 0 )
{
if ( v10 == 2 )
return (unsigned int)mi_enlarge_root(a1, a2, v16, v17);
v12 = (unsigned __int8)v8[1] | ((*(_DWORD *)v8 & 0x7F) << 8);
if ( (*(_DWORD *)v8 & 0x80u) != 0 )
{
v14 = *(unsigned int *)(*(_QWORD *)a1 + 380LL);
if ( v12 <= (int)v14 + 3 )
{
if ( *(_DWORD *)(*(_QWORD *)a1 + 380LL) )
v13 = mi_kpos(v14, &v8[v14 + 2]);
else
v13 = -1LL;
goto LABEL_19;
}
}
else
{
v13 = -1LL;
if ( v12 <= 3 )
{
LABEL_19:
*v17 = v13;
return (unsigned int)-((unsigned int)mi_dispose(a1, a2, v6, 3LL) != 0);
}
}
return (unsigned int)mi_write_keypage(a1, a2, v6, 3LL, v8);
}
}
else
{
return (unsigned int)-1;
}
}
return (unsigned int)v10;
}
| _mi_ck_real_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],RDX
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R12,qword ptr [R8]
CMP R12,-0x1
JZ 0x0017a0c1
MOV R14D,ECX
MOV RBX,RSI
MOV qword ptr [RBP + -0x38],R8
MOVZX EAX,word ptr [RSI + 0xe]
MOV R13,RSP
ADD EAX,0x97f
AND EAX,0xfffffff0
SUB R13,RAX
MOV RSP,R13
MOV RDI,R15
MOV RDX,R12
MOV ECX,0x3
MOV R8,R13
XOR R9D,R9D
CALL 0x00188f9c
TEST RAX,RAX
JZ 0x0017a0eb
CMP byte ptr [RBX + 0xa],0x0
MOV EAX,0x4
MOV EDX,0x20041
CMOVNS EDX,EAX
SUB RSP,0x8
MOV RDI,R15
MOV RSI,RBX
MOV RCX,qword ptr [RBP + -0x40]
MOV R8D,R14D
MOV R9,R12
PUSH R13
CALL 0x0017a1a9
ADD RSP,0x10
MOV R14D,EAX
TEST EAX,EAX
JLE 0x0017a183
CMP R14D,0x2
JNZ 0x0017a0f6
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x0018da80
JMP 0x0017a141
LAB_0017a0c1:
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RAX + 0x268]
MOV R14D,0x7e
MOV EDI,0x7e
CALL 0x00180212
CALL 0x001a8ec2
MOV dword ptr [RAX],0x7e
JMP 0x0017a183
LAB_0017a0eb:
MOV R14D,0xffffffff
JMP 0x0017a183
LAB_0017a0f6:
MOVZX EAX,byte ptr [R13 + 0x1]
MOV EDX,dword ptr [R13]
MOV ECX,EDX
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
TEST DL,DL
JS 0x0017a11b
MOV RAX,-0x1
CMP ECX,0x3
JA 0x0017a12b
JMP 0x0017a161
LAB_0017a11b:
MOV RAX,qword ptr [R15]
MOV EDI,dword ptr [RAX + 0x17c]
LEA EAX,[RDI + 0x3]
CMP ECX,EAX
JBE 0x0017a146
LAB_0017a12b:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x3
MOV R8,R13
CALL 0x00189048
LAB_0017a141:
MOV R14D,EAX
JMP 0x0017a183
LAB_0017a146:
TEST RDI,RDI
JZ 0x0017a15a
LEA RSI,[RDI + R13*0x1]
ADD RSI,0x2
CALL 0x00189916
JMP 0x0017a161
LAB_0017a15a:
MOV RAX,-0x1
LAB_0017a161:
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX],RAX
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x3
CALL 0x0018911b
XOR R14D,R14D
NEG EAX
SBB R14D,R14D
LAB_0017a183:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0017a1a4
MOV EAX,R14D
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017a1a4:
CALL 0x0012a240
|
int _mi_ck_real_delete(long *param_1,long param_2,int8 param_3,int4 param_4,
long *param_5)
{
long lVar1;
long lVar2;
int8 uVar3;
long *plVar4;
int iVar5;
long lVar6;
int4 *puVar7;
uint uVar8;
int8 uVar9;
uint *puVar10;
ulong uVar11;
long in_FS_OFFSET;
int8 auStack_60 [3];
int8 local_48;
long *local_40;
long local_38;
puVar10 = (uint *)&local_48;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *param_5;
local_48 = param_3;
if (lVar1 == -1) {
iVar5 = 0x7e;
auStack_60[2] = 0x17a0db;
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
auStack_60[2] = 0x17a0e0;
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x7e;
goto LAB_0017a183;
}
lVar2 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x97f & 0xfffffff0);
puVar10 = (uint *)((long)&local_48 + lVar2);
local_40 = param_5;
*(int8 *)((long)auStack_60 + lVar2 + 0x10) = 0x17a05f;
lVar6 = _mi_fetch_keypage(param_1,param_2,lVar1,3,puVar10,0);
uVar3 = local_48;
if (lVar6 == 0) {
iVar5 = -1;
goto LAB_0017a183;
}
uVar9 = 0x20041;
if (-1 < *(char *)(param_2 + 10)) {
uVar9 = 4;
}
*(uint **)((long)auStack_60 + lVar2 + 8) = puVar10;
*(int8 *)((long)auStack_60 + lVar2) = 0x17a094;
iVar5 = d_search(param_1,param_2,uVar9,uVar3,param_4,lVar1);
plVar4 = local_40;
uVar3 = local_48;
if (iVar5 < 1) goto LAB_0017a183;
if (iVar5 == 2) {
*(int8 *)((long)auStack_60 + lVar2 + 0x10) = 0x17a0bc;
iVar5 = _mi_enlarge_root(param_1,param_2,uVar3,plVar4);
goto LAB_0017a183;
}
uVar8 = (*puVar10 & 0x7f) << 8 | (uint)*(byte *)((long)&local_48 + lVar2 + 1);
if ((char)*puVar10 < '\0') {
uVar11 = (ulong)*(uint *)(*param_1 + 0x17c);
if (*(uint *)(*param_1 + 0x17c) + 3 < uVar8) goto LAB_0017a12b;
if (uVar11 == 0) {
lVar6 = -1;
}
else {
*(int8 *)((long)auStack_60 + lVar2 + 0x10) = 0x17a158;
lVar6 = _mi_kpos(uVar11,(long)puVar10 + uVar11 + 2);
}
}
else {
lVar6 = -1;
if (3 < uVar8) {
LAB_0017a12b:
*(int8 *)((long)auStack_60 + lVar2 + 0x10) = 0x17a141;
iVar5 = _mi_write_keypage(param_1,param_2,lVar1,3,puVar10);
goto LAB_0017a183;
}
}
*local_40 = lVar6;
*(int8 *)((long)auStack_60 + lVar2 + 0x10) = 0x17a17b;
iVar5 = _mi_dispose(param_1,param_2,lVar1,3);
iVar5 = -(uint)(iVar5 != 0);
LAB_0017a183:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)(puVar10 + -2) = d_search;
__stack_chk_fail();
}
return iVar5;
}
| |
34,518 | minja::Value::operator-() const | monkey531[P]llama/common/minja.hpp | Value operator-() const {
if (is_number_integer())
return -get<int64_t>();
else
return -get<double>();
} | O2 | cpp | minja::Value::operator-() const:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
movq %rsi, %rdi
cmpb $0x1, %al
ja 0x63732
callq 0x63848
negq %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x638fe
jmp 0x6374e
callq 0x6391c
xorps 0x4f8e2(%rip), %xmm0 # 0xb3020
leaq 0x8(%rsp), %rsi
movlps %xmm0, (%rsi)
movq %rbx, %rdi
callq 0x639d2
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
| _ZNK5minja5ValuengEv:
push rbx
sub rsp, 10h
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
mov rdi, rsi
cmp al, 1
ja short loc_63732
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
neg rax
lea rsi, [rsp+18h+var_10]; __int64 *
mov [rsi], rax
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKl; minja::Value::Value(long const&)
jmp short loc_6374E
loc_63732:
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
xorps xmm0, cs:xmmword_B3020
lea rsi, [rsp+18h+var_10]; double *
movlps qword ptr [rsi], xmm0
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKd; minja::Value::Value(double const&)
loc_6374E:
mov rax, rbx
add rsp, 10h
pop rbx
retn
| minja::Value * minja::Value::operator-(minja::Value *this, long long a2, __m128 a3)
{
long long v4[2]; // [rsp+8h] [rbp-10h] BYREF
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u )
{
*(double *)a3.m128_u64 = minja::Value::get<double>(a2);
_mm_storel_ps((double *)v4, _mm_xor_ps(a3, (__m128)xmmword_B3020));
minja::Value::Value(this, (const double *)v4);
}
else
{
v4[0] = -minja::Value::get<long>(a2);
minja::Value::Value(this, v4);
}
return this;
}
| operator-:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
MOV RDI,RSI
CMP AL,0x1
JA 0x00163732
CALL 0x00163848
NEG RAX
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDI,RBX
CALL 0x001638fe
JMP 0x0016374e
LAB_00163732:
CALL 0x0016391c
XORPS XMM0,xmmword ptr [0x001b3020]
LEA RSI,[RSP + 0x8]
MOVLPS qword ptr [RSI],XMM0
MOV RDI,RBX
CALL 0x001639d2
LAB_0016374e:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE() const */
Value * __thiscall minja::Value::operator-(Value *this)
{
long lVar1;
Value *in_RSI;
double dVar2;
double local_10;
if ((byte)((char)in_RSI[0x40] - 5U) < 2) {
lVar1 = get<long>(in_RSI);
local_10 = (double)-lVar1;
Value(this,(long *)&local_10);
}
else {
dVar2 = get<double>(in_RSI);
local_10 = (double)CONCAT44((uint)((ulong)dVar2 >> 0x20) ^ _UNK_001b3024,
SUB84(dVar2,0) ^ _DAT_001b3020);
Value(this,&local_10);
}
return this;
}
| |
34,519 | convert_tensor(void*, ggml_type, void*, ggml_type, int) | 7CodeWizard[P]stablediffusion/model.cpp | void convert_tensor(void* src, ggml_type src_type, void* dst, ggml_type dst_type, int n) {
if (src_type == dst_type) {
size_t nbytes = n * ggml_type_size(src_type) / ggml_blck_size(src_type);
memcpy(((char*)dst), ((char*)src), nbytes);
} else if (src_type == GGML_TYPE_F32) {
if (dst_type == GGML_TYPE_F16) {
ggml_fp32_to_fp16_row((float*)src, (ggml_fp16_t*)dst, n);
} else {
int64_t hist[16];
ggml_quantize_chunk(dst_type, (float*)src, dst, 0, n, hist);
}
} else if (dst_type == GGML_TYPE_F32) {
if (src_type == GGML_TYPE_F16) {
ggml_fp16_to_fp32_row((ggml_fp16_t*)src, (float*)dst, n);
} else {
auto qtype = ggml_internal_get_type_traits(src_type);
if (qtype.to_float == NULL) {
throw std::runtime_error(format("type %s unsupported for integer quantization: no dequantization available",
ggml_type_name(src_type)));
}
qtype.to_float(src, (float*)dst, n);
}
} else {
// src_type == GGML_TYPE_F16 => dst_type is quantized
// src_type is quantized => dst_type == GGML_TYPE_F16 or dst_type is quantized
auto qtype = ggml_internal_get_type_traits(src_type);
if (qtype.to_float == NULL) {
throw std::runtime_error(format("type %s unsupported for integer quantization: no dequantization available",
ggml_type_name(src_type)));
}
std::vector<char> buf;
buf.resize(sizeof(float) * n);
char* src_data_f32 = buf.data();
qtype.to_float(src, (float*)src_data_f32, n);
if (dst_type == GGML_TYPE_F16) {
ggml_fp32_to_fp16_row((float*)src_data_f32, (ggml_fp16_t*)dst, n);
} else {
int64_t hist[16];
ggml_quantize_chunk(dst_type, (float*)src_data_f32, dst, 0, n, hist);
}
}
} | O0 | cpp | convert_tensor(void*, ggml_type, void*, ggml_type, int):
subq $0x278, %rsp # imm = 0x278
movq %rdi, 0x270(%rsp)
movl %esi, 0x26c(%rsp)
movq %rdx, 0x260(%rsp)
movl %ecx, 0x25c(%rsp)
movl %r8d, 0x258(%rsp)
movl 0x26c(%rsp), %eax
cmpl 0x25c(%rsp), %eax
jne 0xbb0ec
movslq 0x258(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x26c(%rsp), %edi
callq 0x11afb0
movq %rax, %rcx
movq 0x30(%rsp), %rax
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
movl 0x26c(%rsp), %edi
callq 0x11af90
movl %eax, %ecx
movq 0x38(%rsp), %rax
movslq %ecx, %rcx
xorl %edx, %edx
divq %rcx
movq %rax, 0x250(%rsp)
movq 0x260(%rsp), %rdi
movq 0x270(%rsp), %rsi
movq 0x250(%rsp), %rdx
callq 0xb600
jmp 0xbb489
cmpl $0x0, 0x26c(%rsp)
jne 0xbb151
cmpl $0x1, 0x25c(%rsp)
jne 0xbb11e
movq 0x270(%rsp), %rdi
movq 0x260(%rsp), %rsi
movl 0x258(%rsp), %edx
callq 0x11a6a0
jmp 0xbb14c
movl 0x25c(%rsp), %edi
movq 0x270(%rsp), %rsi
movq 0x260(%rsp), %rdx
movl 0x258(%rsp), %r8d
leaq 0x1d0(%rsp), %r9
xorl %ecx, %ecx
callq 0x135f80
jmp 0xbb487
cmpl $0x0, 0x25c(%rsp)
jne 0xbb2a5
cmpl $0x1, 0x26c(%rsp)
jne 0xbb18a
movq 0x270(%rsp), %rdi
movq 0x260(%rsp), %rsi
movl 0x258(%rsp), %edx
callq 0x11a640
jmp 0xbb2a0
movl 0x26c(%rsp), %esi
leaq 0x188(%rsp), %rdi
callq 0x11a960
cmpq $0x0, 0x1a8(%rsp)
jne 0xbb27f
movb $0x1, 0x15b(%rsp)
movl $0x10, %edi
callq 0xb320
movq %rax, 0x20(%rsp)
movl 0x26c(%rsp), %edi
callq 0x11b090
movq %rax, 0x28(%rsp)
jmp 0xbb1d7
movq 0x28(%rsp), %rdx
leaq 0xc8c31(%rip), %rsi # 0x183e14
xorl %eax, %eax
leaq 0x168(%rsp), %rdi
callq 0xea960
jmp 0xbb1f4
movq 0x20(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0xbc20
jmp 0xbb208
movq 0x20(%rsp), %rdi
movb $0x0, 0x15b(%rsp)
movq 0x11cdd4(%rip), %rsi # 0x1d7ff0
movq 0x11cd5d(%rip), %rdx # 0x1d7f80
callq 0xbcb0
jmp 0xbb49e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0xbb264
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0xbf00
testb $0x1, 0x15b(%rsp)
jne 0xbb270
jmp 0xbb27a
movq 0x20(%rsp), %rdi
callq 0xb540
jmp 0xbb491
movq 0x1a8(%rsp), %rax
movq 0x270(%rsp), %rdi
movq 0x260(%rsp), %rsi
movl 0x258(%rsp), %edx
callq *%rax
jmp 0xbb485
movl 0x26c(%rsp), %esi
leaq 0x110(%rsp), %rdi
callq 0x11a960
cmpq $0x0, 0x130(%rsp)
jne 0xbb39a
movb $0x1, 0xef(%rsp)
movl $0x10, %edi
callq 0xb320
movq %rax, 0x10(%rsp)
movl 0x26c(%rsp), %edi
callq 0x11b090
movq %rax, 0x18(%rsp)
jmp 0xbb2f2
movq 0x18(%rsp), %rdx
leaq 0xc8b16(%rip), %rsi # 0x183e14
xorl %eax, %eax
leaq 0xf0(%rsp), %rdi
callq 0xea960
jmp 0xbb30f
movq 0x10(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0xbc20
jmp 0xbb323
movq 0x10(%rsp), %rdi
movb $0x0, 0xef(%rsp)
movq 0x11ccb9(%rip), %rsi # 0x1d7ff0
movq 0x11cc42(%rip), %rdx # 0x1d7f80
callq 0xbcb0
jmp 0xbb49e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0xbb37f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xbf00
testb $0x1, 0xef(%rsp)
jne 0xbb38b
jmp 0xbb395
movq 0x10(%rsp), %rdi
callq 0xb540
jmp 0xbb491
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x941f0
movq 0x8(%rsp), %rdi
movslq 0x258(%rsp), %rsi
shlq $0x2, %rsi
callq 0xc2fa0
jmp 0xbb3c4
leaq 0xd0(%rsp), %rdi
callq 0x98640
movq %rax, 0xc8(%rsp)
movq 0x130(%rsp), %rax
movq 0x270(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movl 0x258(%rsp), %edx
callq *%rax
jmp 0xbb3fc
cmpl $0x1, 0x25c(%rsp)
jne 0xbb449
movq 0xc8(%rsp), %rdi
movq 0x260(%rsp), %rsi
movl 0x258(%rsp), %edx
callq 0x11a6a0
jmp 0xbb424
jmp 0xbb478
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x94320
jmp 0xbb491
movl 0x25c(%rsp), %edi
movq 0xc8(%rsp), %rsi
movq 0x260(%rsp), %rdx
movl 0x258(%rsp), %r8d
xorl %ecx, %ecx
leaq 0x40(%rsp), %r9
callq 0x135f80
jmp 0xbb476
jmp 0xbb478
leaq 0xd0(%rsp), %rdi
callq 0x94320
jmp 0xbb487
jmp 0xbb489
addq $0x278, %rsp # imm = 0x278
retq
movq 0x160(%rsp), %rdi
callq 0xbd30
nop
| _Z14convert_tensorPv9ggml_typeS_S0_i:
sub rsp, 278h
mov [rsp+278h+var_8], rdi
mov [rsp+278h+var_C], esi
mov [rsp+278h+var_18], rdx
mov [rsp+278h+var_1C], ecx
mov [rsp+278h+var_20], r8d
mov eax, [rsp+278h+var_C]
cmp eax, [rsp+278h+var_1C]
jnz short loc_BB0EC
movsxd rax, [rsp+278h+var_20]
mov [rsp+278h+var_248], rax
mov edi, [rsp+278h+var_C]
call ggml_type_size
mov rcx, rax
mov rax, [rsp+278h+var_248]
imul rax, rcx
mov [rsp+278h+var_240], rax
mov edi, [rsp+278h+var_C]
call ggml_blck_size
mov ecx, eax
mov rax, [rsp+278h+var_240]
movsxd rcx, ecx
xor edx, edx
div rcx
mov [rsp+278h+var_28], rax
mov rdi, [rsp+278h+var_18]
mov rsi, [rsp+278h+var_8]
mov rdx, [rsp+278h+var_28]
call _memcpy
jmp loc_BB489
loc_BB0EC:
cmp [rsp+278h+var_C], 0
jnz short loc_BB151
cmp [rsp+278h+var_1C], 1
jnz short loc_BB11E
mov rdi, [rsp+278h+var_8]
mov rsi, [rsp+278h+var_18]
mov edx, [rsp+278h+var_20]
call ggml_fp32_to_fp16_row
jmp short loc_BB14C
loc_BB11E:
mov edi, [rsp+278h+var_1C]
mov rsi, [rsp+278h+var_8]
mov rdx, [rsp+278h+var_18]
mov r8d, [rsp+278h+var_20]
lea r9, [rsp+278h+var_A8]
xor ecx, ecx
call ggml_quantize_chunk
loc_BB14C:
jmp loc_BB487
loc_BB151:
cmp [rsp+278h+var_1C], 0
jnz loc_BB2A5
cmp [rsp+278h+var_C], 1
jnz short loc_BB18A
mov rdi, [rsp+278h+var_8]
mov rsi, [rsp+278h+var_18]
mov edx, [rsp+278h+var_20]
call ggml_fp16_to_fp32_row
jmp loc_BB2A0
loc_BB18A:
mov esi, [rsp+278h+var_C]
lea rdi, [rsp+278h+var_F0]
call ggml_internal_get_type_traits
cmp [rsp+278h+var_D0], 0
jnz loc_BB27F
mov [rsp+278h+var_11D], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov [rsp+278h+var_258], rax
mov edi, [rsp+278h+var_C]
call ggml_type_name
mov [rsp+278h+var_250], rax
jmp short $+2
loc_BB1D7:
mov rdx, [rsp+278h+var_250]
lea rsi, aTypeSUnsupport; "type %s unsupported for integer quantiz"...
xor eax, eax
lea rdi, [rsp+278h+var_110]
call _Z6formatB5cxx11PKcz; format(char const*,...)
jmp short $+2
loc_BB1F4:
mov rdi, [rsp+278h+var_258]
lea rsi, [rsp+278h+var_110]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_BB208:
mov rdi, [rsp+278h+var_258]; void *
mov [rsp+278h+var_11D], 0
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_BB49E
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_BB264
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_160]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_BB264:
test [rsp+arg_153], 1
jnz short loc_BB270
jmp short loc_BB27A
loc_BB270:
mov rdi, [rsp+arg_18]; void *
call ___cxa_free_exception
loc_BB27A:
jmp loc_BB491
loc_BB27F:
mov rax, [rsp+278h+var_D0]
mov rdi, [rsp+278h+var_8]
mov rsi, [rsp+278h+var_18]
mov edx, [rsp+278h+var_20]
call rax
loc_BB2A0:
jmp loc_BB485
loc_BB2A5:
mov esi, [rsp+278h+var_C]
lea rdi, [rsp+278h+var_168]
call ggml_internal_get_type_traits
cmp [rsp+278h+var_148], 0
jnz loc_BB39A
mov [rsp+278h+var_189], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov [rsp+278h+var_268], rax
mov edi, [rsp+278h+var_C]
call ggml_type_name
mov [rsp+278h+var_260], rax
jmp short $+2
loc_BB2F2:
mov rdx, [rsp+278h+var_260]
lea rsi, aTypeSUnsupport; "type %s unsupported for integer quantiz"...
xor eax, eax
lea rdi, [rsp+278h+var_188]
call _Z6formatB5cxx11PKcz; format(char const*,...)
jmp short $+2
loc_BB30F:
mov rdi, [rsp+278h+var_268]
lea rsi, [rsp+278h+var_188]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_BB323:
mov rdi, [rsp+278h+var_268]; void *
mov [rsp+278h+var_189], 0
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_BB49E
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
jmp short loc_BB37F
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_BB37F:
test [rsp+arg_E7], 1
jnz short loc_BB38B
jmp short loc_BB395
loc_BB38B:
mov rdi, [rsp+arg_8]; void *
call ___cxa_free_exception
loc_BB395:
jmp loc_BB491
loc_BB39A:
lea rdi, [rsp+278h+var_1A8]
mov [rsp+278h+var_270], rdi
call _ZNSt6vectorIcSaIcEEC2Ev; std::vector<char>::vector(void)
mov rdi, [rsp+278h+var_270]
movsxd rsi, [rsp+278h+var_20]
shl rsi, 2
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
jmp short $+2
loc_BB3C4:
lea rdi, [rsp+278h+var_1A8]
call _ZNSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void)
mov [rsp+278h+var_1B0], rax
mov rax, [rsp+278h+var_148]
mov rdi, [rsp+278h+var_8]
mov rsi, [rsp+278h+var_1B0]
mov edx, [rsp+278h+var_20]
call rax
jmp short $+2
loc_BB3FC:
cmp [rsp+278h+var_1C], 1
jnz short loc_BB449
mov rdi, [rsp+278h+var_1B0]
mov rsi, [rsp+278h+var_18]
mov edx, [rsp+278h+var_20]
call ggml_fp32_to_fp16_row
jmp short $+2
loc_BB424:
jmp short loc_BB478
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_C8]
call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector()
jmp short loc_BB491
loc_BB449:
mov edi, [rsp+278h+var_1C]
mov rsi, [rsp+278h+var_1B0]
mov rdx, [rsp+278h+var_18]
mov r8d, [rsp+278h+var_20]
xor ecx, ecx
lea r9, [rsp+278h+var_238]
call ggml_quantize_chunk
jmp short $+2
loc_BB476:
jmp short $+2
loc_BB478:
lea rdi, [rsp+278h+var_1A8]
call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector()
loc_BB485:
jmp short $+2
loc_BB487:
jmp short $+2
loc_BB489:
add rsp, 278h
retn
loc_BB491:
mov rdi, [rsp+arg_158]
call __Unwind_Resume
loc_BB49E:
xchg ax, ax
| long long convert_tensor(long long a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5)
{
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // r8d
int v11; // r9d
void *exception; // [rsp+10h] [rbp-268h]
int v13; // [rsp+18h] [rbp-260h]
void *v14; // [rsp+20h] [rbp-258h]
int v15; // [rsp+28h] [rbp-250h]
unsigned long long v16; // [rsp+38h] [rbp-240h]
_BYTE v17[136]; // [rsp+40h] [rbp-238h] BYREF
long long v18; // [rsp+C8h] [rbp-1B0h]
long long v19[3]; // [rsp+D0h] [rbp-1A8h] BYREF
char v20; // [rsp+EFh] [rbp-189h]
_BYTE v21[32]; // [rsp+F0h] [rbp-188h] BYREF
_BYTE v22[32]; // [rsp+110h] [rbp-168h] BYREF
void ( *v23)(long long, long long, _QWORD); // [rsp+130h] [rbp-148h]
char v24; // [rsp+15Bh] [rbp-11Dh]
_BYTE v25[32]; // [rsp+168h] [rbp-110h] BYREF
_BYTE v26[32]; // [rsp+188h] [rbp-F0h] BYREF
long long ( *v27)(long long, long long, _QWORD); // [rsp+1A8h] [rbp-D0h]
_BYTE v28[128]; // [rsp+1D0h] [rbp-A8h] BYREF
unsigned long long v29; // [rsp+250h] [rbp-28h]
unsigned int v30; // [rsp+258h] [rbp-20h]
unsigned int v31; // [rsp+25Ch] [rbp-1Ch]
long long v32; // [rsp+260h] [rbp-18h]
unsigned int v33; // [rsp+26Ch] [rbp-Ch]
long long v34; // [rsp+270h] [rbp-8h]
v34 = a1;
v33 = a2;
v32 = a3;
v31 = a4;
v30 = a5;
if ( a2 == a4 )
{
v16 = ggml_type_size(v33) * (int)v30;
v29 = v16 / (int)ggml_blck_size(v33);
return memcpy(v32, v34, v29);
}
else if ( v33 )
{
if ( v31 )
{
ggml_internal_get_type_traits(v22, v33);
if ( !v23 )
{
exception = __cxa_allocate_exception(0x10uLL);
v13 = ggml_type_name(v33);
format[abi:cxx11](
(unsigned int)v21,
(unsigned int)"type %s unsupported for integer quantization: no dequantization available",
v13,
v9,
v10,
v11);
std::runtime_error::runtime_error(exception, v21);
v20 = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::vector<char>::vector((long long)v19);
std::vector<char>::resize(v19, 4LL * (int)v30);
v18 = std::vector<char>::data(v19);
v23(v34, v18, v30);
if ( v31 == 1 )
ggml_fp32_to_fp16_row(v18, v32, v30);
else
ggml_quantize_chunk(v31, v18, v32, 0LL, v30, v17);
return std::vector<char>::~vector(v19);
}
else if ( v33 == 1 )
{
return ggml_fp16_to_fp32_row(v34, v32, v30);
}
else
{
ggml_internal_get_type_traits(v26, v33);
if ( !v27 )
{
v14 = __cxa_allocate_exception(0x10uLL);
v15 = ggml_type_name(v33);
format[abi:cxx11](
(unsigned int)v25,
(unsigned int)"type %s unsupported for integer quantization: no dequantization available",
v15,
v6,
v7,
v8);
std::runtime_error::runtime_error(v14, v25);
v24 = 0;
__cxa_throw(
v14,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return v27(v34, v32, v30);
}
}
else if ( v31 == 1 )
{
return ggml_fp32_to_fp16_row(v34, v32, v30);
}
else
{
return ggml_quantize_chunk(v31, v34, v32, 0LL, v30, v28);
}
}
| convert_tensor:
SUB RSP,0x278
MOV qword ptr [RSP + 0x270],RDI
MOV dword ptr [RSP + 0x26c],ESI
MOV qword ptr [RSP + 0x260],RDX
MOV dword ptr [RSP + 0x25c],ECX
MOV dword ptr [RSP + 0x258],R8D
MOV EAX,dword ptr [RSP + 0x26c]
CMP EAX,dword ptr [RSP + 0x25c]
JNZ 0x001bb0ec
MOVSXD RAX,dword ptr [RSP + 0x258]
MOV qword ptr [RSP + 0x30],RAX
MOV EDI,dword ptr [RSP + 0x26c]
CALL 0x0021afb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x30]
IMUL RAX,RCX
MOV qword ptr [RSP + 0x38],RAX
MOV EDI,dword ptr [RSP + 0x26c]
CALL 0x0021af90
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,ECX
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x250],RAX
MOV RDI,qword ptr [RSP + 0x260]
MOV RSI,qword ptr [RSP + 0x270]
MOV RDX,qword ptr [RSP + 0x250]
CALL 0x0010b600
JMP 0x001bb489
LAB_001bb0ec:
CMP dword ptr [RSP + 0x26c],0x0
JNZ 0x001bb151
CMP dword ptr [RSP + 0x25c],0x1
JNZ 0x001bb11e
MOV RDI,qword ptr [RSP + 0x270]
MOV RSI,qword ptr [RSP + 0x260]
MOV EDX,dword ptr [RSP + 0x258]
CALL 0x0021a6a0
JMP 0x001bb14c
LAB_001bb11e:
MOV EDI,dword ptr [RSP + 0x25c]
MOV RSI,qword ptr [RSP + 0x270]
MOV RDX,qword ptr [RSP + 0x260]
MOV R8D,dword ptr [RSP + 0x258]
LEA R9,[RSP + 0x1d0]
XOR ECX,ECX
CALL 0x00235f80
LAB_001bb14c:
JMP 0x001bb487
LAB_001bb151:
CMP dword ptr [RSP + 0x25c],0x0
JNZ 0x001bb2a5
CMP dword ptr [RSP + 0x26c],0x1
JNZ 0x001bb18a
MOV RDI,qword ptr [RSP + 0x270]
MOV RSI,qword ptr [RSP + 0x260]
MOV EDX,dword ptr [RSP + 0x258]
CALL 0x0021a640
JMP 0x001bb2a0
LAB_001bb18a:
MOV ESI,dword ptr [RSP + 0x26c]
LEA RDI,[RSP + 0x188]
CALL 0x0021a960
CMP qword ptr [RSP + 0x1a8],0x0
JNZ 0x001bb27f
MOV byte ptr [RSP + 0x15b],0x1
MOV EDI,0x10
CALL 0x0010b320
MOV qword ptr [RSP + 0x20],RAX
MOV EDI,dword ptr [RSP + 0x26c]
LAB_001bb1cb:
CALL 0x0021b090
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001bb1d7
LAB_001bb1d7:
MOV RDX,qword ptr [RSP + 0x28]
LEA RSI,[0x283e14]
XOR EAX,EAX
LEA RDI,[RSP + 0x168]
CALL 0x001ea960
JMP 0x001bb1f4
LAB_001bb1f4:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x168]
CALL 0x0010bc20
JMP 0x001bb208
LAB_001bb208:
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RSP + 0x15b],0x0
MOV RSI,qword ptr [0x002d7ff0]
MOV RDX,qword ptr [0x002d7f80]
CALL 0x0010bcb0
LAB_001bb27f:
MOV RAX,qword ptr [RSP + 0x1a8]
MOV RDI,qword ptr [RSP + 0x270]
MOV RSI,qword ptr [RSP + 0x260]
MOV EDX,dword ptr [RSP + 0x258]
CALL RAX
LAB_001bb2a0:
JMP 0x001bb485
LAB_001bb2a5:
MOV ESI,dword ptr [RSP + 0x26c]
LEA RDI,[RSP + 0x110]
CALL 0x0021a960
CMP qword ptr [RSP + 0x130],0x0
JNZ 0x001bb39a
MOV byte ptr [RSP + 0xef],0x1
MOV EDI,0x10
CALL 0x0010b320
MOV qword ptr [RSP + 0x10],RAX
MOV EDI,dword ptr [RSP + 0x26c]
LAB_001bb2e6:
CALL 0x0021b090
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001bb2f2
LAB_001bb2f2:
MOV RDX,qword ptr [RSP + 0x18]
LEA RSI,[0x283e14]
XOR EAX,EAX
LEA RDI,[RSP + 0xf0]
CALL 0x001ea960
JMP 0x001bb30f
LAB_001bb30f:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0xf0]
CALL 0x0010bc20
JMP 0x001bb323
LAB_001bb323:
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0xef],0x0
MOV RSI,qword ptr [0x002d7ff0]
MOV RDX,qword ptr [0x002d7f80]
CALL 0x0010bcb0
LAB_001bb39a:
LEA RDI,[RSP + 0xd0]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001941f0
MOV RDI,qword ptr [RSP + 0x8]
MOVSXD RSI,dword ptr [RSP + 0x258]
SHL RSI,0x2
LAB_001bb3bd:
CALL 0x001c2fa0
JMP 0x001bb3c4
LAB_001bb3c4:
LEA RDI,[RSP + 0xd0]
CALL 0x00198640
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x130]
MOV RDI,qword ptr [RSP + 0x270]
MOV RSI,qword ptr [RSP + 0xc8]
MOV EDX,dword ptr [RSP + 0x258]
CALL RAX
JMP 0x001bb3fc
LAB_001bb3fc:
CMP dword ptr [RSP + 0x25c],0x1
JNZ 0x001bb449
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0x260]
MOV EDX,dword ptr [RSP + 0x258]
CALL 0x0021a6a0
JMP 0x001bb424
LAB_001bb424:
JMP 0x001bb478
LAB_001bb449:
MOV EDI,dword ptr [RSP + 0x25c]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0x260]
MOV R8D,dword ptr [RSP + 0x258]
XOR ECX,ECX
LEA R9,[RSP + 0x40]
CALL 0x00235f80
LAB_001bb474:
JMP 0x001bb476
LAB_001bb476:
JMP 0x001bb478
LAB_001bb478:
LEA RDI,[RSP + 0xd0]
CALL 0x00194320
LAB_001bb485:
JMP 0x001bb487
LAB_001bb487:
JMP 0x001bb489
LAB_001bb489:
ADD RSP,0x278
RET
|
/* convert_tensor(void*, ggml_type, void*, ggml_type, int) */
void convert_tensor(void *param_1,int param_2,void *param_3,int param_4,int param_5)
{
int iVar1;
long lVar2;
runtime_error *prVar3;
int8 uVar4;
int1 local_238 [136];
int8 local_1b0;
vector<char,std::allocator<char>> local_1a8 [31];
int1 local_189;
string local_188 [32];
int1 local_168 [32];
code *local_148;
int1 local_11d;
string local_110 [32];
int1 local_f0 [32];
code *local_d0;
int1 local_a8 [128];
ulong local_28;
int local_20;
int local_1c;
void *local_18;
int local_c;
void *local_8;
local_20 = param_5;
local_1c = param_4;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
if (param_2 == param_4) {
lVar2 = ggml_type_size(param_2);
iVar1 = ggml_blck_size(local_c);
local_28 = (ulong)(param_5 * lVar2) / (ulong)(long)iVar1;
memcpy(local_18,local_8,local_28);
}
else if (param_2 == 0) {
if (param_4 == 1) {
ggml_fp32_to_fp16_row(param_1,param_3,param_5);
}
else {
ggml_quantize_chunk(param_4,param_1,param_3,0,param_5,local_a8);
}
}
else if (param_4 == 0) {
if (param_2 == 1) {
ggml_fp16_to_fp32_row(param_1,param_3,param_5);
}
else {
ggml_internal_get_type_traits(local_f0,param_2);
if (local_d0 == (code *)0x0) {
local_11d = 1;
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bb1cb to 001bb1f1 has its CatchHandler @ 001bb22d */
uVar4 = ggml_type_name(local_c);
format_abi_cxx11_((char *)local_110,
"type %s unsupported for integer quantization: no dequantization available"
,uVar4);
/* try { // try from 001bb1f4 to 001bb227 has its CatchHandler @ 001bb243 */
std::runtime_error::runtime_error(prVar3,local_110);
local_11d = 0;
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_002d7ff0,PTR__runtime_error_002d7f80);
}
(*local_d0)(local_8,local_18,local_20);
}
}
else {
ggml_internal_get_type_traits(local_168,param_2);
if (local_148 == (code *)0x0) {
local_189 = 1;
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bb2e6 to 001bb30c has its CatchHandler @ 001bb348 */
uVar4 = ggml_type_name(local_c);
format_abi_cxx11_((char *)local_188,
"type %s unsupported for integer quantization: no dequantization available",
uVar4);
/* try { // try from 001bb30f to 001bb342 has its CatchHandler @ 001bb35e */
std::runtime_error::runtime_error(prVar3,local_188);
local_189 = 0;
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_002d7ff0,PTR__runtime_error_002d7f80);
}
std::vector<char,std::allocator<char>>::vector(local_1a8);
/* try { // try from 001bb3bd to 001bb473 has its CatchHandler @ 001bb426 */
std::vector<char,std::allocator<char>>::resize(local_1a8,(long)local_20 << 2);
local_1b0 = std::vector<char,std::allocator<char>>::data(local_1a8);
(*local_148)(local_8,local_1b0,local_20);
if (local_1c == 1) {
ggml_fp32_to_fp16_row(local_1b0,local_18,local_20);
}
else {
ggml_quantize_chunk(local_1c,local_1b0,local_18,0,local_20,local_238);
}
std::vector<char,std::allocator<char>>::~vector(local_1a8);
}
return;
}
| |
34,520 | convert_tensor(void*, ggml_type, void*, ggml_type, int) | 7CodeWizard[P]stablediffusion/model.cpp | void convert_tensor(void* src, ggml_type src_type, void* dst, ggml_type dst_type, int n) {
if (src_type == dst_type) {
size_t nbytes = n * ggml_type_size(src_type) / ggml_blck_size(src_type);
memcpy(((char*)dst), ((char*)src), nbytes);
} else if (src_type == GGML_TYPE_F32) {
if (dst_type == GGML_TYPE_F16) {
ggml_fp32_to_fp16_row((float*)src, (ggml_fp16_t*)dst, n);
} else {
int64_t hist[16];
ggml_quantize_chunk(dst_type, (float*)src, dst, 0, n, hist);
}
} else if (dst_type == GGML_TYPE_F32) {
if (src_type == GGML_TYPE_F16) {
ggml_fp16_to_fp32_row((ggml_fp16_t*)src, (float*)dst, n);
} else {
auto qtype = ggml_internal_get_type_traits(src_type);
if (qtype.to_float == NULL) {
throw std::runtime_error(format("type %s unsupported for integer quantization: no dequantization available",
ggml_type_name(src_type)));
}
qtype.to_float(src, (float*)dst, n);
}
} else {
// src_type == GGML_TYPE_F16 => dst_type is quantized
// src_type is quantized => dst_type == GGML_TYPE_F16 or dst_type is quantized
auto qtype = ggml_internal_get_type_traits(src_type);
if (qtype.to_float == NULL) {
throw std::runtime_error(format("type %s unsupported for integer quantization: no dequantization available",
ggml_type_name(src_type)));
}
std::vector<char> buf;
buf.resize(sizeof(float) * n);
char* src_data_f32 = buf.data();
qtype.to_float(src, (float*)src_data_f32, n);
if (dst_type == GGML_TYPE_F16) {
ggml_fp32_to_fp16_row((float*)src_data_f32, (ggml_fp16_t*)dst, n);
} else {
int64_t hist[16];
ggml_quantize_chunk(dst_type, (float*)src_data_f32, dst, 0, n, hist);
}
}
} | O2 | cpp | convert_tensor(void*, ggml_type, void*, ggml_type, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %ebp
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r14
cmpl %ecx, %esi
jne 0x46f55
movslq %ebp, %r13
movl %r12d, %edi
callq 0x67b83
movq %rax, %r15
imulq %r13, %r15
movl %r12d, %edi
callq 0x67b71
movslq %eax, %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa4c0
movl %ecx, %r15d
testl %r12d, %r12d
je 0x46fbc
testl %r15d, %r15d
je 0x46fe0
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl %r12d, %esi
callq 0x67704
cmpq $0x0, 0x20(%r13)
je 0x47075
movq %rsp, %rdi
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movslq %ebp, %rsi
shlq $0x2, %rsi
callq 0x4a526
movq (%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq *0x38(%rsp)
cmpl $0x1, %r15d
jne 0x47004
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x6763d
jmp 0x4701c
cmpl $0x1, %r15d
jne 0x47026
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6763d
cmpl $0x1, %r12d
jne 0x47040
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x67614
leaq 0x60(%rsp), %r9
movl %r15d, %edi
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x7672b
movq %rsp, %rdi
callq 0x3bc1a
jmp 0x47063
leaq 0x60(%rsp), %r9
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x7672b
jmp 0x47063
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0x67704
movq 0x20(%r15), %rax
testq %rax, %rax
je 0x470c8
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *%rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0xa270
movq %rax, %r14
movl %r12d, %edi
callq 0x67bf9
leaq 0x56c05(%rip), %rsi # 0x9dc94
leaq 0x60(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x558f1
movb $0x1, %bpl
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0xa9f0
xorl %ebp, %ebp
movq 0x8ef31(%rip), %rsi # 0xd5fe8
movq 0x8eeca(%rip), %rdx # 0xd5f88
movq %r14, %rdi
callq 0xaa50
jmp 0x47119
pushq $0x10
popq %rdi
callq 0xa270
movq %rax, %r14
movl %r12d, %edi
callq 0x67bf9
leaq 0x56bb2(%rip), %rsi # 0x9dc94
leaq 0x18(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x558f1
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0xa9f0
xorl %ebp, %ebp
movq 0x8eede(%rip), %rsi # 0xd5fe8
movq 0x8ee77(%rip), %rdx # 0xd5f88
movq %r14, %rdi
callq 0xaa50
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x4712d
jmp 0x4713b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xac60
testb %bpl, %bpl
jne 0x4713e
jmp 0x47155
jmp 0x4714a
movq %rax, %rbx
movq %r14, %rdi
callq 0xa410
jmp 0x47155
jmp 0x4714a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3bc1a
movq %rbx, %rdi
callq 0xaab0
| _Z14convert_tensorPv9ggml_typeS_S0_i:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov ebp, r8d
mov rbx, rdx
mov r12d, esi
mov r14, rdi
cmp esi, ecx
jnz short loc_46F55
movsxd r13, ebp
mov edi, r12d
call ggml_type_size
mov r15, rax
imul r15, r13
mov edi, r12d
call ggml_blck_size
movsxd rcx, eax
mov rax, r15
xor edx, edx
div rcx
mov rdi, rbx
mov rsi, r14
mov rdx, rax
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memcpy
loc_46F55:
mov r15d, ecx
test r12d, r12d
jz short loc_46FBC
test r15d, r15d
jz short loc_46FE0
lea r13, [rsp+118h+var_100]
mov rdi, r13
mov esi, r12d
call ggml_internal_get_type_traits
cmp qword ptr [r13+20h], 0
jz loc_47075
mov rdi, rsp
and qword ptr [rdi+10h], 0
xorps xmm0, xmm0
movaps xmmword ptr [rdi], xmm0
movsxd rsi, ebp
shl rsi, 2
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov r12, [rsp+118h+var_118]
mov rdi, r14
mov rsi, r12
mov edx, ebp
call [rsp+118h+var_E0]
cmp r15d, 1
jnz short loc_47004
mov rdi, r12
mov rsi, rbx
mov edx, ebp
call ggml_fp32_to_fp16_row
jmp short loc_4701C
loc_46FBC:
cmp r15d, 1
jnz short loc_47026
mov rdi, r14
mov rsi, rbx
mov edx, ebp
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ggml_fp32_to_fp16_row
loc_46FE0:
cmp r12d, 1
jnz short loc_47040
mov rdi, r14
mov rsi, rbx
mov edx, ebp
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ggml_fp16_to_fp32_row
loc_47004:
lea r9, [rsp+118h+var_B8]
mov edi, r15d
mov rsi, r12
mov rdx, rbx
xor ecx, ecx
mov r8d, ebp
call ggml_quantize_chunk
loc_4701C:
mov rdi, rsp
call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base()
jmp short loc_47063
loc_47026:
lea r9, [rsp+118h+var_B8]
mov edi, r15d
mov rsi, r14
mov rdx, rbx
xor ecx, ecx
mov r8d, ebp
call ggml_quantize_chunk
jmp short loc_47063
loc_47040:
lea r15, [rsp+118h+var_B8]
mov rdi, r15
mov esi, r12d
call ggml_internal_get_type_traits
mov rax, [r15+20h]
test rax, rax
jz short loc_470C8
mov rdi, r14
mov rsi, rbx
mov edx, ebp
call rax
loc_47063:
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_47075:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov edi, r12d
call ggml_type_name
lea rsi, aTypeSUnsupport; "type %s unsupported for integer quantiz"...
lea rdi, [rsp+118h+var_B8]
mov rdx, rax
xor eax, eax
call _Z6formatB5cxx11PKcz; format(char const*,...)
mov bpl, 1
lea rsi, [rsp+118h+var_B8]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_47119
loc_470C8:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov edi, r12d
call ggml_type_name
lea rsi, aTypeSUnsupport; "type %s unsupported for integer quantiz"...
lea rdi, [rsp+118h+var_100]
mov rdx, rax
xor eax, eax
call _Z6formatB5cxx11PKcz; format(char const*,...)
mov bpl, 1
lea rsi, [rsp+118h+var_100]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_47119:
mov rbx, rax
lea rdi, [rsp+118h+var_100]
jmp short loc_4712D
jmp short loc_4713B
mov rbx, rax
lea rdi, [rsp+118h+var_B8]; void *
loc_4712D:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_4713E
jmp short loc_47155
jmp short loc_4714A
loc_4713B:
mov rbx, rax
loc_4713E:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_47155
jmp short $+2
loc_4714A:
mov rbx, rax
mov rdi, rsp
call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base()
loc_47155:
mov rdi, rbx
call __Unwind_Resume
| long long convert_tensor(long long a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5)
{
unsigned long long v7; // r15
int v8; // eax
long long result; // rax
long long v11; // r12
void *exception; // r14
int v13; // eax
int v14; // ecx
int v15; // r8d
int v16; // r9d
void *v17; // r14
int v18; // eax
int v19; // ecx
int v20; // r8d
int v21; // r9d
__int128 v22; // [rsp+0h] [rbp-118h] BYREF
long long v23; // [rsp+10h] [rbp-108h]
_BYTE v24[32]; // [rsp+18h] [rbp-100h] BYREF
void ( *v25)(long long, _QWORD, _QWORD); // [rsp+38h] [rbp-E0h]
_BYTE v26[32]; // [rsp+60h] [rbp-B8h] BYREF
long long ( *v27)(long long, long long, _QWORD); // [rsp+80h] [rbp-98h]
if ( a2 == a4 )
{
v7 = (int)a5 * ggml_type_size(a2);
v8 = ggml_blck_size(a2);
return memcpy(a3, a1, v7 / v8);
}
else if ( a2 )
{
if ( a4 )
{
ggml_internal_get_type_traits(v24, a2);
if ( !v25 )
{
exception = __cxa_allocate_exception(0x10uLL);
v13 = ggml_type_name(a2);
format[abi:cxx11](
(unsigned int)v26,
(unsigned int)"type %s unsupported for integer quantization: no dequantization available",
v13,
v14,
v15,
v16);
std::runtime_error::runtime_error(exception, v26);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v23 = 0LL;
v22 = 0LL;
std::vector<char>::resize(&v22, 4LL * (int)a5);
v11 = v22;
v25(a1, v22, a5);
if ( a4 == 1 )
result = ggml_fp32_to_fp16_row(v11, a3, a5);
else
result = ggml_quantize_chunk(a4, v11, a3, 0LL, a5, v26);
std::_Vector_base<char>::~_Vector_base(&v22);
}
else if ( a2 == 1 )
{
return ggml_fp16_to_fp32_row(a1, a3, a5);
}
else
{
ggml_internal_get_type_traits(v26, a2);
if ( !v27 )
{
v17 = __cxa_allocate_exception(0x10uLL);
v18 = ggml_type_name(a2);
format[abi:cxx11](
(unsigned int)v24,
(unsigned int)"type %s unsupported for integer quantization: no dequantization available",
v18,
v19,
v20,
v21);
std::runtime_error::runtime_error(v17, v24);
__cxa_throw(
v17,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return v27(a1, a3, a5);
}
}
else if ( a4 == 1 )
{
return ggml_fp32_to_fp16_row(a1, a3, a5);
}
else
{
return ggml_quantize_chunk(a4, a1, a3, 0LL, a5, v26);
}
return result;
}
| convert_tensor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV EBP,R8D
MOV RBX,RDX
MOV R12D,ESI
MOV R14,RDI
CMP ESI,ECX
JNZ 0x00146f55
MOVSXD R13,EBP
MOV EDI,R12D
CALL 0x00167b83
MOV R15,RAX
IMUL R15,R13
MOV EDI,R12D
CALL 0x00167b71
MOVSXD RCX,EAX
MOV RAX,R15
XOR EDX,EDX
DIV RCX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0010a4c0
LAB_00146f55:
MOV R15D,ECX
TEST R12D,R12D
JZ 0x00146fbc
TEST R15D,R15D
JZ 0x00146fe0
LEA R13,[RSP + 0x18]
MOV RDI,R13
MOV ESI,R12D
CALL 0x00167704
CMP qword ptr [R13 + 0x20],0x0
JZ 0x00147075
MOV RDI,RSP
AND qword ptr [RDI + 0x10],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RDI],XMM0
MOVSXD RSI,EBP
SHL RSI,0x2
LAB_00146f92:
CALL 0x0014a526
MOV R12,qword ptr [RSP]
LAB_00146f9b:
MOV RDI,R14
MOV RSI,R12
MOV EDX,EBP
CALL qword ptr [RSP + 0x38]
CMP R15D,0x1
JNZ 0x00147004
MOV RDI,R12
MOV RSI,RBX
MOV EDX,EBP
CALL 0x0016763d
LAB_00146fba:
JMP 0x0014701c
LAB_00146fbc:
CMP R15D,0x1
JNZ 0x00147026
MOV RDI,R14
MOV RSI,RBX
MOV EDX,EBP
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016763d
LAB_00146fe0:
CMP R12D,0x1
JNZ 0x00147040
MOV RDI,R14
MOV RSI,RBX
MOV EDX,EBP
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00167614
LAB_00147004:
LEA R9,[RSP + 0x60]
MOV EDI,R15D
MOV RSI,R12
MOV RDX,RBX
XOR ECX,ECX
MOV R8D,EBP
CALL 0x0017672b
LAB_0014701c:
MOV RDI,RSP
CALL 0x0013bc1a
JMP 0x00147063
LAB_00147026:
LEA R9,[RSP + 0x60]
MOV EDI,R15D
MOV RSI,R14
MOV RDX,RBX
XOR ECX,ECX
MOV R8D,EBP
CALL 0x0017672b
JMP 0x00147063
LAB_00147040:
LEA R15,[RSP + 0x60]
MOV RDI,R15
MOV ESI,R12D
CALL 0x00167704
MOV RAX,qword ptr [R15 + 0x20]
TEST RAX,RAX
JZ 0x001470c8
MOV RDI,R14
MOV RSI,RBX
MOV EDX,EBP
CALL RAX
LAB_00147063:
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00147075:
PUSH 0x10
POP RDI
CALL 0x0010a270
MOV R14,RAX
LAB_00147080:
MOV EDI,R12D
CALL 0x00167bf9
LEA RSI,[0x19dc94]
LEA RDI,[RSP + 0x60]
MOV RDX,RAX
XOR EAX,EAX
CALL 0x001558f1
MOV BPL,0x1
LAB_001470a1:
LEA RSI,[RSP + 0x60]
MOV RDI,R14
CALL 0x0010a9f0
XOR EBP,EBP
MOV RSI,qword ptr [0x001d5fe8]
MOV RDX,qword ptr [0x001d5f88]
MOV RDI,R14
CALL 0x0010aa50
LAB_001470c8:
PUSH 0x10
POP RDI
CALL 0x0010a270
MOV R14,RAX
LAB_001470d3:
MOV EDI,R12D
CALL 0x00167bf9
LEA RSI,[0x19dc94]
LEA RDI,[RSP + 0x18]
MOV RDX,RAX
XOR EAX,EAX
CALL 0x001558f1
MOV BPL,0x1
LAB_001470f4:
LEA RSI,[RSP + 0x18]
MOV RDI,R14
CALL 0x0010a9f0
XOR EBP,EBP
MOV RSI,qword ptr [0x001d5fe8]
MOV RDX,qword ptr [0x001d5f88]
MOV RDI,R14
CALL 0x0010aa50
|
/* convert_tensor(void*, ggml_type, void*, ggml_type, int) */
void convert_tensor(void *param_1,int param_2,void *param_3,int param_4,int param_5)
{
int iVar1;
long lVar2;
runtime_error *prVar3;
int8 uVar4;
int8 local_118;
int8 uStack_110;
int8 local_108;
string local_100 [32];
code *local_e0;
string local_b8 [32];
code *local_98;
if (param_2 == param_4) {
lVar2 = ggml_type_size(param_2);
iVar1 = ggml_blck_size(param_2);
memcpy(param_3,param_1,(ulong)(lVar2 * param_5) / (ulong)(long)iVar1);
return;
}
if (param_2 == 0) {
if (param_4 == 1) {
ggml_fp32_to_fp16_row(param_1,param_3,param_5);
return;
}
ggml_quantize_chunk(param_4,param_1,param_3,0,param_5,local_b8);
}
else if (param_4 == 0) {
if (param_2 == 1) {
ggml_fp16_to_fp32_row(param_1,param_3,param_5);
return;
}
ggml_internal_get_type_traits(local_b8,param_2);
if (local_98 == (code *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001470d3 to 001470f0 has its CatchHandler @ 00147123 */
uVar4 = ggml_type_name(param_2);
format_abi_cxx11_((char *)local_100,
"type %s unsupported for integer quantization: no dequantization available",
uVar4);
/* try { // try from 001470f4 to 00147118 has its CatchHandler @ 00147119 */
std::runtime_error::runtime_error(prVar3,local_100);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001d5fe8,PTR__runtime_error_001d5f88);
}
(*local_98)(param_1,param_3,param_5);
}
else {
ggml_internal_get_type_traits(local_100,param_2);
if (local_e0 == (code *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00147080 to 0014709d has its CatchHandler @ 0014713b */
uVar4 = ggml_type_name(param_2);
format_abi_cxx11_((char *)local_b8,
"type %s unsupported for integer quantization: no dequantization available",
uVar4);
/* try { // try from 001470a1 to 001470c5 has its CatchHandler @ 00147125 */
std::runtime_error::runtime_error(prVar3,local_b8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001d5fe8,PTR__runtime_error_001d5f88);
}
local_108 = 0;
local_118 = 0;
uStack_110 = 0;
/* try { // try from 00146f92 to 00146f96 has its CatchHandler @ 00147148 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)&local_118,(long)param_5 << 2);
uVar4 = local_118;
/* try { // try from 00146f9b to 00146fb9 has its CatchHandler @ 0014714a */
(*local_e0)(param_1,local_118,param_5);
if (param_4 == 1) {
ggml_fp32_to_fp16_row(uVar4,param_3,param_5);
}
else {
/* try { // try from 00147004 to 0014701b has its CatchHandler @ 00147139 */
ggml_quantize_chunk(param_4,uVar4,param_3,0,param_5,local_b8);
}
std::_Vector_base<char,std::allocator<char>>::~_Vector_base
((_Vector_base<char,std::allocator<char>> *)&local_118);
}
return;
}
| |
34,521 | convert_tensor(void*, ggml_type, void*, ggml_type, int) | 7CodeWizard[P]stablediffusion/model.cpp | void convert_tensor(void* src, ggml_type src_type, void* dst, ggml_type dst_type, int n) {
if (src_type == dst_type) {
size_t nbytes = n * ggml_type_size(src_type) / ggml_blck_size(src_type);
memcpy(((char*)dst), ((char*)src), nbytes);
} else if (src_type == GGML_TYPE_F32) {
if (dst_type == GGML_TYPE_F16) {
ggml_fp32_to_fp16_row((float*)src, (ggml_fp16_t*)dst, n);
} else {
int64_t hist[16];
ggml_quantize_chunk(dst_type, (float*)src, dst, 0, n, hist);
}
} else if (dst_type == GGML_TYPE_F32) {
if (src_type == GGML_TYPE_F16) {
ggml_fp16_to_fp32_row((ggml_fp16_t*)src, (float*)dst, n);
} else {
auto qtype = ggml_internal_get_type_traits(src_type);
if (qtype.to_float == NULL) {
throw std::runtime_error(format("type %s unsupported for integer quantization: no dequantization available",
ggml_type_name(src_type)));
}
qtype.to_float(src, (float*)dst, n);
}
} else {
// src_type == GGML_TYPE_F16 => dst_type is quantized
// src_type is quantized => dst_type == GGML_TYPE_F16 or dst_type is quantized
auto qtype = ggml_internal_get_type_traits(src_type);
if (qtype.to_float == NULL) {
throw std::runtime_error(format("type %s unsupported for integer quantization: no dequantization available",
ggml_type_name(src_type)));
}
std::vector<char> buf;
buf.resize(sizeof(float) * n);
char* src_data_f32 = buf.data();
qtype.to_float(src, (float*)src_data_f32, n);
if (dst_type == GGML_TYPE_F16) {
ggml_fp32_to_fp16_row((float*)src_data_f32, (ggml_fp16_t*)dst, n);
} else {
int64_t hist[16];
ggml_quantize_chunk(dst_type, (float*)src_data_f32, dst, 0, n, hist);
}
}
} | O3 | cpp | convert_tensor(void*, ggml_type, void*, ggml_type, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %ebp
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r14
cmpl %ecx, %esi
jne 0x6784b
movslq %ebp, %r13
movl %r12d, %edi
callq 0x8ceea
movq %rax, %r15
imulq %r13, %r15
movl %r12d, %edi
callq 0x8ced8
movslq %eax, %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa4b0
movl %ecx, %r15d
testl %r12d, %r12d
je 0x678b9
testl %r15d, %r15d
je 0x678dd
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl %r12d, %esi
callq 0x8cac9
cmpq $0x0, 0x20(%r13)
je 0x67980
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq %ebp, %rsi
shlq $0x2, %rsi
callq 0x6c692
movq (%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq *0x38(%rsp)
cmpl $0x1, %r15d
jne 0x67901
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x8c9c2
jmp 0x67919
cmpl $0x1, %r15d
jne 0x67931
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8c9c2
cmpl $0x1, %r12d
jne 0x6794b
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8c99a
leaq 0x60(%rsp), %r9
movl %r15d, %edi
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x9b980
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6796e
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5d0
jmp 0x6796e
leaq 0x60(%rsp), %r9
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x9b980
jmp 0x6796e
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0x8cac9
movq 0x20(%r15), %rax
testq %rax, %rax
je 0x679d5
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *%rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0xa270
movq %rax, %r14
movl %r12d, %edi
callq 0x8cf60
leaq 0x593f8(%rip), %rsi # 0xc0d94
leaq 0x60(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x78ac6
movb $0x1, %bpl
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0xa9f0
xorl %ebp, %ebp
movq 0x8d62c(%rip), %rsi # 0xf4ff0
movq 0x8d5d5(%rip), %rdx # 0xf4fa0
movq %r14, %rdi
callq 0xaa70
jmp 0x67a28
movl $0x10, %edi
callq 0xa270
movq %rax, %r14
movl %r12d, %edi
callq 0x8cf60
leaq 0x593a3(%rip), %rsi # 0xc0d94
leaq 0x18(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x78ac6
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0xa9f0
xorl %ebp, %ebp
movq 0x8d5d7(%rip), %rsi # 0xf4ff0
movq 0x8d580(%rip), %rdx # 0xf4fa0
movq %r14, %rdi
callq 0xaa70
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67a60
movq 0x28(%rsp), %rsi
jmp 0x67a58
jmp 0x67a69
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67a60
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xa5d0
testb %bpl, %bpl
jne 0x67a6c
jmp 0x67a91
jmp 0x67a78
movq %rax, %rbx
movq %r14, %rdi
callq 0xa410
jmp 0x67a91
jmp 0x67a78
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x67a91
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5d0
movq %rbx, %rdi
callq 0xaad0
| _Z14convert_tensorPv9ggml_typeS_S0_i:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov ebp, r8d
mov rbx, rdx
mov r12d, esi
mov r14, rdi
cmp esi, ecx
jnz short loc_6784B
movsxd r13, ebp
mov edi, r12d
call ggml_type_size
mov r15, rax
imul r15, r13
mov edi, r12d
call ggml_blck_size
movsxd rcx, eax
mov rax, r15
xor edx, edx
div rcx
mov rdi, rbx
mov rsi, r14
mov rdx, rax
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memcpy
loc_6784B:
mov r15d, ecx
test r12d, r12d
jz short loc_678B9
test r15d, r15d
jz loc_678DD
lea r13, [rsp+118h+var_100]
mov rdi, r13
mov esi, r12d
call ggml_internal_get_type_traits
cmp qword ptr [r13+20h], 0
jz loc_67980
xorps xmm0, xmm0
mov rdi, rsp
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
movsxd rsi, ebp
shl rsi, 2
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov r12, [rsp+118h+var_118]
mov rdi, r14
mov rsi, r12
mov edx, ebp
call [rsp+118h+var_E0]
cmp r15d, 1
jnz short loc_67901
mov rdi, r12
mov rsi, rbx
mov edx, ebp
call ggml_fp32_to_fp16_row
jmp short loc_67919
loc_678B9:
cmp r15d, 1
jnz short loc_67931
mov rdi, r14
mov rsi, rbx
mov edx, ebp
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ggml_fp32_to_fp16_row
loc_678DD:
cmp r12d, 1
jnz short loc_6794B
mov rdi, r14
mov rsi, rbx
mov edx, ebp
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ggml_fp16_to_fp32_row
loc_67901:
lea r9, [rsp+118h+var_B8]
mov edi, r15d
mov rsi, r12
mov rdx, rbx
xor ecx, ecx
mov r8d, ebp
call ggml_quantize_chunk
loc_67919:
mov rdi, [rsp+118h+var_118]; void *
test rdi, rdi
jz short loc_6796E
mov rsi, [rsp+118h+var_108]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6796E
loc_67931:
lea r9, [rsp+118h+var_B8]
mov edi, r15d
mov rsi, r14
mov rdx, rbx
xor ecx, ecx
mov r8d, ebp
call ggml_quantize_chunk
jmp short loc_6796E
loc_6794B:
lea r15, [rsp+118h+var_B8]
mov rdi, r15
mov esi, r12d
call ggml_internal_get_type_traits
mov rax, [r15+20h]
test rax, rax
jz short loc_679D5
mov rdi, r14
mov rsi, rbx
mov edx, ebp
call rax
loc_6796E:
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_67980:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov edi, r12d
call ggml_type_name
lea rsi, aTypeSUnsupport; "type %s unsupported for integer quantiz"...
lea rdi, [rsp+118h+var_B8]; int
mov rdx, rax; int
xor eax, eax
call _Z6formatB5cxx11PKcz; format(char const*,...)
mov bpl, 1
lea rsi, [rsp+118h+var_B8]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_67A28
loc_679D5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov edi, r12d
call ggml_type_name
lea rsi, aTypeSUnsupport; "type %s unsupported for integer quantiz"...
lea rdi, [rsp+118h+var_100]; int
mov rdx, rax; int
xor eax, eax
call _Z6formatB5cxx11PKcz; format(char const*,...)
mov bpl, 1
lea rsi, [rsp+118h+var_100]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_67A28:
mov rbx, rax
lea rax, [rsp+118h+var_F0]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_67A60
mov rsi, [rsp+118h+var_F0]
jmp short loc_67A58
jmp short loc_67A69
mov rbx, rax
lea rax, [rsp+118h+var_A8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_67A60
mov rsi, [rsp+118h+var_A8]
loc_67A58:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67A60:
test bpl, bpl
jnz short loc_67A6C
jmp short loc_67A91
jmp short loc_67A78
loc_67A69:
mov rbx, rax
loc_67A6C:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_67A91
jmp short $+2
loc_67A78:
mov rbx, rax
mov rdi, [rsp+118h+var_118]; void *
test rdi, rdi
jz short loc_67A91
mov rsi, [rsp+118h+var_108]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67A91:
mov rdi, rbx
call __Unwind_Resume
| void convert_tensor(long long a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5)
{
unsigned long long v7; // r15
int v8; // eax
long long v10; // r12
void *exception; // r14
int v12; // eax
int v13; // ecx
int v14; // r8d
int v15; // r9d
void *v16; // r14
int v17; // eax
int v18; // ecx
int v19; // r8d
int v20; // r9d
__int128 v21; // [rsp+0h] [rbp-118h] BYREF
long long v22; // [rsp+10h] [rbp-108h]
int v23[4]; // [rsp+18h] [rbp-100h] BYREF
void ( *v24)(long long, _QWORD, _QWORD); // [rsp+38h] [rbp-E0h]
int v25[4]; // [rsp+60h] [rbp-B8h] BYREF
void ( *v26)(long long, long long, _QWORD); // [rsp+80h] [rbp-98h]
if ( a2 == a4 )
{
v7 = (int)a5 * ggml_type_size(a2);
v8 = ggml_blck_size(a2);
memcpy(a3, a1, v7 / v8);
}
else if ( a2 )
{
if ( a4 )
{
ggml_internal_get_type_traits(v23, a2);
if ( !v24 )
{
exception = __cxa_allocate_exception(0x10uLL);
v12 = ggml_type_name(a2);
format[abi:cxx11](
(int)v25,
(int)"type %s unsupported for integer quantization: no dequantization available",
v12,
v13,
v14,
v15,
(void *)v21,
SDWORD2(v21),
v22);
std::runtime_error::runtime_error(exception, v25);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v21 = 0LL;
v22 = 0LL;
std::vector<char>::resize(&v21, 4LL * (int)a5);
v10 = v21;
v24(a1, v21, a5);
if ( a4 == 1 )
ggml_fp32_to_fp16_row(v10, a3, a5);
else
ggml_quantize_chunk(a4, v10, a3, 0LL, a5, v25);
if ( (_QWORD)v21 )
operator delete((void *)v21, v22 - v21);
}
else if ( a2 == 1 )
{
ggml_fp16_to_fp32_row(a1, a3, a5);
}
else
{
ggml_internal_get_type_traits(v25, a2);
if ( !v26 )
{
v16 = __cxa_allocate_exception(0x10uLL);
v17 = ggml_type_name(a2);
format[abi:cxx11](
(int)v23,
(int)"type %s unsupported for integer quantization: no dequantization available",
v17,
v18,
v19,
v20,
(void *)v21,
SDWORD2(v21),
v22);
std::runtime_error::runtime_error(v16, v23);
__cxa_throw(
v16,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v26(a1, a3, a5);
}
}
else if ( a4 == 1 )
{
ggml_fp32_to_fp16_row(a1, a3, a5);
}
else
{
ggml_quantize_chunk(a4, a1, a3, 0LL, a5, v25);
}
}
| |||
34,522 | string_view::operator==(string_view const&) const | monkey531[P]llama/common/json-schema-to-grammar.cpp | bool operator==(const string_view & other) const {
std::string this_str = *this;
std::string other_str = other;
return this_str == other_str;
} | O1 | cpp | string_view::operator==(string_view const&) const:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rcx
subq %rdx, %rcx
movq %rsp, %rdi
callq 0x1a8e0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
subq %rdx, %rcx
leaq 0x20(%rsp), %rdi
callq 0x1a8e0
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0xcac40
testq %rdx, %rdx
je 0xcac44
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x1a8d0
testl %eax, %eax
sete %bl
jmp 0xcac46
xorl %ebx, %ebx
jmp 0xcac46
movb $0x1, %bl
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcac61
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcac7c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcaca2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rdi
callq 0x1af20
| _ZNK11string_vieweqERKS_:
push rbx
sub rsp, 40h
mov rbx, rsi
mov rsi, [rdi]
mov rdx, [rdi+8]
mov rcx, [rdi+10h]
sub rcx, rdx
mov rdi, rsp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rdx
lea rdi, [rsp+48h+var_28]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdx, [rsp+48h+var_40]
cmp rdx, [rsp+48h+var_20]
jnz short loc_CAC40
test rdx, rdx
jz short loc_CAC44
mov rsi, [rsp+48h+var_28]
mov rdi, [rsp+48h+var_48]
call _bcmp
test eax, eax
setz bl
jmp short loc_CAC46
loc_CAC40:
xor ebx, ebx
jmp short loc_CAC46
loc_CAC44:
mov bl, 1
loc_CAC46:
lea rax, [rsp+48h+var_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CAC61
mov rsi, [rsp+48h+var_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CAC61:
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CAC7C
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CAC7C:
mov eax, ebx
add rsp, 40h
pop rbx
retn
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CACA2
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CACA2:
mov rdi, rbx
call __Unwind_Resume
| long long string_view::operator==(_QWORD *a1, _QWORD *a2)
{
long long *v4; // [rsp+0h] [rbp-48h] BYREF
void *v5; // [rsp+8h] [rbp-40h]
long long v6; // [rsp+10h] [rbp-38h] BYREF
void *v7[2]; // [rsp+20h] [rbp-28h] BYREF
long long v8; // [rsp+30h] [rbp-18h] BYREF
std::string::substr(&v4, *a1, a1[1], a1[2] - a1[1]);
std::string::substr(v7, *a2, a2[1], a2[2] - a2[1]);
if ( v5 == v7[1] )
{
if ( v5 )
LOBYTE(a2) = (unsigned int)bcmp(v4, v7[0]) == 0;
else
LOBYTE(a2) = 1;
}
else
{
LODWORD(a2) = 0;
}
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
if ( v4 != &v6 )
operator delete(v4, v6 + 1);
return (unsigned int)a2;
}
| operator==:
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
SUB RCX,RDX
MOV RDI,RSP
CALL 0x0011a8e0
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RDX
LAB_001cac10:
LEA RDI,[RSP + 0x20]
CALL 0x0011a8e0
LAB_001cac1a:
MOV RDX,qword ptr [RSP + 0x8]
CMP RDX,qword ptr [RSP + 0x28]
JNZ 0x001cac40
TEST RDX,RDX
JZ 0x001cac44
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP]
CALL 0x0011a8d0
TEST EAX,EAX
SETZ BL
JMP 0x001cac46
LAB_001cac40:
XOR EBX,EBX
JMP 0x001cac46
LAB_001cac44:
MOV BL,0x1
LAB_001cac46:
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cac61
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a890
LAB_001cac61:
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cac7c
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a890
LAB_001cac7c:
MOV EAX,EBX
ADD RSP,0x40
POP RBX
RET
|
/* string_view::TEMPNAMEPLACEHOLDERVALUE(string_view const&) const */
ulong __thiscall string_view::operator==(string_view *this,string_view *param_1)
{
int iVar1;
int7 uVar3;
ulong uVar2;
long *local_48;
size_t local_40;
long local_38 [2];
long *local_28;
size_t local_20;
long local_18 [2];
std::__cxx11::string::substr((ulong)&local_48,*(ulong *)this);
/* try { // try from 001cac10 to 001cac19 has its CatchHandler @ 001cac84 */
std::__cxx11::string::substr((ulong)&local_28,*(ulong *)param_1);
if (local_40 == local_20) {
uVar3 = (int7)((ulong)param_1 >> 8);
if (local_40 == 0) {
uVar2 = CONCAT71(uVar3,1);
}
else {
iVar1 = bcmp(local_48,local_28,local_40);
uVar2 = CONCAT71(uVar3,iVar1 == 0);
}
}
else {
uVar2 = 0;
}
if (local_28 != local_18) {
operator_delete(local_28,local_18[0] + 1);
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return uVar2 & 0xffffffff;
}
| |
34,523 | string_view::operator==(string_view const&) const | monkey531[P]llama/common/json-schema-to-grammar.cpp | bool operator==(const string_view & other) const {
std::string this_str = *this;
std::string other_str = other;
return this_str == other_str;
} | O3 | cpp | string_view::operator==(string_view const&) const:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rcx
subq %rdx, %rcx
leaq 0x8(%rsp), %rdi
callq 0x1a8e0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
subq %rdx, %rcx
leaq 0x28(%rsp), %rdi
callq 0x1a8e0
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0xca16a
movq 0x28(%rsp), %r14
testq %rdx, %rdx
je 0xca173
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x1a8d0
testl %eax, %eax
sete %bl
jmp 0xca175
movq 0x28(%rsp), %r14
xorl %ebx, %ebx
jmp 0xca175
movb $0x1, %bl
leaq 0x38(%rsp), %rax
cmpq %rax, %r14
je 0xca18f
movq 0x38(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x1a890
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xca1aa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xca1d2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rdi
callq 0x1af20
| _ZNK11string_vieweqERKS_:
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
mov rsi, [rdi]
mov rdx, [rdi+8]
mov rcx, [rdi+10h]
sub rcx, rdx
lea rdi, [rsp+58h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rdx
lea rdi, [rsp+58h+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdx, [rsp+58h+var_48]
cmp rdx, [rsp+58h+var_28]
jnz short loc_CA16A
mov r14, [rsp+58h+var_30]
test rdx, rdx
jz short loc_CA173
mov rdi, [rsp+58h+var_50]
mov rsi, r14
call _bcmp
test eax, eax
setz bl
jmp short loc_CA175
loc_CA16A:
mov r14, [rsp+58h+var_30]
xor ebx, ebx
jmp short loc_CA175
loc_CA173:
mov bl, 1
loc_CA175:
lea rax, [rsp+58h+var_20]
cmp r14, rax
jz short loc_CA18F
mov rsi, [rsp+58h+var_20]
inc rsi; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_CA18F:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CA1AA
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CA1AA:
mov eax, ebx
add rsp, 48h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CA1D2
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CA1D2:
mov rdi, rbx
call __Unwind_Resume
| long long string_view::operator==(_QWORD *a1, _QWORD *a2)
{
long long *v3; // r14
long long *v5; // [rsp+8h] [rbp-50h] BYREF
void *v6; // [rsp+10h] [rbp-48h]
long long v7; // [rsp+18h] [rbp-40h] BYREF
void *v8[2]; // [rsp+28h] [rbp-30h] BYREF
long long v9; // [rsp+38h] [rbp-20h] BYREF
std::string::substr(&v5, *a1, a1[1], a1[2] - a1[1]);
std::string::substr(v8, *a2, a2[1], a2[2] - a2[1]);
if ( v6 == v8[1] )
{
v3 = (long long *)v8[0];
if ( v6 )
LOBYTE(a2) = (unsigned int)bcmp(v5, v8[0]) == 0;
else
LOBYTE(a2) = 1;
}
else
{
v3 = (long long *)v8[0];
LODWORD(a2) = 0;
}
if ( v3 != &v9 )
operator delete(v3, v9 + 1);
if ( v5 != &v7 )
operator delete(v5, v7 + 1);
return (unsigned int)a2;
}
| operator==:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
SUB RCX,RDX
LEA RDI,[RSP + 0x8]
CALL 0x0011a8e0
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RDX
LAB_001ca136:
LEA RDI,[RSP + 0x28]
CALL 0x0011a8e0
LAB_001ca140:
MOV RDX,qword ptr [RSP + 0x10]
CMP RDX,qword ptr [RSP + 0x30]
JNZ 0x001ca16a
MOV R14,qword ptr [RSP + 0x28]
TEST RDX,RDX
JZ 0x001ca173
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R14
CALL 0x0011a8d0
TEST EAX,EAX
SETZ BL
JMP 0x001ca175
LAB_001ca16a:
MOV R14,qword ptr [RSP + 0x28]
XOR EBX,EBX
JMP 0x001ca175
LAB_001ca173:
MOV BL,0x1
LAB_001ca175:
LEA RAX,[RSP + 0x38]
CMP R14,RAX
JZ 0x001ca18f
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
MOV RDI,R14
CALL 0x0011a890
LAB_001ca18f:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001ca1aa
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a890
LAB_001ca1aa:
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* string_view::TEMPNAMEPLACEHOLDERVALUE(string_view const&) const */
ulong __thiscall string_view::operator==(string_view *this,string_view *param_1)
{
int iVar1;
int7 uVar3;
ulong uVar2;
long *local_50;
size_t local_48;
long local_40 [2];
long *local_30;
size_t local_28;
long local_20 [2];
std::__cxx11::string::substr((ulong)&local_50,*(ulong *)this);
/* try { // try from 001ca136 to 001ca13f has its CatchHandler @ 001ca1b4 */
std::__cxx11::string::substr((ulong)&local_30,*(ulong *)param_1);
if (local_48 == local_28) {
uVar3 = (int7)((ulong)param_1 >> 8);
if (local_48 == 0) {
uVar2 = CONCAT71(uVar3,1);
}
else {
iVar1 = bcmp(local_50,local_30,local_48);
uVar2 = CONCAT71(uVar3,iVar1 == 0);
}
}
else {
uVar2 = 0;
}
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return uVar2 & 0xffffffff;
}
| |
34,524 | MainWindow::~MainWindow() | The-SGR[P]silly-clicker/mainwindow.cpp | MainWindow::~MainWindow()
{
QFile file("data.txt");
file.close();
delete ui;
} | O0 | cpp | MainWindow::~MainWindow():
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0xe275d(%rip), %rcx # 0xe7b28
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, (%rax)
addq $0x1c8, %rcx # imm = 0x1C8
movq %rcx, 0x10(%rax)
leaq 0x3e09(%rip), %rsi # 0x91f0
leaq -0x30(%rbp), %rdi
callq 0x4c30
jmp 0x53f2
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4540
jmp 0x5401
leaq -0x30(%rbp), %rdi
callq 0x4c90
leaq -0x18(%rbp), %rdi
callq 0x4510
jmp 0x5415
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x5435
movq -0x40(%rbp), %rdi
movl $0x80, %esi
callq 0x4090
leaq -0x18(%rbp), %rdi
callq 0x45a8
movq -0x38(%rbp), %rdi
addq $0x30, %rdi
callq 0x4410
movq -0x38(%rbp), %rdi
callq 0x4260
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x4dc0
nopw %cs:(%rax,%rax)
| _ZN10MainWindowD2Ev:
push rbp; Alternative name is 'MainWindow::~MainWindow()'
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
lea rcx, _ZTV10MainWindow; `vtable for'MainWindow
mov rdx, rcx
add rdx, 10h
mov [rax], rdx
add rcx, 1C8h
mov [rax+10h], rcx
lea rsi, aDataTxt; "data.txt"
lea rdi, [rbp+var_30]; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_53F2:
lea rdi, [rbp+var_18]; this
lea rsi, [rbp+var_30]; QString *
call __ZN5QFileC1ERK7QString; QFile::QFile(QString const&)
jmp short $+2
loc_5401:
lea rdi, [rbp+var_30]; this
call _ZN7QStringD2Ev; QString::~QString()
lea rdi, [rbp+var_18]; this
call __ZN11QFileDevice5closeEv; QFileDevice::close(void)
jmp short $+2
loc_5415:
mov rax, [rbp+var_38]
mov rax, [rax+28h]
mov [rbp+var_40], rax
cmp rax, 0
jz short loc_5435
mov rdi, [rbp+var_40]; void *
mov esi, 80h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5435:
lea rdi, [rbp+var_18]; void *
call _ZN5QFileD1Ev; QFile::~QFile()
mov rdi, [rbp+var_38]
add rdi, 30h ; '0'; this
call __ZN12QSqlDatabaseD1Ev; QSqlDatabase::~QSqlDatabase()
mov rdi, [rbp+var_38]; this
call __ZN11QMainWindowD2Ev; QMainWindow::~QMainWindow()
add rsp, 40h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
| void MainWindow::~MainWindow(MainWindow *this)
{
void *v1; // [rsp+0h] [rbp-40h]
_BYTE v2[24]; // [rsp+10h] [rbp-30h] BYREF
_BYTE v3[16]; // [rsp+28h] [rbp-18h] BYREF
MainWindow *v4; // [rsp+38h] [rbp-8h]
v4 = this;
*(_QWORD *)this = &`vtable for'MainWindow + 2;
*((_QWORD *)this + 2) = &`vtable for'MainWindow + 57;
QString::QString((QString *)v2, "data.txt");
QFile::QFile((QFile *)v3, (const QString *)v2);
QString::~QString((QString *)v2);
QFileDevice::close((QFileDevice *)v3);
v1 = (void *)*((_QWORD *)this + 5);
if ( v1 )
operator delete(v1, 0x80uLL);
QFile::~QFile(v3);
QSqlDatabase::~QSqlDatabase((MainWindow *)((char *)this + 48));
QMainWindow::~QMainWindow(this);
}
| ~MainWindow:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
LEA RCX,[0x1e7b28]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RAX],RDX
ADD RCX,0x1c8
MOV qword ptr [RAX + 0x10],RCX
LAB_001053e0:
LEA RSI,[0x1091f0]
LEA RDI,[RBP + -0x30]
CALL 0x00104c30
JMP 0x001053f2
LAB_001053f2:
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x00104540
JMP 0x00105401
LAB_00105401:
LEA RDI,[RBP + -0x30]
CALL 0x00104c90
LEA RDI,[RBP + -0x18]
CALL 0x00104510
JMP 0x00105415
LAB_00105415:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JZ 0x00105435
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,0x80
CALL 0x00104090
LAB_00105435:
LEA RDI,[RBP + -0x18]
CALL 0x001045a8
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x30
CALL 0x00104410
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00104260
ADD RSP,0x40
POP RBP
RET
|
/* MainWindow::~MainWindow() */
void __thiscall MainWindow::~MainWindow(MainWindow *this)
{
QString local_38 [24];
QFile local_20 [16];
MainWindow *local_10;
*(int ***)this = &PTR_metaObject_001e7b38;
*(int **)(this + 0x10) = &DAT_001e7cf0;
/* try { // try from 001053e0 to 00105412 has its CatchHandler @ 0010545a */
local_10 = this;
QString::QString(local_38,"data.txt");
QFile::QFile(local_20,local_38);
QString::~QString(local_38);
QFileDevice::close();
if (*(void **)(this + 0x28) != (void *)0x0) {
operator_delete(*(void **)(this + 0x28),0x80);
}
QFile::~QFile(local_20);
QSqlDatabase::~QSqlDatabase((QSqlDatabase *)(this + 0x30));
QMainWindow::~QMainWindow((QMainWindow *)this);
return;
}
| |
34,525 | MainWindow::~MainWindow() | The-SGR[P]silly-clicker/mainwindow.cpp | MainWindow::~MainWindow()
{
QFile file("data.txt");
file.close();
delete ui;
} | O3 | cpp | MainWindow::~MainWindow():
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0xdfd9b(%rip), %rax # 0xe4b38
leaq 0x10(%rax), %rcx
movq %rcx, (%rdi)
addq $0x1c8, %rax # imm = 0x1C8
movq %rax, 0x10(%rdi)
leaq 0x249b(%rip), %rdx # 0x7250
movq %rsp, %rdi
movl $0x8, %esi
callq 0x4280
movq %rsp, %rdi
movaps (%rdi), %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsi)
callq 0x4510
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x4e00
lock
decl (%rax)
jne 0x4e00
movq 0x20(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
movq %rsp, %rdi
callq 0x44e0
movq 0x28(%rbx), %rdi
movl $0x80, %esi
callq 0x4090
movq %rsp, %rdi
callq 0x4578
leaq 0x30(%rbx), %rdi
callq 0x43e0
movq %rbx, %rdi
callq 0x4240
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x6684
nop
| _ZN10MainWindowD2Ev:
push rbx; Alternative name is 'MainWindow::~MainWindow()'
sub rsp, 40h
mov rbx, rdi
lea rax, _ZTV10MainWindow; `vtable for'MainWindow
lea rcx, [rax+10h]
mov [rdi], rcx
add rax, 1C8h
mov [rdi+10h], rax
lea rdx, aDataTxt; "data.txt"
mov rdi, rsp
mov esi, 8
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
mov rdi, rsp; this
movaps xmm0, xmmword ptr [rdi]
lea rsi, [rsp+48h+var_28]; QString *
movaps xmmword ptr [rsi], xmm0
mov rax, [rdi+10h]
mov [rsi+10h], rax
call __ZN5QFileC1ERK7QString; QFile::QFile(QString const&)
mov rax, [rsp+48h+var_28]
test rax, rax
jz short loc_4E00
lock dec dword ptr [rax]
jnz short loc_4E00
mov rdi, [rsp+48h+var_28]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_4E00:
mov rdi, rsp; this
call __ZN11QFileDevice5closeEv; QFileDevice::close(void)
mov rdi, [rbx+28h]; void *
mov esi, 80h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rsp; void *
call _ZN5QFileD1Ev; QFile::~QFile()
lea rdi, [rbx+30h]; this
call __ZN12QSqlDatabaseD1Ev; QSqlDatabase::~QSqlDatabase()
mov rdi, rbx; this
call __ZN11QMainWindowD2Ev; QMainWindow::~QMainWindow()
add rsp, 40h
pop rbx
retn
mov rdi, rax
call __clang_call_terminate
| void MainWindow::~MainWindow(MainWindow *this)
{
__int128 v1; // [rsp+0h] [rbp-48h] BYREF
long long v2; // [rsp+10h] [rbp-38h]
__int128 v3; // [rsp+20h] [rbp-28h] BYREF
long long v4; // [rsp+30h] [rbp-18h]
*(_QWORD *)this = &`vtable for'MainWindow + 2;
*((_QWORD *)this + 2) = &`vtable for'MainWindow + 57;
QString::fromUtf8(&v1, 8LL, "data.txt");
v3 = v1;
v4 = v2;
QFile::QFile((QFile *)&v1, (const QString *)&v3);
if ( (_QWORD)v3 && !_InterlockedDecrement((volatile signed __int32 *)v3) )
QArrayData::deallocate(v3, 2LL, 8LL);
QFileDevice::close((QFileDevice *)&v1);
operator delete(*((void **)this + 5), 0x80uLL);
QFile::~QFile(&v1);
QSqlDatabase::~QSqlDatabase((MainWindow *)((char *)this + 48));
QMainWindow::~QMainWindow(this);
}
| ~MainWindow:
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
LEA RAX,[0x1e4b38]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RDI],RCX
ADD RAX,0x1c8
MOV qword ptr [RDI + 0x10],RAX
LAB_00104dae:
LEA RDX,[0x107250]
MOV RDI,RSP
MOV ESI,0x8
CALL 0x00104280
MOV RDI,RSP
MOVAPS XMM0,xmmword ptr [RDI]
LEA RSI,[RSP + 0x20]
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSI + 0x10],RAX
CALL 0x00104510
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x00104e00
DEC.LOCK dword ptr [RAX]
JNZ 0x00104e00
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104260
LAB_00104e00:
MOV RDI,RSP
CALL 0x001044e0
MOV RDI,qword ptr [RBX + 0x28]
MOV ESI,0x80
CALL 0x00104090
MOV RDI,RSP
CALL 0x00104578
LEA RDI,[RBX + 0x30]
CALL 0x001043e0
MOV RDI,RBX
CALL 0x00104240
ADD RSP,0x40
POP RBX
RET
|
/* MainWindow::~MainWindow() */
void __thiscall MainWindow::~MainWindow(MainWindow *this)
{
QArrayData *local_48;
int8 uStack_40;
int8 local_38;
QArrayData *local_28;
int8 uStack_20;
int8 local_18;
*(int ***)this = &PTR_metaObject_001e4b48;
*(int **)(this + 0x10) = &DAT_001e4d00;
/* try { // try from 00104dae to 00104e07 has its CatchHandler @ 00104e35 */
QString::fromUtf8(&local_48,8,"data.txt");
local_28 = local_48;
uStack_20 = uStack_40;
local_18 = local_38;
QFile::QFile((QFile *)&local_48,(QString *)&local_28);
if (local_28 != (QArrayData *)0x0) {
LOCK();
*(int *)local_28 = *(int *)local_28 + -1;
UNLOCK();
if (*(int *)local_28 == 0) {
QArrayData::deallocate(local_28,2,8);
}
}
QFileDevice::close();
operator_delete(*(void **)(this + 0x28),0x80);
QFile::~QFile((QFile *)&local_48);
QSqlDatabase::~QSqlDatabase((QSqlDatabase *)(this + 0x30));
QMainWindow::~QMainWindow((QMainWindow *)this);
return;
}
| |
34,526 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | T& operator[](const key_type& key)
{
return emplace(key, T{}).first->second;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x56f38
movq %r14, %rdi
movl $0x1, %esi
callq 0x56f38
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8e692
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x56f38
movq %r14, %rdi
callq 0x5c724
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8e619
callq 0x6c090
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8e628
callq 0x6c090
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8e637
callq 0x6c090
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8e66d
movq 0x9d938(%rip), %rax # 0x12bf80
cmpb $0x0, (%rax)
je 0x8e658
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x8e662
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x8e66d
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x858b4
movq %rbx, %rdi
callq 0x1af20
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
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, 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 rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value&&)
mov rbx, rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+68h+var_30]
test rdi, rdi
jz short loc_8E619
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E619:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_8E628
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E628:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_8E637
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E637:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_8E66D
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_8E658
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_8E662
loc_8E658:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_8E662:
cmp eax, 1
jnz short loc_8E66D
mov rax, [rdi]
call qword ptr [rax+18h]
loc_8E66D:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h]
__int128 v8; // [rsp+20h] [rbp-48h]
__int128 v9; // [rsp+30h] [rbp-38h]
char v10[8]; // [rsp+40h] [rbp-28h] BYREF
long long v11; // [rsp+48h] [rbp-20h]
v11 = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
v10[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
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(v10);
v2 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
a1,
a2,
&v6);
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(v10);
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(v10);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
if ( *((_QWORD *)&v8 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1));
if ( *((_QWORD *)&v7 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1));
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
| operator[]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00156f38
MOV RDI,R14
MOV ESI,0x1
CALL 0x00156f38
LAB_0018e5e7:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x0018e692
LAB_0018e5f5:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00156f38
MOV RDI,R14
CALL 0x0015c724
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0018e619
CALL 0x0016c090
LAB_0018e619:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0018e628
CALL 0x0016c090
LAB_0018e628:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0018e637
CALL 0x0016c090
LAB_0018e637:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018e66d
MOV RAX,qword ptr [0x0022bf80]
CMP byte ptr [RAX],0x0
JZ 0x0018e658
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0018e662
LAB_0018e658:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0018e662:
CMP EAX,0x1
JNZ 0x0018e66d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0018e66d:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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&) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar4);
/* try { // try from 0018e5e7 to 0018e5f4 has its CatchHandler @ 0018e67e */
lVar3 = emplace(this,param_1,(Value *)&local_68);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf80 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
| |
34,527 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | T& operator[](const key_type& key)
{
return emplace(key, T{}).first->second;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x579d6
movq %r14, %rdi
movl $0x1, %esi
callq 0x579d6
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8e100
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x579d6
movq %r14, %rdi
callq 0x5cec4
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8e087
callq 0x6c8e8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8e096
callq 0x6c8e8
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8e0a5
callq 0x6c8e8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8e0db
movq 0x9beca(%rip), %rax # 0x129f80
cmpb $0x0, (%rax)
je 0x8e0c6
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x8e0d0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x8e0db
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x85470
movq %rbx, %rdi
callq 0x1af20
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
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, 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 rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value&&)
mov rbx, rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+68h+var_30]
test rdi, rdi
jz short loc_8E087
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E087:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_8E096
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E096:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_8E0A5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8E0A5:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_8E0DB
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_8E0C6
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_8E0D0
loc_8E0C6:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_8E0D0:
cmp eax, 1
jnz short loc_8E0DB
mov rax, [rdi]
call qword ptr [rax+18h]
loc_8E0DB:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h]
__int128 v8; // [rsp+20h] [rbp-48h]
__int128 v9; // [rsp+30h] [rbp-38h]
char v10[8]; // [rsp+40h] [rbp-28h] BYREF
long long v11; // [rsp+48h] [rbp-20h]
v11 = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
v10[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
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(v10);
v2 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
a1,
a2,
&v6);
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(v10);
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(v10);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
if ( *((_QWORD *)&v8 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1));
if ( *((_QWORD *)&v7 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1));
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
| operator[]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x001579d6
MOV RDI,R14
MOV ESI,0x1
CALL 0x001579d6
LAB_0018e055:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x0018e100
LAB_0018e063:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x001579d6
MOV RDI,R14
CALL 0x0015cec4
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0018e087
CALL 0x0016c8e8
LAB_0018e087:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0018e096
CALL 0x0016c8e8
LAB_0018e096:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0018e0a5
CALL 0x0016c8e8
LAB_0018e0a5:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018e0db
MOV RAX,qword ptr [0x00229f80]
CMP byte ptr [RAX],0x0
JZ 0x0018e0c6
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0018e0d0
LAB_0018e0c6:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0018e0d0:
CMP EAX,0x1
JNZ 0x0018e0db
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0018e0db:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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&) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar4);
/* try { // try from 0018e055 to 0018e062 has its CatchHandler @ 0018e0ec */
lVar3 = emplace(this,param_1,(Value *)&local_68);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_00229f80 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
| |
34,528 | my_charpos_mb | eloqsql/strings/ctype-mb.c | size_t my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end, size_t length)
{
const char *start= pos;
while (length && pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs, pos, end)) ? mb_len : 1;
length--;
}
return (size_t) (length ? end+2-start : pos-start);
} | O3 | c | my_charpos_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
testq %rcx, %rcx
setne %cl
sete %al
cmpq %rdx, %rsi
setae %dl
orb %al, %dl
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
jne 0x3a8be
movq %rdi, %r12
decq %r15
movl $0x1, %r14d
movq -0x30(%rbp), %rax
movq %rax, %r13
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovbl %r14d, %eax
cmovll %r14d, %eax
addq %r13, %rax
addq $-0x1, %r15
setb %cl
jae 0x3a8be
cmpq %rbx, %rax
jb 0x3a888
addq $0x2, %rbx
testb %cl, %cl
cmoveq %rax, %rbx
subq -0x30(%rbp), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_charpos_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rcx
mov rbx, rdx
test rcx, rcx
setnz cl
setz al
cmp rsi, rdx
setnb dl
or dl, al
mov [rbp+var_30], rsi
mov rax, rsi
jnz short loc_3A8BE
mov r12, rdi
dec r15
mov r14d, 1
mov rax, [rbp+var_30]
loc_3A888:
mov r13, rax
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r13
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovb eax, r14d
cmovl eax, r14d
add rax, r13
add r15, 0FFFFFFFFFFFFFFFFh
setb cl
jnb short loc_3A8BE
cmp rax, rbx
jb short loc_3A888
loc_3A8BE:
add rbx, 2
test cl, cl
cmovz rbx, rax
sub rbx, [rbp+var_30]
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long my_charpos_mb(long long a1, unsigned long long a2, unsigned long long a3, long long a4)
{
long long v4; // r15
bool v6; // zf
unsigned long long v7; // rax
long long v8; // r15
unsigned long long v9; // r13
long long v10; // rax
bool v11; // cc
bool v12; // cf
unsigned long long v13; // rbx
v4 = a4;
v6 = a4 == 0;
LOBYTE(a4) = a4 != 0;
v7 = a2;
if ( !v6 && a2 < a3 )
{
v8 = v4 - 1;
v7 = a2;
do
{
v9 = v7;
v10 = (*(long long ( **)(long long, unsigned long long, unsigned long long, long long))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v7,
a3,
a4);
v11 = (int)v10 < 2;
if ( (unsigned int)v10 < 2 )
v10 = 1LL;
if ( v11 )
v10 = 1LL;
v7 = v9 + v10;
v12 = v8-- != 0;
LOBYTE(a4) = v12;
}
while ( v12 && v7 < a3 );
}
v13 = a3 + 2;
if ( !(_BYTE)a4 )
v13 = v7;
return v13 - a2;
}
| my_charpos_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RCX
MOV RBX,RDX
TEST RCX,RCX
SETNZ CL
SETZ AL
CMP RSI,RDX
SETNC DL
OR DL,AL
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
JNZ 0x0013a8be
MOV R12,RDI
DEC R15
MOV R14D,0x1
MOV RAX,qword ptr [RBP + -0x30]
LAB_0013a888:
MOV R13,RAX
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVC EAX,R14D
CMOVL EAX,R14D
ADD RAX,R13
ADD R15,-0x1
SETC CL
JNC 0x0013a8be
CMP RAX,RBX
JC 0x0013a888
LAB_0013a8be:
ADD RBX,0x2
TEST CL,CL
CMOVZ RBX,RAX
SUB RBX,qword ptr [RBP + -0x30]
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_charpos_mb(long param_1,ulong param_2,ulong param_3,long param_4)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
bool bVar4;
bVar4 = param_4 != 0;
uVar3 = param_2;
if (param_2 < param_3 && bVar4) {
do {
param_4 = param_4 + -1;
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar3,param_3);
uVar2 = (ulong)uVar1;
if (uVar1 < 2) {
uVar2 = 1;
}
if ((int)uVar1 < 2) {
uVar2 = 1;
}
uVar3 = uVar2 + uVar3;
bVar4 = param_4 != 0;
} while ((bVar4) && (uVar3 < param_3));
}
uVar2 = param_3 + 2;
if (!bVar4) {
uVar2 = uVar3;
}
return uVar2 - param_2;
}
| |
34,529 | ma_hashtbl_free | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | void ma_hashtbl_free(MA_HASHTBL *hash)
{
if (hash->free)
{
uint i,records;
MA_HASHTBL_LINK *data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*);
for (i=0,records=hash->records ; i < records ; i++)
(*hash->free)(data[i].data);
hash->free=0;
}
ma_delete_dynamic(&hash->array);
hash->records=0;
return;
} | O0 | c | ma_hashtbl_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x1d19f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0x1d193
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
callq *%rax
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1d164
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x1b4d0
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| ma_hashtbl_free:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+38h], 0
jz short loc_1D19F
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_18], rax
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_10], eax
loc_1D164:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_10]
jnb short loc_1D193
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov rcx, [rbp+var_18]
mov edx, [rbp+var_C]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
call rax
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_1D164
loc_1D193:
mov rax, [rbp+var_8]
mov qword ptr [rax+38h], 0
loc_1D19F:
mov rdi, [rbp+var_8]
add rdi, 18h
call ma_delete_dynamic
mov rax, [rbp+var_8]
mov dword ptr [rax+8], 0
add rsp, 20h
pop rbp
retn
| long long ma_hashtbl_free(long long a1)
{
long long result; // rax
long long v2; // [rsp+8h] [rbp-18h]
unsigned int v3; // [rsp+10h] [rbp-10h]
unsigned int v4; // [rsp+14h] [rbp-Ch]
if ( *(_QWORD *)(a1 + 56) )
{
v2 = *(_QWORD *)(a1 + 24);
v4 = 0;
v3 = *(_DWORD *)(a1 + 8);
while ( v4 < v3 )
(*(void ( **)(_QWORD))(a1 + 56))(*(_QWORD *)(16LL * v4++ + v2 + 8));
*(_QWORD *)(a1 + 56) = 0LL;
}
ma_delete_dynamic(a1 + 24);
result = a1;
*(_DWORD *)(a1 + 8) = 0;
return result;
}
| ma_hashtbl_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0011d19f
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x10],EAX
LAB_0011d164:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x10]
JNC 0x0011d193
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0xc]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
CALL RAX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0011d164
LAB_0011d193:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x38],0x0
LAB_0011d19f:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
CALL 0x0011b4d0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8],0x0
ADD RSP,0x20
POP RBP
RET
|
void ma_hashtbl_free(long param_1)
{
uint uVar1;
long lVar2;
int4 local_14;
if (*(long *)(param_1 + 0x38) != 0) {
lVar2 = *(long *)(param_1 + 0x18);
local_14 = 0;
uVar1 = *(uint *)(param_1 + 8);
for (; local_14 < uVar1; local_14 = local_14 + 1) {
(**(code **)(param_1 + 0x38))(*(int8 *)(lVar2 + (ulong)local_14 * 0x10 + 8));
}
*(int8 *)(param_1 + 0x38) = 0;
}
ma_delete_dynamic(param_1 + 0x18);
*(int4 *)(param_1 + 8) = 0;
return;
}
| |
34,530 | ggml_easy::ctx::~ctx() | ngxson[P]ggml-easy/ggml-easy.h | ~ctx() {
ggml_backend_buffer_free(buf);
} | O3 | c | ggml_easy::ctx::~ctx():
pushq %rbx
movq %rdi, %rbx
movq 0xb0(%rdi), %rdi
callq 0x3500
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x5f79
movq 0xe8(%rbx), %rsi
subq %rdi, %rsi
callq 0x3300
leaq 0xc0(%rbx), %rdi
callq 0x6198
leaq 0xb8(%rbx), %rdi
callq 0x61c8
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x5fac
movq 0x98(%rbx), %rsi
subq %rdi, %rsi
callq 0x3300
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x5fc4
movq 0x80(%rbx), %rsi
subq %rdi, %rsi
callq 0x3300
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x5fd9
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x3300
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x66d4
movq %rax, %rdi
callq 0x5fee
| _ZN9ggml_easy3ctxD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+0B0h]
call _ggml_backend_buffer_free
mov rdi, [rbx+0D8h]; void *
test rdi, rdi
jz short loc_5F79
mov rsi, [rbx+0E8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5F79:
lea rdi, [rbx+0C0h]
call _ZNSt6vectorIN9ggml_easy3ctx11loaded_ggufESaIS2_EED2Ev; std::vector<ggml_easy::ctx::loaded_gguf>::~vector()
lea rdi, [rbx+0B8h]
call _ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterED2Ev; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr()
mov rdi, [rbx+88h]; void *
test rdi, rdi
jz short loc_5FAC
mov rsi, [rbx+98h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5FAC:
mov rdi, [rbx+70h]; void *
test rdi, rdi
jz short loc_5FC4
mov rsi, [rbx+80h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5FC4:
mov rdi, [rbx+50h]; void *
test rdi, rdi
jz short loc_5FD9
mov rsi, [rbx+60h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5FD9:
add rbx, 8
mov rdi, rbx
pop rbx
jmp _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ggml_tensor *>,std::allocator<std::pair<std::string const,ggml_tensor *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, rax
call $+5
| void ggml_easy::ctx::~ctx(ggml_easy::ctx *this)
{
void *v2; // rdi
void *v3; // rdi
void *v4; // rdi
void *v5; // rdi
ggml_backend_buffer_free(*((_QWORD *)this + 22));
v2 = (void *)*((_QWORD *)this + 27);
if ( v2 )
operator delete(v2, *((_QWORD *)this + 29) - (_QWORD)v2);
std::vector<ggml_easy::ctx::loaded_gguf>::~vector((char *)this + 192);
std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr((char *)this + 184);
v3 = (void *)*((_QWORD *)this + 17);
if ( v3 )
operator delete(v3, *((_QWORD *)this + 19) - (_QWORD)v3);
v4 = (void *)*((_QWORD *)this + 14);
if ( v4 )
operator delete(v4, *((_QWORD *)this + 16) - (_QWORD)v4);
v5 = (void *)*((_QWORD *)this + 10);
if ( v5 )
operator delete(v5, *((_QWORD *)this + 12) - (_QWORD)v5);
std::_Hashtable<std::string,std::pair<std::string const,ggml_tensor *>,std::allocator<std::pair<std::string const,ggml_tensor *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable((char *)this + 8);
}
| ~ctx:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xb0]
LAB_00105f59:
CALL 0x00103500
MOV RDI,qword ptr [RBX + 0xd8]
TEST RDI,RDI
JZ 0x00105f79
MOV RSI,qword ptr [RBX + 0xe8]
SUB RSI,RDI
CALL 0x00103300
LAB_00105f79:
LEA RDI,[RBX + 0xc0]
CALL 0x00106198
LEA RDI,[RBX + 0xb8]
CALL 0x001061c8
MOV RDI,qword ptr [RBX + 0x88]
TEST RDI,RDI
JZ 0x00105fac
MOV RSI,qword ptr [RBX + 0x98]
SUB RSI,RDI
CALL 0x00103300
LAB_00105fac:
MOV RDI,qword ptr [RBX + 0x70]
TEST RDI,RDI
JZ 0x00105fc4
MOV RSI,qword ptr [RBX + 0x80]
SUB RSI,RDI
CALL 0x00103300
LAB_00105fc4:
MOV RDI,qword ptr [RBX + 0x50]
TEST RDI,RDI
JZ 0x00105fd9
MOV RSI,qword ptr [RBX + 0x60]
SUB RSI,RDI
CALL 0x00103300
LAB_00105fd9:
ADD RBX,0x8
MOV RDI,RBX
POP RBX
JMP 0x001066d4
|
/* ggml_easy::ctx::~ctx() */
void __thiscall ggml_easy::ctx::~ctx(ctx *this)
{
void *pvVar1;
/* try { // try from 00105f59 to 00105f5d has its CatchHandler @ 00105fe6 */
ggml_backend_buffer_free(*(int8 *)(this + 0xb0));
pvVar1 = *(void **)(this + 0xd8);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0xe8) - (long)pvVar1);
}
std::vector<ggml_easy::ctx::loaded_gguf,std::allocator<ggml_easy::ctx::loaded_gguf>>::~vector
((vector<ggml_easy::ctx::loaded_gguf,std::allocator<ggml_easy::ctx::loaded_gguf>> *)
(this + 0xc0));
std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr
((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0xb8));
pvVar1 = *(void **)(this + 0x88);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x98) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x70);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x80) - (long)pvVar1);
}
pvVar1 = *(void **)(this + 0x50);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x60) - (long)pvVar1);
}
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)(this + 8));
return;
}
| |
34,531 | mi_ft_del | eloqsql/storage/myisam/ft_update.c | int _mi_ft_del(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *record,
my_off_t pos)
{
int error= -1;
FT_WORD *wlist;
DBUG_ENTER("_mi_ft_del");
DBUG_PRINT("enter",("keynr: %d",keynr));
if ((wlist=_mi_ft_parserecord(info, keynr, record, &info->ft_memroot)))
error=_mi_ft_erase(info,keynr,keybuf,wlist,pos);
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_PRINT("exit",("Return: %d",error));
DBUG_RETURN(error);
} | O0 | c | mi_ft_del:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
jmp 0xa35d4
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x90, %rcx
callq 0xa2e70
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xa3614
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0xa3400
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x90, %rdi
movl $0x2, %esi
callq 0xeda10
jmp 0xa362b
jmp 0xa362d
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _mi_ft_del:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], 0FFFFFFFFh
jmp short $+2
loc_A35D4:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_8]
add rcx, 90h
call _mi_ft_parserecord
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_A3614
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_38]
mov r8, [rbp+var_28]
call _mi_ft_erase
mov [rbp+var_2C], eax
loc_A3614:
mov rdi, [rbp+var_8]
add rdi, 90h
mov esi, 2
call free_root
jmp short $+2
loc_A362B:
jmp short $+2
loc_A362D:
mov eax, [rbp+var_2C]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
| long long mi_ft_del(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5)
{
_QWORD *v6; // [rsp+8h] [rbp-38h]
unsigned int v7; // [rsp+14h] [rbp-2Ch]
v7 = -1;
v6 = (_QWORD *)mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18));
if ( v6 )
v7 = mi_ft_erase((long long)a1, a2, a3, v6, a5);
free_root(a1 + 18, 2LL);
return v7;
}
| _mi_ft_del:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],0xffffffff
JMP 0x001a35d4
LAB_001a35d4:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x90
CALL 0x001a2e70
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x001a3614
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x001a3400
MOV dword ptr [RBP + -0x2c],EAX
LAB_001a3614:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x90
MOV ESI,0x2
CALL 0x001eda10
JMP 0x001a362b
LAB_001a362b:
JMP 0x001a362d
LAB_001a362d:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
int4
_mi_ft_del(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5)
{
long lVar1;
int4 local_34;
local_34 = 0xffffffff;
lVar1 = _mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x90);
if (lVar1 != 0) {
local_34 = _mi_ft_erase(param_1,param_2,param_3,lVar1,param_5);
}
free_root(param_1 + 0x90,2);
return local_34;
}
| |
34,532 | minja::Parser::parseExpression(bool) | monkey531[P]llama/common/./minja.hpp | std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
} | O2 | cpp | minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x39e4e
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x2f2dd
testb %bpl, %bpl
je 0x2f2dd
movb 0xb3b33(%rip), %al # 0xe2d78
testb %al, %al
je 0x2f307
leaq 0xb3b04(%rip), %rdx # 0xe2d58
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x2f3f2
leaq 0x18(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x20d78
testq %r15, %r15
je 0x2f2dd
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x2efae
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x3a04e
leaq 0x28(%rsp), %r8
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rsp, %rcx
callq 0x3a23c
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x2eeb2
leaq 0x18(%rsp), %rdi
callq 0x3a264
leaq 0x40(%rsp), %rdi
callq 0x2eeb2
jmp 0x2f2ef
movaps (%rsp), %xmm0
andq $0x0, 0x8(%rsp)
movups %xmm0, (%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb3a6a(%rip), %rdi # 0xe2d78
callq 0x20bf0
testl %eax, %eax
je 0x2f24d
leaq 0xb3a36(%rip), %rdi # 0xe2d58
leaq 0x69f9e(%rip), %rsi # 0x992c7
pushq $0x10
popq %rdx
callq 0x2ef2e
leaq -0x3a4(%rip), %rdi # 0x2ef94
leaq 0xb3a19(%rip), %rsi # 0xe2d58
leaq 0xb3382(%rip), %rdx # 0xe26c8
callq 0x205f0
leaq 0xb3a26(%rip), %rdi # 0xe2d78
callq 0x20480
jmp 0x2f24d
movq %rax, %rbx
leaq 0xb3a12(%rip), %rdi # 0xe2d78
callq 0x20470
jmp 0x2f390
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3a264
jmp 0x2f37f
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2eeb2
jmp 0x2f390
jmp 0x2f38d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rdi
callq 0x20b90
| _ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz loc_2F2DD
test bpl, bpl
jz loc_2F2DD
mov al, cs:_ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
test al, al
jz loc_2F307
loc_2F24D:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+88h+var_70]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_70]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_2F2DD
lea rdi, [rsp+88h+var_50]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+88h+var_70]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
lea r8, [rsp+88h+var_60]
lea rdi, [rsp+88h+var_38]
lea rsi, [rsp+88h+var_50]
lea rdx, [rsp+88h+var_70]
mov rcx, rsp
call _ZSt11make_sharedIN5minja6IfExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_S6_EES4_IT_EDpOT0_; std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression> &&)
lea rdi, [rsp+88h+var_30]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_70]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_2F2EF
loc_2F2DD:
movaps xmm0, [rsp+88h+var_88]
and qword ptr [rsp+88h+var_88+8], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rsp+88h+var_88], 0
loc_2F2EF:
lea rdi, [rsp+88h+var_88+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2F307:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_2F24D
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_2F24D
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_2F390
mov rbx, rax
lea rdi, [rsp+arg_10]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_2F37F
mov rbx, rax
loc_2F37F:
lea rdi, [rsp+arg_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_2F390
jmp short $+2
loc_2F38D:
mov rbx, rax
loc_2F390:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpression(minja::Parser *this, _QWORD *a2, char a3)
{
int v4; // r8d
int v5; // r9d
long long v6; // r15
__int128 v7; // xmm0
__int128 v8; // xmm0
__int128 v10; // [rsp+0h] [rbp-88h] BYREF
_BYTE v11[8]; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+20h] [rbp-68h]
_BYTE v13[16]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v14[8]; // [rsp+38h] [rbp-50h] BYREF
long long v15; // [rsp+40h] [rbp-48h] BYREF
_OWORD v16[3]; // [rsp+50h] [rbp-38h] BYREF
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_6;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)v11,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
SBYTE8(v10));
v6 = v12;
std::string::~string(v11);
if ( v6 )
{
minja::Parser::get_location((minja::Parser *)v14, a2);
minja::Parser::parseIfExpression((minja::Parser *)v11);
std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(
v16,
v14,
v11,
&v10,
v13);
v7 = v16[0];
*((_QWORD *)&v16[0] + 1) = 0LL;
*(_OWORD *)this = v7;
*(_QWORD *)&v16[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v16 + 1);
std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair(v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
}
else
{
LABEL_6:
v8 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v8;
*(_QWORD *)&v10 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1);
return this;
}
| |||
34,533 | minja::Parser::parseExpression(bool) | monkey531[P]llama/common/./minja.hpp | std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
} | O3 | cpp | minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x3c238
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x2fbfb
testb %bpl, %bpl
je 0x2fbfb
movb 0xc11b9(%rip), %al # 0xf0d48
testb %al, %al
je 0x2fcc5
leaq 0xc118a(%rip), %rdx # 0xf0d28
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x2fd6a
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x2fbcf
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x186a0
testq %r15, %r15
je 0x2fbfb
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x2fc16
movq 0xc03af(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x2fc12
incl 0x8(%rax)
jmp 0x2fc16
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x3c4c0
movl $0x60, %edi
callq 0x18690
movq %rax, %r14
leaq 0x40(%rsp), %r8
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xbee31(%rip), %rax # 0xeea88
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x18(%rsp), %rsi
leaq 0x30(%rsp), %r12
movq %rsp, %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x5919a
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x2fc8f
callq 0x2f80e
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2fc9e
callq 0x2f80e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2fcad
callq 0x2f80e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2fc02
callq 0x2f80e
jmp 0x2fc02
leaq 0xc107c(%rip), %rdi # 0xf0d48
callq 0x18be0
testl %eax, %eax
je 0x2fb97
leaq 0xc1048(%rip), %rdi # 0xf0d28
leaq 0x86458(%rip), %rsi # 0xb613f
movl $0x10, %edx
callq 0x2f87e
leaq -0x412(%rip), %rdi # 0x2f8e6
leaq 0xc1029(%rip), %rsi # 0xf0d28
leaq 0xc0992(%rip), %rdx # 0xf0698
callq 0x185d0
leaq 0xc1036(%rip), %rdi # 0xf0d48
callq 0x18450
jmp 0x2fb97
movq %rax, %rbx
leaq 0xc1022(%rip), %rdi # 0xf0d48
callq 0x18440
jmp 0x2fd53
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3c68a
jmp 0x2fd3f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2fd53
callq 0x2f80e
jmp 0x2fd53
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2fd62
callq 0x2f80e
movq %rbx, %rdi
callq 0x18b90
| _ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_2FBFB
test bpl, bpl
jz short loc_2FBFB
mov al, cs:_ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
test al, al
jz loc_2FCC5
loc_2FB97:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_2FBCF
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FBCF:
test r15, r15
jz short loc_2FBFB
mov rax, [r14]
mov [rsp+78h+var_60], rax
mov rax, [r14+8]
mov [rsp+78h+var_58], rax
test rax, rax
jz short loc_2FC16
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_2FC12
inc dword ptr [rax+8]
jmp short loc_2FC16
loc_2FBFB:
movaps xmm0, [rsp+78h+var_78]
movups xmmword ptr [rbx], xmm0
loc_2FC02:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2FC12:
lock inc dword ptr [rax+8]
loc_2FC16:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_50], rax
lea rdi, [rsp+78h+var_48]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea r8, [rsp+78h+var_38]
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_EEA88
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+78h+var_60]
lea r12, [rsp+78h+var_48]
mov rcx, rsp
mov rdi, r15
mov rdx, r12
call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &)
mov [rbx], r15
mov [rbx+8], r14
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_2FC8F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FC8F:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_2FC9E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FC9E:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_2FCAD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FCAD:
mov rdi, qword ptr [rsp+78h+var_78+8]
test rdi, rdi
jz loc_2FC02
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_2FC02
loc_2FCC5:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_2FB97
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_2FB97
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_2FD53
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_2FD3F
mov rbx, rax
loc_2FD3F:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_2FD53
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_2FD53
mov rbx, rax
loc_2FD53:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_2FD62
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FD62:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3)
{
int v4; // r8d
int v5; // r9d
volatile signed __int32 *v6; // r15
volatile signed __int32 *v7; // rax
_QWORD *v9; // r14
__int128 v10; // [rsp+0h] [rbp-78h] BYREF
long long v11; // [rsp+18h] [rbp-60h] BYREF
volatile signed __int32 *v12; // [rsp+20h] [rbp-58h]
long long v13; // [rsp+28h] [rbp-50h]
long long *v14; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v15; // [rsp+38h] [rbp-40h]
long long v16; // [rsp+40h] [rbp-38h] BYREF
volatile signed __int32 *v17; // [rsp+48h] [rbp-30h]
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_10;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)&v14,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
*((long long *)&v10 + 1));
v6 = v15;
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v6 )
{
v11 = *a2;
v7 = (volatile signed __int32 *)a2[1];
v12 = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v7 + 2);
else
_InterlockedIncrement(v7 + 2);
}
v13 = a2[4] - a2[2];
minja::Parser::parseIfExpression((minja::Parser *)&v14);
v9 = (_QWORD *)operator new(0x60uLL);
v9[1] = 0x100000001LL;
*v9 = off_EEA88;
minja::IfExpr::IfExpr(v9 + 2, &v11, &v14, &v10, &v16);
*(_QWORD *)this = v9 + 2;
*((_QWORD *)this + 1) = v9;
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( *((_QWORD *)&v10 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1));
}
else
{
LABEL_10:
*(_OWORD *)this = v10;
}
return this;
}
| parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0013c238
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0012fbfb
TEST BPL,BPL
JZ 0x0012fbfb
MOV AL,byte ptr [0x001f0d48]
TEST AL,AL
JZ 0x0012fcc5
LAB_0012fb97:
LEA RDX,[0x1f0d28]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x0012fd6a
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0012fbcf
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001186a0
LAB_0012fbcf:
TEST R15,R15
JZ 0x0012fbfb
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x0012fc16
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x0012fc12
INC dword ptr [RAX + 0x8]
JMP 0x0012fc16
LAB_0012fbfb:
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RBX],XMM0
LAB_0012fc02:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012fc12:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0012fc16:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
LAB_0012fc23:
LEA RDI,[RSP + 0x30]
MOV RSI,R14
CALL 0x0013c4c0
LAB_0012fc30:
MOV EDI,0x60
CALL 0x00118690
MOV R14,RAX
LEA R8,[RSP + 0x40]
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x1eea88]
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x18]
LEA R12,[RSP + 0x30]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,R12
CALL 0x0015919a
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x0012fc8f
CALL 0x0012f80e
LAB_0012fc8f:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0012fc9e
CALL 0x0012f80e
LAB_0012fc9e:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0012fcad
CALL 0x0012f80e
LAB_0012fcad:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0012fc02
CALL 0x0012f80e
JMP 0x0012fc02
LAB_0012fcc5:
LEA RDI,[0x1f0d48]
CALL 0x00118be0
TEST EAX,EAX
JZ 0x0012fb97
LAB_0012fcd9:
LEA RDI,[0x1f0d28]
LEA RSI,[0x1b613f]
MOV EDX,0x10
CALL 0x0012f87e
LAB_0012fcf1:
LEA RDI,[0x12f8e6]
LEA RSI,[0x1f0d28]
LEA RDX,[0x1f0698]
CALL 0x001185d0
LEA RDI,[0x1f0d48]
CALL 0x00118450
JMP 0x0012fb97
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
char in_DL;
int8 *in_RSI;
int7 in_register_00000039;
int8 *puVar4;
int8 local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
long local_50;
long *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) {
if ((parseExpression(bool)::if_tok_abi_cxx11_ == '\0') &&
(iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_), iVar2 != 0)) {
/* try { // try from 0012fcd9 to 0012fcf0 has its CatchHandler @ 0012fd1c */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001b613f,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
/* try { // try from 0012fb97 to 0012fbaf has its CatchHandler @ 0012fd50 */
consumeToken(&local_48);
p_Var1 = local_40;
if (local_48 != &local_38) {
operator_delete(local_48,local_38 + 1);
}
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
local_60 = *in_RSI;
local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
}
}
local_50 = in_RSI[4] - in_RSI[2];
/* try { // try from 0012fc23 to 0012fc2f has its CatchHandler @ 0012fd3c */
parseIfExpression();
/* try { // try from 0012fc30 to 0012fc39 has its CatchHandler @ 0012fd2d */
puVar3 = (int8 *)operator_new(0x60);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_001eea88;
IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48,
(shared_ptr *)&local_78,(shared_ptr *)&local_38);
*puVar4 = (IfExpr *)(puVar3 + 2);
puVar4[1] = puVar3;
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (p_Stack_70 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
return puVar4;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70);
return puVar4;
}
}
*puVar4 = local_78;
puVar4[1] = p_Stack_70;
return puVar4;
}
| |
34,534 | JS_IsArray | bluesky950520[P]quickjs/quickjs.c | int JS_IsArray(JSContext *ctx, JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(val) == JS_TAG_OBJECT) {
p = JS_VALUE_GET_OBJ(val);
if (unlikely(p->class_id == JS_CLASS_PROXY))
return js_proxy_isArray(ctx, val);
else
return p->class_id == JS_CLASS_ARRAY;
} else {
return FALSE;
}
} | O1 | c | JS_IsArray:
movq %rsi, -0x8(%rsp)
xorl %eax, %eax
cmpl $-0x1, %edx
jne 0x282f6
movq -0x8(%rsp), %rax
movzwl 0x6(%rax), %ecx
cmpw $0x30, %cx
je 0x282f7
xorl %eax, %eax
cmpw $0x2, %cx
sete %al
retq
movq -0x8(%rsp), %rsi
jmp 0x282fe
| JS_IsArray:
mov [rsp+var_8], rsi
xor eax, eax
cmp edx, 0FFFFFFFFh
jnz short locret_282F6
mov rax, [rsp+var_8]
movzx ecx, word ptr [rax+6]
cmp cx, 30h ; '0'
jz short loc_282F7
xor eax, eax
cmp cx, 2
setz al
locret_282F6:
retn
loc_282F7:
mov rsi, [rsp+var_8]
jmp short $+2
| long long JS_IsArray(long long a1, long long a2, int a3)
{
long long result; // rax
__int16 v4; // cx
result = 0LL;
if ( a3 == -1 )
{
v4 = *(_WORD *)(a2 + 6);
if ( v4 == 48 )
return js_proxy_isArray(a1, a2);
else
return v4 == 2;
}
return result;
}
| |||
34,535 | JS_IsArray | bluesky950520[P]quickjs/quickjs.c | int JS_IsArray(JSContext *ctx, JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(val) == JS_TAG_OBJECT) {
p = JS_VALUE_GET_OBJ(val);
if (unlikely(p->class_id == JS_CLASS_PROXY))
return js_proxy_isArray(ctx, val);
else
return p->class_id == JS_CLASS_ARRAY;
} else {
return FALSE;
}
} | O2 | c | JS_IsArray:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpl $-0x1, %edx
jne 0x21d43
movzwl 0x6(%rsi), %ecx
cmpw $0x30, %cx
jne 0x21d3a
movq 0x30(%rsi), %rcx
testq %rcx, %rcx
je 0x21d43
movq 0x18(%rdi), %rax
cmpq %rbp, 0xe8(%rax)
ja 0x21d45
cmpb $0x0, 0x21(%rcx)
jne 0x21d4c
movq (%rcx), %rsi
movl 0x8(%rcx), %edx
jmp 0x21d05
xorl %eax, %eax
cmpw $0x2, %cx
sete %al
popq %rbp
retq
callq 0x35d91
jmp 0x21d51
callq 0x35d9f
pushq $-0x1
popq %rax
jmp 0x21d43
| JS_IsArray:
push rbp
mov rbp, rsp
loc_21D05:
xor eax, eax
cmp edx, 0FFFFFFFFh
jnz short loc_21D43
movzx ecx, word ptr [rsi+6]
cmp cx, 30h ; '0'
jnz short loc_21D3A
mov rcx, [rsi+30h]
test rcx, rcx
jz short loc_21D43
mov rax, [rdi+18h]
cmp [rax+0E8h], rbp
ja short loc_21D45
cmp byte ptr [rcx+21h], 0
jnz short loc_21D4C
mov rsi, [rcx]
mov edx, [rcx+8]
jmp short loc_21D05
loc_21D3A:
xor eax, eax
cmp cx, 2
setz al
loc_21D43:
pop rbp
retn
loc_21D45:
call JS_ThrowStackOverflow
jmp short loc_21D51
loc_21D4C:
call JS_ThrowTypeErrorRevokedProxy
loc_21D51:
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_21D43
| long long JS_IsArray(long long a1, long long a2, int a3)
{
long long result; // rax
__int16 v4; // cx
long long *v5; // rcx
long long savedregs; // [rsp+0h] [rbp+0h] BYREF
while ( 1 )
{
result = 0LL;
if ( a3 != -1 )
break;
v4 = *(_WORD *)(a2 + 6);
if ( v4 != 48 )
return v4 == 2;
v5 = *(long long **)(a2 + 48);
if ( !v5 )
return result;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) > (unsigned long long)&savedregs )
{
JS_ThrowStackOverflow(a1);
return -1LL;
}
if ( *((_BYTE *)v5 + 33) )
{
JS_ThrowTypeErrorRevokedProxy();
return -1LL;
}
a2 = *v5;
a3 = *((_DWORD *)v5 + 2);
}
return result;
}
| JS_IsArray:
PUSH RBP
MOV RBP,RSP
LAB_00121d05:
XOR EAX,EAX
CMP EDX,-0x1
JNZ 0x00121d43
MOVZX ECX,word ptr [RSI + 0x6]
CMP CX,0x30
JNZ 0x00121d3a
MOV RCX,qword ptr [RSI + 0x30]
TEST RCX,RCX
JZ 0x00121d43
MOV RAX,qword ptr [RDI + 0x18]
CMP qword ptr [RAX + 0xe8],RBP
JA 0x00121d45
CMP byte ptr [RCX + 0x21],0x0
JNZ 0x00121d4c
MOV RSI,qword ptr [RCX]
MOV EDX,dword ptr [RCX + 0x8]
JMP 0x00121d05
LAB_00121d3a:
XOR EAX,EAX
CMP CX,0x2
SETZ AL
LAB_00121d43:
POP RBP
RET
LAB_00121d45:
CALL 0x00135d91
JMP 0x00121d51
LAB_00121d4c:
CALL 0x00135d9f
LAB_00121d51:
PUSH -0x1
POP RAX
JMP 0x00121d43
|
ulong JS_IsArray(long param_1,long param_2,int param_3)
{
long *plVar1;
while( true ) {
if (param_3 != -1) {
return 0;
}
if (*(short *)(param_2 + 6) != 0x30) {
return (ulong)(*(short *)(param_2 + 6) == 2);
}
plVar1 = *(long **)(param_2 + 0x30);
if (plVar1 == (long *)0x0) {
return 0;
}
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) break;
if (*(char *)((long)plVar1 + 0x21) != '\0') {
JS_ThrowTypeErrorRevokedProxy();
return 0xffffffffffffffff;
}
param_2 = *plVar1;
param_3 = (int)plVar1[1];
}
JS_ThrowStackOverflow();
return 0xffffffffffffffff;
}
| |
34,536 | my_setwd | eloqsql/mysys/my_getwd.c | int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
} | O3 | c | my_setwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0xbdc73
movq %r14, %rdi
cmpl $0x2f, %eax
jne 0xbdc7a
cmpb $0x0, 0x1(%r14)
movq %r14, %rdi
jne 0xbdc7a
leaq 0x438c2(%rip), %rdi # 0x10153c
callq 0x2aa50
movl %eax, %ebx
testl %eax, %eax
je 0xbdcb8
callq 0x2a870
movq %rax, %r12
movl (%rax), %r13d
callq 0xc14ee
movl %r13d, (%rax)
testb $0x10, %r15b
je 0xbdd15
movl (%r12), %ecx
movl $0x4, %esi
movl $0x11, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0xbad7b
jmp 0xbdd15
leaq 0xb72a09(%rip), %rax # 0xc306c8
movq (%rax), %rax
movq %r14, %rcx
movzbl (%rcx), %edx
cmpl $0x7e, %edx
jne 0xbdcdd
cmpb $0x2f, 0x1(%rcx)
jne 0xbdd0b
movq %rax, %rcx
testq %rax, %rax
jne 0xbdcc5
jmp 0xbdd0b
cmpl $0x2f, %edx
jne 0xbdd0b
leaq 0xb729f7(%rip), %r15 # 0xc306e0
movl $0x1ff, %edx # imm = 0x1FF
movq %r15, %rdi
movq %r14, %rsi
callq 0xf6e50
cmpb $0x2f, -0x1(%rax)
je 0xbdd15
subl %r15d, %eax
movw $0x2f, (%r15,%rax)
jmp 0xbdd15
leaq 0xb729ce(%rip), %rax # 0xc306e0
movb $0x0, (%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_setwd:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_BDC73
mov rdi, r14
cmp eax, 2Fh ; '/'
jnz short loc_BDC7A
cmp byte ptr [r14+1], 0
mov rdi, r14
jnz short loc_BDC7A
loc_BDC73:
lea rdi, unk_10153C
loc_BDC7A:
call _chdir
mov ebx, eax
test eax, eax
jz short loc_BDCB8
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r15b, 10h
jz short loc_BDD15
mov ecx, [r12]
mov esi, 4
mov edi, 11h
mov rdx, r14
xor eax, eax
call my_error
jmp short loc_BDD15
loc_BDCB8:
lea rax, home_dir
mov rax, [rax]
mov rcx, r14
loc_BDCC5:
movzx edx, byte ptr [rcx]
cmp edx, 7Eh ; '~'
jnz short loc_BDCDD
cmp byte ptr [rcx+1], 2Fh ; '/'
jnz short loc_BDD0B
mov rcx, rax
test rax, rax
jnz short loc_BDCC5
jmp short loc_BDD0B
loc_BDCDD:
cmp edx, 2Fh ; '/'
jnz short loc_BDD0B
lea r15, curr_dir
mov edx, 1FFh
mov rdi, r15
mov rsi, r14
call strmake
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_BDD15
sub eax, r15d
mov word ptr [r15+rax], 2Fh ; '/'
jmp short loc_BDD15
loc_BDD0B:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_BDD15:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_setwd(unsigned __int8 *a1, char a2)
{
unsigned __int8 *v2; // r14
unsigned int v3; // ebx
unsigned int *v4; // r12
unsigned int v5; // r13d
unsigned __int8 *v6; // rcx
int v7; // edx
long long v8; // rax
v2 = a1;
if ( !*a1 || *a1 == 47 && !a1[1] )
a1 = (unsigned __int8 *)&unk_10153C;
v3 = chdir(a1);
if ( v3 )
{
v4 = (unsigned int *)__errno_location(a1);
v5 = *v4;
*(_DWORD *)my_thread_var(a1) = v5;
if ( (a2 & 0x10) != 0 )
my_error(0x11u, 4LL, v2, *v4);
}
else
{
v6 = v2;
while ( 1 )
{
v7 = *v6;
if ( v7 != 126 )
break;
if ( v6[1] == 47 )
{
v6 = (unsigned __int8 *)home_dir;
if ( home_dir )
continue;
}
goto LABEL_16;
}
if ( v7 != 47 )
{
LABEL_16:
curr_dir[0] = 0;
return v3;
}
v8 = strmake(curr_dir, v2, 511LL);
if ( *(_BYTE *)(v8 - 1) != 47 )
*(_WORD *)&curr_dir[(unsigned int)v8 - (unsigned int)curr_dir] = 47;
}
return v3;
}
| my_setwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x001bdc73
MOV RDI,R14
CMP EAX,0x2f
JNZ 0x001bdc7a
CMP byte ptr [R14 + 0x1],0x0
MOV RDI,R14
JNZ 0x001bdc7a
LAB_001bdc73:
LEA RDI,[0x20153c]
LAB_001bdc7a:
CALL 0x0012aa50
MOV EBX,EAX
TEST EAX,EAX
JZ 0x001bdcb8
CALL 0x0012a870
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x001c14ee
MOV dword ptr [RAX],R13D
TEST R15B,0x10
JZ 0x001bdd15
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x11
MOV RDX,R14
XOR EAX,EAX
CALL 0x001bad7b
JMP 0x001bdd15
LAB_001bdcb8:
LEA RAX,[0xd306c8]
MOV RAX,qword ptr [RAX]
MOV RCX,R14
LAB_001bdcc5:
MOVZX EDX,byte ptr [RCX]
CMP EDX,0x7e
JNZ 0x001bdcdd
CMP byte ptr [RCX + 0x1],0x2f
JNZ 0x001bdd0b
MOV RCX,RAX
TEST RAX,RAX
JNZ 0x001bdcc5
JMP 0x001bdd0b
LAB_001bdcdd:
CMP EDX,0x2f
JNZ 0x001bdd0b
LEA R15,[0xd306e0]
MOV EDX,0x1ff
MOV RDI,R15
MOV RSI,R14
CALL 0x001f6e50
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x001bdd15
SUB EAX,R15D
MOV word ptr [R15 + RAX*0x1],0x2f
JMP 0x001bdd15
LAB_001bdd0b:
LEA RAX,[0xd306e0]
MOV byte ptr [RAX],0x0
LAB_001bdd15:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
long lVar5;
char *pcVar6;
if ((*param_1 == '\0') || ((pcVar6 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
pcVar6 = "/";
}
iVar2 = chdir(pcVar6);
pcVar6 = param_1;
if (iVar2 == 0) {
while (*pcVar6 == '~') {
if ((pcVar6[1] != '/') || (pcVar6 = home_dir, home_dir == (char *)0x0)) goto LAB_001bdd0b;
}
if (*pcVar6 == '/') {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) == '/') {
return 0;
}
*(int2 *)(&curr_dir + ((int)lVar5 - 0xd306e0)) = 0x2f;
return 0;
}
LAB_001bdd0b:
curr_dir = 0;
}
else {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_2 & 0x10) != 0) {
my_error(0x11,4,param_1,*piVar3);
}
}
return iVar2;
}
| |
34,537 | spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode(spdlog::color_mode) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/sinks/ansicolor_sink-inl.h | SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::set_color_mode(color_mode mode) {
switch (mode) {
case color_mode::always:
should_do_colors_ = true;
return;
case color_mode::automatic:
should_do_colors_ =
details::os::in_terminal(target_file_) && details::os::is_color_terminal();
return;
case color_mode::never:
should_do_colors_ = false;
return;
default:
should_do_colors_ = false;
}
} | O0 | c | spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode(spdlog::color_mode):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
testl %eax, %eax
je 0xb788b
jmp 0xb7875
movl 0x18(%rsp), %eax
subl $0x1, %eax
je 0xb7899
jmp 0xb7880
movl 0x18(%rsp), %eax
subl $0x2, %eax
je 0xb78d6
jmp 0xb78e4
movq 0x10(%rsp), %rax
movb $0x1, 0x1d0(%rax)
jmp 0xb78f0
movq 0x10(%rsp), %rax
movq 0x1c0(%rax), %rdi
callq 0x75d50
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0xf(%rsp)
jne 0xb78b9
jmp 0xb78c2
callq 0x75c50
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
movb 0xf(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x1d0(%rax)
jmp 0xb78f0
movq 0x10(%rsp), %rax
movb $0x0, 0x1d0(%rax)
jmp 0xb78f0
movq 0x10(%rsp), %rax
movb $0x0, 0x1d0(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE14set_color_modeENS_10color_modeE:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_18], rax
mov eax, [rsp+28h+var_C]
mov [rsp+28h+var_10], eax
test eax, eax
jz short loc_B788B
jmp short $+2
loc_B7875:
mov eax, [rsp+28h+var_10]
sub eax, 1
jz short loc_B7899
jmp short $+2
loc_B7880:
mov eax, [rsp+28h+var_10]
sub eax, 2
jz short loc_B78D6
jmp short loc_B78E4
loc_B788B:
mov rax, [rsp+28h+var_18]
mov byte ptr [rax+1D0h], 1
jmp short loc_B78F0
loc_B7899:
mov rax, [rsp+28h+var_18]
mov rdi, [rax+1C0h]; this
call _ZN6spdlog7details2os11in_terminalEP8_IO_FILE; spdlog::details::os::in_terminal(_IO_FILE *)
mov cl, al
xor eax, eax
test cl, 1
mov [rsp+28h+var_19], al
jnz short loc_B78B9
jmp short loc_B78C2
loc_B78B9:
call _ZN6spdlog7details2os17is_color_terminalEv; spdlog::details::os::is_color_terminal(void)
mov [rsp+28h+var_19], al
loc_B78C2:
mov rax, [rsp+28h+var_18]
mov cl, [rsp+28h+var_19]
and cl, 1
mov [rax+1D0h], cl
jmp short loc_B78F0
loc_B78D6:
mov rax, [rsp+28h+var_18]
mov byte ptr [rax+1D0h], 0
jmp short loc_B78F0
loc_B78E4:
mov rax, [rsp+28h+var_18]
mov byte ptr [rax+1D0h], 0
loc_B78F0:
add rsp, 28h
retn
| long long spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode(
long long a1,
int a2)
{
spdlog::details::os *v2; // rdi
long long result; // rax
char is_color_terminal; // [rsp+Fh] [rbp-19h]
if ( a2 )
{
if ( a2 == 1 )
{
v2 = *(spdlog::details::os **)(a1 + 448);
is_color_terminal = 0;
if ( spdlog::details::os::in_terminal((long long)v2) )
is_color_terminal = spdlog::details::os::is_color_terminal(v2);
result = a1;
*(_BYTE *)(a1 + 464) = is_color_terminal & 1;
}
else
{
result = a1;
*(_BYTE *)(a1 + 464) = 0;
}
}
else
{
result = a1;
*(_BYTE *)(a1 + 464) = 1;
}
return result;
}
| set_color_mode:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x18],EAX
TEST EAX,EAX
JZ 0x001b788b
JMP 0x001b7875
LAB_001b7875:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x1
JZ 0x001b7899
JMP 0x001b7880
LAB_001b7880:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x2
JZ 0x001b78d6
JMP 0x001b78e4
LAB_001b788b:
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX + 0x1d0],0x1
JMP 0x001b78f0
LAB_001b7899:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x1c0]
CALL 0x00175d50
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RSP + 0xf],AL
JNZ 0x001b78b9
JMP 0x001b78c2
LAB_001b78b9:
CALL 0x00175c50
MOV byte ptr [RSP + 0xf],AL
LAB_001b78c2:
MOV RAX,qword ptr [RSP + 0x10]
MOV CL,byte ptr [RSP + 0xf]
AND CL,0x1
MOV byte ptr [RAX + 0x1d0],CL
JMP 0x001b78f0
LAB_001b78d6:
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX + 0x1d0],0x0
JMP 0x001b78f0
LAB_001b78e4:
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX + 0x1d0],0x0
LAB_001b78f0:
ADD RSP,0x28
RET
|
/* spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode(spdlog::color_mode)
*/
void __thiscall
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::set_color_mode
(ansicolor_sink<spdlog::details::console_nullmutex> *this,int param_2)
{
uint uVar1;
byte local_19;
if (param_2 == 0) {
this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)0x1;
}
else if (param_2 == 1) {
uVar1 = details::os::in_terminal(*(_IO_FILE **)(this + 0x1c0));
local_19 = 0;
if ((uVar1 & 1) != 0) {
local_19 = details::os::is_color_terminal();
}
this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)(local_19 & 1);
}
else if (param_2 == 2) {
this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)0x0;
}
else {
this[0x1d0] = (ansicolor_sink<spdlog::details::console_nullmutex>)0x0;
}
return;
}
| |
34,538 | nglog::LogDestination::DeleteLogDestinations() | ng-log[P]ng-log/src/logging.cc | void LogDestination::DeleteLogDestinations() {
for (auto& log_destination : log_destinations_) {
log_destination.reset();
}
SinkLock l{sink_mutex_};
sinks_.reset();
} | O1 | cpp | nglog::LogDestination::DeleteLogDestinations():
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0x27209(%rip), %r14 # 0x3b030
leaq (%r14,%rbx), %rdi
xorl %esi, %esi
callq 0x1c0ea
addq $0x8, %rbx
cmpq $0x20, %rbx
jne 0x13e27
leaq 0x271a5(%rip), %rdi # 0x3afe8
callq 0x11e70
cmpl $0x23, %eax
je 0x13e83
movq 0x2718c(%rip), %rsi # 0x3afe0
movq $0x0, 0x27181(%rip) # 0x3afe0
testq %rsi, %rsi
je 0x13e70
leaq 0x27175(%rip), %rdi # 0x3afe0
callq 0x1c22c
leaq 0x27171(%rip), %rdi # 0x3afe8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11c70
movl $0x23, %edi
callq 0x115d0
| _ZN5nglog14LogDestination21DeleteLogDestinationsEv:
push r14
push rbx
push rax
xor ebx, ebx
lea r14, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
loc_13E27:
lea rdi, [r14+rbx]
xor esi, esi
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
add rbx, 8
cmp rbx, 20h ; ' '
jnz short loc_13E27
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_wrlock
cmp eax, 23h ; '#'
jz short loc_13E83
mov rsi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov cs:_ZN5nglog14LogDestination6sinks_E, 0; nglog::LogDestination::sinks_
test rsi, rsi
jz short loc_13E70
lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
call _ZNKSt14default_deleteISt6vectorIPN5nglog7LogSinkESaIS3_EEEclEPS5_; std::default_delete<std::vector<nglog::LogSink *>>::operator()(std::vector<nglog::LogSink *>*)
loc_13E70:
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
add rsp, 8
pop rbx
pop r14
jmp _pthread_rwlock_unlock
loc_13E83:
mov edi, 23h ; '#'; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
| long long nglog::LogDestination::DeleteLogDestinations(nglog::LogDestination *this)
{
long long i; // rbx
long long v2; // rsi
for ( i = 0LL; i != 32; i += 8LL )
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
(char *)&nglog::LogDestination::log_destinations_ + i,
0LL);
if ( (unsigned int)pthread_rwlock_wrlock(&nglog::LogDestination::sink_mutex_) == 35 )
std::__throw_system_error(35);
v2 = nglog::LogDestination::sinks_;
nglog::LogDestination::sinks_ = 0LL;
if ( v2 )
std::default_delete<std::vector<nglog::LogSink *>>::operator()(&nglog::LogDestination::sinks_);
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
| DeleteLogDestinations:
PUSH R14
PUSH RBX
PUSH RAX
XOR EBX,EBX
LEA R14,[0x13b030]
LAB_00113e27:
LEA RDI,[R14 + RBX*0x1]
XOR ESI,ESI
CALL 0x0011c0ea
ADD RBX,0x8
CMP RBX,0x20
JNZ 0x00113e27
LEA RDI,[0x13afe8]
CALL 0x00111e70
CMP EAX,0x23
JZ 0x00113e83
MOV RSI,qword ptr [0x0013afe0]
MOV qword ptr [0x0013afe0],0x0
TEST RSI,RSI
JZ 0x00113e70
LEA RDI,[0x13afe0]
CALL 0x0011c22c
LAB_00113e70:
LEA RDI,[0x13afe8]
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00111c70
LAB_00113e83:
MOV EDI,0x23
CALL 0x001115d0
|
/* nglog::LogDestination::DeleteLogDestinations() */
void nglog::LogDestination::DeleteLogDestinations(void)
{
vector *pvVar1;
int iVar2;
long lVar3;
lVar3 = 0;
do {
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
((long)&log_destinations_ + lVar3),(LogDestination *)0x0);
lVar3 = lVar3 + 8;
} while (lVar3 != 0x20);
iVar2 = pthread_rwlock_wrlock((pthread_rwlock_t *)sink_mutex_);
pvVar1 = sinks_;
if (iVar2 != 0x23) {
sinks_ = (vector *)0x0;
if (pvVar1 != (vector *)0x0) {
std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>::operator()
((default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>> *)
&sinks_,pvVar1);
}
pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(0x23);
}
| |
34,539 | translog_get_total_chunk_length | eloqsql/storage/maria/ma_loghandler.c | static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset)
{
DBUG_ENTER("translog_get_total_chunk_length");
switch (page[offset] & TRANSLOG_CHUNK_TYPE) {
case TRANSLOG_CHUNK_LSN:
{
/* 0 chunk referred as LSN (head or tail) */
translog_size_t rec_len;
uchar *start= page + offset;
uchar *ptr= start + 1 + 2; /* chunk type and short trid */
uint16 chunk_len, header_len, page_rest;
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN"));
rec_len= translog_variable_record_1group_decode_len(&ptr);
chunk_len= uint2korr(ptr);
header_len= (uint16) (ptr -start) + 2;
DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u",
(ulong) rec_len, (uint) chunk_len, (uint) header_len));
if (chunk_len)
{
DBUG_PRINT("info", ("chunk len: %u + %u = %u",
(uint) header_len, (uint) chunk_len,
(uint) (chunk_len + header_len)));
DBUG_RETURN(chunk_len + header_len);
}
page_rest= TRANSLOG_PAGE_SIZE - offset;
DBUG_PRINT("info", ("page_rest %u", (uint) page_rest));
if (rec_len + header_len < page_rest)
DBUG_RETURN(rec_len + header_len);
DBUG_RETURN(page_rest);
}
case TRANSLOG_CHUNK_FIXED:
{
uchar *ptr;
uint type= page[offset] & TRANSLOG_REC_TYPE;
uint length;
int i;
/* 1 (pseudo)fixed record (also LSN) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_FIXED"));
DBUG_ASSERT(log_record_type_descriptor[type].rclass ==
LOGRECTYPE_FIXEDLENGTH ||
log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH);
if (log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH)
{
DBUG_PRINT("info",
("Fixed length: %u",
(uint) (log_record_type_descriptor[type].fixed_length + 3)));
DBUG_RETURN(log_record_type_descriptor[type].fixed_length + 3);
}
ptr= page + offset + 3; /* first compressed LSN */
length= log_record_type_descriptor[type].fixed_length + 3;
for (i= 0; i < log_record_type_descriptor[type].compressed_LSN; i++)
{
/* first 2 bits is length - 2 */
uint len= (((uint8) (*ptr)) >> 6) + 2;
if (ptr[0] == 0 && ((uint8) ptr[1]) == 1)
len+= LSN_STORE_SIZE; /* case of full LSN storing */
ptr+= len;
/* subtract saved bytes */
length-= (LSN_STORE_SIZE - len);
}
DBUG_PRINT("info", ("Pseudo-fixed length: %u", length));
DBUG_RETURN(length);
}
case TRANSLOG_CHUNK_NOHDR:
/* 2 no header chunk (till page end) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_NOHDR length: %u",
(uint) (TRANSLOG_PAGE_SIZE - offset)));
DBUG_RETURN(TRANSLOG_PAGE_SIZE - offset);
case TRANSLOG_CHUNK_LNGTH: /* 3 chunk with chunk length */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH"));
DBUG_ASSERT(TRANSLOG_PAGE_SIZE - offset >= 3);
DBUG_PRINT("info", ("length: %u", uint2korr(page + offset + 1) + 3));
DBUG_RETURN(uint2korr(page + offset + 1) + 3);
default:
DBUG_ASSERT(0);
DBUG_RETURN(0);
}
} | O3 | c | translog_get_total_chunk_length:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %esi, %eax
leaq (%rdi,%rax), %r15
movzbl (%rdi,%rax), %eax
movl %eax, %ecx
shrl $0x6, %ecx
leaq 0x9a1fa(%rip), %rdx # 0xdfe00
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x3(%r15), %rax
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movq %r14, %rdi
callq 0x4a390
movl %eax, %ecx
movq (%r14), %rax
movzwl (%rax), %edx
subl %r15d, %eax
addl $0x2, %eax
testw %dx, %dx
je 0x45cb0
addl %edx, %eax
jmp 0x45c65
movl $0x2000, %eax # imm = 0x2000
subl %ebx, %eax
jmp 0x45c65
movzwl 0x1(%r15), %eax
jmp 0x45c62
andl $0x3f, %eax
leaq (%rax,%rax,8), %rcx
leaq 0x3b6309(%rip), %rdx # 0x3fbf60
cmpl $0x3, (%rdx,%rcx,8)
movzwl 0x4(%rdx,%rcx,8), %eax
jne 0x45c70
addl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq (%rdx,%rcx,8), %rcx
addl $0x3, %eax
movswl 0x20(%rcx), %ecx
testl %ecx, %ecx
jle 0x45c65
addq $0x3, %r15
movzbl (%r15), %esi
movl %esi, %edx
shrl $0x6, %edx
addl $0x2, %edx
testl %esi, %esi
jne 0x45ca0
cmpb $0x1, 0x1(%r15)
leal 0x7(%rdx), %esi
cmovnel %edx, %esi
movl %esi, %edx
movl %edx, %esi
addq %rsi, %r15
addl %edx, %eax
addl $-0x7, %eax
decl %ecx
jne 0x45c83
jmp 0x45c65
movl $0x2000, %edx # imm = 0x2000
subl %ebx, %edx
movzwl %ax, %eax
addl %eax, %ecx
movzwl %dx, %eax
cmpl %eax, %ecx
cmovael %edx, %ecx
movl %ecx, %eax
jmp 0x45c65
| translog_get_total_chunk_length:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov eax, esi
lea r15, [rdi+rax]
movzx eax, byte ptr [rdi+rax]
mov ecx, eax
shr ecx, 6
lea rdx, jpt_45C0D
movsxd rcx, ds:(jpt_45C0D - 0DFE00h)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_45C0F:
lea rax, [r15+3]; jumptable 0000000000045C0D case 0
lea r14, [rbp+var_20]
mov [r14], rax
mov rdi, r14
call translog_variable_record_1group_decode_len
mov ecx, eax
mov rax, [r14]
movzx edx, word ptr [rax]
sub eax, r15d
add eax, 2
test dx, dx
jz short loc_45CB0
add eax, edx
jmp short loc_45C65
loc_45C39:
mov eax, 2000h; jumptable 0000000000045C0D case 2
sub eax, ebx
jmp short loc_45C65
loc_45C42:
movzx eax, word ptr [r15+1]; jumptable 0000000000045C0D case 3
jmp short loc_45C62
loc_45C49:
and eax, 3Fh; jumptable 0000000000045C0D case 1
lea rcx, [rax+rax*8]
lea rdx, log_record_type_descriptor
cmp dword ptr [rdx+rcx*8], 3
movzx eax, word ptr [rdx+rcx*8+4]
jnz short loc_45C70
loc_45C62:
add eax, 3
loc_45C65:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_45C70:
lea rcx, [rdx+rcx*8]
add eax, 3
movsx ecx, word ptr [rcx+20h]
test ecx, ecx
jle short loc_45C65
add r15, 3
loc_45C83:
movzx esi, byte ptr [r15]
mov edx, esi
shr edx, 6
add edx, 2
test esi, esi
jnz short loc_45CA0
cmp byte ptr [r15+1], 1
lea esi, [rdx+7]
cmovnz esi, edx
mov edx, esi
loc_45CA0:
mov esi, edx
add r15, rsi
add eax, edx
add eax, 0FFFFFFF9h
dec ecx
jnz short loc_45C83
jmp short loc_45C65
loc_45CB0:
mov edx, 2000h
sub edx, ebx
movzx eax, ax
add ecx, eax
movzx eax, dx
cmp ecx, eax
cmovnb ecx, edx
mov eax, ecx
jmp short loc_45C65
| long long translog_get_total_chunk_length(long long a1, unsigned int a2)
{
unsigned __int16 *v2; // rax
unsigned __int8 *v3; // r15
int v4; // ecx
int v5; // edx
int v6; // eax
long long result; // rax
int v8; // eax
int v9; // ecx
unsigned __int8 *v10; // r15
unsigned int v11; // edx
int v12; // esi
unsigned int v13; // ecx
unsigned __int16 *v14; // [rsp+0h] [rbp-20h] BYREF
v14 = v2;
v3 = (unsigned __int8 *)(a1 + a2);
switch ( *v3 >> 6 )
{
case 0:
v14 = (unsigned __int16 *)(v3 + 3);
v4 = translog_variable_record_1group_decode_len(&v14);
v5 = *v14;
v6 = (_DWORD)v14 - (_DWORD)v3 + 2;
if ( (_WORD)v5 )
{
result = (unsigned int)(v5 + v6);
}
else
{
v13 = (unsigned __int16)v6 + v4;
if ( v13 >= (unsigned __int16)(0x2000 - a2) )
v13 = 0x2000 - a2;
result = v13;
}
break;
case 1:
v8 = *((unsigned __int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 2);
if ( *((_DWORD *)&log_record_type_descriptor + 18 * (*v3 & 0x3F)) == 3 )
goto LABEL_7;
result = (unsigned int)(v8 + 3);
v9 = *((__int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 16);
if ( v9 > 0 )
{
v10 = v3 + 3;
do
{
v11 = (*v10 >> 6) + 2;
if ( !*v10 )
{
v12 = (*v10 >> 6) + 9;
if ( v10[1] != 1 )
v12 = (*v10 >> 6) + 2;
v11 = v12;
}
v10 += v11;
result = v11 + (unsigned int)result - 7;
--v9;
}
while ( v9 );
}
break;
case 2:
result = 0x2000 - a2;
break;
case 3:
v8 = *(unsigned __int16 *)(v3 + 1);
LABEL_7:
result = (unsigned int)(v8 + 3);
break;
}
return result;
}
| translog_get_total_chunk_length:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV EAX,ESI
LEA R15,[RDI + RAX*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOV ECX,EAX
SHR ECX,0x6
LEA RDX,[0x1dfe00]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
JMP RCX
|
void translog_get_total_chunk_length(long param_1,uint param_2)
{
/* WARNING: Could not recover jumptable at 0x00145c0d. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_001dfe00 +
*(int *)(&DAT_001dfe00 + (ulong)(*(byte *)(param_1 + (ulong)param_2) >> 6) * 4)))();
return;
}
| |
34,540 | google::protobuf::compiler::cpp::MessageSCCAnalyzer::GetSCCAnalysis(google::protobuf::compiler::SCC const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/helpers.cc | MessageAnalysis MessageSCCAnalyzer::GetSCCAnalysis(const SCC* scc) {
if (analysis_cache_.count(scc)) return analysis_cache_[scc];
MessageAnalysis result;
if (UsingImplicitWeakFields(scc->GetFile(), options_)) {
result.contains_weak = true;
}
for (int i = 0; i < scc->descriptors.size(); i++) {
const Descriptor* descriptor = scc->descriptors[i];
if (descriptor->extension_range_count() > 0) {
result.contains_extension = true;
}
for (int j = 0; j < descriptor->field_count(); j++) {
const FieldDescriptor* field = descriptor->field(j);
if (field->is_required()) {
result.contains_required = true;
}
if (field->options().weak()) {
result.contains_weak = true;
}
switch (field->type()) {
case FieldDescriptor::TYPE_STRING:
case FieldDescriptor::TYPE_BYTES: {
if (field->options().ctype() == FieldOptions::CORD) {
result.contains_cord = true;
}
break;
}
case FieldDescriptor::TYPE_GROUP:
case FieldDescriptor::TYPE_MESSAGE: {
const SCC* child = analyzer_.GetSCC(field->message_type());
if (child != scc) {
MessageAnalysis analysis = GetSCCAnalysis(child);
result.contains_cord |= analysis.contains_cord;
result.contains_extension |= analysis.contains_extension;
if (!ShouldIgnoreRequiredFieldCheck(field, options_)) {
result.contains_required |= analysis.contains_required;
}
result.contains_weak |= analysis.contains_weak;
} else {
// This field points back into the same SCC hence the messages
// in the SCC are recursive. Note if SCC contains more than two
// nodes it has to be recursive, however this test also works for
// a single node that is recursive.
result.is_recursive = true;
}
break;
}
default:
break;
}
}
}
// We deliberately only insert the result here. After we contracted the SCC
// in the graph, the graph should be a DAG. Hence we shouldn't need to mark
// nodes visited as we can never return to them. By inserting them here
// we will go in an infinite loop if the SCC is not correct.
return analysis_cache_[scc] = result;
} | O0 | cpp | google::protobuf::compiler::cpp::MessageSCCAnalyzer::GetSCCAnalysis(google::protobuf::compiler::SCC const*):
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq 0x68(%rsp), %rdi
movq %rdi, 0x18(%rsp)
addq $0x148, %rdi # imm = 0x148
leaq 0x60(%rsp), %rsi
callq 0x58e10
cmpq $0x0, %rax
je 0x56307
movq 0x18(%rsp), %rdi
addq $0x148, %rdi # imm = 0x148
leaq 0x60(%rsp), %rsi
callq 0x58e70
movl (%rax), %ecx
movl %ecx, 0x73(%rsp)
movb 0x4(%rax), %al
movb %al, 0x77(%rsp)
jmp 0x56590
leaq 0x5b(%rsp), %rdi
callq 0x58f70
movq 0x60(%rsp), %rdi
callq 0x58f90
movq 0x18(%rsp), %rsi
movq %rax, %rdi
addq $0x68, %rsi
callq 0x560f0
testb $0x1, %al
jne 0x56332
jmp 0x56337
movb $0x1, 0x5f(%rsp)
movl $0x0, 0x54(%rsp)
movslq 0x54(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0x39b20
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x56560
movq 0x60(%rsp), %rdi
movslq 0x54(%rsp), %rsi
callq 0x58fb0
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x3d9e0
cmpl $0x0, %eax
jle 0x5638f
movb $0x1, 0x5d(%rsp)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rdi
callq 0x3ca80
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x5654e
movq 0x48(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x3ca90
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x58d80
testb $0x1, %al
jne 0x563da
jmp 0x563df
movb $0x1, 0x5e(%rsp)
movq 0x38(%rsp), %rdi
callq 0x58b40
movq %rax, %rdi
callq 0x58fd0
testb $0x1, %al
jne 0x563f7
jmp 0x563fc
movb $0x1, 0x5f(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3d920
movl %eax, %ecx
movl %ecx, 0x8(%rsp)
subl $0x9, %eax
je 0x56430
jmp 0x56413
movl 0x8(%rsp), %eax
addl $-0xa, %eax
subl $0x2, %eax
jb 0x56451
jmp 0x56421
movl 0x8(%rsp), %eax
subl $0xc, %eax
jne 0x5653a
jmp 0x56430
movq 0x38(%rsp), %rdi
callq 0x58b40
movq %rax, %rdi
callq 0x58b50
cmpl $0x1, %eax
jne 0x5644c
movb $0x1, 0x5c(%rsp)
jmp 0x5653c
movq 0x38(%rsp), %rdi
callq 0x24cfc0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x58ff0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x56533
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x562b0
movq 0x18(%rsp), %rsi
movl %eax, %ecx
movl %ecx, 0x2b(%rsp)
shrq $0x20, %rax
movb %al, 0x2f(%rsp)
movb 0x2c(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x5c(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x5c(%rsp)
movb 0x2d(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x5d(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x5d(%rsp)
movq 0x38(%rsp), %rdi
addq $0x68, %rsi
callq 0x565c0
testb $0x1, %al
jne 0x56511
movb 0x2e(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x5e(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x5e(%rsp)
movb 0x2f(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
movb 0x5f(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x5f(%rsp)
jmp 0x56538
movb $0x1, 0x5b(%rsp)
jmp 0x5653c
jmp 0x5653c
jmp 0x5653e
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x56397
jmp 0x56550
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x5633f
movq 0x18(%rsp), %rdi
addq $0x148, %rdi # imm = 0x148
leaq 0x60(%rsp), %rsi
callq 0x58e70
movl 0x5b(%rsp), %ecx
movl %ecx, (%rax)
movb 0x5f(%rsp), %cl
movb %cl, 0x4(%rax)
movl (%rax), %ecx
movl %ecx, 0x73(%rsp)
movb 0x4(%rax), %al
movb %al, 0x77(%rsp)
movb 0x77(%rsp), %al
movb %al, 0x24(%rsp)
movl 0x73(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl 0x24(%rsp), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8compiler3cpp18MessageSCCAnalyzer14GetSCCAnalysisEPKNS1_3SCCE:
sub rsp, 78h
mov [rsp+78h+var_10], rdi
mov [rsp+78h+var_18], rsi
mov rdi, [rsp+78h+var_10]
mov [rsp+78h+var_60], rdi
add rdi, 148h
lea rsi, [rsp+78h+var_18]
call _ZNKSt3mapIPKN6google8protobuf8compiler3SCCENS2_3cpp15MessageAnalysisESt4lessIS5_ESaISt4pairIKS5_S7_EEE5countERSB_; std::map<google::protobuf::compiler::SCC const*,google::protobuf::compiler::cpp::MessageAnalysis>::count(google::protobuf::compiler::SCC const* const&)
cmp rax, 0
jz short loc_56307
mov rdi, [rsp+78h+var_60]
add rdi, 148h
lea rsi, [rsp+78h+var_18]
call _ZNSt3mapIPKN6google8protobuf8compiler3SCCENS2_3cpp15MessageAnalysisESt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_; std::map<google::protobuf::compiler::SCC const*,google::protobuf::compiler::cpp::MessageAnalysis>::operator[](google::protobuf::compiler::SCC const* const&)
mov ecx, [rax]
mov [rsp+78h+var_5], ecx
mov al, [rax+4]
mov [rsp+78h+var_1], al
jmp loc_56590
loc_56307:
lea rdi, [rsp+78h+var_1D]; this
call _ZN6google8protobuf8compiler3cpp15MessageAnalysisC2Ev; google::protobuf::compiler::cpp::MessageAnalysis::MessageAnalysis(void)
mov rdi, [rsp+78h+var_18]; this
call _ZNK6google8protobuf8compiler3SCC7GetFileEv; google::protobuf::compiler::SCC::GetFile(void)
mov rsi, [rsp+78h+var_60]
mov rdi, rax; this
add rsi, 68h ; 'h'; google::protobuf::FileDescriptor *
call _ZN6google8protobuf8compiler3cpp23UsingImplicitWeakFieldsEPKNS0_14FileDescriptorERKNS2_7OptionsE; google::protobuf::compiler::cpp::UsingImplicitWeakFields(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::Options const&)
test al, 1
jnz short loc_56332
jmp short loc_56337
loc_56332:
mov [rsp+78h+var_19], 1
loc_56337:
mov [rsp+78h+var_24], 0
loc_5633F:
movsxd rax, [rsp+78h+var_24]
mov [rsp+78h+var_68], rax
mov rdi, [rsp+78h+var_18]
call _ZNKSt6vectorIPKN6google8protobuf10DescriptorESaIS4_EE4sizeEv; std::vector<google::protobuf::Descriptor const*>::size(void)
mov rcx, rax
mov rax, [rsp+78h+var_68]
cmp rax, rcx
jnb loc_56560
mov rdi, [rsp+78h+var_18]
movsxd rsi, [rsp+78h+var_24]
call _ZNKSt6vectorIPKN6google8protobuf10DescriptorESaIS4_EEixEm; std::vector<google::protobuf::Descriptor const*>::operator[](ulong)
mov rax, [rax]
mov [rsp+78h+var_30], rax
mov rdi, [rsp+78h+var_30]; this
call _ZNK6google8protobuf10Descriptor21extension_range_countEv; google::protobuf::Descriptor::extension_range_count(void)
cmp eax, 0
jle short loc_5638F
mov byte ptr [rsp+78h+var_1D+2], 1
loc_5638F:
mov [rsp+78h+var_34], 0
loc_56397:
mov eax, [rsp+78h+var_34]
mov [rsp+78h+var_6C], eax
mov rdi, [rsp+78h+var_30]; this
call _ZNK6google8protobuf10Descriptor11field_countEv; google::protobuf::Descriptor::field_count(void)
mov ecx, eax
mov eax, [rsp+78h+var_6C]
cmp eax, ecx
jge loc_5654E
mov rdi, [rsp+78h+var_30]; this
mov esi, [rsp+78h+var_34]; int
call _ZNK6google8protobuf10Descriptor5fieldEi; google::protobuf::Descriptor::field(int)
mov [rsp+78h+var_40], rax
mov rdi, [rsp+78h+var_40]; this
call _ZNK6google8protobuf15FieldDescriptor11is_requiredEv; google::protobuf::FieldDescriptor::is_required(void)
test al, 1
jnz short loc_563DA
jmp short loc_563DF
loc_563DA:
mov byte ptr [rsp+78h+var_1D+3], 1
loc_563DF:
mov rdi, [rsp+78h+var_40]; this
call _ZNK6google8protobuf15FieldDescriptor7optionsEv; google::protobuf::FieldDescriptor::options(void)
mov rdi, rax; this
call _ZNK6google8protobuf12FieldOptions4weakEv; google::protobuf::FieldOptions::weak(void)
test al, 1
jnz short loc_563F7
jmp short loc_563FC
loc_563F7:
mov [rsp+78h+var_19], 1
loc_563FC:
mov rdi, [rsp+78h+var_40]; this
call _ZNK6google8protobuf15FieldDescriptor4typeEv; google::protobuf::FieldDescriptor::type(void)
mov ecx, eax
mov [rsp+78h+var_70], ecx
sub eax, 9
jz short loc_56430
jmp short $+2
loc_56413:
mov eax, [rsp+78h+var_70]
add eax, 0FFFFFFF6h
sub eax, 2
jb short loc_56451
jmp short $+2
loc_56421:
mov eax, [rsp+78h+var_70]
sub eax, 0Ch
jnz loc_5653A
jmp short $+2
loc_56430:
mov rdi, [rsp+78h+var_40]; this
call _ZNK6google8protobuf15FieldDescriptor7optionsEv; google::protobuf::FieldDescriptor::options(void)
mov rdi, rax; this
call _ZNK6google8protobuf12FieldOptions5ctypeEv; google::protobuf::FieldOptions::ctype(void)
cmp eax, 1
jnz short loc_5644C
mov byte ptr [rsp+78h+var_1D+1], 1
loc_5644C:
jmp loc_5653C
loc_56451:
mov rdi, [rsp+78h+var_40]; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
mov rdi, [rsp+78h+var_60]
mov rsi, rax
call _ZN6google8protobuf8compiler11SCCAnalyzerINS1_3cpp18MessageSCCAnalyzer13DepsGeneratorEE6GetSCCEPKNS0_10DescriptorE; google::protobuf::compiler::SCCAnalyzer<google::protobuf::compiler::cpp::MessageSCCAnalyzer::DepsGenerator>::GetSCC(google::protobuf::Descriptor const*)
mov [rsp+78h+var_48], rax
mov rax, [rsp+78h+var_48]
cmp rax, [rsp+78h+var_18]
jz loc_56533
mov rdi, [rsp+78h+var_60]; this
mov rsi, [rsp+78h+var_48]; google::protobuf::compiler::SCC *
call _ZN6google8protobuf8compiler3cpp18MessageSCCAnalyzer14GetSCCAnalysisEPKNS1_3SCCE; google::protobuf::compiler::cpp::MessageSCCAnalyzer::GetSCCAnalysis(google::protobuf::compiler::SCC const*)
mov rsi, [rsp+78h+var_60]
mov ecx, eax
mov [rsp+78h+var_4D], ecx
shr rax, 20h
mov [rsp+78h+var_49], al
mov al, byte ptr [rsp+78h+var_4D+1]
and al, 1
movzx ecx, al
mov al, byte ptr [rsp+78h+var_1D+1]
and al, 1
movzx eax, al
or eax, ecx
cmp eax, 0
setnz al
and al, 1
mov byte ptr [rsp+78h+var_1D+1], al
mov al, byte ptr [rsp+78h+var_4D+2]
and al, 1
movzx ecx, al
mov al, byte ptr [rsp+78h+var_1D+2]
and al, 1
movzx eax, al
or eax, ecx
cmp eax, 0
setnz al
and al, 1
mov byte ptr [rsp+78h+var_1D+2], al
mov rdi, [rsp+78h+var_40]
add rsi, 68h ; 'h'
call _ZN6google8protobuf8compiler3cppL30ShouldIgnoreRequiredFieldCheckEPKNS0_15FieldDescriptorERKNS2_7OptionsE; google::protobuf::compiler::cpp::ShouldIgnoreRequiredFieldCheck(google::protobuf::FieldDescriptor const*,google::protobuf::compiler::cpp::Options const&)
test al, 1
jnz short loc_56511
mov al, byte ptr [rsp+78h+var_4D+3]
and al, 1
movzx ecx, al
mov al, byte ptr [rsp+78h+var_1D+3]
and al, 1
movzx eax, al
or eax, ecx
cmp eax, 0
setnz al
and al, 1
mov byte ptr [rsp+78h+var_1D+3], al
loc_56511:
mov al, [rsp+78h+var_49]
and al, 1
movzx ecx, al
mov al, [rsp+78h+var_19]
and al, 1
movzx eax, al
or eax, ecx
cmp eax, 0
setnz al
and al, 1
mov [rsp+78h+var_19], al
jmp short loc_56538
loc_56533:
mov byte ptr [rsp+78h+var_1D], 1
loc_56538:
jmp short loc_5653C
loc_5653A:
jmp short $+2
loc_5653C:
jmp short $+2
loc_5653E:
mov eax, [rsp+78h+var_34]
add eax, 1
mov [rsp+78h+var_34], eax
jmp loc_56397
loc_5654E:
jmp short $+2
loc_56550:
mov eax, [rsp+78h+var_24]
add eax, 1
mov [rsp+78h+var_24], eax
jmp loc_5633F
loc_56560:
mov rdi, [rsp+78h+var_60]
add rdi, 148h
lea rsi, [rsp+78h+var_18]
call _ZNSt3mapIPKN6google8protobuf8compiler3SCCENS2_3cpp15MessageAnalysisESt4lessIS5_ESaISt4pairIKS5_S7_EEEixERSB_; std::map<google::protobuf::compiler::SCC const*,google::protobuf::compiler::cpp::MessageAnalysis>::operator[](google::protobuf::compiler::SCC const* const&)
mov ecx, [rsp+78h+var_1D]
mov [rax], ecx
mov cl, [rsp+78h+var_19]
mov [rax+4], cl
mov ecx, [rax]
mov [rsp+78h+var_5], ecx
mov al, [rax+4]
mov [rsp+78h+var_1], al
loc_56590:
mov al, [rsp+78h+var_1]
mov byte ptr [rsp+78h+var_54], al
mov eax, [rsp+78h+var_5]
mov [rsp+78h+var_58], eax
mov eax, [rsp+78h+var_58]
mov ecx, [rsp+78h+var_54]
shl rcx, 20h
or rax, rcx
add rsp, 78h
retn
| unsigned long long google::protobuf::compiler::cpp::MessageSCCAnalyzer::GetSCCAnalysis(
google::protobuf::compiler::cpp::MessageSCCAnalyzer *this,
const google::protobuf::compiler::SCC *a2)
{
long long v2; // rax
google::protobuf::compiler::cpp *File; // rax
const google::protobuf::compiler::cpp::Options *v4; // rdx
google::protobuf::FieldOptions *v5; // rax
google::protobuf::FieldOptions *v6; // rax
long long v7; // rax
long long SCCAnalysis; // rax
const google::protobuf::compiler::cpp::Options *v9; // rdx
long long v10; // rax
int v12; // [rsp+8h] [rbp-70h]
unsigned int v13; // [rsp+24h] [rbp-54h]
char v14; // [rsp+2Eh] [rbp-4Ah]
char v15; // [rsp+2Fh] [rbp-49h]
google::protobuf::compiler::SCC *SCC; // [rsp+30h] [rbp-48h]
google::protobuf::FieldDescriptor *v17; // [rsp+38h] [rbp-40h]
int i; // [rsp+44h] [rbp-34h]
google::protobuf::Descriptor *v19; // [rsp+48h] [rbp-30h]
int v20; // [rsp+54h] [rbp-24h]
int v21; // [rsp+5Bh] [rbp-1Dh] BYREF
bool v22; // [rsp+5Fh] [rbp-19h]
google::protobuf::compiler::SCC *v23[2]; // [rsp+60h] [rbp-18h] BYREF
unsigned int v24; // [rsp+73h] [rbp-5h]
char v25; // [rsp+77h] [rbp-1h]
v23[1] = this;
v23[0] = a2;
if ( !std::map<google::protobuf::compiler::SCC const*,google::protobuf::compiler::cpp::MessageAnalysis>::count(
(char *)this + 328,
v23) )
{
google::protobuf::compiler::cpp::MessageAnalysis::MessageAnalysis((google::protobuf::compiler::cpp::MessageAnalysis *)&v21);
File = (google::protobuf::compiler::cpp *)google::protobuf::compiler::SCC::GetFile(v23[0]);
if ( google::protobuf::compiler::cpp::UsingImplicitWeakFields(
File,
(google::protobuf::compiler::cpp::MessageSCCAnalyzer *)((char *)this + 104),
v4) )
{
v22 = 1;
}
v20 = 0;
LABEL_6:
if ( v20 >= (unsigned long long)std::vector<google::protobuf::Descriptor const*>::size((_QWORD *)v23[0]) )
{
v10 = std::map<google::protobuf::compiler::SCC const*,google::protobuf::compiler::cpp::MessageAnalysis>::operator[](
(char *)this + 328,
v23);
*(_DWORD *)v10 = v21;
*(_BYTE *)(v10 + 4) = v22;
v24 = *(_DWORD *)v10;
v25 = *(_BYTE *)(v10 + 4);
goto LABEL_29;
}
v19 = *(google::protobuf::Descriptor **)std::vector<google::protobuf::Descriptor const*>::operator[](v23[0], v20);
if ( (int)google::protobuf::Descriptor::extension_range_count(v19) > 0 )
BYTE2(v21) = 1;
for ( i = 0; ; ++i )
{
if ( i >= (int)google::protobuf::Descriptor::field_count(v19) )
{
++v20;
goto LABEL_6;
}
v17 = (google::protobuf::FieldDescriptor *)google::protobuf::Descriptor::field(v19, i);
if ( (google::protobuf::FieldDescriptor::is_required(v17) & 1) != 0 )
HIBYTE(v21) = 1;
v5 = (google::protobuf::FieldOptions *)google::protobuf::FieldDescriptor::options(v17);
if ( (google::protobuf::FieldOptions::weak(v5) & 1) != 0 )
v22 = 1;
v12 = google::protobuf::FieldDescriptor::type(v17);
if ( v12 == 9 )
goto LABEL_18;
if ( (unsigned int)(v12 - 10) >= 2 )
break;
v7 = google::protobuf::FieldDescriptor::message_type(v17);
SCC = (google::protobuf::compiler::SCC *)google::protobuf::compiler::SCCAnalyzer<google::protobuf::compiler::cpp::MessageSCCAnalyzer::DepsGenerator>::GetSCC(
this,
v7);
if ( SCC == v23[0] )
{
LOBYTE(v21) = 1;
}
else
{
SCCAnalysis = google::protobuf::compiler::cpp::MessageSCCAnalyzer::GetSCCAnalysis(this, SCC);
v14 = BYTE3(SCCAnalysis);
v15 = BYTE4(SCCAnalysis);
BYTE1(v21) = (BYTE1(SCCAnalysis) & 1 | BYTE1(v21) & 1) != 0;
BYTE2(v21) = (BYTE2(SCCAnalysis) & 1 | BYTE2(v21) & 1) != 0;
if ( (google::protobuf::compiler::cpp::ShouldIgnoreRequiredFieldCheck(
v17,
(google::protobuf::compiler::cpp::MessageSCCAnalyzer *)((char *)this + 104),
v9) & 1) == 0 )
HIBYTE(v21) = (v14 & 1 | HIBYTE(v21) & 1) != 0;
v22 = (v15 & 1 | v22) != 0;
}
LABEL_26:
;
}
if ( v12 != 12 )
goto LABEL_26;
LABEL_18:
v6 = (google::protobuf::FieldOptions *)google::protobuf::FieldDescriptor::options(v17);
if ( (unsigned int)google::protobuf::FieldOptions::ctype(v6) == 1 )
BYTE1(v21) = 1;
goto LABEL_26;
}
v2 = std::map<google::protobuf::compiler::SCC const*,google::protobuf::compiler::cpp::MessageAnalysis>::operator[](
(char *)this + 328,
v23);
v24 = *(_DWORD *)v2;
v25 = *(_BYTE *)(v2 + 4);
LABEL_29:
LOBYTE(v13) = v25;
return ((unsigned long long)v13 << 32) | v24;
}
| GetSCCAnalysis:
SUB RSP,0x78
MOV qword ptr [RSP + 0x68],RDI
MOV qword ptr [RSP + 0x60],RSI
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x18],RDI
ADD RDI,0x148
LEA RSI,[RSP + 0x60]
CALL 0x00158e10
CMP RAX,0x0
JZ 0x00156307
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x148
LEA RSI,[RSP + 0x60]
CALL 0x00158e70
MOV ECX,dword ptr [RAX]
MOV dword ptr [RSP + 0x73],ECX
MOV AL,byte ptr [RAX + 0x4]
MOV byte ptr [RSP + 0x77],AL
JMP 0x00156590
LAB_00156307:
LEA RDI,[RSP + 0x5b]
CALL 0x00158f70
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00158f90
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,RAX
ADD RSI,0x68
CALL 0x001560f0
TEST AL,0x1
JNZ 0x00156332
JMP 0x00156337
LAB_00156332:
MOV byte ptr [RSP + 0x5f],0x1
LAB_00156337:
MOV dword ptr [RSP + 0x54],0x0
LAB_0015633f:
MOVSXD RAX,dword ptr [RSP + 0x54]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00139b20
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,RCX
JNC 0x00156560
MOV RDI,qword ptr [RSP + 0x60]
MOVSXD RSI,dword ptr [RSP + 0x54]
CALL 0x00158fb0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0013d9e0
CMP EAX,0x0
JLE 0x0015638f
MOV byte ptr [RSP + 0x5d],0x1
LAB_0015638f:
MOV dword ptr [RSP + 0x44],0x0
LAB_00156397:
MOV EAX,dword ptr [RSP + 0x44]
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0013ca80
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
JGE 0x0015654e
MOV RDI,qword ptr [RSP + 0x48]
MOV ESI,dword ptr [RSP + 0x44]
CALL 0x0013ca90
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00158d80
TEST AL,0x1
JNZ 0x001563da
JMP 0x001563df
LAB_001563da:
MOV byte ptr [RSP + 0x5e],0x1
LAB_001563df:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00158b40
MOV RDI,RAX
CALL 0x00158fd0
TEST AL,0x1
JNZ 0x001563f7
JMP 0x001563fc
LAB_001563f7:
MOV byte ptr [RSP + 0x5f],0x1
LAB_001563fc:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013d920
MOV ECX,EAX
MOV dword ptr [RSP + 0x8],ECX
SUB EAX,0x9
JZ 0x00156430
JMP 0x00156413
LAB_00156413:
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,-0xa
SUB EAX,0x2
JC 0x00156451
JMP 0x00156421
LAB_00156421:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0xc
JNZ 0x0015653a
JMP 0x00156430
LAB_00156430:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00158b40
MOV RDI,RAX
CALL 0x00158b50
CMP EAX,0x1
JNZ 0x0015644c
MOV byte ptr [RSP + 0x5c],0x1
LAB_0015644c:
JMP 0x0015653c
LAB_00156451:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0034cfc0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
CALL 0x00158ff0
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,qword ptr [RSP + 0x60]
JZ 0x00156533
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x001562b0
MOV RSI,qword ptr [RSP + 0x18]
MOV ECX,EAX
MOV dword ptr [RSP + 0x2b],ECX
SHR RAX,0x20
MOV byte ptr [RSP + 0x2f],AL
MOV AL,byte ptr [RSP + 0x2c]
AND AL,0x1
MOVZX ECX,AL
MOV AL,byte ptr [RSP + 0x5c]
AND AL,0x1
MOVZX EAX,AL
OR EAX,ECX
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x5c],AL
MOV AL,byte ptr [RSP + 0x2d]
AND AL,0x1
MOVZX ECX,AL
MOV AL,byte ptr [RSP + 0x5d]
AND AL,0x1
MOVZX EAX,AL
OR EAX,ECX
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x5d],AL
MOV RDI,qword ptr [RSP + 0x38]
ADD RSI,0x68
CALL 0x001565c0
TEST AL,0x1
JNZ 0x00156511
MOV AL,byte ptr [RSP + 0x2e]
AND AL,0x1
MOVZX ECX,AL
MOV AL,byte ptr [RSP + 0x5e]
AND AL,0x1
MOVZX EAX,AL
OR EAX,ECX
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x5e],AL
LAB_00156511:
MOV AL,byte ptr [RSP + 0x2f]
AND AL,0x1
MOVZX ECX,AL
MOV AL,byte ptr [RSP + 0x5f]
AND AL,0x1
MOVZX EAX,AL
OR EAX,ECX
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x5f],AL
JMP 0x00156538
LAB_00156533:
MOV byte ptr [RSP + 0x5b],0x1
LAB_00156538:
JMP 0x0015653c
LAB_0015653a:
JMP 0x0015653c
LAB_0015653c:
JMP 0x0015653e
LAB_0015653e:
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,0x1
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00156397
LAB_0015654e:
JMP 0x00156550
LAB_00156550:
MOV EAX,dword ptr [RSP + 0x54]
ADD EAX,0x1
MOV dword ptr [RSP + 0x54],EAX
JMP 0x0015633f
LAB_00156560:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x148
LEA RSI,[RSP + 0x60]
CALL 0x00158e70
MOV ECX,dword ptr [RSP + 0x5b]
MOV dword ptr [RAX],ECX
MOV CL,byte ptr [RSP + 0x5f]
MOV byte ptr [RAX + 0x4],CL
MOV ECX,dword ptr [RAX]
MOV dword ptr [RSP + 0x73],ECX
MOV AL,byte ptr [RAX + 0x4]
MOV byte ptr [RSP + 0x77],AL
LAB_00156590:
MOV AL,byte ptr [RSP + 0x77]
MOV byte ptr [RSP + 0x24],AL
MOV EAX,dword ptr [RSP + 0x73]
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x24]
SHL RCX,0x20
OR RAX,RCX
ADD RSP,0x78
RET
|
/* google::protobuf::compiler::cpp::MessageSCCAnalyzer::GetSCCAnalysis(google::protobuf::compiler::SCC
const*) */
int8 __thiscall
google::protobuf::compiler::cpp::MessageSCCAnalyzer::GetSCCAnalysis
(MessageSCCAnalyzer *this,SCC *param_1)
{
Descriptor *this_00;
uint uVar1;
int iVar2;
long lVar3;
uint *puVar4;
FileDescriptor *pFVar5;
ulong uVar6;
int8 *puVar7;
FieldDescriptor *this_01;
FieldOptions *pFVar8;
Descriptor *pDVar9;
SCC *pSVar10;
ulong uVar11;
int4 local_54;
int local_34;
int local_24;
int4 local_1d;
byte local_19;
SCC *local_18;
MessageSCCAnalyzer *local_10;
uint local_5;
int1 local_1;
local_18 = param_1;
local_10 = this;
lVar3 = std::
map<google::protobuf::compiler::SCC_const*,google::protobuf::compiler::cpp::MessageAnalysis,std::less<google::protobuf::compiler::SCC_const*>,std::allocator<std::pair<google::protobuf::compiler::SCC_const*const,google::protobuf::compiler::cpp::MessageAnalysis>>>
::count((map<google::protobuf::compiler::SCC_const*,google::protobuf::compiler::cpp::MessageAnalysis,std::less<google::protobuf::compiler::SCC_const*>,std::allocator<std::pair<google::protobuf::compiler::SCC_const*const,google::protobuf::compiler::cpp::MessageAnalysis>>>
*)(this + 0x148),&local_18);
if (lVar3 == 0) {
MessageAnalysis::MessageAnalysis((MessageAnalysis *)&local_1d);
pFVar5 = (FileDescriptor *)SCC::GetFile(local_18);
uVar6 = UsingImplicitWeakFields(pFVar5,(Options *)(this + 0x68));
if ((uVar6 & 1) != 0) {
local_19 = 1;
}
for (local_24 = 0;
uVar6 = std::
vector<google::protobuf::Descriptor_const*,std::allocator<google::protobuf::Descriptor_const*>>
::size((vector<google::protobuf::Descriptor_const*,std::allocator<google::protobuf::Descriptor_const*>>
*)local_18), (ulong)(long)local_24 < uVar6; local_24 = local_24 + 1) {
puVar7 = (int8 *)
std::
vector<google::protobuf::Descriptor_const*,std::allocator<google::protobuf::Descriptor_const*>>
::operator[]((vector<google::protobuf::Descriptor_const*,std::allocator<google::protobuf::Descriptor_const*>>
*)local_18,(long)local_24);
this_00 = (Descriptor *)*puVar7;
iVar2 = Descriptor::extension_range_count(this_00);
if (0 < iVar2) {
local_1d._0_3_ = CONCAT12(1,(int2)local_1d);
}
for (local_34 = 0; iVar2 = Descriptor::field_count(this_00), local_34 < iVar2;
local_34 = local_34 + 1) {
this_01 = (FieldDescriptor *)Descriptor::field(this_00,local_34);
uVar6 = FieldDescriptor::is_required(this_01);
if ((uVar6 & 1) != 0) {
local_1d = CONCAT13(1,(int3)local_1d);
}
pFVar8 = (FieldOptions *)FieldDescriptor::options(this_01);
uVar6 = FieldOptions::weak(pFVar8);
if ((uVar6 & 1) != 0) {
local_19 = 1;
}
iVar2 = FieldDescriptor::type(this_01);
if (iVar2 == 9) {
LAB_00156430:
pFVar8 = (FieldOptions *)FieldDescriptor::options(this_01);
iVar2 = FieldOptions::ctype(pFVar8);
if (iVar2 == 1) {
local_1d._0_2_ = CONCAT11(1,local_1d._0_1_);
}
}
else if (iVar2 - 10U < 2) {
pDVar9 = (Descriptor *)FieldDescriptor::message_type(this_01);
pSVar10 = (SCC *)SCCAnalyzer<google::protobuf::compiler::cpp::MessageSCCAnalyzer::DepsGenerator>
::GetSCC((SCCAnalyzer<google::protobuf::compiler::cpp::MessageSCCAnalyzer::DepsGenerator>
*)this,pDVar9);
if (pSVar10 == local_18) {
local_1d = CONCAT31(local_1d._1_3_,1);
}
else {
uVar6 = GetSCCAnalysis(this,pSVar10);
uVar1 = local_1d;
local_1d._0_2_ =
CONCAT11((local_1d & 0x100) != 0 || (uVar6 & 0x100) != 0,local_1d._0_1_);
local_1d._3_1_ = SUB41(uVar1,3);
local_1d._0_3_ =
CONCAT12((uVar1 & 0x10000) != 0 || (uVar6 & 0x10000) != 0,(int2)local_1d);
uVar11 = ShouldIgnoreRequiredFieldCheck(this_01,(Options *)(this + 0x68));
if ((uVar11 & 1) == 0) {
local_1d = CONCAT13((local_1d & 0x1000000) != 0 || (uVar6 & 0x1000000) != 0,
(int3)local_1d);
}
local_19 = (local_19 & 1) != 0 || (uVar6 & 0x100000000) != 0;
}
}
else if (iVar2 == 0xc) goto LAB_00156430;
}
}
puVar4 = (uint *)std::
map<google::protobuf::compiler::SCC_const*,google::protobuf::compiler::cpp::MessageAnalysis,std::less<google::protobuf::compiler::SCC_const*>,std::allocator<std::pair<google::protobuf::compiler::SCC_const*const,google::protobuf::compiler::cpp::MessageAnalysis>>>
::operator[]((map<google::protobuf::compiler::SCC_const*,google::protobuf::compiler::cpp::MessageAnalysis,std::less<google::protobuf::compiler::SCC_const*>,std::allocator<std::pair<google::protobuf::compiler::SCC_const*const,google::protobuf::compiler::cpp::MessageAnalysis>>>
*)(this + 0x148),&local_18);
*puVar4 = local_1d;
*(byte *)(puVar4 + 1) = local_19;
local_5 = *puVar4;
local_1 = (int1)puVar4[1];
}
else {
puVar4 = (uint *)std::
map<google::protobuf::compiler::SCC_const*,google::protobuf::compiler::cpp::MessageAnalysis,std::less<google::protobuf::compiler::SCC_const*>,std::allocator<std::pair<google::protobuf::compiler::SCC_const*const,google::protobuf::compiler::cpp::MessageAnalysis>>>
::operator[]((map<google::protobuf::compiler::SCC_const*,google::protobuf::compiler::cpp::MessageAnalysis,std::less<google::protobuf::compiler::SCC_const*>,std::allocator<std::pair<google::protobuf::compiler::SCC_const*const,google::protobuf::compiler::cpp::MessageAnalysis>>>
*)(this + 0x148),&local_18);
local_5 = *puVar4;
local_1 = (int1)puVar4[1];
}
local_54 = CONCAT31(local_54._1_3_,local_1);
return CONCAT44(local_54,local_5);
}
| |
34,541 | time_normalizer::to_pico(unsigned long long, unsigned long long, unsigned long long*, unsigned long long*, unsigned long long*) | eloqsql/storage/perfschema/pfs_timer.cc | void time_normalizer::to_pico(ulonglong start, ulonglong end,
ulonglong *pico_start, ulonglong *pico_end, ulonglong *pico_wait)
{
if (start == 0)
{
*pico_start= 0;
*pico_end= 0;
*pico_wait= 0;
}
else
{
*pico_start= (start - m_v0) * m_factor;
if (end == 0)
{
*pico_end= 0;
*pico_wait= 0;
}
else
{
*pico_end= (end - m_v0) * m_factor;
*pico_wait= (end - start) * m_factor;
}
}
} | O0 | cpp | time_normalizer::to_pico(unsigned long long, unsigned long long, unsigned long long*, unsigned long long*, unsigned long long*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x34a7e
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
jmp 0x34ae1
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
subq (%rax), %rcx
imulq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x18(%rbp)
jne 0x34ab4
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
jmp 0x34adf
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rdx
subq (%rax), %rdx
imulq 0x8(%rax), %rdx
movq -0x28(%rbp), %rcx
movq %rdx, (%rcx)
movq -0x18(%rbp), %rcx
subq -0x10(%rbp), %rcx
imulq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x34ae1
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN15time_normalizer7to_picoEyyPyS0_S0_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
cmp [rbp+var_10], 0
jnz short loc_34A7E
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
jmp short loc_34AE1
loc_34A7E:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
sub rcx, [rax]
imul rcx, [rax+8]
mov rax, [rbp+var_20]
mov [rax], rcx
cmp [rbp+var_18], 0
jnz short loc_34AB4
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
jmp short loc_34ADF
loc_34AB4:
mov rax, [rbp+var_38]
mov rdx, [rbp+var_18]
sub rdx, [rax]
imul rdx, [rax+8]
mov rcx, [rbp+var_28]
mov [rcx], rdx
mov rcx, [rbp+var_18]
sub rcx, [rbp+var_10]
imul rcx, [rax+8]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_34ADF:
jmp short $+2
loc_34AE1:
pop rbp
retn
| unsigned long long * time_normalizer::to_pico(
time_normalizer *this,
long long a2,
long long a3,
unsigned long long *a4,
unsigned long long *a5,
unsigned long long *a6)
{
unsigned long long *result; // rax
if ( a2 )
{
*a4 = *((_QWORD *)this + 1) * (a2 - *(_QWORD *)this);
if ( a3 )
{
*a5 = *((_QWORD *)this + 1) * (a3 - *(_QWORD *)this);
result = a6;
*a6 = *((_QWORD *)this + 1) * (a3 - a2);
}
else
{
*a5 = 0LL;
result = a6;
*a6 = 0LL;
}
}
else
{
*a4 = 0LL;
*a5 = 0LL;
result = a6;
*a6 = 0LL;
}
return result;
}
| to_pico:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00134a7e
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
JMP 0x00134ae1
LAB_00134a7e:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,qword ptr [RAX]
IMUL RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00134ab4
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
JMP 0x00134adf
LAB_00134ab4:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr [RAX]
IMUL RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX],RDX
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00134adf:
JMP 0x00134ae1
LAB_00134ae1:
POP RBP
RET
|
/* time_normalizer::to_pico(unsigned long long, unsigned long long, unsigned long long*, unsigned
long long*, unsigned long long*) */
void __thiscall
time_normalizer::to_pico
(time_normalizer *this,ulonglong param_1,ulonglong param_2,ulonglong *param_3,
ulonglong *param_4,ulonglong *param_5)
{
if (param_1 == 0) {
*param_3 = 0;
*param_4 = 0;
*param_5 = 0;
}
else {
*param_3 = (param_1 - *(long *)this) * *(long *)(this + 8);
if (param_2 == 0) {
*param_4 = 0;
*param_5 = 0;
}
else {
*param_4 = (param_2 - *(long *)this) * *(long *)(this + 8);
*param_5 = (param_2 - param_1) * *(long *)(this + 8);
}
}
return;
}
| |
34,542 | ma_tls_set_certs | eloqsql/libmariadb/libmariadb/secure/openssl.c | static int ma_tls_set_certs(MYSQL *mysql, SSL_CTX *ctx)
{
char *certfile= mysql->options.ssl_cert,
*keyfile= mysql->options.ssl_key;
char *pw= (mysql->options.extension) ?
mysql->options.extension->tls_pw : NULL;
/* add cipher */
if ((mysql->options.ssl_cipher &&
mysql->options.ssl_cipher[0] != 0))
{
if(
#ifdef TLS1_3_VERSION
SSL_CTX_set_ciphersuites(ctx, mysql->options.ssl_cipher) == 0 &&
#endif
SSL_CTX_set_cipher_list(ctx, mysql->options.ssl_cipher) == 0)
goto error;
}
/* ca_file and ca_path */
if (!SSL_CTX_load_verify_locations(ctx,
mysql->options.ssl_ca,
mysql->options.ssl_capath))
{
if (mysql->options.ssl_ca || mysql->options.ssl_capath)
goto error;
if (SSL_CTX_set_default_verify_paths(ctx) == 0)
goto error;
}
if (mysql->options.extension &&
(mysql->options.extension->ssl_crl || mysql->options.extension->ssl_crlpath))
{
X509_STORE *certstore;
if ((certstore= SSL_CTX_get_cert_store(ctx)))
{
if (X509_STORE_load_locations(certstore, mysql->options.extension->ssl_crl,
mysql->options.extension->ssl_crlpath) == 0)
goto error;
if (X509_STORE_set_flags(certstore, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL) == 0)
goto error;
}
}
if (keyfile && !certfile)
certfile= keyfile;
if (certfile && !keyfile)
keyfile= certfile;
/* set cert */
if (certfile && certfile[0] != 0)
{
if (SSL_CTX_use_certificate_chain_file(ctx, certfile) != 1)
{
goto error;
}
}
if (keyfile && keyfile[0])
{
FILE *fp;
if ((fp= fopen(keyfile, "rb")))
{
EVP_PKEY *key= EVP_PKEY_new();
PEM_read_PrivateKey(fp, &key, NULL, pw);
fclose(fp);
if (SSL_CTX_use_PrivateKey(ctx, key) != 1)
{
unsigned long err= ERR_peek_error();
EVP_PKEY_free(key);
if (!(ERR_GET_LIB(err) == ERR_LIB_X509 &&
ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE))
goto error;
}
EVP_PKEY_free(key);
} else {
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
CER(CR_FILE_NOT_FOUND), keyfile);
return 1;
}
}
/* verify key */
if (certfile && SSL_CTX_check_private_key(ctx) != 1)
goto error;
SSL_CTX_set_verify(ctx, (mysql->options.ssl_ca || mysql->options.ssl_capath) ?
SSL_VERIFY_PEER : SSL_VERIFY_NONE, NULL);
return 0;
error:
ma_tls_set_error(mysql);
return 1;
} | O0 | c | ma_tls_set_certs:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x408(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x400(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x378f4
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x378fc
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x378fc
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x420(%rax)
je 0x3795e
movq -0x10(%rbp), %rax
movq 0x420(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3795e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x420(%rax), %rsi
callq 0x13500
cmpl $0x0, %eax
jne 0x3795c
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x420(%rax), %rsi
callq 0x13400
cmpl $0x0, %eax
jne 0x3795c
jmp 0x37bf2
jmp 0x3795e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x410(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x418(%rax), %rdx
callq 0x13550
cmpl $0x0, %eax
jne 0x379b8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x410(%rax)
jne 0x3799e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x418(%rax)
je 0x379a3
jmp 0x37bf2
movq -0x18(%rbp), %rdi
callq 0x134a0
cmpl $0x0, %eax
jne 0x379b6
jmp 0x37bf2
jmp 0x379b8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x37a4e
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x379ee
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x37a4e
movq -0x18(%rbp), %rdi
callq 0x137d0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x37a4c
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x18(%rax), %rdx
callq 0x13800
cmpl $0x0, %eax
jne 0x37a32
jmp 0x37bf2
movq -0x38(%rbp), %rdi
movl $0xc, %esi
callq 0x132f0
cmpl $0x0, %eax
jne 0x37a4a
jmp 0x37bf2
jmp 0x37a4c
jmp 0x37a4e
cmpq $0x0, -0x28(%rbp)
je 0x37a64
cmpq $0x0, -0x20(%rbp)
jne 0x37a64
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x37a7a
cmpq $0x0, -0x28(%rbp)
jne 0x37a7a
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x37aa6
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x37aa6
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x13350
cmpl $0x1, %eax
je 0x37aa4
jmp 0x37bf2
jmp 0x37aa6
cmpq $0x0, -0x28(%rbp)
je 0x37b88
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x37b88
movq -0x28(%rbp), %rdi
leaq 0x15515(%rip), %rsi # 0x4cfe1
callq 0x134d0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x37b54
callq 0x13740
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x132e0
movq -0x40(%rbp), %rdi
callq 0x13420
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x13380
cmpl $0x1, %eax
je 0x37b49
callq 0x130c0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x132b0
movq -0x50(%rbp), %rdi
callq 0x38720
cmpl $0xb, %eax
jne 0x37b42
movq -0x50(%rbp), %rdi
callq 0x38760
cmpl $0x65, %eax
je 0x37b47
jmp 0x37bf2
jmp 0x37b49
movq -0x48(%rbp), %rdi
callq 0x132b0
jmp 0x37b86
movq -0x10(%rbp), %rdi
leaq 0x29381(%rip), %rax # 0x60ee0
movq (%rax), %rdx
leaq 0x29587(%rip), %rax # 0x610f0
movq 0x20(%rax), %rcx
movq -0x28(%rbp), %r8
movl $0x7ea, %esi # imm = 0x7EA
movb $0x0, %al
callq 0x16c80
movl $0x1, -0x4(%rbp)
jmp 0x37c02
jmp 0x37b88
cmpq $0x0, -0x20(%rbp)
je 0x37b9f
movq -0x18(%rbp), %rdi
callq 0x13710
cmpl $0x1, %eax
je 0x37b9f
jmp 0x37bf2
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0x410(%rcx)
movb %al, -0x59(%rbp)
jne 0x37bcc
movq -0x10(%rbp), %rax
cmpq $0x0, 0x418(%rax)
setne %al
movb %al, -0x59(%rbp)
movq -0x68(%rbp), %rdi
movb -0x59(%rbp), %cl
xorl %esi, %esi
movl $0x1, %eax
testb $0x1, %cl
cmovnel %eax, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x13120
movl $0x0, -0x4(%rbp)
jmp 0x37c02
movq -0x10(%rbp), %rdi
callq 0x37e50
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ma_tls_set_certs:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+408h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+400h]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_378F4
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+0A0h]
mov [rbp+var_58], rax
jmp short loc_378FC
loc_378F4:
xor eax, eax
mov [rbp+var_58], rax
jmp short $+2
loc_378FC:
mov rax, [rbp+var_58]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+420h], 0
jz short loc_3795E
mov rax, [rbp+var_10]
mov rax, [rax+420h]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_3795E
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+420h]
call _SSL_CTX_set_ciphersuites
cmp eax, 0
jnz short loc_3795C
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+420h]
call _SSL_CTX_set_cipher_list
cmp eax, 0
jnz short loc_3795C
jmp loc_37BF2
loc_3795C:
jmp short $+2
loc_3795E:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+410h]
mov rax, [rbp+var_10]
mov rdx, [rax+418h]
call _SSL_CTX_load_verify_locations
cmp eax, 0
jnz short loc_379B8
mov rax, [rbp+var_10]
cmp qword ptr [rax+410h], 0
jnz short loc_3799E
mov rax, [rbp+var_10]
cmp qword ptr [rax+418h], 0
jz short loc_379A3
loc_3799E:
jmp loc_37BF2
loc_379A3:
mov rdi, [rbp+var_18]
call _SSL_CTX_set_default_verify_paths
cmp eax, 0
jnz short loc_379B6
jmp loc_37BF2
loc_379B6:
jmp short $+2
loc_379B8:
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz loc_37A4E
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+10h], 0
jnz short loc_379EE
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+18h], 0
jz short loc_37A4E
loc_379EE:
mov rdi, [rbp+var_18]
call _SSL_CTX_get_cert_store
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_37A4C
mov rdi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rdx, [rax+18h]
call _X509_STORE_load_locations
cmp eax, 0
jnz short loc_37A32
jmp loc_37BF2
loc_37A32:
mov rdi, [rbp+var_38]
mov esi, 0Ch
call _X509_STORE_set_flags
cmp eax, 0
jnz short loc_37A4A
jmp loc_37BF2
loc_37A4A:
jmp short $+2
loc_37A4C:
jmp short $+2
loc_37A4E:
cmp [rbp+var_28], 0
jz short loc_37A64
cmp [rbp+var_20], 0
jnz short loc_37A64
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
loc_37A64:
cmp [rbp+var_20], 0
jz short loc_37A7A
cmp [rbp+var_28], 0
jnz short loc_37A7A
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_37A7A:
cmp [rbp+var_20], 0
jz short loc_37AA6
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_37AA6
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _SSL_CTX_use_certificate_chain_file
cmp eax, 1
jz short loc_37AA4
jmp loc_37BF2
loc_37AA4:
jmp short $+2
loc_37AA6:
cmp [rbp+var_28], 0
jz loc_37B88
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_37B88
mov rdi, [rbp+var_28]
lea rsi, aRb; "rb"
call _fopen64
mov [rbp+var_40], rax
cmp rax, 0
jz short loc_37B54
call _EVP_PKEY_new
mov [rbp+var_48], rax
mov rdi, [rbp+var_40]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
xor eax, eax
mov edx, eax
call _PEM_read_PrivateKey
mov rdi, [rbp+var_40]
call _fclose
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_48]
call _SSL_CTX_use_PrivateKey
cmp eax, 1
jz short loc_37B49
call _ERR_peek_error
mov [rbp+var_50], rax
mov rdi, [rbp+var_48]
call _EVP_PKEY_free
mov rdi, [rbp+var_50]
call ERR_GET_LIB
cmp eax, 0Bh
jnz short loc_37B42
mov rdi, [rbp+var_50]
call ERR_GET_REASON
cmp eax, 65h ; 'e'
jz short loc_37B47
loc_37B42:
jmp loc_37BF2
loc_37B47:
jmp short $+2
loc_37B49:
mov rdi, [rbp+var_48]
call _EVP_PKEY_free
jmp short loc_37B86
loc_37B54:
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, mariadb_client_errors
mov rcx, [rax+20h]
mov r8, [rbp+var_28]
mov esi, 7EAh
mov al, 0
call my_set_error
mov [rbp+var_4], 1
jmp short loc_37C02
loc_37B86:
jmp short $+2
loc_37B88:
cmp [rbp+var_20], 0
jz short loc_37B9F
mov rdi, [rbp+var_18]
call _SSL_CTX_check_private_key
cmp eax, 1
jz short loc_37B9F
jmp short loc_37BF2
loc_37B9F:
mov rax, [rbp+var_18]
mov [rbp+var_68], rax
mov rcx, [rbp+var_10]
mov al, 1
cmp qword ptr [rcx+410h], 0
mov [rbp+var_59], al
jnz short loc_37BCC
mov rax, [rbp+var_10]
cmp qword ptr [rax+418h], 0
setnz al
mov [rbp+var_59], al
loc_37BCC:
mov rdi, [rbp+var_68]
mov cl, [rbp+var_59]
xor esi, esi
mov eax, 1
test cl, 1
cmovnz esi, eax
xor eax, eax
mov edx, eax
call _SSL_CTX_set_verify
mov [rbp+var_4], 0
jmp short loc_37C02
loc_37BF2:
mov rdi, [rbp+var_10]
call ma_tls_set_error
mov [rbp+var_4], 1
loc_37C02:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long ma_tls_set_certs(_QWORD *a1, long long a2)
{
bool v3; // [rsp+17h] [rbp-59h]
long long v4; // [rsp+18h] [rbp-58h]
long long v5; // [rsp+20h] [rbp-50h]
long long v6; // [rsp+28h] [rbp-48h] BYREF
long long v7; // [rsp+30h] [rbp-40h]
long long cert_store; // [rsp+38h] [rbp-38h]
long long v9; // [rsp+40h] [rbp-30h]
_BYTE *v10; // [rsp+48h] [rbp-28h]
_BYTE *v11; // [rsp+50h] [rbp-20h]
long long v12; // [rsp+58h] [rbp-18h]
_QWORD *v13; // [rsp+60h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = (_BYTE *)a1[129];
v10 = (_BYTE *)a1[128];
if ( a1[144] )
v4 = *(_QWORD *)(v13[144] + 160LL);
else
v4 = 0LL;
v9 = v4;
if ( v13[132]
&& *(_BYTE *)v13[132]
&& !(unsigned int)SSL_CTX_set_ciphersuites(v12, v13[132])
&& !(unsigned int)SSL_CTX_set_cipher_list(v12, v13[132]) )
{
goto LABEL_42;
}
if ( !(unsigned int)SSL_CTX_load_verify_locations(v12, v13[130], v13[131])
&& (v13[130] || v13[131] || !(unsigned int)SSL_CTX_set_default_verify_paths(v12)) )
{
goto LABEL_42;
}
if ( v13[144] && (*(_QWORD *)(v13[144] + 16LL) || *(_QWORD *)(v13[144] + 24LL)) )
{
cert_store = SSL_CTX_get_cert_store(v12);
if ( cert_store )
{
if ( !(unsigned int)X509_STORE_load_locations(
cert_store,
*(_QWORD *)(v13[144] + 16LL),
*(_QWORD *)(v13[144] + 24LL))
|| !(unsigned int)X509_STORE_set_flags(cert_store, 12LL) )
{
goto LABEL_42;
}
}
}
if ( v10 && !v11 )
v11 = v10;
if ( v11 && !v10 )
v10 = v11;
if ( v11 && *v11 && (unsigned int)SSL_CTX_use_certificate_chain_file(v12, v11) != 1 )
goto LABEL_42;
if ( v10 && *v10 )
{
v7 = fopen64(v10, "rb");
if ( !v7 )
{
my_set_error((long long)v13, 0x7EAu, (long long)SQLSTATE_UNKNOWN, (long long)mariadb_client_errors[4], v10);
return 1;
}
v6 = EVP_PKEY_new();
PEM_read_PrivateKey(v7, &v6, 0LL, v9);
fclose(v7);
if ( (unsigned int)SSL_CTX_use_PrivateKey(v12, v6) != 1 )
{
v5 = ERR_peek_error();
EVP_PKEY_free(v6);
if ( (unsigned int)ERR_GET_LIB(v5) != 11 || (unsigned int)ERR_GET_REASON(v5) != 101 )
goto LABEL_42;
}
EVP_PKEY_free(v6);
}
if ( v11 && (unsigned int)SSL_CTX_check_private_key(v12) != 1 )
{
LABEL_42:
ma_tls_set_error(v13);
return 1;
}
v3 = 1;
if ( !v13[130] )
v3 = v13[131] != 0LL;
SSL_CTX_set_verify(v12, v3, 0LL);
return 0;
}
| ma_tls_set_certs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x408]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x400]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x001378f4
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001378fc
LAB_001378f4:
XOR EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001378fc
LAB_001378fc:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x420],0x0
JZ 0x0013795e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x420]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0013795e
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x420]
CALL 0x00113500
CMP EAX,0x0
JNZ 0x0013795c
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x420]
CALL 0x00113400
CMP EAX,0x0
JNZ 0x0013795c
JMP 0x00137bf2
LAB_0013795c:
JMP 0x0013795e
LAB_0013795e:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x410]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x418]
CALL 0x00113550
CMP EAX,0x0
JNZ 0x001379b8
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x410],0x0
JNZ 0x0013799e
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x418],0x0
JZ 0x001379a3
LAB_0013799e:
JMP 0x00137bf2
LAB_001379a3:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001134a0
CMP EAX,0x0
JNZ 0x001379b6
JMP 0x00137bf2
LAB_001379b6:
JMP 0x001379b8
LAB_001379b8:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00137a4e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x001379ee
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00137a4e
LAB_001379ee:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001137d0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x00137a4c
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00113800
CMP EAX,0x0
JNZ 0x00137a32
JMP 0x00137bf2
LAB_00137a32:
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,0xc
CALL 0x001132f0
CMP EAX,0x0
JNZ 0x00137a4a
JMP 0x00137bf2
LAB_00137a4a:
JMP 0x00137a4c
LAB_00137a4c:
JMP 0x00137a4e
LAB_00137a4e:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00137a64
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00137a64
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_00137a64:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00137a7a
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00137a7a
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_00137a7a:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00137aa6
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00137aa6
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00113350
CMP EAX,0x1
JZ 0x00137aa4
JMP 0x00137bf2
LAB_00137aa4:
JMP 0x00137aa6
LAB_00137aa6:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00137b88
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00137b88
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[0x14cfe1]
CALL 0x001134d0
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JZ 0x00137b54
CALL 0x00113740
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001132e0
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00113420
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x00113380
CMP EAX,0x1
JZ 0x00137b49
CALL 0x001130c0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001132b0
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00138720
CMP EAX,0xb
JNZ 0x00137b42
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00138760
CMP EAX,0x65
JZ 0x00137b47
LAB_00137b42:
JMP 0x00137bf2
LAB_00137b47:
JMP 0x00137b49
LAB_00137b49:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001132b0
JMP 0x00137b86
LAB_00137b54:
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x160ee0]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x1610f0]
MOV RCX,qword ptr [RAX + 0x20]
MOV R8,qword ptr [RBP + -0x28]
MOV ESI,0x7ea
MOV AL,0x0
CALL 0x00116c80
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00137c02
LAB_00137b86:
JMP 0x00137b88
LAB_00137b88:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00137b9f
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00113710
CMP EAX,0x1
JZ 0x00137b9f
JMP 0x00137bf2
LAB_00137b9f:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x68],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV AL,0x1
CMP qword ptr [RCX + 0x410],0x0
MOV byte ptr [RBP + -0x59],AL
JNZ 0x00137bcc
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x418],0x0
SETNZ AL
MOV byte ptr [RBP + -0x59],AL
LAB_00137bcc:
MOV RDI,qword ptr [RBP + -0x68]
MOV CL,byte ptr [RBP + -0x59]
XOR ESI,ESI
MOV EAX,0x1
TEST CL,0x1
CMOVNZ ESI,EAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00113120
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00137c02
LAB_00137bf2:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00137e50
MOV dword ptr [RBP + -0x4],0x1
LAB_00137c02:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int4 ma_tls_set_certs(long param_1,SSL_CTX *param_2)
{
int iVar1;
ulong uVar2;
bool bVar3;
void *local_60;
EVP_PKEY *local_50;
FILE *local_48;
X509_STORE *local_40;
void *local_38;
char *local_30;
char *local_28;
SSL_CTX *local_20;
long local_18;
local_28 = *(char **)(param_1 + 0x408);
local_30 = *(char **)(param_1 + 0x400);
if (*(long *)(param_1 + 0x480) == 0) {
local_60 = (void *)0x0;
}
else {
local_60 = *(void **)(*(long *)(param_1 + 0x480) + 0xa0);
}
local_38 = local_60;
local_20 = param_2;
local_18 = param_1;
if ((((((*(long *)(param_1 + 0x420) == 0) || (**(char **)(param_1 + 0x420) == '\0')) ||
(iVar1 = SSL_CTX_set_ciphersuites(param_2,*(int8 *)(param_1 + 0x420)), iVar1 != 0)) ||
(iVar1 = SSL_CTX_set_cipher_list(local_20,*(char **)(local_18 + 0x420)), iVar1 != 0)) &&
((iVar1 = SSL_CTX_load_verify_locations
(local_20,*(char **)(local_18 + 0x410),*(char **)(local_18 + 0x418)),
iVar1 != 0 ||
(((*(long *)(local_18 + 0x410) == 0 && (*(long *)(local_18 + 0x418) == 0)) &&
(iVar1 = SSL_CTX_set_default_verify_paths(local_20), iVar1 != 0)))))) &&
((((*(long *)(local_18 + 0x480) == 0 ||
((*(long *)(*(long *)(local_18 + 0x480) + 0x10) == 0 &&
(*(long *)(*(long *)(local_18 + 0x480) + 0x18) == 0)))) ||
(local_40 = SSL_CTX_get_cert_store(local_20), local_40 == (X509_STORE *)0x0)) ||
((iVar1 = X509_STORE_load_locations
(local_40,*(char **)(*(long *)(local_18 + 0x480) + 0x10),
*(char **)(*(long *)(local_18 + 0x480) + 0x18)), iVar1 != 0 &&
(iVar1 = X509_STORE_set_flags(local_40,0xc), iVar1 != 0)))))) {
if ((local_30 != (char *)0x0) && (local_28 == (char *)0x0)) {
local_28 = local_30;
}
if ((local_28 != (char *)0x0) && (local_30 == (char *)0x0)) {
local_30 = local_28;
}
if (((local_28 == (char *)0x0) || (*local_28 == '\0')) ||
(iVar1 = SSL_CTX_use_certificate_chain_file(local_20,local_28), iVar1 == 1)) {
if ((local_30 != (char *)0x0) && (*local_30 != '\0')) {
local_48 = fopen64(local_30,"rb");
if (local_48 == (FILE *)0x0) {
my_set_error(local_18,0x7ea,SQLSTATE_UNKNOWN,mariadb_client_errors._32_8_,local_30);
return 1;
}
local_50 = EVP_PKEY_new();
PEM_read_PrivateKey(local_48,&local_50,(int1 *)0x0,local_38);
fclose(local_48);
iVar1 = SSL_CTX_use_PrivateKey(local_20,local_50);
if (iVar1 != 1) {
uVar2 = ERR_peek_error();
EVP_PKEY_free(local_50);
iVar1 = ERR_GET_LIB(uVar2);
if ((iVar1 != 0xb) || (iVar1 = ERR_GET_REASON(uVar2), iVar1 != 0x65)) goto LAB_00137bf2;
}
EVP_PKEY_free(local_50);
}
if ((local_28 == (char *)0x0) || (iVar1 = SSL_CTX_check_private_key(local_20), iVar1 == 1)) {
bVar3 = true;
if (*(long *)(local_18 + 0x410) == 0) {
bVar3 = *(long *)(local_18 + 0x418) != 0;
}
SSL_CTX_set_verify(local_20,(uint)bVar3,(callback *)0x0);
return 0;
}
}
}
LAB_00137bf2:
ma_tls_set_error(local_18);
return 1;
}
| |
34,543 | js_os_realpath | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_realpath(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
char buf[PATH_MAX], *res;
int err;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
res = realpath(path, buf);
JS_FreeCString(ctx, path);
if (!res) {
buf[0] = '\0';
err = errno;
} else {
err = 0;
}
return make_string_error(ctx, buf, err);
} | O0 | c | js_os_realpath:
subq $0x1058, %rsp # imm = 0x1058
movq %rsi, 0x1038(%rsp)
movq %rdx, 0x1040(%rsp)
movq %rdi, 0x1030(%rsp)
movl %ecx, 0x102c(%rsp)
movq %r8, 0x1020(%rsp)
movq 0x1030(%rsp), %rdi
movq 0x1020(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x1aad0
movq %rax, 0x1018(%rsp)
cmpq $0x0, 0x1018(%rsp)
jne 0x21776
movl $0x0, 0x1048(%rsp)
movq $0x6, 0x1050(%rsp)
jmp 0x217ea
movq 0x1018(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe600
movq %rax, 0x8(%rsp)
movq 0x1030(%rsp), %rdi
movq 0x1018(%rsp), %rsi
callq 0x30140
cmpq $0x0, 0x8(%rsp)
jne 0x217bc
movb $0x0, 0x10(%rsp)
callq 0xe0b0
movl (%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x217c4
movl $0x0, 0x4(%rsp)
movq 0x1030(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl 0x4(%rsp), %edx
callq 0x231e0
movq %rax, 0x1048(%rsp)
movq %rdx, 0x1050(%rsp)
movq 0x1048(%rsp), %rax
movq 0x1050(%rsp), %rdx
addq $0x1058, %rsp # imm = 0x1058
retq
nopw %cs:(%rax,%rax)
| js_os_realpath:
sub rsp, 1058h
mov [rsp+1058h+var_20], rsi
mov [rsp+1058h+var_18], rdx
mov [rsp+1058h+var_28], rdi
mov [rsp+1058h+var_2C], ecx
mov [rsp+1058h+var_38], r8
mov rdi, [rsp+1058h+var_28]
mov rax, [rsp+1058h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString_0
mov [rsp+1058h+var_40], rax
cmp [rsp+1058h+var_40], 0
jnz short loc_21776
mov dword ptr [rsp+1058h+var_10], 0
mov [rsp+1058h+var_8], 6
jmp short loc_217EA
loc_21776:
mov rdi, [rsp+1058h+var_40]
lea rsi, [rsp+1058h+var_1048]
call _realpath
mov [rsp+1058h+var_1050], rax
mov rdi, [rsp+1058h+var_28]
mov rsi, [rsp+1058h+var_40]
call JS_FreeCString
cmp [rsp+1058h+var_1050], 0
jnz short loc_217BC
mov [rsp+1058h+var_1048], 0
call ___errno_location
mov eax, [rax]
mov [rsp+1058h+var_1054], eax
jmp short loc_217C4
loc_217BC:
mov [rsp+1058h+var_1054], 0
loc_217C4:
mov rdi, [rsp+1058h+var_28]
lea rsi, [rsp+1058h+var_1048]
mov edx, [rsp+1058h+var_1054]
call make_string_error
mov [rsp+1058h+var_10], rax
mov [rsp+1058h+var_8], rdx
loc_217EA:
mov rax, [rsp+1058h+var_10]
mov rdx, [rsp+1058h+var_8]
add rsp, 1058h
retn
| long long js_os_realpath(long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6)
{
long long v6; // rdx
long long v8; // [rsp+4h] [rbp-1054h]
long long v9; // [rsp+8h] [rbp-1050h]
_BYTE v10[4104]; // [rsp+10h] [rbp-1048h] BYREF
long long v11; // [rsp+1018h] [rbp-40h]
long long *v12; // [rsp+1020h] [rbp-38h]
int v13; // [rsp+102Ch] [rbp-2Ch]
long long v14; // [rsp+1030h] [rbp-28h]
long long v15; // [rsp+1038h] [rbp-20h]
long long v16; // [rsp+1040h] [rbp-18h]
long long string_error; // [rsp+1048h] [rbp-10h]
long long v18; // [rsp+1050h] [rbp-8h]
v15 = a2;
v16 = a3;
v14 = a1;
v13 = a4;
v12 = a5;
v11 = JS_ToCString_0(a1, *a5, a5[1], a4, (long long)a5, a6);
if ( v11 )
{
v9 = realpath(v11, v10);
JS_FreeCString(v14, v11);
if ( v9 )
{
LODWORD(v8) = 0;
}
else
{
v10[0] = 0;
v8 = *(unsigned int *)__errno_location();
}
string_error = make_string_error(v14, v10, (unsigned int)v8);
v18 = v6;
}
else
{
LODWORD(string_error) = 0;
v18 = 6LL;
}
return string_error;
}
| js_os_realpath:
SUB RSP,0x1058
MOV qword ptr [RSP + 0x1038],RSI
MOV qword ptr [RSP + 0x1040],RDX
MOV qword ptr [RSP + 0x1030],RDI
MOV dword ptr [RSP + 0x102c],ECX
MOV qword ptr [RSP + 0x1020],R8
MOV RDI,qword ptr [RSP + 0x1030]
MOV RAX,qword ptr [RSP + 0x1020]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0011aad0
MOV qword ptr [RSP + 0x1018],RAX
CMP qword ptr [RSP + 0x1018],0x0
JNZ 0x00121776
MOV dword ptr [RSP + 0x1048],0x0
MOV qword ptr [RSP + 0x1050],0x6
JMP 0x001217ea
LAB_00121776:
MOV RDI,qword ptr [RSP + 0x1018]
LEA RSI,[RSP + 0x10]
CALL 0x0010e600
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x1030]
MOV RSI,qword ptr [RSP + 0x1018]
CALL 0x00130140
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001217bc
MOV byte ptr [RSP + 0x10],0x0
CALL 0x0010e0b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001217c4
LAB_001217bc:
MOV dword ptr [RSP + 0x4],0x0
LAB_001217c4:
MOV RDI,qword ptr [RSP + 0x1030]
LEA RSI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x001231e0
MOV qword ptr [RSP + 0x1048],RAX
MOV qword ptr [RSP + 0x1050],RDX
LAB_001217ea:
MOV RAX,qword ptr [RSP + 0x1048]
MOV RDX,qword ptr [RSP + 0x1050]
ADD RSP,0x1058
RET
|
int1 [16]
js_os_realpath(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
char *pcVar1;
int *piVar2;
int1 auVar3 [16];
int local_1054;
char local_1048 [4104];
char *local_40;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_40 = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if (local_40 == (char *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
pcVar1 = realpath(local_40,local_1048);
JS_FreeCString(local_28,local_40);
if (pcVar1 == (char *)0x0) {
local_1048[0] = '\0';
piVar2 = __errno_location();
local_1054 = *piVar2;
}
else {
local_1054 = 0;
}
auVar3 = make_string_error(local_28,local_1048,local_1054);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
34,544 | js_os_realpath | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_realpath(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *path;
char buf[PATH_MAX], *res;
int err;
path = JS_ToCString(ctx, argv[0]);
if (!path)
return JS_EXCEPTION;
res = realpath(path, buf);
JS_FreeCString(ctx, path);
if (!res) {
buf[0] = '\0';
err = errno;
} else {
err = 0;
}
return make_string_error(ctx, buf, err);
} | O2 | c | js_os_realpath:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp # imm = 0x1008
movq %rdi, %r14
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x1561c
xorl %ebx, %ebx
testq %rax, %rax
je 0x18469
movq %rax, %r15
movq %rsp, %rsi
movq %rax, %rdi
callq 0xe620
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ec07
testq %r12, %r12
jne 0x18457
movb $0x0, (%rsp)
callq 0xe0b0
movl (%rax), %ebx
movq %rsp, %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x1936c
movq %rax, %rbx
jmp 0x1846c
pushq $0x6
popq %rdx
movq %rbx, %rax
addq $0x1008, %rsp # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_os_realpath:
push r15
push r14
push r12
push rbx
sub rsp, 1008h
mov r14, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToCString_0
xor ebx, ebx
test rax, rax
jz short loc_18469
mov r15, rax
mov rsi, rsp
mov rdi, rax
call _realpath
mov r12, rax
mov rdi, r14
mov rsi, r15
call JS_FreeCString
test r12, r12
jnz short loc_18457
mov [rsp+1028h+var_1028], 0
call ___errno_location
mov ebx, [rax]
loc_18457:
mov rsi, rsp
mov rdi, r14
mov edx, ebx
call make_string_error
mov rbx, rax
jmp short loc_1846C
loc_18469:
push 6
pop rdx
loc_1846C:
mov rax, rbx
add rsp, 1008h
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_os_realpath(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v5; // rax
long long v6; // rbx
long long v7; // r15
long long v8; // r12
_BYTE v10[4136]; // [rsp+0h] [rbp-1028h] BYREF
v5 = JS_ToCString_0(a1, *a5, a5[1]);
v6 = 0LL;
if ( v5 )
{
v7 = v5;
v8 = realpath(v5, v10);
JS_FreeCString(a1, v7);
if ( !v8 )
{
v10[0] = 0;
LODWORD(v6) = *(_DWORD *)__errno_location(a1);
}
return make_string_error(a1, v10, (unsigned int)v6);
}
return v6;
}
| js_os_realpath:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1008
MOV R14,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x0011561c
XOR EBX,EBX
TEST RAX,RAX
JZ 0x00118469
MOV R15,RAX
MOV RSI,RSP
MOV RDI,RAX
CALL 0x0010e620
MOV R12,RAX
MOV RDI,R14
MOV RSI,R15
CALL 0x0011ec07
TEST R12,R12
JNZ 0x00118457
MOV byte ptr [RSP],0x0
CALL 0x0010e0b0
MOV EBX,dword ptr [RAX]
LAB_00118457:
MOV RSI,RSP
MOV RDI,R14
MOV EDX,EBX
CALL 0x0011936c
MOV RBX,RAX
JMP 0x0011846c
LAB_00118469:
PUSH 0x6
POP RDX
LAB_0011846c:
MOV RAX,RBX
ADD RSP,0x1008
POP RBX
POP R12
POP R14
POP R15
RET
|
ulong js_os_realpath(int8 param_1)
{
char *__name;
char *pcVar1;
uint *puVar2;
ulong uVar3;
int8 *in_R8;
char local_1028 [4104];
__name = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
uVar3 = 0;
if (__name != (char *)0x0) {
pcVar1 = realpath(__name,local_1028);
JS_FreeCString(param_1,__name);
if (pcVar1 == (char *)0x0) {
local_1028[0] = '\0';
puVar2 = (uint *)__errno_location();
uVar3 = (ulong)*puVar2;
}
uVar3 = make_string_error(param_1,local_1028,uVar3);
}
return uVar3;
}
| |
34,545 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get() | llama.cpp/common/json.hpp | char_int_type get()
{
++position.chars_read_total;
++position.chars_read_current_line;
if (next_unget)
{
// just reset the next_unget variable and work with current
next_unget = false;
}
else
{
current = ia.get_character();
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
if (current == '\n')
{
++position.lines_read;
position.chars_read_current_line = 0;
}
return current;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get():
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movdqu 0x20(%rdi), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x20(%rdi)
cmpb $0x1, 0x18(%rdi)
jne 0x252c2
movb $0x0, 0x18(%rbx)
movl 0x14(%rbx), %eax
cmpl $-0x1, %eax
je 0x252cf
leaq 0x38(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
callq 0x56248
movl 0x14(%rbx), %eax
cmpl $0xa, %eax
jne 0x252bc
incq 0x30(%rbx)
andq $0x0, 0x28(%rbx)
pushq $0xa
popq %rax
addq $0x10, %rsp
popq %rbx
retq
movq %rbx, %rdi
callq 0x252d4
movl %eax, 0x14(%rbx)
jmp 0x25293
pushq $-0x1
jmp 0x252bb
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv:
push rbx
sub rsp, 10h
mov rbx, rdi
movdqu xmm0, xmmword ptr [rdi+20h]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword ptr [rdi+20h], xmm0
cmp byte ptr [rdi+18h], 1
jnz short loc_252C2
mov byte ptr [rbx+18h], 0
mov eax, [rbx+14h]
loc_25293:
cmp eax, 0FFFFFFFFh
jz short loc_252CF
lea rdi, [rbx+38h]
lea rsi, [rsp+18h+var_9]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
mov eax, [rbx+14h]
cmp eax, 0Ah
jnz short loc_252BC
inc qword ptr [rbx+30h]
and qword ptr [rbx+28h], 0
push 0Ah
loc_252BB:
pop rax
loc_252BC:
add rsp, 10h
pop rbx
retn
loc_252C2:
mov rdi, rbx; this
call _ZN8nlohmann16json_abi_v3_11_36detail20input_stream_adapter13get_characterEv; nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::get_character(void)
mov [rbx+14h], eax
jmp short loc_25293
loc_252CF:
push 0FFFFFFFFFFFFFFFFh
jmp short loc_252BB
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(
__m128i *this)
{
__int32 character; // eax
long long result; // rax
this[2] = _mm_sub_epi64(_mm_loadu_si128(this + 2), (__m128i)-1LL);
if ( this[1].m128i_i8[8] == 1 )
{
this[1].m128i_i8[8] = 0;
character = this[1].m128i_i32[1];
}
else
{
character = nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::get_character((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this);
this[1].m128i_i32[1] = character;
}
if ( character == -1 )
return -1LL;
std::vector<char>::emplace_back<char>(&this[3].m128i_u64[1]);
result = this[1].m128i_u32[1];
if ( (_DWORD)result != 10 )
return result;
++this[3].m128i_i64[0];
this[2].m128i_i64[1] = 0LL;
return 10LL;
}
| get:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOVDQU XMM0,xmmword ptr [RDI + 0x20]
PCMPEQD XMM1,XMM1
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [RDI + 0x20],XMM0
CMP byte ptr [RDI + 0x18],0x1
JNZ 0x001252c2
MOV byte ptr [RBX + 0x18],0x0
MOV EAX,dword ptr [RBX + 0x14]
LAB_00125293:
CMP EAX,-0x1
JZ 0x001252cf
LEA RDI,[RBX + 0x38]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
CALL 0x00156248
MOV EAX,dword ptr [RBX + 0x14]
CMP EAX,0xa
JNZ 0x001252bc
INC qword ptr [RBX + 0x30]
AND qword ptr [RBX + 0x28],0x0
PUSH 0xa
LAB_001252bb:
POP RAX
LAB_001252bc:
ADD RSP,0x10
POP RBX
RET
LAB_001252c2:
MOV RDI,RBX
CALL 0x001252d4
MOV dword ptr [RBX + 0x14],EAX
JMP 0x00125293
LAB_001252cf:
PUSH -0x1
JMP 0x001252bb
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get() */
ulong __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>
::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>
*this)
{
int iVar1;
ulong uStack_20;
char local_9;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 1;
*(long *)(this + 0x28) = *(long *)(this + 0x28) + 1;
if (this[0x18] ==
(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>
)0x1) {
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>
)0x0;
iVar1 = *(int *)(this + 0x14);
}
else {
iVar1 = input_stream_adapter::get_character((input_stream_adapter *)this);
*(int *)(this + 0x14) = iVar1;
}
if (iVar1 == -1) {
uStack_20 = 0xffffffffffffffff;
}
else {
local_9 = (char)iVar1;
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),&local_9);
uStack_20 = (ulong)*(uint *)(this + 0x14);
if (*(uint *)(this + 0x14) == 10) {
*(long *)(this + 0x30) = *(long *)(this + 0x30) + 1;
*(int8 *)(this + 0x28) = 0;
uStack_20 = 10;
}
}
return uStack_20;
}
| |
34,546 | init_available_charsets | eloqsql/mysys/charset.c | static void init_available_charsets(void)
{
char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
struct charset_info_st **cs;
MY_CHARSET_LOADER loader;
DBUG_ENTER("init_available_charsets");
bzero((char*) &all_charsets,sizeof(all_charsets));
bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics));
my_hash_init2(key_memory_charsets, &charset_name_hash, 16,
&my_charset_latin1, 64, 0, 0, get_charset_key,
0, 0, HASH_UNIQUE);
init_compiled_charsets(MYF(0));
/* Copy compiled charsets */
for (cs= (struct charset_info_st**) all_charsets;
cs < (struct charset_info_st**) all_charsets +
array_elements(all_charsets)-1 ;
cs++)
{
if (*cs)
{
DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN);
if (cs[0]->m_ctype)
if (init_state_maps(*cs))
*cs= NULL;
}
}
my_charset_loader_init_mysys(&loader);
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
my_read_charset_file(&loader, fname, MYF(0));
DBUG_VOID_RETURN;
} | O3 | c | init_available_charsets:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq 0x33e893(%rip), %rbx # 0x366a80
movl $0x4000, %edx # imm = 0x4000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x24170
leaq 0x3428ed(%rip), %rdi # 0x36aaf0
movl $0x4000, %edx # imm = 0x4000
xorl %esi, %esi
callq 0x24170
leaq 0x33e566(%rip), %rax # 0x36677c
movl (%rax), %edi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x10fc(%rip), %rax # 0x29323
movq %rax, 0x8(%rsp)
movl $0x1, 0x20(%rsp)
movq $0x0, (%rsp)
leaq 0x34283d(%rip), %rsi # 0x36aa80
leaq 0x2ed536(%rip), %rcx # 0x315780
movl $0x40, %r8d
movl $0x10, %edx
xorl %r9d, %r9d
callq 0x29681
xorl %edi, %edi
callq 0x2c658
movq $-0x8, %r14
movq 0x8(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x2828e
cmpq $0x0, 0x40(%rdi)
je 0x2828e
callq 0x2916e
testb %al, %al
je 0x2828e
movq $0x0, 0x8(%rbx,%r14)
addq $0x8, %r14
cmpq $0x3ff0, %r14 # imm = 0x3FF0
jb 0x2826b
leaq -0x2e0(%rbp), %rbx
movb $0x0, (%rbx)
leaq -0x8ae(%rip), %rax # 0x279fe
movq %rax, 0x80(%rbx)
leaq -0x8ad(%rip), %rax # 0x27a0d
movq %rax, 0x88(%rbx)
leaq -0x8a0(%rip), %rax # 0x27a28
movq %rax, 0x90(%rbx)
leaq 0x342c(%rip), %rax # 0x2b702
movq %rax, 0x98(%rbx)
leaq 0x2c7554(%rip), %rax # 0x2ef838
movq (%rax), %rax
movq %rax, 0xa0(%rbx)
leaq -0x8af(%rip), %rax # 0x27a46
movq %rax, 0xa8(%rbx)
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x27f8b
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x29334
movq %fs:0x28, %rax
cmpq -0x18(%rbp), %rax
jne 0x28346
addq $0x300, %rsp # imm = 0x300
popq %rbx
popq %r14
popq %rbp
retq
callq 0x24320
| init_available_charsets:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_18], rax
lea rbx, all_charsets
mov edx, 4000h
mov rdi, rbx
xor esi, esi
call _memset
lea rdi, my_collation_statistics
mov edx, 4000h
xor esi, esi
call _memset
lea rax, key_memory_charsets
mov edi, [rax]
xorps xmm0, xmm0
movups [rsp+310h+var_300], xmm0
lea rax, get_charset_key
mov [rsp+310h+var_308], rax
mov [rsp+310h+var_2F0], 1
mov [rsp+310h+var_310], 0
lea rsi, charset_name_hash
lea rcx, my_charset_latin1
mov r8d, 40h ; '@'
mov edx, 10h
xor r9d, r9d
call my_hash_init2
xor edi, edi
call init_compiled_charsets
mov r14, 0FFFFFFFFFFFFFFF8h
loc_2826B:
mov rdi, [rbx+r14+8]
test rdi, rdi
jz short loc_2828E
cmp qword ptr [rdi+40h], 0
jz short loc_2828E
call init_state_maps
test al, al
jz short loc_2828E
mov qword ptr [rbx+r14+8], 0
loc_2828E:
add r14, 8
cmp r14, 3FF0h
jb short loc_2826B
lea rbx, [rbp+var_2E0]
mov byte ptr [rbx], 0
lea rax, my_once_alloc_c
mov [rbx+80h], rax
lea rax, my_malloc_c
mov [rbx+88h], rax
lea rax, my_realloc_c
mov [rbx+90h], rax
lea rax, my_free
mov [rbx+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rbx+0A0h], rax
lea rax, add_collation
mov [rbx+0A8h], rax
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
mov rdi, rbx
mov rsi, r14
xor edx, edx
call my_read_charset_file
mov rax, fs:28h
cmp rax, [rbp+var_18]
jnz short loc_28346
add rsp, 300h
pop rbx
pop r14
pop rbp
retn
loc_28346:
call ___stack_chk_fail
| unsigned long long init_available_charsets()
{
unsigned long long v0; // r14
long long v1; // rdi
_BYTE v3[128]; // [rsp+30h] [rbp-2E0h] BYREF
long long ( *v4)(long long); // [rsp+B0h] [rbp-260h]
long long ( *v5)(long long); // [rsp+B8h] [rbp-258h]
long long ( *v6)(long long, long long); // [rsp+C0h] [rbp-250h]
long long ( *v7)(_QWORD); // [rsp+C8h] [rbp-248h]
long long ( *v8)(); // [rsp+D0h] [rbp-240h]
long long ( *v9)(unsigned int *); // [rsp+D8h] [rbp-238h]
_BYTE v10[536]; // [rsp+E0h] [rbp-230h] BYREF
unsigned long long v11; // [rsp+2F8h] [rbp-18h]
v11 = __readfsqword(0x28u);
memset(all_charsets, 0LL, sizeof(all_charsets));
memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics));
my_hash_init2(
key_memory_charsets,
(unsigned int)&charset_name_hash,
16,
(unsigned int)&my_charset_latin1,
64,
0,
0LL,
(long long)get_charset_key,
0LL,
0LL,
1);
init_compiled_charsets(0LL);
v0 = 0x1FFFFFFFFFFFFFFFLL;
do
{
v1 = all_charsets[v0 + 1];
if ( v1 && *(_QWORD *)(v1 + 64) && (unsigned __int8)init_state_maps(v1) )
all_charsets[v0 + 1] = 0LL;
++v0;
}
while ( v0 < 2046 );
v3[0] = 0;
v4 = my_once_alloc_c;
v5 = my_malloc_c;
v6 = my_realloc_c;
v7 = my_free;
v8 = my_charset_error_reporter;
v9 = add_collation;
strcpy((char *)get_charsets_dir((long long)v10), "Index.xml");
my_read_charset_file(v3, v10, 0LL);
return __readfsqword(0x28u);
}
| init_available_charsets:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RBX,[0x466a80]
MOV EDX,0x4000
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00124170
LEA RDI,[0x46aaf0]
MOV EDX,0x4000
XOR ESI,ESI
CALL 0x00124170
LEA RAX,[0x46677c]
MOV EDI,dword ptr [RAX]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x10],XMM0
LEA RAX,[0x129323]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x20],0x1
MOV qword ptr [RSP],0x0
LEA RSI,[0x46aa80]
LEA RCX,[0x415780]
MOV R8D,0x40
MOV EDX,0x10
XOR R9D,R9D
CALL 0x00129681
XOR EDI,EDI
CALL 0x0012c658
MOV R14,-0x8
LAB_0012826b:
MOV RDI,qword ptr [RBX + R14*0x1 + 0x8]
TEST RDI,RDI
JZ 0x0012828e
CMP qword ptr [RDI + 0x40],0x0
JZ 0x0012828e
CALL 0x0012916e
TEST AL,AL
JZ 0x0012828e
MOV qword ptr [RBX + R14*0x1 + 0x8],0x0
LAB_0012828e:
ADD R14,0x8
CMP R14,0x3ff0
JC 0x0012826b
LEA RBX,[RBP + -0x2e0]
MOV byte ptr [RBX],0x0
LEA RAX,[0x1279fe]
MOV qword ptr [RBX + 0x80],RAX
LEA RAX,[0x127a0d]
MOV qword ptr [RBX + 0x88],RAX
LEA RAX,[0x127a28]
MOV qword ptr [RBX + 0x90],RAX
LEA RAX,[0x12b702]
MOV qword ptr [RBX + 0x98],RAX
LEA RAX,[0x3ef838]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX + 0xa0],RAX
LEA RAX,[0x127a46]
MOV qword ptr [RBX + 0xa8],RAX
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x00127f8b
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x00129334
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x00128346
ADD RSP,0x300
POP RBX
POP R14
POP RBP
RET
LAB_00128346:
CALL 0x00124320
|
void init_available_charsets(void)
{
char cVar1;
int8 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
int1 local_2e8 [128];
code *local_268;
code *local_260;
code *local_258;
code *local_250;
int *local_248;
code *local_240;
int1 local_238 [536];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
memset(&all_charsets,0,0x4000);
memset(my_collation_statistics,0,0x4000);
my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0,
get_charset_key,0,0,1);
init_compiled_charsets(0);
uVar3 = 0xfffffffffffffff8;
do {
if ((*(long *)((long)&DAT_00466a88 + uVar3) != 0) &&
(*(long *)(*(long *)((long)&DAT_00466a88 + uVar3) + 0x40) != 0)) {
cVar1 = init_state_maps();
if (cVar1 != '\0') {
*(int8 *)((long)&DAT_00466a88 + uVar3) = 0;
}
}
uVar3 = uVar3 + 8;
} while (uVar3 < 0x3ff0);
local_2e8[0] = 0;
local_268 = my_once_alloc_c;
local_260 = my_malloc_c;
local_258 = my_realloc_c;
local_250 = my_free;
local_248 = my_charset_error_reporter;
local_240 = add_collation;
puVar2 = (int8 *)get_charsets_dir(local_238);
*puVar2 = 0x6d782e7865646e49;
*(int2 *)(puVar2 + 1) = 0x6c;
my_read_charset_file(local_2e8,local_238,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
34,547 | bitmap_subtract | eloqsql/mysys/my_bitmap.c | void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
DBUG_ASSERT(map->n_bits==map2->n_bits);
end= map->last_word_ptr;
while (to <= end)
*to++ &= ~(*from++);
} | O3 | c | bitmap_subtract:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
ja 0x9d93a
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movl (%rdx), %esi
notl %esi
andl %esi, (%rax)
addq $0x4, %rdx
addq $0x4, %rax
cmpq %rcx, %rax
jbe 0x9d926
popq %rbp
retq
| bitmap_subtract:
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rax, rcx
ja short locret_9D93A
push rbp
mov rbp, rsp
mov rdx, [rsi]
loc_9D926:
mov esi, [rdx]
not esi
and [rax], esi
add rdx, 4
add rax, 4
cmp rax, rcx
jbe short loc_9D926
pop rbp
locret_9D93A:
retn
| _DWORD * bitmap_subtract(long long a1, _DWORD **a2)
{
_DWORD *result; // rax
unsigned long long v3; // rcx
_DWORD *v4; // rdx
result = *(_DWORD **)a1;
v3 = *(_QWORD *)(a1 + 8);
if ( *(_QWORD *)a1 <= v3 )
{
v4 = *a2;
do
*result++ &= ~*v4++;
while ( (unsigned long long)result <= v3 );
}
return result;
}
| bitmap_subtract:
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RAX,RCX
JA 0x0019d93a
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
LAB_0019d926:
MOV ESI,dword ptr [RDX]
NOT ESI
AND dword ptr [RAX],ESI
ADD RDX,0x4
ADD RAX,0x4
CMP RAX,RCX
JBE 0x0019d926
POP RBP
LAB_0019d93a:
RET
|
void bitmap_subtract(int8 *param_1,int8 *param_2)
{
uint *puVar1;
uint *puVar2;
uint *puVar3;
puVar2 = (uint *)*param_1;
puVar1 = (uint *)param_1[1];
if (puVar2 <= puVar1) {
puVar3 = (uint *)*param_2;
do {
*puVar2 = *puVar2 & ~*puVar3;
puVar3 = puVar3 + 1;
puVar2 = puVar2 + 1;
} while (puVar2 <= puVar1);
}
return;
}
| |
34,548 | bc_byte_swap | bluesky950520[P]quickjs/quickjs.c | static void bc_byte_swap(uint8_t *bc_buf, int bc_len)
{
int pos, len, op, fmt;
pos = 0;
while (pos < bc_len) {
op = bc_buf[pos];
len = short_opcode_info(op).size;
fmt = short_opcode_info(op).fmt;
switch(fmt) {
case OP_FMT_u16:
case OP_FMT_i16:
case OP_FMT_label16:
case OP_FMT_npop:
case OP_FMT_loc:
case OP_FMT_arg:
case OP_FMT_var_ref:
put_u16(bc_buf + pos + 1,
bswap16(get_u16(bc_buf + pos + 1)));
break;
case OP_FMT_i32:
case OP_FMT_u32:
case OP_FMT_const:
case OP_FMT_label:
case OP_FMT_atom:
case OP_FMT_atom_u8:
put_u32(bc_buf + pos + 1,
bswap32(get_u32(bc_buf + pos + 1)));
break;
case OP_FMT_atom_u16:
case OP_FMT_label_u16:
put_u32(bc_buf + pos + 1,
bswap32(get_u32(bc_buf + pos + 1)));
put_u16(bc_buf + pos + 1 + 4,
bswap16(get_u16(bc_buf + pos + 1 + 4)));
break;
case OP_FMT_atom_label_u8:
case OP_FMT_atom_label_u16:
put_u32(bc_buf + pos + 1,
bswap32(get_u32(bc_buf + pos + 1)));
put_u32(bc_buf + pos + 1 + 4,
bswap32(get_u32(bc_buf + pos + 1 + 4)));
if (fmt == OP_FMT_atom_label_u16) {
put_u16(bc_buf + pos + 1 + 4 + 4,
bswap16(get_u16(bc_buf + pos + 1 + 4 + 4)));
}
break;
case OP_FMT_npop_u16:
put_u16(bc_buf + pos + 1,
bswap16(get_u16(bc_buf + pos + 1)));
put_u16(bc_buf + pos + 1 + 2,
bswap16(get_u16(bc_buf + pos + 1 + 2)));
break;
default:
break;
}
pos += len;
}
} | O0 | c | bc_byte_swap:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jge 0x79e03
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, 0x60(%rsp)
cmpl $0xb3, 0x60(%rsp)
jl 0x79aec
movl 0x60(%rsp), %eax
addl $0x12, %eax
movl %eax, 0x58(%rsp)
jmp 0x79af4
movl 0x60(%rsp), %eax
movl %eax, 0x58(%rsp)
movl 0x58(%rsp), %eax
movslq %eax, %rcx
leaq 0x9375e(%rip), %rax # 0x10d260
movzbl (%rax,%rcx,4), %eax
movl %eax, 0x64(%rsp)
cmpl $0xb3, 0x60(%rsp)
jl 0x79b21
movl 0x60(%rsp), %eax
addl $0x12, %eax
movl %eax, 0x54(%rsp)
jmp 0x79b29
movl 0x60(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
movslq %eax, %rcx
leaq 0x93729(%rip), %rax # 0x10d260
movzbl 0x3(%rax,%rcx,4), %eax
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, 0x48(%rsp)
subl $0x13, %eax
ja 0x79df0
movq 0x48(%rsp), %rax
leaq 0x914b5(%rip), %rcx # 0x10b018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x64bc0
movzwl %ax, %edi
callq 0x79550
movq 0x40(%rsp), %rdi
movzwl %ax, %esi
callq 0x79e10
jmp 0x79df2
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5f1b0
movl %eax, %edi
callq 0x79e30
movq 0x38(%rsp), %rdi
movl %eax, %esi
callq 0x68270
jmp 0x79df2
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5f1b0
movl %eax, %edi
callq 0x79e30
movq 0x28(%rsp), %rdi
movl %eax, %esi
callq 0x68270
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
addq $0x4, %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
addq $0x4, %rdi
callq 0x64bc0
movzwl %ax, %edi
callq 0x79550
movq 0x30(%rsp), %rdi
movzwl %ax, %esi
callq 0x79e10
jmp 0x79df2
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5f1b0
movl %eax, %edi
callq 0x79e30
movq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0x68270
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
addq $0x4, %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
addq $0x4, %rdi
callq 0x5f1b0
movl %eax, %edi
callq 0x79e30
movq 0x20(%rsp), %rdi
movl %eax, %esi
callq 0x68270
cmpl $0x1c, 0x5c(%rsp)
jne 0x79d61
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
addq $0x4, %rax
addq $0x4, %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
addq $0x4, %rdi
addq $0x4, %rdi
callq 0x64bc0
movzwl %ax, %edi
callq 0x79550
movq 0x10(%rsp), %rdi
movzwl %ax, %esi
callq 0x79e10
jmp 0x79df2
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x64bc0
movzwl %ax, %edi
callq 0x79550
movq (%rsp), %rdi
movzwl %ax, %esi
callq 0x79e10
movq 0x70(%rsp), %rax
movslq 0x68(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
addq $0x2, %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
movslq 0x68(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
addq $0x2, %rdi
callq 0x64bc0
movzwl %ax, %edi
callq 0x79550
movq 0x8(%rsp), %rdi
movzwl %ax, %esi
callq 0x79e10
jmp 0x79df2
jmp 0x79df2
movl 0x64(%rsp), %eax
addl 0x68(%rsp), %eax
movl %eax, 0x68(%rsp)
jmp 0x79ab5
addq $0x78, %rsp
retq
nopl (%rax,%rax)
| bc_byte_swap:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_C], esi
mov [rsp+78h+var_10], 0
loc_79AB5:
mov eax, [rsp+78h+var_10]
cmp eax, [rsp+78h+var_C]
jge loc_79E03
mov rax, [rsp+78h+var_8]
movsxd rcx, [rsp+78h+var_10]
movzx eax, byte ptr [rax+rcx]
mov [rsp+78h+var_18], eax
cmp [rsp+78h+var_18], 0B3h
jl short loc_79AEC
mov eax, [rsp+78h+var_18]
add eax, 12h
mov [rsp+78h+var_20], eax
jmp short loc_79AF4
loc_79AEC:
mov eax, [rsp+78h+var_18]
mov [rsp+78h+var_20], eax
loc_79AF4:
mov eax, [rsp+78h+var_20]
movsxd rcx, eax
lea rax, opcode_info
movzx eax, byte ptr [rax+rcx*4]
mov [rsp+78h+var_14], eax
cmp [rsp+78h+var_18], 0B3h
jl short loc_79B21
mov eax, [rsp+78h+var_18]
add eax, 12h
mov [rsp+78h+var_24], eax
jmp short loc_79B29
loc_79B21:
mov eax, [rsp+78h+var_18]
mov [rsp+78h+var_24], eax
loc_79B29:
mov eax, [rsp+78h+var_24]
movsxd rcx, eax
lea rax, opcode_info
movzx eax, byte ptr [rax+rcx*4+3]
mov [rsp+78h+var_1C], eax
mov eax, [rsp+78h+var_1C]
add eax, 0FFFFFFF6h; switch 20 cases
mov ecx, eax
mov [rsp+78h+var_30], rcx
sub eax, 13h
ja def_79B6A; jumptable 0000000000079B6A default case, cases 14,20
mov rax, [rsp+78h+var_30]
lea rcx, jpt_79B6A
movsxd rax, ds:(jpt_79B6A - 10B018h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_79B6C:
mov rax, [rsp+78h+var_8]; jumptable 0000000000079B6A cases 10-13,16-18
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
mov [rsp+78h+var_38], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
call get_u16
movzx edi, ax
call bswap16
mov rdi, [rsp+78h+var_38]
movzx esi, ax
call put_u16
jmp loc_79DF2
loc_79BB2:
mov rax, [rsp+78h+var_8]; jumptable 0000000000079B6A cases 19,21-25
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
mov [rsp+78h+var_40], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
call get_u32
mov edi, eax
call bswap32
mov rdi, [rsp+78h+var_40]
mov esi, eax
call put_u32
jmp loc_79DF2
loc_79BF6:
mov rax, [rsp+78h+var_8]; jumptable 0000000000079B6A cases 26,29
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
mov [rsp+78h+var_50], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
call get_u32
mov edi, eax
call bswap32
mov rdi, [rsp+78h+var_50]
mov esi, eax
call put_u32
mov rax, [rsp+78h+var_8]
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
add rax, 4
mov [rsp+78h+var_48], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
add rdi, 4
call get_u16
movzx edi, ax
call bswap16
mov rdi, [rsp+78h+var_48]
movzx esi, ax
call put_u16
jmp loc_79DF2
loc_79C83:
mov rax, [rsp+78h+var_8]; jumptable 0000000000079B6A cases 27,28
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
mov [rsp+78h+var_60], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
call get_u32
mov edi, eax
call bswap32
mov rdi, [rsp+78h+var_60]
mov esi, eax
call put_u32
mov rax, [rsp+78h+var_8]
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
add rax, 4
mov [rsp+78h+var_58], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
add rdi, 4
call get_u32
mov edi, eax
call bswap32
mov rdi, [rsp+78h+var_58]
mov esi, eax
call put_u32
cmp [rsp+78h+var_1C], 1Ch
jnz short loc_79D61
mov rax, [rsp+78h+var_8]
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
add rax, 4
add rax, 4
mov [rsp+78h+var_68], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
add rdi, 4
add rdi, 4
call get_u16
movzx edi, ax
call bswap16
mov rdi, [rsp+78h+var_68]
movzx esi, ax
call put_u16
loc_79D61:
jmp loc_79DF2
loc_79D66:
mov rax, [rsp+78h+var_8]; jumptable 0000000000079B6A case 15
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
mov [rsp+78h+var_78], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
call get_u16
movzx edi, ax
call bswap16
mov rdi, [rsp+78h+var_78]
movzx esi, ax
call put_u16
mov rax, [rsp+78h+var_8]
movsxd rcx, [rsp+78h+var_10]
add rax, rcx
add rax, 1
add rax, 2
mov [rsp+78h+var_70], rax
mov rdi, [rsp+78h+var_8]
movsxd rax, [rsp+78h+var_10]
add rdi, rax
add rdi, 1
add rdi, 2
call get_u16
movzx edi, ax
call bswap16
mov rdi, [rsp+78h+var_70]
movzx esi, ax
call put_u16
jmp short loc_79DF2
def_79B6A:
jmp short $+2; jumptable 0000000000079B6A default case, cases 14,20
loc_79DF2:
mov eax, [rsp+78h+var_14]
add eax, [rsp+78h+var_10]
mov [rsp+78h+var_10], eax
jmp loc_79AB5
loc_79E03:
add rsp, 78h
retn
| long long bc_byte_swap(long long a1, int a2)
{
long long result; // rax
unsigned __int16 u16; // ax
unsigned __int16 v4; // ax
unsigned int u32; // eax
int v6; // eax
unsigned int v7; // eax
int v8; // eax
unsigned __int16 v9; // ax
unsigned __int16 v10; // ax
unsigned int v11; // eax
int v12; // eax
unsigned int v13; // eax
int v14; // eax
unsigned __int16 v15; // ax
unsigned __int16 v16; // ax
unsigned __int16 v17; // ax
unsigned __int16 v18; // ax
unsigned __int16 v19; // ax
unsigned __int16 v20; // ax
unsigned int v21; // [rsp+54h] [rbp-24h]
unsigned int v22; // [rsp+58h] [rbp-20h]
int v23; // [rsp+5Ch] [rbp-1Ch]
unsigned int v24; // [rsp+60h] [rbp-18h]
int v25; // [rsp+64h] [rbp-14h]
unsigned int i; // [rsp+68h] [rbp-10h]
for ( i = 0; ; i += v25 )
{
result = i;
if ( (int)i >= a2 )
break;
v24 = *(unsigned __int8 *)(a1 + (int)i);
if ( v24 < 0xB3 )
v22 = *(unsigned __int8 *)(a1 + (int)i);
else
v22 = v24 + 18;
v25 = opcode_info[4 * v22];
if ( *(unsigned __int8 *)(a1 + (int)i) < 0xB3u )
v21 = *(unsigned __int8 *)(a1 + (int)i);
else
v21 = v24 + 18;
v23 = opcode_info[4 * v21 + 3];
switch ( opcode_info[4 * v21 + 3] )
{
case 0xAu:
case 0xBu:
case 0xCu:
case 0xDu:
case 0x10u:
case 0x11u:
case 0x12u:
u16 = get_u16((unsigned __int16 *)((int)i + a1 + 1));
v4 = bswap16(u16);
put_u16((int)i + a1 + 1, v4);
break;
case 0xFu:
v17 = get_u16((unsigned __int16 *)((int)i + a1 + 1));
v18 = bswap16(v17);
put_u16((int)i + a1 + 1, v18);
v19 = get_u16((unsigned __int16 *)((int)i + a1 + 3));
v20 = bswap16(v19);
put_u16((int)i + a1 + 3, v20);
break;
case 0x13u:
case 0x15u:
case 0x16u:
case 0x17u:
case 0x18u:
case 0x19u:
u32 = get_u32((unsigned int *)((int)i + a1 + 1));
v6 = bswap32(u32);
put_u32((_DWORD *)((int)i + a1 + 1), v6);
break;
case 0x1Au:
case 0x1Du:
v7 = get_u32((unsigned int *)((int)i + a1 + 1));
v8 = bswap32(v7);
put_u32((_DWORD *)((int)i + a1 + 1), v8);
v9 = get_u16((unsigned __int16 *)((int)i + a1 + 5));
v10 = bswap16(v9);
put_u16((int)i + a1 + 5, v10);
break;
case 0x1Bu:
case 0x1Cu:
v11 = get_u32((unsigned int *)((int)i + a1 + 1));
v12 = bswap32(v11);
put_u32((_DWORD *)((int)i + a1 + 1), v12);
v13 = get_u32((unsigned int *)((int)i + a1 + 5));
v14 = bswap32(v13);
put_u32((_DWORD *)((int)i + a1 + 5), v14);
if ( v23 == 28 )
{
v15 = get_u16((unsigned __int16 *)((int)i + a1 + 9));
v16 = bswap16(v15);
put_u16((int)i + a1 + 9, v16);
}
break;
default:
continue;
}
}
return result;
}
| bc_byte_swap:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ESI
MOV dword ptr [RSP + 0x68],0x0
LAB_00179ab5:
MOV EAX,dword ptr [RSP + 0x68]
CMP EAX,dword ptr [RSP + 0x6c]
JGE 0x00179e03
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0x60],EAX
CMP dword ptr [RSP + 0x60],0xb3
JL 0x00179aec
MOV EAX,dword ptr [RSP + 0x60]
ADD EAX,0x12
MOV dword ptr [RSP + 0x58],EAX
JMP 0x00179af4
LAB_00179aec:
MOV EAX,dword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0x58],EAX
LAB_00179af4:
MOV EAX,dword ptr [RSP + 0x58]
MOVSXD RCX,EAX
LEA RAX,[0x20d260]
MOVZX EAX,byte ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x64],EAX
CMP dword ptr [RSP + 0x60],0xb3
JL 0x00179b21
MOV EAX,dword ptr [RSP + 0x60]
ADD EAX,0x12
MOV dword ptr [RSP + 0x54],EAX
JMP 0x00179b29
LAB_00179b21:
MOV EAX,dword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0x54],EAX
LAB_00179b29:
MOV EAX,dword ptr [RSP + 0x54]
MOVSXD RCX,EAX
LEA RAX,[0x20d260]
MOVZX EAX,byte ptr [RAX + RCX*0x4 + 0x3]
MOV dword ptr [RSP + 0x5c],EAX
MOV EAX,dword ptr [RSP + 0x5c]
ADD EAX,-0xa
MOV ECX,EAX
MOV qword ptr [RSP + 0x48],RCX
SUB EAX,0x13
JA 0x00179df0
MOV RAX,qword ptr [RSP + 0x48]
LEA RCX,[0x20b018]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_a:
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x00164bc0
MOVZX EDI,AX
CALL 0x00179550
MOV RDI,qword ptr [RSP + 0x40]
MOVZX ESI,AX
CALL 0x00179e10
JMP 0x00179df2
caseD_13:
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015f1b0
MOV EDI,EAX
CALL 0x00179e30
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,EAX
CALL 0x00168270
JMP 0x00179df2
caseD_1a:
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015f1b0
MOV EDI,EAX
CALL 0x00179e30
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,EAX
CALL 0x00168270
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
ADD RAX,0x4
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
ADD RDI,0x4
CALL 0x00164bc0
MOVZX EDI,AX
CALL 0x00179550
MOV RDI,qword ptr [RSP + 0x30]
MOVZX ESI,AX
CALL 0x00179e10
JMP 0x00179df2
caseD_1b:
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015f1b0
MOV EDI,EAX
CALL 0x00179e30
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,EAX
CALL 0x00168270
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
ADD RAX,0x4
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
ADD RDI,0x4
CALL 0x0015f1b0
MOV EDI,EAX
CALL 0x00179e30
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,EAX
CALL 0x00168270
CMP dword ptr [RSP + 0x5c],0x1c
JNZ 0x00179d61
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
ADD RAX,0x4
ADD RAX,0x4
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
ADD RDI,0x4
ADD RDI,0x4
CALL 0x00164bc0
MOVZX EDI,AX
CALL 0x00179550
MOV RDI,qword ptr [RSP + 0x10]
MOVZX ESI,AX
CALL 0x00179e10
LAB_00179d61:
JMP 0x00179df2
caseD_f:
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x00164bc0
MOVZX EDI,AX
CALL 0x00179550
MOV RDI,qword ptr [RSP]
MOVZX ESI,AX
CALL 0x00179e10
MOV RAX,qword ptr [RSP + 0x70]
MOVSXD RCX,dword ptr [RSP + 0x68]
ADD RAX,RCX
ADD RAX,0x1
ADD RAX,0x2
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RAX,dword ptr [RSP + 0x68]
ADD RDI,RAX
ADD RDI,0x1
ADD RDI,0x2
CALL 0x00164bc0
MOVZX EDI,AX
CALL 0x00179550
MOV RDI,qword ptr [RSP + 0x8]
MOVZX ESI,AX
CALL 0x00179e10
JMP 0x00179df2
caseD_e:
JMP 0x00179df2
LAB_00179df2:
MOV EAX,dword ptr [RSP + 0x64]
ADD EAX,dword ptr [RSP + 0x68]
MOV dword ptr [RSP + 0x68],EAX
JMP 0x00179ab5
LAB_00179e03:
ADD RSP,0x78
RET
|
void bc_byte_swap(long param_1,int param_2)
{
byte bVar1;
char cVar2;
int2 uVar3;
int4 uVar4;
uint local_24;
uint local_20;
int local_10;
for (local_10 = 0; local_10 < param_2; local_10 = (uint)bVar1 + local_10) {
local_24 = (uint)*(byte *)(param_1 + local_10);
local_20 = local_24;
if (0xb2 < local_24) {
local_20 = local_24 + 0x12;
}
bVar1 = opcode_info[(long)(int)local_20 * 4];
if (0xb2 < local_24) {
local_24 = local_24 + 0x12;
}
cVar2 = opcode_info[(long)(int)local_24 * 4 + 3];
switch(cVar2) {
case '\n':
case '\v':
case '\f':
case '\r':
case '\x10':
case '\x11':
case '\x12':
uVar3 = get_u16(param_1 + local_10 + 1);
uVar3 = bswap16(uVar3);
put_u16(param_1 + local_10 + 1,uVar3);
break;
default:
break;
case '\x0f':
uVar3 = get_u16(param_1 + local_10 + 1);
uVar3 = bswap16(uVar3);
put_u16(param_1 + local_10 + 1,uVar3);
uVar3 = get_u16(param_1 + local_10 + 3);
uVar3 = bswap16(uVar3);
put_u16(param_1 + local_10 + 3,uVar3);
break;
case '\x13':
case '\x15':
case '\x16':
case '\x17':
case '\x18':
case '\x19':
uVar4 = get_u32(param_1 + local_10 + 1);
uVar4 = bswap32(uVar4);
put_u32(param_1 + local_10 + 1,uVar4);
break;
case '\x1a':
case '\x1d':
uVar4 = get_u32(param_1 + local_10 + 1);
uVar4 = bswap32(uVar4);
put_u32(param_1 + local_10 + 1,uVar4);
uVar3 = get_u16(param_1 + local_10 + 5);
uVar3 = bswap16(uVar3);
put_u16(param_1 + local_10 + 5,uVar3);
break;
case '\x1b':
case '\x1c':
uVar4 = get_u32(param_1 + local_10 + 1);
uVar4 = bswap32(uVar4);
put_u32(param_1 + local_10 + 1,uVar4);
uVar4 = get_u32(param_1 + local_10 + 5);
uVar4 = bswap32(uVar4);
put_u32(param_1 + local_10 + 5,uVar4);
if (cVar2 == '\x1c') {
uVar3 = get_u16(param_1 + local_10 + 9);
uVar3 = bswap16(uVar3);
put_u16(param_1 + local_10 + 9,uVar3);
}
}
}
return;
}
| |
34,549 | testing::internal::TestEventRepeater::~TestEventRepeater() | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | TestEventRepeater::~TestEventRepeater() {
ForEach(listeners_, Delete<TestEventListener>);
} | O1 | cpp | testing::internal::TestEventRepeater::~TestEventRepeater():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x34235(%rip), %rax # 0x58068
movq %rax, (%rdi)
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %r15
cmpq %r15, %r14
je 0x23e57
movq (%r14), %rdi
testq %rdi, %rdi
je 0x23e51
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r14
jmp 0x23e3e
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x23e71
movq 0x20(%rbx), %rsi
subq %rdi, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x84e0
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN7testing8internal17TestEventRepeaterD2Ev:
push r15
push r14
push rbx
mov rbx, rdi
lea rax, off_58068
mov [rdi], rax
mov r14, [rdi+10h]
mov r15, [rdi+18h]
loc_23E3E:
cmp r14, r15
jz short loc_23E57
mov rdi, [r14]
test rdi, rdi
jz short loc_23E51
mov rax, [rdi]
call qword ptr [rax+8]
loc_23E51:
add r14, 8
jmp short loc_23E3E
loc_23E57:
mov rdi, [rbx+10h]; void *
test rdi, rdi
jz short loc_23E71
mov rsi, [rbx+20h]
sub rsi, rdi; unsigned __int64
pop rbx
pop r14
pop r15
jmp __ZdlPvm; operator delete(void *,ulong)
loc_23E71:
pop rbx
pop r14
pop r15
retn
| void testing::internal::TestEventRepeater::~TestEventRepeater(testing::internal::TestEventRepeater *this)
{
_QWORD *v2; // r14
_QWORD *v3; // r15
void *v4; // rdi
*(_QWORD *)this = off_58068;
v2 = (_QWORD *)*((_QWORD *)this + 2);
v3 = (_QWORD *)*((_QWORD *)this + 3);
while ( v2 != v3 )
{
if ( *v2 )
(*(void ( **)(_QWORD))(*(_QWORD *)*v2 + 8LL))(*v2);
++v2;
}
v4 = (void *)*((_QWORD *)this + 2);
if ( v4 )
operator delete(v4, *((_QWORD *)this + 4) - (_QWORD)v4);
}
| ~TestEventRepeater:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x158068]
MOV qword ptr [RDI],RAX
MOV R14,qword ptr [RDI + 0x10]
MOV R15,qword ptr [RDI + 0x18]
LAB_00123e3e:
CMP R14,R15
JZ 0x00123e57
MOV RDI,qword ptr [R14]
TEST RDI,RDI
JZ 0x00123e51
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00123e51:
ADD R14,0x8
JMP 0x00123e3e
LAB_00123e57:
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00123e71
MOV RSI,qword ptr [RBX + 0x20]
SUB RSI,RDI
POP RBX
POP R14
POP R15
JMP 0x001084e0
LAB_00123e71:
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::TestEventRepeater::~TestEventRepeater() */
void __thiscall testing::internal::TestEventRepeater::~TestEventRepeater(TestEventRepeater *this)
{
long *plVar1;
void *pvVar2;
long *plVar3;
*(int ***)this = &PTR__TestEventRepeater_00158068;
plVar1 = *(long **)(this + 0x18);
for (plVar3 = *(long **)(this + 0x10); plVar3 != plVar1; plVar3 = plVar3 + 1) {
if ((long *)*plVar3 != (long *)0x0) {
(**(code **)(*(long *)*plVar3 + 8))();
}
}
pvVar2 = *(void **)(this + 0x10);
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,*(long *)(this + 0x20) - (long)pvVar2);
return;
}
return;
}
| |
34,550 | mi_seq_search | eloqsql/storage/myisam/mi_search.c | int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff, my_bool *last_key)
{
int UNINIT_VAR(flag);
uint nod_flag,UNINIT_VAR(length),not_used[2];
uchar t_buff[HA_MAX_KEY_BUFF],*end;
DBUG_ENTER("_mi_seq_search");
end= page+mi_getint(page);
nod_flag=mi_test_if_nod(page);
page+=2+nod_flag;
*ret_pos=page;
t_buff[0]=0; /* Avoid bugs */
while (page < end)
{
length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff);
if (length == 0 || page > end)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_PRINT("error",
("Found wrong key: length: %u page: %p end: %p",
length, page, end));
DBUG_RETURN(MI_FOUND_WRONG_KEY);
}
if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag,
not_used)) >= 0)
break;
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff,
flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
}
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
*last_key= page == end;
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
DBUG_RETURN(flag);
} | O0 | c | mi_seq_search:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp # imm = 0x520
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x4d0(%rbp)
movq %rsi, -0x4d8(%rbp)
movq %rdx, -0x4e0(%rbp)
movq %rcx, -0x4e8(%rbp)
movl %r8d, -0x4ec(%rbp)
movl %r9d, -0x4f0(%rbp)
movl -0x4f4(%rbp), %eax
movl %eax, -0x4f4(%rbp)
movl -0x4fc(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movq -0x4e0(%rbp), %rax
movq -0x4e0(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x4e0(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x510(%rbp)
movq -0x4e0(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc141e
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x514(%rbp)
jmp 0xc1428
xorl %eax, %eax
movl %eax, -0x514(%rbp)
jmp 0xc1428
movl -0x514(%rbp), %eax
movl %eax, -0x4f8(%rbp)
movl -0x4f8(%rbp), %ecx
addl $0x2, %ecx
movq -0x4e0(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x4e0(%rbp)
movq -0x4e0(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x4c0(%rbp)
movq -0x4e0(%rbp), %rax
cmpq -0x510(%rbp), %rax
jae 0xc1563
movq -0x4d8(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x4d8(%rbp), %rdi
movl -0x4f8(%rbp), %esi
leaq -0x4c0(%rbp), %rcx
leaq -0x4e0(%rbp), %rdx
callq *%rax
movl %eax, -0x4fc(%rbp)
cmpl $0x0, -0x4fc(%rbp)
je 0xc14c0
movq -0x4e0(%rbp), %rax
cmpq -0x510(%rbp), %rax
jbe 0xc14f9
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xb02e0
callq 0xfe880
movl $0x7e, (%rax)
jmp 0xc14e8
jmp 0xc14ea
movl $0x7fffffff, -0x4c4(%rbp) # imm = 0x7FFFFFFF
jmp 0xc15b2
movq -0x4d8(%rbp), %rax
movq 0x28(%rax), %rdi
leaq -0x4c0(%rbp), %rsi
movq -0x4e8(%rbp), %rdx
movl -0x4ec(%rbp), %ecx
movl -0x4f0(%rbp), %r8d
leaq -0x504(%rbp), %r9
callq 0xf8d90
movl %eax, -0x4f4(%rbp)
cmpl $0x0, %eax
jl 0xc1538
jmp 0xc1563
movq 0x18(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl -0x4fc(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movq -0x4e0(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc1465
cmpl $0x0, -0x4f4(%rbp)
jne 0xc1584
movq 0x18(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl -0x4fc(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movq -0x4e0(%rbp), %rax
cmpq -0x510(%rbp), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq 0x20(%rbp), %rax
movb %cl, (%rax)
jmp 0xc15a4
jmp 0xc15a6
movl -0x4f4(%rbp), %eax
movl %eax, -0x4c4(%rbp)
movl -0x4c4(%rbp), %eax
movl %eax, -0x518(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc15df
movl -0x518(%rbp), %eax
addq $0x520, %rsp # imm = 0x520
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| _mi_seq_search:
push rbp
mov rbp, rsp
sub rsp, 520h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_4D0], rdi
mov [rbp+var_4D8], rsi
mov [rbp+var_4E0], rdx
mov [rbp+var_4E8], rcx
mov [rbp+var_4EC], r8d
mov [rbp+var_4F0], r9d
mov eax, [rbp+var_4F4]
mov [rbp+var_4F4], eax
mov eax, [rbp+var_4FC]
mov [rbp+var_4FC], eax
mov rax, [rbp+var_4E0]
mov rcx, [rbp+var_4E0]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_4E0]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_510], rax
mov rax, [rbp+var_4E0]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_C141E
mov rax, [rbp+var_4D0]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_514], eax
jmp short loc_C1428
loc_C141E:
xor eax, eax
mov [rbp+var_514], eax
jmp short $+2
loc_C1428:
mov eax, [rbp+var_514]
mov [rbp+var_4F8], eax
mov ecx, [rbp+var_4F8]
add ecx, 2
mov rax, [rbp+var_4E0]
mov ecx, ecx
add rax, rcx
mov [rbp+var_4E0], rax
mov rcx, [rbp+var_4E0]
mov rax, [rbp+arg_0]
mov [rax], rcx
mov [rbp+var_4C0], 0
loc_C1465:
mov rax, [rbp+var_4E0]
cmp rax, [rbp+var_510]
jnb loc_C1563
mov rax, [rbp+var_4D8]
mov rax, [rax+48h]
mov rdi, [rbp+var_4D8]
mov esi, [rbp+var_4F8]
lea rcx, [rbp+var_4C0]
lea rdx, [rbp+var_4E0]
call rax
mov [rbp+var_4FC], eax
cmp [rbp+var_4FC], 0
jz short loc_C14C0
mov rax, [rbp+var_4E0]
cmp rax, [rbp+var_510]
jbe short loc_C14F9
loc_C14C0:
mov rax, [rbp+var_4D0]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
jmp short $+2
loc_C14E8:
jmp short $+2
loc_C14EA:
mov [rbp+var_4C4], 7FFFFFFFh
jmp loc_C15B2
loc_C14F9:
mov rax, [rbp+var_4D8]
mov rdi, [rax+28h]
lea rsi, [rbp+var_4C0]
mov rdx, [rbp+var_4E8]
mov ecx, [rbp+var_4EC]
mov r8d, [rbp+var_4F0]
lea r9, [rbp+var_504]
call ha_key_cmp
mov [rbp+var_4F4], eax
cmp eax, 0
jl short loc_C1538
jmp short loc_C1563
loc_C1538:
mov rdi, [rbp+arg_8]
lea rsi, [rbp+var_4C0]
mov eax, [rbp+var_4FC]
mov edx, eax
call _memcpy
mov rcx, [rbp+var_4E0]
mov rax, [rbp+arg_0]
mov [rax], rcx
jmp loc_C1465
loc_C1563:
cmp [rbp+var_4F4], 0
jnz short loc_C1584
mov rdi, [rbp+arg_8]
lea rsi, [rbp+var_4C0]
mov eax, [rbp+var_4FC]
mov edx, eax
call _memcpy
loc_C1584:
mov rax, [rbp+var_4E0]
cmp rax, [rbp+var_510]
setz al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+arg_10]
mov [rax], cl
jmp short $+2
loc_C15A4:
jmp short $+2
loc_C15A6:
mov eax, [rbp+var_4F4]
mov [rbp+var_4C4], eax
loc_C15B2:
mov eax, [rbp+var_4C4]
mov [rbp+var_518], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C15DF
mov eax, [rbp+var_518]
add rsp, 520h
pop rbp
retn
loc_C15DF:
call ___stack_chk_fail
| long long mi_seq_search(
long long a1,
long long a2,
unsigned __int16 *a3,
long long a4,
unsigned int a5,
unsigned int a6,
unsigned __int16 **a7,
long long a8,
bool *a9)
{
const char *v9; // rsi
unsigned int v11; // [rsp+Ch] [rbp-514h]
unsigned __int16 *v12; // [rsp+10h] [rbp-510h]
char v13[8]; // [rsp+1Ch] [rbp-504h] BYREF
unsigned int v14; // [rsp+24h] [rbp-4FCh]
unsigned int v15; // [rsp+28h] [rbp-4F8h]
int v16; // [rsp+2Ch] [rbp-4F4h]
unsigned int v17; // [rsp+30h] [rbp-4F0h]
unsigned int v18; // [rsp+34h] [rbp-4ECh]
long long v19; // [rsp+38h] [rbp-4E8h]
unsigned __int16 *v20; // [rsp+40h] [rbp-4E0h] BYREF
long long v21; // [rsp+48h] [rbp-4D8h]
long long v22; // [rsp+50h] [rbp-4D0h]
_BYTE v24[1208]; // [rsp+60h] [rbp-4C0h] BYREF
unsigned long long v25; // [rsp+518h] [rbp-8h]
v25 = __readfsqword(0x28u);
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v12 = (unsigned __int16 *)((char *)a3 + (_byteswap_ushort(*a3) & 0x7FFF));
if ( (*(_BYTE *)a3 & 0x80) != 0 )
v11 = *(_DWORD *)(*(_QWORD *)v22 + 380LL);
else
v11 = 0;
v15 = v11;
v20 = (unsigned __int16 *)((char *)v20 + v11 + 2);
*a7 = v20;
v24[0] = 0;
while ( v20 < v12 )
{
v14 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v21 + 72))(v21, v15, &v20, v24);
if ( !v14 || v20 > v12 )
{
v9 = *(const char **)(*(_QWORD *)v22 + 616LL);
mi_report_error(126, (long long)v9);
*(_DWORD *)my_thread_var(126LL, v9) = 126;
return 0x7FFFFFFF;
}
v16 = ha_key_cmp(*(_QWORD *)(v21 + 40), v24, v19, v18, v17, v13);
if ( v16 >= 0 )
break;
memcpy(a8, v24, v14);
*a7 = v20;
}
if ( !v16 )
memcpy(a8, v24, v14);
*a9 = v20 == v12;
return (unsigned int)v16;
}
| _mi_seq_search:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x520
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x4d0],RDI
MOV qword ptr [RBP + -0x4d8],RSI
MOV qword ptr [RBP + -0x4e0],RDX
MOV qword ptr [RBP + -0x4e8],RCX
MOV dword ptr [RBP + -0x4ec],R8D
MOV dword ptr [RBP + -0x4f0],R9D
MOV EAX,dword ptr [RBP + -0x4f4]
MOV dword ptr [RBP + -0x4f4],EAX
MOV EAX,dword ptr [RBP + -0x4fc]
MOV dword ptr [RBP + -0x4fc],EAX
MOV RAX,qword ptr [RBP + -0x4e0]
MOV RCX,qword ptr [RBP + -0x4e0]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x4e0]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x510],RAX
MOV RAX,qword ptr [RBP + -0x4e0]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001c141e
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x514],EAX
JMP 0x001c1428
LAB_001c141e:
XOR EAX,EAX
MOV dword ptr [RBP + -0x514],EAX
JMP 0x001c1428
LAB_001c1428:
MOV EAX,dword ptr [RBP + -0x514]
MOV dword ptr [RBP + -0x4f8],EAX
MOV ECX,dword ptr [RBP + -0x4f8]
ADD ECX,0x2
MOV RAX,qword ptr [RBP + -0x4e0]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x4e0],RAX
MOV RCX,qword ptr [RBP + -0x4e0]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x4c0],0x0
LAB_001c1465:
MOV RAX,qword ptr [RBP + -0x4e0]
CMP RAX,qword ptr [RBP + -0x510]
JNC 0x001c1563
MOV RAX,qword ptr [RBP + -0x4d8]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x4d8]
MOV ESI,dword ptr [RBP + -0x4f8]
LEA RCX,[RBP + -0x4c0]
LEA RDX,[RBP + -0x4e0]
CALL RAX
MOV dword ptr [RBP + -0x4fc],EAX
CMP dword ptr [RBP + -0x4fc],0x0
JZ 0x001c14c0
MOV RAX,qword ptr [RBP + -0x4e0]
CMP RAX,qword ptr [RBP + -0x510]
JBE 0x001c14f9
LAB_001c14c0:
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001b02e0
CALL 0x001fe880
MOV dword ptr [RAX],0x7e
JMP 0x001c14e8
LAB_001c14e8:
JMP 0x001c14ea
LAB_001c14ea:
MOV dword ptr [RBP + -0x4c4],0x7fffffff
JMP 0x001c15b2
LAB_001c14f9:
MOV RAX,qword ptr [RBP + -0x4d8]
MOV RDI,qword ptr [RAX + 0x28]
LEA RSI,[RBP + -0x4c0]
MOV RDX,qword ptr [RBP + -0x4e8]
MOV ECX,dword ptr [RBP + -0x4ec]
MOV R8D,dword ptr [RBP + -0x4f0]
LEA R9,[RBP + -0x504]
CALL 0x001f8d90
MOV dword ptr [RBP + -0x4f4],EAX
CMP EAX,0x0
JL 0x001c1538
JMP 0x001c1563
LAB_001c1538:
MOV RDI,qword ptr [RBP + 0x18]
LEA RSI,[RBP + -0x4c0]
MOV EAX,dword ptr [RBP + -0x4fc]
MOV EDX,EAX
CALL 0x0012a0b0
MOV RCX,qword ptr [RBP + -0x4e0]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001c1465
LAB_001c1563:
CMP dword ptr [RBP + -0x4f4],0x0
JNZ 0x001c1584
MOV RDI,qword ptr [RBP + 0x18]
LEA RSI,[RBP + -0x4c0]
MOV EAX,dword ptr [RBP + -0x4fc]
MOV EDX,EAX
CALL 0x0012a0b0
LAB_001c1584:
MOV RAX,qword ptr [RBP + -0x4e0]
CMP RAX,qword ptr [RBP + -0x510]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + 0x20]
MOV byte ptr [RAX],CL
JMP 0x001c15a4
LAB_001c15a4:
JMP 0x001c15a6
LAB_001c15a6:
MOV EAX,dword ptr [RBP + -0x4f4]
MOV dword ptr [RBP + -0x4c4],EAX
LAB_001c15b2:
MOV EAX,dword ptr [RBP + -0x4c4]
MOV dword ptr [RBP + -0x518],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001c15df
MOV EAX,dword ptr [RBP + -0x518]
ADD RSP,0x520
POP RBP
RET
LAB_001c15df:
CALL 0x0012a270
|
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5,
int4 param_6,int8 *param_7,void *param_8,int8 param_9)
{
byte *pbVar1;
int4 *puVar2;
long in_FS_OFFSET;
int local_51c;
int1 local_50c [8];
uint local_504;
int local_500;
int local_4fc;
int4 local_4f8;
int4 local_4f4;
int8 local_4f0;
byte *local_4e8;
long local_4e0;
long *local_4d8;
int local_4cc;
int1 local_4c8 [1208];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pbVar1 = param_3 + ((uint)param_3[1] | (*param_3 & 0x7f) << 8);
if ((*param_3 & 0x80) == 0) {
local_51c = 0;
}
else {
local_51c = *(int *)(*param_1 + 0x17c);
}
local_500 = local_51c;
local_4e8 = param_3 + (local_51c + 2);
*param_7 = local_4e8;
local_4c8[0] = 0;
local_4f8 = param_6;
local_4f4 = param_5;
local_4f0 = param_4;
local_4e0 = param_2;
local_4d8 = param_1;
while (local_4e8 < pbVar1) {
local_504 = (**(code **)(local_4e0 + 0x48))(local_4e0,local_500,&local_4e8,local_4c8);
if ((local_504 == 0) || (pbVar1 < local_4e8)) {
mi_report_error(0x7e,*(int8 *)(*local_4d8 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_4cc = 0x7fffffff;
goto LAB_001c15b2;
}
local_4fc = ha_key_cmp(*(int8 *)(local_4e0 + 0x28),local_4c8,local_4f0,local_4f4,local_4f8
,local_50c);
if (-1 < local_4fc) break;
memcpy(param_8,local_4c8,(ulong)local_504);
*param_7 = local_4e8;
}
if (local_4fc == 0) {
memcpy(param_8,local_4c8,(ulong)local_504);
}
*(bool *)param_9 = local_4e8 == pbVar1;
local_4cc = local_4fc;
LAB_001c15b2:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_4cc;
}
| |
34,551 | fn_format | eloqsql/mysys/mf_format.c | char * fn_format(char * to, const char *name, const char *dir,
const char *extension, uint flag)
{
char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos;
const char *ext;
reg1 size_t length;
size_t dev_length;
DBUG_ENTER("fn_format");
DBUG_ASSERT(name != NULL);
DBUG_ASSERT(extension != NULL);
DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d",
name,dir,extension,flag));
/* Copy and skip directory */
name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length));
if (length == 0 || (flag & MY_REPLACE_DIR))
{
/* Use given directory */
convert_dirname(dev,dir,NullS); /* Fix to this OS */
}
else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev))
{
/* Put 'dir' before the given path */
strmake_buf(buff, dev);
pos=convert_dirname(dev,dir,NullS);
strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev));
}
if (flag & MY_PACK_FILENAME)
pack_dirname(dev,dev); /* Put in ./.. and ~/.. */
if (flag & MY_UNPACK_FILENAME)
(void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */
if (!(flag & MY_APPEND_EXT) &&
(pos= (char*) strchr(name,FN_EXTCHAR)) != NullS)
{
if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */
{
length=strlength(name); /* Use old extension */
ext = "";
}
else
{
length= (size_t) (pos-(char*) name); /* Change extension */
ext= extension;
}
}
else
{
length=strlength(name); /* No ext, use the now one */
ext=extension;
}
if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN )
{
/* To long path, return original or NULL */
size_t tmp_length;
if (flag & MY_SAFE_PATH)
DBUG_RETURN(NullS);
tmp_length= strlength(startpos);
DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext,
(uint) length));
(void) strmake(to,startpos,MY_MIN(tmp_length,FN_REFLEN-1));
}
else
{
if (to == startpos)
{
bmove(buff,(uchar*) name,length); /* Save name for last copy */
name=buff;
}
pos=strmake(strmov(to,dev),name,length);
(void) strmov(pos,ext); /* Don't convert extension */
}
if (flag & MY_RETURN_REAL_PATH)
(void) my_realpath(to, to, MYF(0));
else if (flag & MY_RESOLVE_SYMLINKS)
{
strmov(buff,to);
(void) my_readlink(to, buff, MYF(0));
}
DBUG_RETURN(to);
} | O0 | c | fn_format:
pushq %rbp
movq %rsp, %rbp
subq $0x6a0, %rsp # imm = 0x6A0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x620(%rbp)
movq %rsi, -0x628(%rbp)
movq %rdx, -0x630(%rbp)
movq %rcx, -0x638(%rbp)
movl %r8d, -0x63c(%rbp)
jmp 0x422dd
jmp 0x422df
jmp 0x422e1
jmp 0x422e3
jmp 0x422e5
leaq -0x210(%rbp), %rdi
movq -0x628(%rbp), %rsi
movq %rsi, -0x650(%rbp)
leaq -0x668(%rbp), %rdx
callq 0x420a0
movq %rax, -0x660(%rbp)
addq -0x628(%rbp), %rax
movq %rax, -0x628(%rbp)
cmpq $0x0, -0x660(%rbp)
je 0x42333
movl -0x63c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4234f
leaq -0x210(%rbp), %rdi
movq -0x630(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x42100
jmp 0x423ff
movl -0x63c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x423fd
leaq -0x210(%rbp), %rdi
callq 0x45000
cmpl $0x0, %eax
jne 0x423fd
leaq -0x610(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx # imm = 0x200
callq 0x33190
movb $0x2, -0x610(%rbp)
leaq -0x410(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x8c520
movq %rax, -0x670(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x630(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x42100
movq %rax, -0x648(%rbp)
movq -0x648(%rbp), %rdi
leaq -0x410(%rbp), %rsi
movq -0x648(%rbp), %rax
leaq -0x210(%rbp), %rcx
subq %rcx, %rax
cltq
movl $0x1ff, %edx # imm = 0x1FF
subq %rax, %rdx
callq 0x8c520
jmp 0x423ff
movl -0x63c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x42420
leaq -0x210(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x427b0
movl -0x63c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x42441
leaq -0x210(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x43230
movl -0x63c(%rbp), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0x424c8
movq -0x628(%rbp), %rdi
movl $0x2e, %esi
callq 0x33110
movq %rax, -0x648(%rbp)
cmpq $0x0, %rax
je 0x424c8
movl -0x63c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x424a0
movq -0x628(%rbp), %rdi
callq 0x426f0
movq %rax, -0x660(%rbp)
leaq 0x66b63(%rip), %rax # 0xa8ffa
movq %rax, -0x658(%rbp)
jmp 0x424c6
movq -0x648(%rbp), %rax
movq -0x628(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x660(%rbp)
movq -0x638(%rbp), %rax
movq %rax, -0x658(%rbp)
jmp 0x424e9
movq -0x628(%rbp), %rdi
callq 0x426f0
movq %rax, -0x660(%rbp)
movq -0x638(%rbp), %rax
movq %rax, -0x658(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x33130
addq -0x660(%rbp), %rax
movq %rax, -0x680(%rbp)
movq -0x658(%rbp), %rdi
callq 0x33130
movq %rax, %rcx
movq -0x680(%rbp), %rax
addq %rcx, %rax
cmpq $0x200, %rax # imm = 0x200
jae 0x42535
cmpq $0x100, -0x660(%rbp) # imm = 0x100
jb 0x425cd
movl -0x63c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x42555
jmp 0x42545
movq $0x0, -0x618(%rbp)
jmp 0x426b9
movq -0x650(%rbp), %rdi
callq 0x426f0
movq %rax, -0x678(%rbp)
jmp 0x4256a
movq -0x620(%rbp), %rax
movq %rax, -0x690(%rbp)
movq -0x650(%rbp), %rax
movq %rax, -0x688(%rbp)
cmpq $0x1ff, -0x678(%rbp) # imm = 0x1FF
jae 0x425a3
movq -0x678(%rbp), %rax
movq %rax, -0x698(%rbp)
jmp 0x425b1
movl $0x1ff, %eax # imm = 0x1FF
movq %rax, -0x698(%rbp)
jmp 0x425b1
movq -0x688(%rbp), %rsi
movq -0x690(%rbp), %rdi
movq -0x698(%rbp), %rdx
callq 0x8c520
jmp 0x42648
movq -0x620(%rbp), %rax
cmpq -0x650(%rbp), %rax
jne 0x42605
leaq -0x410(%rbp), %rdi
movq -0x628(%rbp), %rsi
movq -0x660(%rbp), %rdx
callq 0x33580
leaq -0x410(%rbp), %rax
movq %rax, -0x628(%rbp)
movq -0x620(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x332b0
movq %rax, %rdi
movq -0x628(%rbp), %rsi
movq -0x660(%rbp), %rdx
callq 0x8c520
movq %rax, -0x648(%rbp)
movq -0x648(%rbp), %rdi
movq -0x658(%rbp), %rsi
callq 0x332b0
movl -0x63c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x4266f
movq -0x620(%rbp), %rdi
movq -0x620(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x45ed0
jmp 0x426a9
movl -0x63c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x426a7
leaq -0x410(%rbp), %rdi
movq -0x620(%rbp), %rsi
callq 0x332b0
movq -0x620(%rbp), %rdi
leaq -0x410(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x45cd0
jmp 0x426a9
jmp 0x426ab
movq -0x620(%rbp), %rax
movq %rax, -0x618(%rbp)
movq -0x618(%rbp), %rax
movq %rax, -0x6a0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x426e9
movq -0x6a0(%rbp), %rax
addq $0x6a0, %rsp # imm = 0x6A0
popq %rbp
retq
callq 0x33310
nop
| fn_format:
push rbp
mov rbp, rsp
sub rsp, 6A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_620], rdi
mov [rbp+var_628], rsi
mov [rbp+var_630], rdx
mov [rbp+var_638], rcx
mov [rbp+var_63C], r8d
jmp short $+2
loc_422DD:
jmp short $+2
loc_422DF:
jmp short $+2
loc_422E1:
jmp short $+2
loc_422E3:
jmp short $+2
loc_422E5:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_628]
mov [rbp+var_650], rsi
lea rdx, [rbp+var_668]
call dirname_part
mov [rbp+var_660], rax
add rax, [rbp+var_628]
mov [rbp+var_628], rax
cmp [rbp+var_660], 0
jz short loc_42333
mov eax, [rbp+var_63C]
and eax, 1
cmp eax, 0
jz short loc_4234F
loc_42333:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_630]
xor eax, eax
mov edx, eax
call convert_dirname
jmp loc_423FF
loc_4234F:
mov eax, [rbp+var_63C]
and eax, 80h
cmp eax, 0
jz loc_423FD
lea rdi, [rbp+var_210]
call test_if_hard_path
cmp eax, 0
jnz loc_423FD
lea rdi, [rbp+var_610]
xor esi, esi
mov edx, 200h
call _memset
mov [rbp+var_610], 2
lea rdi, [rbp+var_410]
lea rsi, [rbp+var_210]
mov edx, 1FFh
call strmake
mov [rbp+var_670], rax
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_630]
xor eax, eax
mov edx, eax
call convert_dirname
mov [rbp+var_648], rax
mov rdi, [rbp+var_648]
lea rsi, [rbp+var_410]
mov rax, [rbp+var_648]
lea rcx, [rbp+var_210]
sub rax, rcx
cdqe
mov edx, 1FFh
sub rdx, rax
call strmake
loc_423FD:
jmp short $+2
loc_423FF:
mov eax, [rbp+var_63C]
and eax, 8
cmp eax, 0
jz short loc_42420
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_210]
call pack_dirname
loc_42420:
mov eax, [rbp+var_63C]
and eax, 4
cmp eax, 0
jz short loc_42441
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_210]
call unpack_dirname
loc_42441:
mov eax, [rbp+var_63C]
and eax, 100h
cmp eax, 0
jnz short loc_424C8
mov rdi, [rbp+var_628]
mov esi, 2Eh ; '.'
call _strchr
mov [rbp+var_648], rax
cmp rax, 0
jz short loc_424C8
mov eax, [rbp+var_63C]
and eax, 2
cmp eax, 0
jnz short loc_424A0
mov rdi, [rbp+var_628]
call strlength
mov [rbp+var_660], rax
lea rax, aIfYouWantToGet+96h; ""
mov [rbp+var_658], rax
jmp short loc_424C6
loc_424A0:
mov rax, [rbp+var_648]
mov rcx, [rbp+var_628]
sub rax, rcx
mov [rbp+var_660], rax
mov rax, [rbp+var_638]
mov [rbp+var_658], rax
loc_424C6:
jmp short loc_424E9
loc_424C8:
mov rdi, [rbp+var_628]
call strlength
mov [rbp+var_660], rax
mov rax, [rbp+var_638]
mov [rbp+var_658], rax
loc_424E9:
lea rdi, [rbp+var_210]
call _strlen
add rax, [rbp+var_660]
mov [rbp+var_680], rax
mov rdi, [rbp+var_658]
call _strlen
mov rcx, rax
mov rax, [rbp+var_680]
add rax, rcx
cmp rax, 200h
jnb short loc_42535
cmp [rbp+var_660], 100h
jb loc_425CD
loc_42535:
mov eax, [rbp+var_63C]
and eax, 40h
cmp eax, 0
jz short loc_42555
jmp short $+2
loc_42545:
mov [rbp+var_618], 0
jmp loc_426B9
loc_42555:
mov rdi, [rbp+var_650]
call strlength
mov [rbp+var_678], rax
jmp short $+2
loc_4256A:
mov rax, [rbp+var_620]
mov [rbp+var_690], rax
mov rax, [rbp+var_650]
mov [rbp+var_688], rax
cmp [rbp+var_678], 1FFh
jnb short loc_425A3
mov rax, [rbp+var_678]
mov [rbp+var_698], rax
jmp short loc_425B1
loc_425A3:
mov eax, 1FFh
mov [rbp+var_698], rax
jmp short $+2
loc_425B1:
mov rsi, [rbp+var_688]
mov rdi, [rbp+var_690]
mov rdx, [rbp+var_698]
call strmake
jmp short loc_42648
loc_425CD:
mov rax, [rbp+var_620]
cmp rax, [rbp+var_650]
jnz short loc_42605
lea rdi, [rbp+var_410]
mov rsi, [rbp+var_628]
mov rdx, [rbp+var_660]
call _memmove
lea rax, [rbp+var_410]
mov [rbp+var_628], rax
loc_42605:
mov rdi, [rbp+var_620]
lea rsi, [rbp+var_210]
call _stpcpy
mov rdi, rax
mov rsi, [rbp+var_628]
mov rdx, [rbp+var_660]
call strmake
mov [rbp+var_648], rax
mov rdi, [rbp+var_648]
mov rsi, [rbp+var_658]
call _stpcpy
loc_42648:
mov eax, [rbp+var_63C]
and eax, 20h
cmp eax, 0
jz short loc_4266F
mov rdi, [rbp+var_620]
mov rsi, [rbp+var_620]
xor eax, eax
mov edx, eax
call my_realpath
jmp short loc_426A9
loc_4266F:
mov eax, [rbp+var_63C]
and eax, 10h
cmp eax, 0
jz short loc_426A7
lea rdi, [rbp+var_410]
mov rsi, [rbp+var_620]
call _stpcpy
mov rdi, [rbp+var_620]
lea rsi, [rbp+var_410]
xor eax, eax
mov edx, eax
call my_readlink
loc_426A7:
jmp short $+2
loc_426A9:
jmp short $+2
loc_426AB:
mov rax, [rbp+var_620]
mov [rbp+var_618], rax
loc_426B9:
mov rax, [rbp+var_618]
mov [rbp+var_6A0], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_426E9
mov rax, [rbp+var_6A0]
add rsp, 6A0h
pop rbp
retn
loc_426E9:
call ___stack_chk_fail
| _BYTE * fn_format(_BYTE *a1, _BYTE *a2, long long a3, char *a4, int a5)
{
long long v5; // rax
long long v6; // rax
unsigned long long v8; // [rsp+20h] [rbp-680h]
unsigned long long v9; // [rsp+28h] [rbp-678h]
long long v10; // [rsp+38h] [rbp-668h] BYREF
unsigned long long v11; // [rsp+40h] [rbp-660h]
char *v12; // [rsp+48h] [rbp-658h]
_BYTE *v13; // [rsp+50h] [rbp-650h]
_BYTE *v14; // [rsp+58h] [rbp-648h]
int v15; // [rsp+64h] [rbp-63Ch]
char *v16; // [rsp+68h] [rbp-638h]
long long v17; // [rsp+70h] [rbp-630h]
_BYTE *v18; // [rsp+78h] [rbp-628h]
_BYTE *v19; // [rsp+80h] [rbp-620h]
char v21[512]; // [rsp+90h] [rbp-610h] BYREF
_BYTE v22[512]; // [rsp+290h] [rbp-410h] BYREF
_BYTE v23[520]; // [rsp+490h] [rbp-210h] BYREF
unsigned long long v24; // [rsp+698h] [rbp-8h]
v24 = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v13 = a2;
v11 = dirname_part((long long)v23, a2, &v10);
v18 += v11;
if ( v11 && (v15 & 1) == 0 )
{
if ( (v15 & 0x80) != 0 && !(unsigned int)test_if_hard_path(v23) )
{
memset(v21, 0LL, sizeof(v21));
v21[0] = 2;
strmake(v22, v23, 511LL);
v14 = convert_dirname(v23, v17, 0LL);
strmake(v14, v22, 511LL - (int)((_DWORD)v14 - (unsigned int)v23));
}
}
else
{
convert_dirname(v23, v17, 0LL);
}
if ( (v15 & 8) != 0 )
pack_dirname(v23, v23);
if ( (v15 & 4) != 0 )
unpack_dirname(v23, v23);
if ( (v15 & 0x100) != 0 || (v14 = (_BYTE *)strchr(v18, 46LL)) == 0LL )
{
v11 = strlength(v18);
v12 = v16;
}
else if ( (v15 & 2) != 0 )
{
v11 = v14 - v18;
v12 = v16;
}
else
{
v11 = strlength(v18);
v12 = "";
}
v5 = strlen(v23);
v8 = v11 + v5;
if ( strlen(v12) + v8 < 0x200 && v11 < 0x100 )
{
if ( v19 == v13 )
{
memmove(v22, v18, v11);
v18 = v22;
}
v6 = stpcpy(v19, v23);
v14 = (_BYTE *)strmake(v6, v18, v11);
stpcpy(v14, v12);
}
else
{
if ( (v15 & 0x40) != 0 )
return 0LL;
v9 = strlength(v13);
if ( v9 >= 0x1FF )
strmake(v19, v13, 511LL);
else
strmake(v19, v13, v9);
}
if ( (v15 & 0x20) != 0 )
{
my_realpath(v19, v19, 0LL);
}
else if ( (v15 & 0x10) != 0 )
{
stpcpy(v22, v19);
my_readlink(v19, v22, 0LL);
}
return v19;
}
| fn_format:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x6a0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x620],RDI
MOV qword ptr [RBP + -0x628],RSI
MOV qword ptr [RBP + -0x630],RDX
MOV qword ptr [RBP + -0x638],RCX
MOV dword ptr [RBP + -0x63c],R8D
JMP 0x001422dd
LAB_001422dd:
JMP 0x001422df
LAB_001422df:
JMP 0x001422e1
LAB_001422e1:
JMP 0x001422e3
LAB_001422e3:
JMP 0x001422e5
LAB_001422e5:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x628]
MOV qword ptr [RBP + -0x650],RSI
LEA RDX,[RBP + -0x668]
CALL 0x001420a0
MOV qword ptr [RBP + -0x660],RAX
ADD RAX,qword ptr [RBP + -0x628]
MOV qword ptr [RBP + -0x628],RAX
CMP qword ptr [RBP + -0x660],0x0
JZ 0x00142333
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014234f
LAB_00142333:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x630]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00142100
JMP 0x001423ff
LAB_0014234f:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001423fd
LEA RDI,[RBP + -0x210]
CALL 0x00145000
CMP EAX,0x0
JNZ 0x001423fd
LEA RDI,[RBP + -0x610]
XOR ESI,ESI
MOV EDX,0x200
CALL 0x00133190
MOV byte ptr [RBP + -0x610],0x2
LEA RDI,[RBP + -0x410]
LEA RSI,[RBP + -0x210]
MOV EDX,0x1ff
CALL 0x0018c520
MOV qword ptr [RBP + -0x670],RAX
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x630]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00142100
MOV qword ptr [RBP + -0x648],RAX
MOV RDI,qword ptr [RBP + -0x648]
LEA RSI,[RBP + -0x410]
MOV RAX,qword ptr [RBP + -0x648]
LEA RCX,[RBP + -0x210]
SUB RAX,RCX
CDQE
MOV EDX,0x1ff
SUB RDX,RAX
CALL 0x0018c520
LAB_001423fd:
JMP 0x001423ff
LAB_001423ff:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00142420
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x210]
CALL 0x001427b0
LAB_00142420:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00142441
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x210]
CALL 0x00143230
LAB_00142441:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x001424c8
MOV RDI,qword ptr [RBP + -0x628]
MOV ESI,0x2e
CALL 0x00133110
MOV qword ptr [RBP + -0x648],RAX
CMP RAX,0x0
JZ 0x001424c8
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x001424a0
MOV RDI,qword ptr [RBP + -0x628]
CALL 0x001426f0
MOV qword ptr [RBP + -0x660],RAX
LEA RAX,[0x1a8ffa]
MOV qword ptr [RBP + -0x658],RAX
JMP 0x001424c6
LAB_001424a0:
MOV RAX,qword ptr [RBP + -0x648]
MOV RCX,qword ptr [RBP + -0x628]
SUB RAX,RCX
MOV qword ptr [RBP + -0x660],RAX
MOV RAX,qword ptr [RBP + -0x638]
MOV qword ptr [RBP + -0x658],RAX
LAB_001424c6:
JMP 0x001424e9
LAB_001424c8:
MOV RDI,qword ptr [RBP + -0x628]
CALL 0x001426f0
MOV qword ptr [RBP + -0x660],RAX
MOV RAX,qword ptr [RBP + -0x638]
MOV qword ptr [RBP + -0x658],RAX
LAB_001424e9:
LEA RDI,[RBP + -0x210]
CALL 0x00133130
ADD RAX,qword ptr [RBP + -0x660]
MOV qword ptr [RBP + -0x680],RAX
MOV RDI,qword ptr [RBP + -0x658]
CALL 0x00133130
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x680]
ADD RAX,RCX
CMP RAX,0x200
JNC 0x00142535
CMP qword ptr [RBP + -0x660],0x100
JC 0x001425cd
LAB_00142535:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00142555
JMP 0x00142545
LAB_00142545:
MOV qword ptr [RBP + -0x618],0x0
JMP 0x001426b9
LAB_00142555:
MOV RDI,qword ptr [RBP + -0x650]
CALL 0x001426f0
MOV qword ptr [RBP + -0x678],RAX
JMP 0x0014256a
LAB_0014256a:
MOV RAX,qword ptr [RBP + -0x620]
MOV qword ptr [RBP + -0x690],RAX
MOV RAX,qword ptr [RBP + -0x650]
MOV qword ptr [RBP + -0x688],RAX
CMP qword ptr [RBP + -0x678],0x1ff
JNC 0x001425a3
MOV RAX,qword ptr [RBP + -0x678]
MOV qword ptr [RBP + -0x698],RAX
JMP 0x001425b1
LAB_001425a3:
MOV EAX,0x1ff
MOV qword ptr [RBP + -0x698],RAX
JMP 0x001425b1
LAB_001425b1:
MOV RSI,qword ptr [RBP + -0x688]
MOV RDI,qword ptr [RBP + -0x690]
MOV RDX,qword ptr [RBP + -0x698]
CALL 0x0018c520
JMP 0x00142648
LAB_001425cd:
MOV RAX,qword ptr [RBP + -0x620]
CMP RAX,qword ptr [RBP + -0x650]
JNZ 0x00142605
LEA RDI,[RBP + -0x410]
MOV RSI,qword ptr [RBP + -0x628]
MOV RDX,qword ptr [RBP + -0x660]
CALL 0x00133580
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x628],RAX
LAB_00142605:
MOV RDI,qword ptr [RBP + -0x620]
LEA RSI,[RBP + -0x210]
CALL 0x001332b0
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x628]
MOV RDX,qword ptr [RBP + -0x660]
CALL 0x0018c520
MOV qword ptr [RBP + -0x648],RAX
MOV RDI,qword ptr [RBP + -0x648]
MOV RSI,qword ptr [RBP + -0x658]
CALL 0x001332b0
LAB_00142648:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x0014266f
MOV RDI,qword ptr [RBP + -0x620]
MOV RSI,qword ptr [RBP + -0x620]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00145ed0
JMP 0x001426a9
LAB_0014266f:
MOV EAX,dword ptr [RBP + -0x63c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001426a7
LEA RDI,[RBP + -0x410]
MOV RSI,qword ptr [RBP + -0x620]
CALL 0x001332b0
MOV RDI,qword ptr [RBP + -0x620]
LEA RSI,[RBP + -0x410]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00145cd0
LAB_001426a7:
JMP 0x001426a9
LAB_001426a9:
JMP 0x001426ab
LAB_001426ab:
MOV RAX,qword ptr [RBP + -0x620]
MOV qword ptr [RBP + -0x618],RAX
LAB_001426b9:
MOV RAX,qword ptr [RBP + -0x618]
MOV qword ptr [RBP + -0x6a0],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001426e9
MOV RAX,qword ptr [RBP + -0x6a0]
ADD RSP,0x6a0
POP RBP
RET
LAB_001426e9:
CALL 0x00133310
|
char * fn_format(char *param_1,char *param_2,int8 param_3,char *param_4,uint param_5)
{
int iVar1;
size_t sVar2;
long lVar3;
char *pcVar4;
long in_FS_OFFSET;
ulong local_6a0;
int1 local_670 [8];
ulong local_668;
char *local_660;
char *local_658;
char *local_650;
uint local_644;
char *local_640;
int8 local_638;
char *local_630;
char *local_628;
char *local_620;
int1 local_618 [512];
char local_418 [512];
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_658 = param_2;
local_644 = param_5;
local_640 = param_4;
local_638 = param_3;
local_630 = param_2;
local_628 = param_1;
local_668 = dirname_part(local_218,param_2,local_670);
local_630 = local_630 + local_668;
if ((local_668 == 0) || ((local_644 & 1) != 0)) {
convert_dirname(local_218,local_638,0);
}
else if (((local_644 & 0x80) != 0) && (iVar1 = test_if_hard_path(local_218), iVar1 == 0)) {
memset(local_618,0,0x200);
local_618[0] = 2;
strmake(local_418,local_218,0x1ff);
local_650 = (char *)convert_dirname(local_218,local_638,0);
strmake(local_650,local_418,0x1ff - (long)((int)local_650 - (int)local_218));
}
if ((local_644 & 8) != 0) {
pack_dirname(local_218,local_218);
}
if ((local_644 & 4) != 0) {
unpack_dirname(local_218,local_218);
}
if (((local_644 & 0x100) == 0) && (local_650 = strchr(local_630,0x2e), local_650 != (char *)0x0))
{
if ((local_644 & 2) == 0) {
local_668 = strlength(local_630);
local_660 = "";
}
else {
local_668 = (long)local_650 - (long)local_630;
local_660 = local_640;
}
}
else {
local_668 = strlength(local_630);
local_660 = local_640;
}
sVar2 = strlen(local_218);
lVar3 = sVar2 + local_668;
sVar2 = strlen(local_660);
if ((lVar3 + sVar2 < 0x200) && (local_668 < 0x100)) {
if (local_628 == local_658) {
memmove(local_418,local_630,local_668);
local_630 = local_418;
}
pcVar4 = stpcpy(local_628,local_218);
local_650 = (char *)strmake(pcVar4,local_630,local_668);
stpcpy(local_650,local_660);
}
else {
if ((local_644 & 0x40) != 0) {
local_620 = (char *)0x0;
goto LAB_001426b9;
}
local_6a0 = strlength(local_658);
if (0x1fe < local_6a0) {
local_6a0 = 0x1ff;
}
strmake(local_628,local_658,local_6a0);
}
if ((local_644 & 0x20) == 0) {
if ((local_644 & 0x10) != 0) {
stpcpy(local_418,local_628);
my_readlink(local_628,local_418,0);
}
}
else {
my_realpath(local_628,local_628,0);
}
local_620 = local_628;
LAB_001426b9:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_620;
}
| |
34,552 | check_mb_utf8_sequence | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_utf8_sequence(const char *start, const char *end)
{
uchar c;
if (start >= end) {
return 0;
}
c = (uchar) start[0];
if (c < 0x80) {
return 1; /* single byte character */
}
if (c < 0xC2) {
return 0; /* invalid mb character */
}
if (c < 0xE0) {
if (start + 2 > end) {
return 0; /* too small */
}
if (!(((uchar)start[1] ^ 0x80) < 0x40)) {
return 0;
}
return 2;
}
if (c < 0xF0) {
if (start + 3 > end) {
return 0; /* too small */
}
if (!(((uchar)start[1] ^ 0x80) < 0x40 && ((uchar)start[2] ^ 0x80) < 0x40 &&
(c >= 0xE1 || (uchar)start[1] >= 0xA0))) {
return 0; /* invalid utf8 character */
}
return 3;
}
if (c < 0xF5) {
if (start + 4 > end) { /* We need 4 characters */
return 0; /* too small */
}
/*
UTF-8 quick four-byte mask:
11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
Encoding allows to encode U+00010000..U+001FFFFF
The maximum character defined in the Unicode standard is U+0010FFFF.
Higher characters U+00110000..U+001FFFFF are not used.
11110000.10010000.10xxxxxx.10xxxxxx == F0.90.80.80 == U+00010000 (min)
11110100.10001111.10111111.10111111 == F4.8F.BF.BF == U+0010FFFF (max)
Valid codes:
[F0][90..BF][80..BF][80..BF]
[F1][80..BF][80..BF][80..BF]
[F2][80..BF][80..BF][80..BF]
[F3][80..BF][80..BF][80..BF]
[F4][80..8F][80..BF][80..BF]
*/
if (!(((uchar)start[1] ^ 0x80) < 0x40 &&
((uchar)start[2] ^ 0x80) < 0x40 &&
((uchar)start[3] ^ 0x80) < 0x40 &&
(c >= 0xf1 || (uchar)start[1] >= 0x90) &&
(c <= 0xf3 || (uchar)start[1] <= 0x8F)))
{
return 0; /* invalid utf8 character */
}
return 4;
}
return 0;
} | O0 | c | check_mb_utf8_sequence:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x6b4f2
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x80, %eax
jge 0x6b512
movl $0x1, -0x4(%rbp)
jmp 0x6b69f
movzbl -0x19(%rbp), %eax
cmpl $0xc2, %eax
jge 0x6b529
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movzbl -0x19(%rbp), %eax
cmpl $0xe0, %eax
jge 0x6b578
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jbe 0x6b54e
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x6b56c
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movl $0x2, -0x4(%rbp)
jmp 0x6b69f
movzbl -0x19(%rbp), %eax
cmpl $0xf0, %eax
jge 0x6b5f3
movq -0x10(%rbp), %rax
addq $0x3, %rax
cmpq -0x18(%rbp), %rax
jbe 0x6b59d
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6b5db
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6b5db
movzbl -0x19(%rbp), %eax
cmpl $0xe1, %eax
jge 0x6b5e7
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x6b5e7
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movl $0x3, -0x4(%rbp)
jmp 0x6b69f
movzbl -0x19(%rbp), %eax
cmpl $0xf5, %eax
jge 0x6b698
movq -0x10(%rbp), %rax
addq $0x4, %rax
cmpq -0x18(%rbp), %rax
jbe 0x6b61c
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6b686
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6b686
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x6b686
movzbl -0x19(%rbp), %eax
cmpl $0xf1, %eax
jge 0x6b66c
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x6b686
movzbl -0x19(%rbp), %eax
cmpl $0xf3, %eax
jle 0x6b68f
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x6b68f
movl $0x0, -0x4(%rbp)
jmp 0x6b69f
movl $0x4, -0x4(%rbp)
jmp 0x6b69f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_mb_utf8_sequence:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jb short loc_6B4F2
mov [rbp+var_4], 0
jmp loc_6B69F
loc_6B4F2:
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
cmp eax, 80h
jge short loc_6B512
mov [rbp+var_4], 1
jmp loc_6B69F
loc_6B512:
movzx eax, [rbp+var_19]
cmp eax, 0C2h
jge short loc_6B529
mov [rbp+var_4], 0
jmp loc_6B69F
loc_6B529:
movzx eax, [rbp+var_19]
cmp eax, 0E0h
jge short loc_6B578
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jbe short loc_6B54E
mov [rbp+var_4], 0
jmp loc_6B69F
loc_6B54E:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_6B56C
mov [rbp+var_4], 0
jmp loc_6B69F
loc_6B56C:
mov [rbp+var_4], 2
jmp loc_6B69F
loc_6B578:
movzx eax, [rbp+var_19]
cmp eax, 0F0h
jge short loc_6B5F3
mov rax, [rbp+var_10]
add rax, 3
cmp rax, [rbp+var_18]
jbe short loc_6B59D
mov [rbp+var_4], 0
jmp loc_6B69F
loc_6B59D:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6B5DB
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6B5DB
movzx eax, [rbp+var_19]
cmp eax, 0E1h
jge short loc_6B5E7
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_6B5E7
loc_6B5DB:
mov [rbp+var_4], 0
jmp loc_6B69F
loc_6B5E7:
mov [rbp+var_4], 3
jmp loc_6B69F
loc_6B5F3:
movzx eax, [rbp+var_19]
cmp eax, 0F5h
jge loc_6B698
mov rax, [rbp+var_10]
add rax, 4
cmp rax, [rbp+var_18]
jbe short loc_6B61C
mov [rbp+var_4], 0
jmp loc_6B69F
loc_6B61C:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6B686
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6B686
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_6B686
movzx eax, [rbp+var_19]
cmp eax, 0F1h
jge short loc_6B66C
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_6B686
loc_6B66C:
movzx eax, [rbp+var_19]
cmp eax, 0F3h
jle short loc_6B68F
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_6B68F
loc_6B686:
mov [rbp+var_4], 0
jmp short loc_6B69F
loc_6B68F:
mov [rbp+var_4], 4
jmp short loc_6B69F
loc_6B698:
mov [rbp+var_4], 0
loc_6B69F:
mov eax, [rbp+var_4]
pop rbp
retn
| long long check_mb_utf8_sequence(unsigned __int8 *a1, unsigned long long a2)
{
unsigned __int8 v3; // [rsp+1h] [rbp-19h]
if ( (unsigned long long)a1 < a2 )
{
v3 = *a1;
if ( *a1 >= 0x80u )
{
if ( v3 >= 0xC2u )
{
if ( v3 >= 0xE0u )
{
if ( v3 >= 0xF0u )
{
if ( v3 >= 0xF5u )
{
return 0;
}
else if ( (unsigned long long)(a1 + 4) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64
&& (a1[2] ^ 0x80) < 64
&& (a1[3] ^ 0x80) < 64
&& (v3 >= 0xF1u || a1[1] >= 0x90u)
&& (v3 <= 0xF3u || a1[1] <= 0x8Fu) )
{
return 4;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a1 + 3) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) )
return 3;
else
return 0;
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a1 + 2) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 )
return 2;
else
return 0;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
return 1;
}
}
else
{
return 0;
}
}
| check_mb_utf8_sequence:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x0016b4f2
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b4f2:
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x80
JGE 0x0016b512
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0016b69f
LAB_0016b512:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xc2
JGE 0x0016b529
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b529:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe0
JGE 0x0016b578
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0016b54e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b54e:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0016b56c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b56c:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0016b69f
LAB_0016b578:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xf0
JGE 0x0016b5f3
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0016b59d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b59d:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016b5db
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016b5db
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe1
JGE 0x0016b5e7
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x0016b5e7
LAB_0016b5db:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b5e7:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0016b69f
LAB_0016b5f3:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xf5
JGE 0x0016b698
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0016b61c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b61c:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016b686
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016b686
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0016b686
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xf1
JGE 0x0016b66c
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x0016b686
LAB_0016b66c:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xf3
JLE 0x0016b68f
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x0016b68f
LAB_0016b686:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016b69f
LAB_0016b68f:
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0016b69f
LAB_0016b698:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016b69f:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 check_mb_utf8_sequence(byte *param_1,byte *param_2)
{
byte bVar1;
int4 local_c;
if (param_1 < param_2) {
bVar1 = *param_1;
if (bVar1 < 0x80) {
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_2 < param_1 + 2) {
local_c = 0;
}
else if ((param_1[1] ^ 0x80) < 0x40) {
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_2 < param_1 + 3) {
local_c = 0;
}
else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_1[1])))) {
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if (param_2 < param_1 + 4) {
local_c = 0;
}
else if ((((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) &&
((param_1[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_1[1])))) &&
((bVar1 < 0xf4 || (param_1[1] < 0x90)))) {
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
34,553 | mysql_list_fields_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_list_fields_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_fields,
(parms->mysql, parms->table, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O0 | c | mysql_list_fields_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x51d60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_list_fields_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
call mysql_list_fields
mov [rbp+var_18], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| long long mysql_list_fields_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_list_fields(*(_QWORD *)a1, *(const char **)(a1 + 8), *(const char **)(a1 + 16));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_list_fields_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
CALL 0x00151d60
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_list_fields_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_fields(*param_1,param_1[1],param_1[2]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
34,554 | remove_io_thread | eloqsql/mysys/mf_iocache.c | void remove_io_thread(IO_CACHE *cache)
{
IO_CACHE_SHARE *cshare= cache->share;
uint total;
DBUG_ENTER("remove_io_thread");
/* If the writer goes, it needs to flush the write cache. */
if (cache == cshare->source_cache)
flush_io_cache(cache);
mysql_mutex_lock(&cshare->mutex);
DBUG_PRINT("io_cache_share", ("%s: %p",
(cache == cshare->source_cache) ?
"writer" : "reader", cache));
/* Remove from share. */
total= --cshare->total_threads;
DBUG_PRINT("io_cache_share", ("remaining threads: %u", total));
/* Detach from share. */
cache->share= NULL;
/* If the writer goes, let the readers know. */
if (cache == cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("writer leaves"));
cshare->source_cache= NULL;
}
/* If all threads are waiting for me to join the lock, wake them. */
if (!--cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("the last running thread leaves, wake all"));
mysql_cond_signal(&cshare->cond_writer);
mysql_cond_broadcast(&cshare->cond);
}
mysql_mutex_unlock(&cshare->mutex);
if (!total)
{
DBUG_PRINT("io_cache_share", ("last thread removed, destroy share"));
mysql_cond_destroy (&cshare->cond_writer);
mysql_cond_destroy (&cshare->cond);
mysql_mutex_destroy(&cshare->mutex);
}
DBUG_VOID_RETURN;
} | O3 | c | remove_io_thread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x98(%rdi), %rbx
cmpq %rdi, 0xc0(%rbx)
jne 0xb173b
movq %r14, %rdi
movl $0x1, %esi
callq 0xb0e3d
cmpq $0x0, 0x40(%rbx)
jne 0xb184b
movq %rbx, %rdi
callq 0x2a230
movl 0xdc(%rbx), %r15d
decl %r15d
movl %r15d, 0xdc(%rbx)
movq $0x0, 0x98(%r14)
cmpq %r14, 0xc0(%rbx)
jne 0xb177e
movq $0x0, 0xc0(%rbx)
decl 0xd8(%rbx)
jne 0xb17be
leaq 0x80(%rbx), %r14
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
jne 0xb1879
movq %r14, %rdi
callq 0x2a630
leaq 0x48(%rbx), %r14
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
jne 0xb188e
movq %r14, %rdi
callq 0x2a7a0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0xb1864
movq %rbx, %rdi
callq 0x2a1f0
testl %r15d, %r15d
je 0xb17e3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x80(%rbx), %r14
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
jne 0xb18a3
movq %r14, %rdi
callq 0x2a290
leaq 0x48(%rbx), %r14
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
jne 0xb18c0
movq %r14, %rdi
callq 0x2a290
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0xb1839
leaq 0x2fd1ed(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2a0f0
leaq 0x4e3a5(%rip), %rsi # 0xffbf7
movq %rbx, %rdi
movl $0x392, %edx # imm = 0x392
callq 0x312ea
jmp 0xb174e
leaq 0x2fd1ad(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xb17cb
leaq 0x2fd198(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xb179d
leaq 0x2fd183(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x178(%rax)
jmp 0xb17b6
leaq 0x2fd16e(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0xb0(%rbx)
jmp 0xb17fa
leaq 0x2fd151(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0x78(%rbx)
jmp 0xb1813
| remove_io_thread:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdi
mov rbx, [rdi+98h]
cmp [rbx+0C0h], rdi
jnz short loc_B173B
mov rdi, r14
mov esi, 1
call my_b_flush_io_cache
loc_B173B:
cmp qword ptr [rbx+40h], 0
jnz loc_B184B
mov rdi, rbx
call _pthread_mutex_lock
loc_B174E:
mov r15d, [rbx+0DCh]
dec r15d
mov [rbx+0DCh], r15d
mov qword ptr [r14+98h], 0
cmp [rbx+0C0h], r14
jnz short loc_B177E
mov qword ptr [rbx+0C0h], 0
loc_B177E:
dec dword ptr [rbx+0D8h]
jnz short loc_B17BE
lea r14, [rbx+80h]
mov rdi, [rbx+0B0h]
test rdi, rdi
jnz loc_B1879
loc_B179D:
mov rdi, r14
call _pthread_cond_signal
lea r14, [rbx+48h]
mov rdi, [rbx+78h]
test rdi, rdi
jnz loc_B188E
loc_B17B6:
mov rdi, r14
call _pthread_cond_broadcast
loc_B17BE:
mov rdi, [rbx+40h]
test rdi, rdi
jnz loc_B1864
loc_B17CB:
mov rdi, rbx
call _pthread_mutex_unlock
test r15d, r15d
jz short loc_B17E3
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_B17E3:
lea r14, [rbx+80h]
mov rdi, [rbx+0B0h]
test rdi, rdi
jnz loc_B18A3
loc_B17FA:
mov rdi, r14
call _pthread_cond_destroy
lea r14, [rbx+48h]
mov rdi, [rbx+78h]
test rdi, rdi
jnz loc_B18C0
loc_B1813:
mov rdi, r14
call _pthread_cond_destroy
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_B1839
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_B1839:
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _pthread_mutex_destroy
loc_B184B:
lea rsi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 392h
call psi_mutex_lock
jmp loc_B174E
loc_B1864:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_B17CB
loc_B1879:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_B179D
loc_B188E:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp loc_B17B6
loc_B18A3:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+0B0h], 0
jmp loc_B17FA
loc_B18C0:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+78h], 0
jmp loc_B1813
| long long remove_io_thread(long long a1)
{
long long v1; // rbx
int v2; // r15d
long long v4; // rdi
long long v5; // rdi
long long v6; // rdi
long long result; // rax
long long v8; // rdi
long long v9; // rdi
long long v10; // rdi
v1 = *(_QWORD *)(a1 + 152);
if ( *(_QWORD *)(v1 + 192) == a1 )
my_b_flush_io_cache(a1, 1);
if ( *(_QWORD *)(v1 + 64) )
psi_mutex_lock(v1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x392u);
else
pthread_mutex_lock(v1);
v2 = *(_DWORD *)(v1 + 220) - 1;
*(_DWORD *)(v1 + 220) = v2;
*(_QWORD *)(a1 + 152) = 0LL;
if ( *(_QWORD *)(v1 + 192) == a1 )
*(_QWORD *)(v1 + 192) = 0LL;
if ( (*(_DWORD *)(v1 + 216))-- == 1 )
{
v4 = *(_QWORD *)(v1 + 176);
if ( v4 )
((void ( *)(long long))PSI_server[46])(v4);
pthread_cond_signal(v1 + 128);
v5 = *(_QWORD *)(v1 + 120);
if ( v5 )
((void ( *)(long long))PSI_server[47])(v5);
pthread_cond_broadcast(v1 + 72);
}
v6 = *(_QWORD *)(v1 + 64);
if ( v6 )
((void ( *)(long long))PSI_server[44])(v6);
result = pthread_mutex_unlock(v1);
if ( !v2 )
{
v8 = *(_QWORD *)(v1 + 176);
if ( v8 )
{
((void ( *)(long long))PSI_server[13])(v8);
*(_QWORD *)(v1 + 176) = 0LL;
}
pthread_cond_destroy(v1 + 128);
v9 = *(_QWORD *)(v1 + 120);
if ( v9 )
{
((void ( *)(long long))PSI_server[13])(v9);
*(_QWORD *)(v1 + 120) = 0LL;
}
pthread_cond_destroy(v1 + 72);
v10 = *(_QWORD *)(v1 + 64);
if ( v10 )
{
((void ( *)(long long))PSI_server[9])(v10);
*(_QWORD *)(v1 + 64) = 0LL;
}
return pthread_mutex_destroy(v1);
}
return result;
}
| remove_io_thread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RBX,qword ptr [RDI + 0x98]
CMP qword ptr [RBX + 0xc0],RDI
JNZ 0x001b173b
MOV RDI,R14
MOV ESI,0x1
CALL 0x001b0e3d
LAB_001b173b:
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x001b184b
MOV RDI,RBX
CALL 0x0012a230
LAB_001b174e:
MOV R15D,dword ptr [RBX + 0xdc]
DEC R15D
MOV dword ptr [RBX + 0xdc],R15D
MOV qword ptr [R14 + 0x98],0x0
CMP qword ptr [RBX + 0xc0],R14
JNZ 0x001b177e
MOV qword ptr [RBX + 0xc0],0x0
LAB_001b177e:
DEC dword ptr [RBX + 0xd8]
JNZ 0x001b17be
LEA R14,[RBX + 0x80]
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JNZ 0x001b1879
LAB_001b179d:
MOV RDI,R14
CALL 0x0012a630
LEA R14,[RBX + 0x48]
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JNZ 0x001b188e
LAB_001b17b6:
MOV RDI,R14
CALL 0x0012a7a0
LAB_001b17be:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001b1864
LAB_001b17cb:
MOV RDI,RBX
CALL 0x0012a1f0
TEST R15D,R15D
JZ 0x001b17e3
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001b17e3:
LEA R14,[RBX + 0x80]
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JNZ 0x001b18a3
LAB_001b17fa:
MOV RDI,R14
CALL 0x0012a290
LEA R14,[RBX + 0x48]
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JNZ 0x001b18c0
LAB_001b1813:
MOV RDI,R14
CALL 0x0012a290
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x001b1839
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_001b1839:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0012a0f0
LAB_001b184b:
LEA RSI,[0x1ffbf7]
MOV RDI,RBX
MOV EDX,0x392
CALL 0x001312ea
JMP 0x001b174e
LAB_001b1864:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001b17cb
LAB_001b1879:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001b179d
LAB_001b188e:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x001b17b6
LAB_001b18a3:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0xb0],0x0
JMP 0x001b17fa
LAB_001b18c0:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0x78],0x0
JMP 0x001b1813
|
void remove_io_thread(long param_1)
{
int *piVar1;
pthread_mutex_t *__mutex;
int iVar2;
__mutex = *(pthread_mutex_t **)(param_1 + 0x98);
if (*(long *)((long)__mutex + 0xc0) == param_1) {
my_b_flush_io_cache(param_1,1);
}
if (*(long *)((long)__mutex + 0x40) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x392);
}
iVar2 = *(int *)((long)__mutex + 0xdc) + -1;
*(int *)((long)__mutex + 0xdc) = iVar2;
*(int8 *)(param_1 + 0x98) = 0;
if (*(long *)((long)__mutex + 0xc0) == param_1) {
*(int8 *)((long)__mutex + 0xc0) = 0;
}
piVar1 = (int *)((long)__mutex + 0xd8);
*piVar1 = *piVar1 + -1;
if (*piVar1 == 0) {
if (*(long *)((long)__mutex + 0xb0) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80));
if (__mutex[3].__align != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)((long)__mutex + 0x48));
}
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
if (iVar2 != 0) {
return;
}
if (*(long *)((long)__mutex + 0xb0) != 0) {
(**(code **)(PSI_server + 0x68))();
*(int8 *)((long)__mutex + 0xb0) = 0;
}
pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x80));
if (__mutex[3].__align != 0) {
(**(code **)(PSI_server + 0x68))();
__mutex[3].__align = 0;
}
pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x48));
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)((long)__mutex + 0x40) = 0;
}
pthread_mutex_destroy(__mutex);
return;
}
| |
34,555 | minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>) | monkey531[P]llama/common/minja.hpp | static Value array(const std::vector<Value> values = {}) {
auto array = std::make_shared<ArrayType>();
for (const auto& item : values) {
array->push_back(item);
}
return Value(array);
} | O2 | cpp | minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x83a2f
movq (%r15), %r14
movq 0x8(%r15), %r15
cmpq %r15, %r14
je 0x8526d
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x85354
addq $0x50, %r14
jmp 0x85256
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x85380
leaq 0x8(%rsp), %rdi
callq 0x4d966
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4d966
movq %rbx, %rdi
callq 0x27660
| _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, rsi
mov rbx, rdi
mov rdi, rsp
call _ZSt11make_sharedISt6vectorIN5minja5ValueESaIS2_EEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<std::vector<minja::Value>>()
mov r14, [r15]
mov r15, [r15+8]
loc_85256:
cmp r14, r15
jz short loc_8526D
mov rdi, [rsp+28h+var_28]
mov rsi, r14
call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backERKS1_; std::vector<minja::Value>::push_back(minja::Value const&)
add r14, 50h ; 'P'
jmp short loc_85256
loc_8526D:
mov rsi, rsp
mov rdi, rbx
call _ZN5minja5ValueC2ERKSt10shared_ptrISt6vectorIS0_SaIS0_EEE; minja::Value::Value(std::shared_ptr<std::vector<minja::Value>> const&)
lea rdi, [rsp+28h+var_20]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::array(long long a1, long long *a2)
{
long long v2; // r14
long long v3; // r15
long long v5; // [rsp+0h] [rbp-28h] BYREF
_QWORD v6[4]; // [rsp+8h] [rbp-20h] BYREF
std::make_shared<std::vector<minja::Value>>((long long)&v5);
v2 = *a2;
v3 = a2[1];
while ( v2 != v3 )
{
std::vector<minja::Value>::push_back(v5, v2);
v2 += 80LL;
}
minja::Value::Value(a1, &v5);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v6);
return a1;
}
| array:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x00183a2f
MOV R14,qword ptr [R15]
MOV R15,qword ptr [R15 + 0x8]
LAB_00185256:
CMP R14,R15
JZ 0x0018526d
MOV RDI,qword ptr [RSP]
LAB_0018525f:
MOV RSI,R14
CALL 0x00185354
LAB_00185267:
ADD R14,0x50
JMP 0x00185256
LAB_0018526d:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00185380
LEA RDI,[RSP + 0x8]
CALL 0x0014d966
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value> >) */
Value * __thiscall minja::Value::array(Value *this,int8 *param_2)
{
Value *pVVar1;
Value *pVVar2;
vector<minja::Value,std::allocator<minja::Value>> *local_28;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_20 [8];
std::make_shared<std::vector<minja::Value,std::allocator<minja::Value>>>();
pVVar1 = (Value *)param_2[1];
for (pVVar2 = (Value *)*param_2; pVVar2 != pVVar1; pVVar2 = pVVar2 + 0x50) {
/* try { // try from 0018525f to 00185266 has its CatchHandler @ 0018528f */
std::vector<minja::Value,std::allocator<minja::Value>>::push_back(local_28,pVVar2);
}
Value(this,(shared_ptr *)&local_28);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_20);
return this;
}
| |
34,556 | OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp | void
TriRefinement::populateVertexEdgeRelation() {
//
// Notes on allocating/initializing the vertex-edge counts/offsets vector:
//
// Be aware of scheme-specific decisions here, e.g.:
// - no verts from parent faces for Loop
// - more interior edges and faces for verts from parent edges for Loop
// - no guaranteed "neighborhood" around Bilinear verts from verts
//
// If uniform subdivision, vert-edge count will be:
// - 2 + 2*N faces incident parent edge for verts from parent edges
// - same as parent vert for verts from parent verts
// If sparse subdivision, vert-edge count will be:
// - non-trivial function of child faces in parent face
// - 1 child face will always result in 2 child edges
// * 2 child faces can mean 3 or 4 child edges
// - 3 child faces will always result in 4 child edges
// - 1 or 2 + N faces incident parent edge for verts from parent edges
// - where the 1 or 2 is number of child edges of parent edge
// - any end vertex will require all N child faces (catmark)
// - same as parent vert for verts from parent verts (catmark)
//
int childVertEdgeIndexSizeEstimate = (int)_parent->_edgeFaceIndices.size() * 2 + _parent->getNumEdges() * 2
+ (int)_parent->_vertEdgeIndices.size();
_child->_vertEdgeCountsAndOffsets.resize(_child->getNumVertices() * 2);
_child->_vertEdgeIndices.resize( childVertEdgeIndexSizeEstimate);
_child->_vertEdgeLocalIndices.resize( childVertEdgeIndexSizeEstimate);
if (getFirstChildVertexFromVertices() == 0) {
populateVertexEdgesFromParentVertices();
populateVertexEdgesFromParentEdges();
} else {
populateVertexEdgesFromParentEdges();
populateVertexEdgesFromParentVertices();
}
// Revise the over-allocated estimate based on what is used (as indicated in the
// count/offset for the last vertex) and trim the index vectors accordingly:
childVertEdgeIndexSizeEstimate = _child->getNumVertexEdges(_child->getNumVertices()-1) +
_child->getOffsetOfVertexEdges(_child->getNumVertices()-1);
_child->_vertEdgeIndices.resize( childVertEdgeIndexSizeEstimate);
_child->_vertEdgeLocalIndices.resize(childVertEdgeIndexSizeEstimate);
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation():
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x8(%rax), %rdi
addq $0xa8, %rdi
callq 0xd7ae0
movq %rax, %rcx
movq -0x18(%rbp), %rax
shll %ecx
movl %ecx, -0x28(%rbp)
movq 0x8(%rax), %rdi
callq 0xca130
movl -0x28(%rbp), %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
shll %edx
addl %edx, %ecx
movl %ecx, -0x24(%rbp)
movq 0x8(%rax), %rdi
addq $0x168, %rdi # imm = 0x168
callq 0xd7ae0
movl -0x24(%rbp), %ecx
movq %rax, %rdx
movq -0x18(%rbp), %rax
addl %edx, %ecx
movl %ecx, -0xc(%rbp)
movq 0x10(%rax), %rcx
addq $0x150, %rcx # imm = 0x150
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rdi
callq 0xc8fe0
movq -0x20(%rbp), %rdi
shll %eax
movslq %eax, %rsi
callq 0xc9aa0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x168, %rdi # imm = 0x168
movslq -0xc(%rbp), %rsi
callq 0xc9aa0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x180, %rdi # imm = 0x180
movslq -0xc(%rbp), %rsi
callq 0xc7e90
movq -0x18(%rbp), %rdi
callq 0xd3b90
cmpl $0x0, %eax
jne 0x109df0
movq -0x18(%rbp), %rdi
callq 0xcc540
movq -0x18(%rbp), %rdi
callq 0xc7ba0
jmp 0x109e02
movq -0x18(%rbp), %rdi
callq 0xc7ba0
movq -0x18(%rbp), %rdi
callq 0xcc540
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x10(%rax), %rdi
callq 0xc8fe0
movq -0x40(%rbp), %rdi
movl %eax, %esi
subl $0x1, %esi
callq 0xcba40
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0x2c(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rdi
callq 0xc8fe0
movq -0x38(%rbp), %rdi
movl %eax, %esi
subl $0x1, %esi
callq 0xc8070
movl -0x2c(%rbp), %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
addl %edx, %ecx
movl %ecx, -0xc(%rbp)
movq 0x10(%rax), %rdi
addq $0x168, %rdi # imm = 0x168
movslq -0xc(%rbp), %rsi
callq 0xc9aa0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x180, %rdi # imm = 0x180
movslq -0xc(%rbp), %rsi
callq 0xc7e90
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement26populateVertexEdgeRelationEv:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rdi, [rax+8]
add rdi, 0A8h
call __ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rcx, rax
mov rax, [rbp+var_18]
shl ecx, 1
mov [rbp+var_28], ecx
mov rdi, [rax+8]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(void)
mov ecx, [rbp+var_28]
mov edx, eax
mov rax, [rbp+var_18]
shl edx, 1
add ecx, edx
mov [rbp+var_24], ecx
mov rdi, [rax+8]
add rdi, 168h
call __ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov ecx, [rbp+var_24]
mov rdx, rax
mov rax, [rbp+var_18]
add ecx, edx
mov [rbp+var_C], ecx
mov rcx, [rax+10h]
add rcx, 150h
mov [rbp+var_20], rcx
mov rdi, [rax+10h]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getNumVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(void)
mov rdi, [rbp+var_20]
shl eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [rbp+var_18]
mov rdi, [rax+10h]
add rdi, 168h
movsxd rsi, [rbp+var_C]
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [rbp+var_18]
mov rdi, [rax+10h]
add rdi, 180h
movsxd rsi, [rbp+var_C]
call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
mov rdi, [rbp+var_18]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal10Refinement31getFirstChildVertexFromVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFirstChildVertexFromVertices(void)
cmp eax, 0
jnz short loc_109DF0
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexEdgesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(void)
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexEdgesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(void)
jmp short loc_109E02
loc_109DF0:
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexEdgesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(void)
mov rdi, [rbp+var_18]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexEdgesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(void)
loc_109E02:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov [rbp+var_40], rcx
mov rdi, [rax+10h]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getNumVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(void)
mov rdi, [rbp+var_40]; this
mov esi, eax
sub esi, 1; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getNumVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertexEdges(int)
mov ecx, eax
mov rax, [rbp+var_18]
mov [rbp+var_2C], ecx
mov rcx, [rax+10h]
mov [rbp+var_38], rcx
mov rdi, [rax+10h]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getNumVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(void)
mov rdi, [rbp+var_38]; this
mov esi, eax
sub esi, 1; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level22getOffsetOfVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getOffsetOfVertexEdges(int)
mov ecx, [rbp+var_2C]
mov edx, eax
mov rax, [rbp+var_18]
add ecx, edx
mov [rbp+var_C], ecx
mov rdi, [rax+10h]
add rdi, 168h
movsxd rsi, [rbp+var_C]
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [rbp+var_18]
mov rdi, [rax+10h]
add rdi, 180h
movsxd rsi, [rbp+var_C]
call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
add rsp, 40h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation(
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this)
{
int NumVertices; // eax
int v2; // eax
int v3; // eax
OpenSubdiv::v3_6_0::Vtr::internal::Level *v5; // [rsp+0h] [rbp-40h]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v6; // [rsp+8h] [rbp-38h]
int NumVertexEdges; // [rsp+14h] [rbp-2Ch]
int v8; // [rsp+18h] [rbp-28h]
int v9; // [rsp+1Ch] [rbp-24h]
long long v10; // [rsp+20h] [rbp-20h]
int v11; // [rsp+34h] [rbp-Ch]
int v12; // [rsp+34h] [rbp-Ch]
v8 = 2 * std::vector<int>::size(*((_QWORD *)this + 1) + 168LL);
v9 = 2
* OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(*((OpenSubdiv::v3_6_0::Vtr::internal::Level **)this + 1))
+ v8;
v11 = std::vector<int>::size(*((_QWORD *)this + 1) + 360LL) + v9;
v10 = *((_QWORD *)this + 2) + 336LL;
NumVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(*((OpenSubdiv::v3_6_0::Vtr::internal::Level **)this
+ 2));
std::vector<int>::resize(v10, 2 * NumVertices);
std::vector<int>::resize(*((_QWORD *)this + 2) + 360LL, v11);
std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 384LL, v11);
if ( (unsigned int)OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFirstChildVertexFromVertices(this) )
{
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(this);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(this);
}
else
{
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(this);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(this);
}
v5 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)*((_QWORD *)this + 2);
v2 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(v5);
NumVertexEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertexEdges(v5, v2 - 1);
v6 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)*((_QWORD *)this + 2);
v3 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(v6);
v12 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getOffsetOfVertexEdges(v6, v3 - 1) + NumVertexEdges;
std::vector<int>::resize(*((_QWORD *)this + 2) + 360LL, v12);
return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 384LL, v12);
}
| |||
34,557 | OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp | void
TriRefinement::populateVertexEdgeRelation() {
//
// Notes on allocating/initializing the vertex-edge counts/offsets vector:
//
// Be aware of scheme-specific decisions here, e.g.:
// - no verts from parent faces for Loop
// - more interior edges and faces for verts from parent edges for Loop
// - no guaranteed "neighborhood" around Bilinear verts from verts
//
// If uniform subdivision, vert-edge count will be:
// - 2 + 2*N faces incident parent edge for verts from parent edges
// - same as parent vert for verts from parent verts
// If sparse subdivision, vert-edge count will be:
// - non-trivial function of child faces in parent face
// - 1 child face will always result in 2 child edges
// * 2 child faces can mean 3 or 4 child edges
// - 3 child faces will always result in 4 child edges
// - 1 or 2 + N faces incident parent edge for verts from parent edges
// - where the 1 or 2 is number of child edges of parent edge
// - any end vertex will require all N child faces (catmark)
// - same as parent vert for verts from parent verts (catmark)
//
int childVertEdgeIndexSizeEstimate = (int)_parent->_edgeFaceIndices.size() * 2 + _parent->getNumEdges() * 2
+ (int)_parent->_vertEdgeIndices.size();
_child->_vertEdgeCountsAndOffsets.resize(_child->getNumVertices() * 2);
_child->_vertEdgeIndices.resize( childVertEdgeIndexSizeEstimate);
_child->_vertEdgeLocalIndices.resize( childVertEdgeIndexSizeEstimate);
if (getFirstChildVertexFromVertices() == 0) {
populateVertexEdgesFromParentVertices();
populateVertexEdgesFromParentEdges();
} else {
populateVertexEdgesFromParentEdges();
populateVertexEdgesFromParentVertices();
}
// Revise the over-allocated estimate based on what is used (as indicated in the
// count/offset for the last vertex) and trim the index vectors accordingly:
childVertEdgeIndexSizeEstimate = _child->getNumVertexEdges(_child->getNumVertices()-1) +
_child->getOffsetOfVertexEdges(_child->getNumVertices()-1);
_child->_vertEdgeIndices.resize( childVertEdgeIndexSizeEstimate);
_child->_vertEdgeLocalIndices.resize(childVertEdgeIndexSizeEstimate);
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation():
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0xb0(%rax), %rcx
subq 0xa8(%rax), %rcx
movq 0x10(%rdi), %rdi
shrq $0x2, %rcx
addl 0x4(%rax), %ecx
movq 0x170(%rax), %rdx
subq 0x168(%rax), %rdx
shrq $0x2, %rdx
leal (%rdx,%rcx,2), %ebp
movslq 0x8(%rdi), %rsi
addq $0x150, %rdi # imm = 0x150
addq %rsi, %rsi
callq 0x39690
movl $0x168, %edi # imm = 0x168
addq 0x10(%rbx), %rdi
movslq %ebp, %r14
movq %r14, %rsi
callq 0x39690
movl $0x180, %edi # imm = 0x180
addq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x39160
cmpl $0x0, 0x54(%rbx)
je 0x4c17b
movq %rbx, %rdi
callq 0x390d0
movq %rbx, %rdi
callq 0x39fc0
jmp 0x4c18b
movq %rbx, %rdi
callq 0x39fc0
movq %rbx, %rdi
callq 0x390d0
movq 0x10(%rbx), %rdi
movl 0x8(%rdi), %eax
leal -0x2(,%rax,2), %ecx
movslq %ecx, %rcx
movq 0x150(%rdi), %rdx
movslq (%rdx,%rcx,4), %rcx
leal -0x1(,%rax,2), %eax
cltq
movslq (%rdx,%rax,4), %r14
addq %rcx, %r14
addq $0x168, %rdi # imm = 0x168
movq %r14, %rsi
callq 0x39690
movl $0x180, %edi # imm = 0x180
addq 0x10(%rbx), %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x39160
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement26populateVertexEdgeRelationEv:
push rbp
push r14
push rbx
mov rbx, rdi
mov rax, [rdi+8]
mov rcx, [rax+0B0h]
sub rcx, [rax+0A8h]
mov rdi, [rdi+10h]
shr rcx, 2
add ecx, [rax+4]
mov rdx, [rax+170h]
sub rdx, [rax+168h]
shr rdx, 2
lea ebp, [rdx+rcx*2]
movsxd rsi, dword ptr [rdi+8]
add rdi, 150h
add rsi, rsi
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov edi, 168h
add rdi, [rbx+10h]
movsxd r14, ebp
mov rsi, r14
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov edi, 180h
add rdi, [rbx+10h]
mov rsi, r14
call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
cmp dword ptr [rbx+54h], 0
jz short loc_4C17B
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexEdgesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexEdgesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(void)
jmp short loc_4C18B
loc_4C17B:
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexEdgesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexEdgesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(void)
loc_4C18B:
mov rdi, [rbx+10h]
mov eax, [rdi+8]
lea ecx, ds:0FFFFFFFFFFFFFFFEh[rax*2]
movsxd rcx, ecx
mov rdx, [rdi+150h]
movsxd rcx, dword ptr [rdx+rcx*4]
lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2]
cdqe
movsxd r14, dword ptr [rdx+rax*4]
add r14, rcx
add rdi, 168h
mov rsi, r14
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov edi, 180h
add rdi, [rbx+10h]
mov rsi, r14
pop rbx
pop r14
pop rbp
jmp __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
| long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation(
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this)
{
long long v2; // rax
int v3; // ebp
long long v4; // rdi
long long v5; // r14
v2 = *((_QWORD *)this + 1);
v3 = ((*(_QWORD *)(v2 + 368) - *(_QWORD *)(v2 + 360)) >> 2)
+ 2 * (*(_DWORD *)(v2 + 4) + ((*(_QWORD *)(v2 + 176) - *(_QWORD *)(v2 + 168)) >> 2));
std::vector<int>::resize(*((_QWORD *)this + 2) + 336LL, 2LL * *(int *)(*((_QWORD *)this + 2) + 8LL));
std::vector<int>::resize(*((_QWORD *)this + 2) + 360LL, v3);
std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 384LL, v3);
if ( *((_DWORD *)this + 21) )
{
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(this);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(this);
}
else
{
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentVertices(this);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgesFromParentEdges(this);
}
v4 = *((_QWORD *)this + 2);
v5 = *(int *)(*(_QWORD *)(v4 + 336) + 4LL * (2 * *(_DWORD *)(v4 + 8) - 2))
+ (long long)*(int *)(*(_QWORD *)(v4 + 336) + 4LL * (2 * *(_DWORD *)(v4 + 8) - 1));
std::vector<int>::resize(v4 + 360, v5);
return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 384LL, v5);
}
| populateVertexEdgeRelation:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0xb0]
SUB RCX,qword ptr [RAX + 0xa8]
MOV RDI,qword ptr [RDI + 0x10]
SHR RCX,0x2
ADD ECX,dword ptr [RAX + 0x4]
MOV RDX,qword ptr [RAX + 0x170]
SUB RDX,qword ptr [RAX + 0x168]
SHR RDX,0x2
LEA EBP,[RDX + RCX*0x2]
MOVSXD RSI,dword ptr [RDI + 0x8]
ADD RDI,0x150
ADD RSI,RSI
CALL 0x00139690
MOV EDI,0x168
ADD RDI,qword ptr [RBX + 0x10]
MOVSXD R14,EBP
MOV RSI,R14
CALL 0x00139690
MOV EDI,0x180
ADD RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x00139160
CMP dword ptr [RBX + 0x54],0x0
JZ 0x0014c17b
MOV RDI,RBX
CALL 0x001390d0
MOV RDI,RBX
CALL 0x00139fc0
JMP 0x0014c18b
LAB_0014c17b:
MOV RDI,RBX
CALL 0x00139fc0
MOV RDI,RBX
CALL 0x001390d0
LAB_0014c18b:
MOV RDI,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x8]
LEA ECX,[-0x2 + RAX*0x2]
MOVSXD RCX,ECX
MOV RDX,qword ptr [RDI + 0x150]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
LEA EAX,[-0x1 + RAX*0x2]
CDQE
MOVSXD R14,dword ptr [RDX + RAX*0x4]
ADD R14,RCX
ADD RDI,0x168
MOV RSI,R14
CALL 0x00139690
MOV EDI,0x180
ADD RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
POP RBX
POP R14
POP RBP
JMP 0x00139160
|
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexEdgeRelation(TriRefinement *this)
{
int iVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
ulong uVar6;
lVar2 = *(long *)(this + 8);
lVar3 = *(long *)(lVar2 + 0xb0);
lVar4 = *(long *)(lVar2 + 0xa8);
iVar1 = *(int *)(lVar2 + 4);
lVar5 = *(long *)(lVar2 + 0x170);
lVar2 = *(long *)(lVar2 + 0x168);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x150),
(long)*(int *)(*(long *)(this + 0x10) + 8) * 2);
uVar6 = (ulong)((int)((ulong)(lVar5 - lVar2) >> 2) +
((int)((ulong)(lVar3 - lVar4) >> 2) + iVar1) * 2);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x168),uVar6);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0x180),uVar6);
if (*(int *)(this + 0x54) == 0) {
populateVertexEdgesFromParentVertices(this);
populateVertexEdgesFromParentEdges(this);
}
else {
populateVertexEdgesFromParentEdges(this);
populateVertexEdgesFromParentVertices(this);
}
lVar2 = *(long *)(this + 0x10);
uVar6 = (long)*(int *)(*(long *)(lVar2 + 0x150) + (long)(*(int *)(lVar2 + 8) * 2 + -1) * 4) +
(long)*(int *)(*(long *)(lVar2 + 0x150) + (long)(*(int *)(lVar2 + 8) * 2 + -2) * 4);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(lVar2 + 0x168),uVar6);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0x180),uVar6);
return;
}
| |
34,558 | sqrt_fp2 | corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/sqrt.c | static bool_t sqrt_fp2(vec384x out, const vec384x inp)
{
vec384x ret;
vec384 aa, bb;
sqr_fp(aa, inp[0]);
sqr_fp(bb, inp[1]);
add_fp(aa, aa, bb);
/* don't pay attention to return value, final "align" will tell... */
(void)sqrt_fp(aa, aa); /* sqrt(a²+b²) */
sub_fp(bb, inp[0], aa);
add_fp(aa, inp[0], aa);
vec_select(aa, bb, aa, sizeof(aa), vec_is_zero(aa, sizeof(aa)));
div_by_2_fp(aa, aa); /* (a ± sqrt(a²+b²))/2 */
/* if it says "no sqrt," final "align" will find right one... */
(void)recip_sqrt_fp(ret[0], aa); /* 1/sqrt((a ± sqrt(a²+b²))/2) */
div_by_2_fp(ret[1], inp[1]);
mul_fp(ret[1], ret[1], ret[0]); /* b/(2*sqrt((a ± sqrt(a²+b²))/2)) */
mul_fp(ret[0], ret[0], aa); /* sqrt((a ± sqrt(a²+b²))/2) */
/*
* Now see if |ret| is or can be made sqrt(|inp|)...
*/
return sqrt_align_fp2(out, ret, ret, inp);
} | O2 | c | sqrt_fp2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
leaq -0x90(%rbp), %r15
movq %r15, %rdi
callq 0x573b1
leaq 0x30(%rbx), %r12
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x573b1
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x55b60
movq %r15, %rdi
movq %r15, %rsi
callq 0x571c0
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x59b54
movq %r15, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x55b60
pushq $0x30
popq %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x501dd
movq %r15, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x5015b
movq %r15, %rdi
movq %r15, %rsi
callq 0x5ba22
leaq -0xf0(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x5b102
leaq -0xc0(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x5ba22
movq %r13, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x59bc0
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x59bc0
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x5ba33
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| sqrt_fp2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, rsi
mov [rbp+var_30], rdi
lea r15, [rbp+var_90]
mov rdi, r15
call sqr_fp
lea r12, [rbx+30h]
lea r13, [rbp+var_60]
mov rdi, r13
mov rsi, r12
call sqr_fp
mov rdi, r15
mov rsi, r15
mov rdx, r13
call add_fp
mov rdi, r15
mov rsi, r15
call sqrt_fp
mov rdi, r13
mov rsi, rbx
mov rdx, r15
call _sub_fp
mov rdi, r15
mov rsi, rbx
mov rdx, r15
call add_fp
push 30h ; '0'
pop r14
mov rdi, r15
mov rsi, r14
call vec_is_zero
mov rdi, r15
mov rsi, r13
mov rdx, r15
mov rcx, r14
mov r8, rax
call vec_select
mov rdi, r15
mov rsi, r15
call div_by_2_fp
lea r14, [rbp+var_F0]
mov rdi, r14
mov rsi, r15
call recip_sqrt_fp
lea r13, [rbp+var_C0]
mov rdi, r13
mov rsi, r12
call div_by_2_fp
mov rdi, r13
mov rsi, r13
mov rdx, r14
call mul_fp
mov rdi, r14
mov rsi, r14
mov rdx, r15
call mul_fp
mov rdi, [rbp+var_30]
mov rsi, r14
mov rdx, r14
mov rcx, rbx
call sqrt_align_fp2
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long sqrt_fp2(long long a1, long long a2)
{
unsigned long long is_zero; // rax
_BYTE v4[48]; // [rsp+0h] [rbp-F0h] BYREF
_BYTE v5[48]; // [rsp+30h] [rbp-C0h] BYREF
_BYTE v6[48]; // [rsp+60h] [rbp-90h] BYREF
_BYTE v7[48]; // [rsp+90h] [rbp-60h] BYREF
long long v8; // [rsp+C0h] [rbp-30h]
v8 = a1;
sqr_fp(v6, a2);
sqr_fp(v7, a2 + 48);
add_fp((long long)v6, (long long)v6, (long long)v7);
sqrt_fp((long long)v6, (long long)v6);
sub_fp(v7, a2, v6);
add_fp((long long)v6, a2, (long long)v6);
is_zero = vec_is_zero((long long)v6, 0x30uLL);
vec_select((long long)v6, (long long)v7, (long long)v6, 0x30uLL, is_zero);
div_by_2_fp(v6, v6);
recip_sqrt_fp(v4, v6);
div_by_2_fp(v5, a2 + 48);
mul_fp(v5, v5, v4);
mul_fp(v4, v4, v6);
return sqrt_align_fp2(v8, v4, v4, a2);
}
| sqrt_fp2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,RSI
MOV qword ptr [RBP + -0x30],RDI
LEA R15,[RBP + -0x90]
MOV RDI,R15
CALL 0x001573b1
LEA R12,[RBX + 0x30]
LEA R13,[RBP + -0x60]
MOV RDI,R13
MOV RSI,R12
CALL 0x001573b1
MOV RDI,R15
MOV RSI,R15
MOV RDX,R13
CALL 0x00155b60
MOV RDI,R15
MOV RSI,R15
CALL 0x001571c0
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
CALL 0x00159b54
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R15
CALL 0x00155b60
PUSH 0x30
POP R14
MOV RDI,R15
MOV RSI,R14
CALL 0x001501dd
MOV RDI,R15
MOV RSI,R13
MOV RDX,R15
MOV RCX,R14
MOV R8,RAX
CALL 0x0015015b
MOV RDI,R15
MOV RSI,R15
CALL 0x0015ba22
LEA R14,[RBP + -0xf0]
MOV RDI,R14
MOV RSI,R15
CALL 0x0015b102
LEA R13,[RBP + -0xc0]
MOV RDI,R13
MOV RSI,R12
CALL 0x0015ba22
MOV RDI,R13
MOV RSI,R13
MOV RDX,R14
CALL 0x00159bc0
MOV RDI,R14
MOV RSI,R14
MOV RDX,R15
CALL 0x00159bc0
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R14
MOV RDX,R14
MOV RCX,RBX
CALL 0x0015ba33
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void sqrt_fp2(int8 param_1,long param_2)
{
int8 uVar1;
int1 local_f8 [48];
int1 local_c8 [48];
int1 local_98 [48];
int1 local_68 [48];
int8 local_38;
local_38 = param_1;
sqr_fp(local_98);
sqr_fp(local_68,param_2 + 0x30);
add_fp(local_98,local_98,local_68);
sqrt_fp(local_98,local_98);
sub_fp(local_68,param_2,local_98);
add_fp(local_98,param_2,local_98);
uVar1 = vec_is_zero(local_98,0x30);
vec_select(local_98,local_68,local_98,0x30,uVar1);
div_by_2_fp(local_98,local_98);
recip_sqrt_fp(local_f8,local_98);
div_by_2_fp(local_c8,param_2 + 0x30);
mul_fp(local_c8,local_c8,local_f8);
mul_fp(local_f8,local_f8,local_98);
sqrt_align_fp2(local_38,local_f8,local_f8,param_2);
return;
}
| |
34,559 | maria_init_bulk_insert | eloqsql/storage/maria/ma_write.c | int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows)
{
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *key=share->keyinfo;
bulk_insert_param *params;
uint i, num_keys, total_keylength;
ulonglong key_map;
DBUG_ENTER("_ma_init_bulk_insert");
DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size));
DBUG_ASSERT(!info->bulk_insert &&
(!rows || rows >= MARIA_MIN_ROWS_TO_USE_BULK_INSERT));
maria_clear_all_keys_active(key_map);
for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++)
{
if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) &&
maria_is_key_active(share->state.key_map, i))
{
num_keys++;
maria_set_key_active(key_map, i);
total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE;
}
}
if (num_keys==0 ||
num_keys * (size_t) MARIA_MIN_SIZE_BULK_INSERT_TREE > cache_size)
DBUG_RETURN(0);
if (rows && rows*total_keylength < cache_size)
cache_size= (size_t)rows;
else
cache_size/=total_keylength*16;
info->bulk_insert=(TREE *)
my_malloc(PSI_INSTRUMENT_ME, (sizeof(TREE)*share->base.keys+
sizeof(bulk_insert_param)*num_keys),MYF(0));
if (!info->bulk_insert)
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
params=(bulk_insert_param *)(info->bulk_insert+share->base.keys);
for (i=0 ; i < share->base.keys ; i++)
{
if (maria_is_key_active(key_map, i))
{
params->info=info;
params->keynr=i;
/* Only allocate a 16'th of the buffer at a time */
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
(qsort_cmp2) keys_compare, keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
}
DBUG_RETURN(0);
} | O0 | c | maria_init_bulk_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x570(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x86fc0
jmp 0x86fc2
jmp 0x86fc4
movq $0x0, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x3e8(%rcx), %eax
jae 0x870b3
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movzwl 0xa2(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x870a3
movq -0x28(%rbp), %rax
movl 0x3ec(%rax), %eax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x870a3
movq -0x28(%rbp), %rax
movq 0x140(%rax), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x87056
movb $0x1, %al
testb $0x1, %al
jne 0x8705e
jmp 0x870a3
xorl %eax, %eax
testb $0x1, %al
jne 0x8705e
jmp 0x870a3
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movzwl 0xae(%rax), %eax
movl %eax, %ecx
addq $0x20, %rcx
movl -0x44(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x44(%rbp)
jmp 0x870a5
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x86fe1
cmpl $0x0, -0x40(%rbp)
je 0x870c6
movl -0x40(%rbp), %eax
shlq $0xe, %rax
cmpq -0x18(%rbp), %rax
jbe 0x870d4
jmp 0x870c8
movl $0x0, -0x4(%rbp)
jmp 0x872a6
cmpq $0x0, -0x20(%rbp)
je 0x870f6
movq -0x20(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
cmpq -0x18(%rbp), %rax
jae 0x870f6
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x8710d
movl -0x44(%rbp), %eax
shll $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movl 0x3e8(%rax), %eax
imulq $0x298, %rax, %rsi # imm = 0x298
movl -0x40(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0xf8350
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x310(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x310(%rax)
jne 0x8715d
jmp 0x87151
movl $0x80, -0x4(%rbp)
jmp 0x872a6
movq -0x10(%rbp), %rax
movq 0x310(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x3e8(%rcx), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x3e8(%rcx), %eax
jae 0x8729d
movq -0x50(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x871c0
movb $0x1, %al
testb $0x1, %al
jne 0x871cb
jmp 0x8726e
xorl %eax, %eax
testb $0x1, %al
jne 0x871cb
jmp 0x8726e
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x310(%rax), %rdi
movl -0x3c(%rbp), %eax
imulq $0x298, %rax, %rax # imm = 0x298
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movzwl 0xae(%rax), %eax
imulq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movzwl 0xae(%rax), %eax
imulq %rax, %rdx
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, -0x38(%rbp)
xorl %ecx, %ecx
leaq 0x60(%rip), %r8 # 0x872b0
leaq 0xb9(%rip), %r9 # 0x87310
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xfeeb0
jmp 0x8728d
movq -0x10(%rbp), %rax
movq 0x310(%rax), %rax
movl -0x3c(%rbp), %ecx
imulq $0x298, %rcx, %rcx # imm = 0x298
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0x8728f
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x87187
jmp 0x8729f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| maria_init_bulk_insert:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+570h]
mov [rbp+var_30], rax
jmp short $+2
loc_86FC0:
jmp short $+2
loc_86FC2:
jmp short $+2
loc_86FC4:
mov [rbp+var_50], 0
mov [rbp+var_40], 0
mov [rbp+var_44], 0
mov [rbp+var_3C], 0
loc_86FE1:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+3E8h]
jnb loc_870B3
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 118h
add rax, rcx
movzx eax, word ptr [rax+0A2h]
and eax, 1
cmp eax, 0
jnz loc_870A3
mov rax, [rbp+var_28]
mov eax, [rax+3ECh]
mov ecx, [rbp+var_3C]
add ecx, 1
cmp eax, ecx
jz short loc_870A3
mov rax, [rbp+var_28]
mov rax, [rax+140h]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_87056
mov al, 1
test al, 1
jnz short loc_8705E
jmp short loc_870A3
loc_87056:
xor eax, eax
test al, 1
jnz short loc_8705E
jmp short loc_870A3
loc_8705E:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
mov ecx, eax
mov eax, 1
shl rax, cl
or rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 118h
add rax, rcx
movzx eax, word ptr [rax+0AEh]
mov ecx, eax
add rcx, 20h ; ' '
mov eax, [rbp+var_44]
add rax, rcx
mov [rbp+var_44], eax
loc_870A3:
jmp short $+2
loc_870A5:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_86FE1
loc_870B3:
cmp [rbp+var_40], 0
jz short loc_870C6
mov eax, [rbp+var_40]
shl rax, 0Eh
cmp rax, [rbp+var_18]
jbe short loc_870D4
loc_870C6:
jmp short $+2
loc_870C8:
mov [rbp+var_4], 0
jmp loc_872A6
loc_870D4:
cmp [rbp+var_20], 0
jz short loc_870F6
mov rax, [rbp+var_20]
mov ecx, [rbp+var_44]
imul rax, rcx
cmp rax, [rbp+var_18]
jnb short loc_870F6
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
jmp short loc_8710D
loc_870F6:
mov eax, [rbp+var_44]
shl eax, 4
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_18]
xor edx, edx
div rcx
mov [rbp+var_18], rax
loc_8710D:
mov rax, [rbp+var_28]
mov eax, [rax+3E8h]
imul rsi, rax, 298h
mov eax, [rbp+var_40]
shl rax, 4
add rsi, rax
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+310h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+310h], 0
jnz short loc_8715D
jmp short $+2
loc_87151:
mov [rbp+var_4], 80h
jmp loc_872A6
loc_8715D:
mov rax, [rbp+var_10]
mov rax, [rax+310h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+3E8h]
imul rcx, 298h
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_3C], 0
loc_87187:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_28]
cmp eax, [rcx+3E8h]
jnb loc_8729D
mov rax, [rbp+var_50]
mov ecx, [rbp+var_3C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_871C0
mov al, 1
test al, 1
jnz short loc_871CB
jmp loc_8726E
loc_871C0:
xor eax, eax
test al, 1
jnz short loc_871CB
jmp loc_8726E
loc_871CB:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_38]
mov [rax], rcx
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_38]
mov [rax+8], ecx
mov rax, [rbp+var_10]
mov rdi, [rax+310h]
mov eax, [rbp+var_3C]
imul rax, 298h
add rdi, rax
mov rsi, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 118h
add rax, rcx
movzx eax, word ptr [rax+0AEh]
imul rsi, rax
mov rdx, [rbp+var_18]
mov rax, [rbp+var_30]
mov ecx, [rbp+var_3C]
imul rcx, 118h
add rax, rcx
movzx eax, word ptr [rax+0AEh]
imul rdx, rax
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 10h
mov [rbp+var_38], rcx
xor ecx, ecx
lea r8, keys_compare
lea r9, keys_free
xor r10d, r10d
mov [rsp+60h+var_60], rax
mov [rsp+60h+var_58], 0
call init_tree
jmp short loc_8728D
loc_8726E:
mov rax, [rbp+var_10]
mov rax, [rax+310h]
mov ecx, [rbp+var_3C]
imul rcx, 298h
add rax, rcx
mov qword ptr [rax], 0
loc_8728D:
jmp short $+2
loc_8728F:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_87187
loc_8729D:
jmp short $+2
loc_8729F:
mov [rbp+var_4], 0
loc_872A6:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long maria_init_bulk_insert(_QWORD *a1, unsigned long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+10h] [rbp-50h]
unsigned int v6; // [rsp+1Ch] [rbp-44h]
unsigned int v7; // [rsp+20h] [rbp-40h]
unsigned int i; // [rsp+24h] [rbp-3Ch]
unsigned int j; // [rsp+24h] [rbp-3Ch]
long long v10; // [rsp+28h] [rbp-38h]
long long v11; // [rsp+30h] [rbp-30h]
long long v12; // [rsp+38h] [rbp-28h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v12 = *a1;
v11 = *(_QWORD *)(*a1 + 1392LL);
v5 = 0LL;
v7 = 0;
v6 = 0;
for ( i = 0; i < *(_DWORD *)(v12 + 1000); ++i )
{
if ( (*(_WORD *)(280LL * i + v11 + 162) & 1) == 0
&& *(_DWORD *)(v12 + 1004) != i + 1
&& ((1LL << i) & *(_QWORD *)(v12 + 320)) != 0 )
{
++v7;
v5 |= 1LL << i;
v6 += *(unsigned __int16 *)(280LL * i + v11 + 174) + 32;
}
}
if ( v7 && (unsigned long long)v7 << 14 <= a2 )
{
if ( a3 && (unsigned long long)v6 * a3 < a2 )
LODWORD(v13) = a3;
else
v13 = a2 / (16 * v6);
a1[98] = my_malloc(0LL, 16LL * v7 + 664LL * *(unsigned int *)(v12 + 1000), 0LL);
if ( a1[98] )
{
v10 = 664LL * *(unsigned int *)(v12 + 1000) + a1[98];
for ( j = 0; j < *(_DWORD *)(v12 + 1000); ++j )
{
if ( ((1LL << j) & v5) != 0 )
{
*(_QWORD *)v10 = a1;
*(_DWORD *)(v10 + 8) = j;
v3 = v10;
v10 += 16LL;
init_tree(
664 * j + *((_DWORD *)a1 + 196),
*(unsigned __int16 *)(280LL * j + v11 + 174) * (_DWORD)v13,
*(unsigned __int16 *)(280LL * j + v11 + 174) * (_DWORD)v13,
0,
(unsigned int)keys_compare,
(unsigned int)keys_free,
v3,
0LL);
}
else
{
*(_QWORD *)(664LL * j + a1[98]) = 0LL;
}
}
return 0;
}
else
{
return 128;
}
}
else
{
return 0;
}
}
| maria_init_bulk_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x570]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00186fc0
LAB_00186fc0:
JMP 0x00186fc2
LAB_00186fc2:
JMP 0x00186fc4
LAB_00186fc4:
MOV qword ptr [RBP + -0x50],0x0
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x3c],0x0
LAB_00186fe1:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x3e8]
JNC 0x001870b3
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001870a3
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x3ec]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x1
CMP EAX,ECX
JZ 0x001870a3
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x140]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x00187056
MOV AL,0x1
TEST AL,0x1
JNZ 0x0018705e
JMP 0x001870a3
LAB_00187056:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x0018705e
JMP 0x001870a3
LAB_0018705e:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
OR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xae]
MOV ECX,EAX
ADD RCX,0x20
MOV EAX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
LAB_001870a3:
JMP 0x001870a5
LAB_001870a5:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00186fe1
LAB_001870b3:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001870c6
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0xe
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001870d4
LAB_001870c6:
JMP 0x001870c8
LAB_001870c8:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001872a6
LAB_001870d4:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001870f6
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001870f6
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0018710d
LAB_001870f6:
MOV EAX,dword ptr [RBP + -0x44]
SHL EAX,0x4
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_0018710d:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x3e8]
IMUL RSI,RAX,0x298
MOV EAX,dword ptr [RBP + -0x40]
SHL RAX,0x4
ADD RSI,RAX
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f8350
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x310],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x310],0x0
JNZ 0x0018715d
JMP 0x00187151
LAB_00187151:
MOV dword ptr [RBP + -0x4],0x80
JMP 0x001872a6
LAB_0018715d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x310]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x3e8]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x0
LAB_00187187:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x3e8]
JNC 0x0018729d
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x001871c0
MOV AL,0x1
TEST AL,0x1
JNZ 0x001871cb
JMP 0x0018726e
LAB_001871c0:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001871cb
JMP 0x0018726e
LAB_001871cb:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x310]
MOV EAX,dword ptr [RBP + -0x3c]
IMUL RAX,RAX,0x298
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xae]
IMUL RSI,RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xae]
IMUL RDX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RBP + -0x38],RCX
XOR ECX,ECX
LEA R8,[0x1872b0]
LEA R9,[0x187310]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x001feeb0
JMP 0x0018728d
LAB_0018726e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x310]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL RCX,RCX,0x298
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LAB_0018728d:
JMP 0x0018728f
LAB_0018728f:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00187187
LAB_0018729d:
JMP 0x0018729f
LAB_0018729f:
MOV dword ptr [RBP + -0x4],0x0
LAB_001872a6:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001871bb) */
/* WARNING: Removing unreachable block (ram,0x00187054) */
int4 maria_init_bulk_insert(long *param_1,ulong param_2,ulong param_3)
{
long lVar1;
long lVar2;
long lVar3;
ulong local_58;
uint local_4c;
uint local_48;
uint local_44;
int8 *local_40;
ulong local_20;
int4 local_c;
lVar1 = *param_1;
lVar2 = *(long *)(lVar1 + 0x570);
local_58 = 0;
local_48 = 0;
local_4c = 0;
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 1000); local_44 = local_44 + 1) {
if ((((*(ushort *)(lVar2 + (ulong)local_44 * 0x118 + 0xa2) & 1) == 0) &&
(*(int *)(lVar1 + 0x3ec) != local_44 + 1)) &&
((*(ulong *)(lVar1 + 0x140) & 1L << ((byte)local_44 & 0x3f)) != 0)) {
local_48 = local_48 + 1;
local_58 = 1L << ((byte)local_44 & 0x3f) | local_58;
local_4c = local_4c + *(ushort *)(lVar2 + (ulong)local_44 * 0x118 + 0xae) + 0x20;
}
}
if ((local_48 == 0) || (param_2 < (ulong)local_48 << 0xe)) {
local_c = 0;
}
else {
if ((param_3 == 0) || (local_20 = param_3, param_2 <= param_3 * local_4c)) {
local_20 = param_2 / (local_4c << 4);
}
lVar3 = my_malloc(0,(ulong)*(uint *)(lVar1 + 1000) * 0x298 + (ulong)local_48 * 0x10,0);
param_1[0x62] = lVar3;
if (param_1[0x62] == 0) {
local_c = 0x80;
}
else {
local_40 = (int8 *)(param_1[0x62] + (ulong)*(uint *)(lVar1 + 1000) * 0x298);
for (local_44 = 0; local_44 < *(uint *)(lVar1 + 1000); local_44 = local_44 + 1) {
if ((local_58 & 1L << ((byte)local_44 & 0x3f)) == 0) {
*(int8 *)(param_1[0x62] + (ulong)local_44 * 0x298) = 0;
}
else {
*local_40 = param_1;
*(uint *)(local_40 + 1) = local_44;
init_tree(param_1[0x62] + (ulong)local_44 * 0x298,
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x118 + 0xae),
local_20 * *(ushort *)(lVar2 + (ulong)local_44 * 0x118 + 0xae),0,keys_compare,
keys_free,local_40,0);
local_40 = local_40 + 2;
}
}
local_c = 0;
}
}
return local_c;
}
| |
34,560 | wait_for_lock | eloqsql/mysys/thr_lock.c | static enum enum_thr_lock_result
wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data,
my_bool in_wait_list, ulong lock_wait_timeout)
{
struct st_my_thread_var *thread_var= my_thread_var;
mysql_cond_t *cond= &thread_var->suspend;
struct timespec wait_timeout;
enum enum_thr_lock_result result= THR_LOCK_ABORTED;
PSI_stage_info old_stage;
my_bool use_wait_callbacks= FALSE;
DBUG_ENTER("wait_for_lock");
/*
One can use this to signal when a thread is going to wait for a lock.
See debug_sync.cc.
Beware of waiting for a signal here. The lock has acquired its mutex.
While waiting on a signal here, the locking thread could not acquire
the mutex to release the lock. One could lock up the table
completely.
In detail it works so: When thr_lock() tries to acquire a table
lock, it locks the lock->mutex, checks if it can have the lock, and
if not, it calls wait_for_lock(). Here it unlocks the table lock
while waiting on a condition. The sync point is located before this
wait for condition. If we have a waiting action here, we hold the
the table locks mutex all the time. Any attempt to look at the table
lock by another thread blocks it immediately on lock->mutex. This
can easily become an unexpected and unobvious blockage. So be
warned: Do not request a WAIT_FOR action for the 'wait_for_lock'
sync point unless you really know what you do.
*/
DEBUG_SYNC_C("wait_for_lock");
if (!in_wait_list)
{
(*wait->last)=data; /* Wait for lock */
data->prev= wait->last;
wait->last= &data->next;
}
statistic_increment(locks_waited, &THR_LOCK_lock);
/* Set up control struct to allow others to abort locks */
thread_var->current_mutex= &data->lock->mutex;
thread_var->current_cond= cond;
data->cond= cond;
proc_info_hook(NULL, &stage_waiting_for_table_level_lock,
&old_stage,
__func__, __FILE__, __LINE__);
/*
Since before_lock_wait potentially can create more threads to
scheduler work for, we don't want to call the before_lock_wait
callback unless it will really start to wait.
For similar reasons, we do not want to call before_lock_wait and
after_lock_wait for each lap around the loop, so we restrict
ourselves to call it before_lock_wait once before starting to wait
and once after the thread has exited the wait loop.
*/
if ((!thread_var->abort || in_wait_list) && before_lock_wait)
{
use_wait_callbacks= TRUE;
(*before_lock_wait)();
}
set_timespec(wait_timeout, lock_wait_timeout);
while (!thread_var->abort || in_wait_list)
{
int rc= mysql_cond_timedwait(cond, &data->lock->mutex, &wait_timeout);
/*
We must break the wait if one of the following occurs:
- the connection has been aborted (!thread_var->abort), but
this is not a delayed insert thread (in_wait_list). For a delayed
insert thread the proper action at shutdown is, apparently, to
acquire the lock and complete the insert.
- the lock has been granted (data->cond is set to NULL by the granter),
or the waiting has been aborted (additionally data->type is set to
TL_UNLOCK).
- the wait has timed out (rc == ETIMEDOUT)
Order of checks below is important to not report about timeout
if the predicate is true.
*/
if (data->cond == 0)
{
DBUG_PRINT("thr_lock", ("lock granted/aborted"));
break;
}
if (rc == ETIMEDOUT || rc == ETIME)
{
/* purecov: begin inspected */
DBUG_PRINT("thr_lock", ("lock timed out"));
result= THR_LOCK_WAIT_TIMEOUT;
break;
/* purecov: end */
}
}
/*
We call the after_lock_wait callback once the wait loop has
finished.
*/
if (after_lock_wait && use_wait_callbacks)
(*after_lock_wait)();
DBUG_PRINT("thr_lock", ("aborted: %d in_wait_list: %d",
thread_var->abort, in_wait_list));
if (data->cond || data->type == TL_UNLOCK)
{
if (data->cond) /* aborted or timed out */
{
if (((*data->prev)=data->next)) /* remove from wait-list */
data->next->prev= data->prev;
else
wait->last=data->prev;
data->type= TL_UNLOCK; /* No lock */
check_locks(data->lock, "killed or timed out wait_for_lock", data->type,
1);
wake_up_waiters(data->lock);
}
else
{
DBUG_PRINT("thr_lock", ("lock aborted"));
check_locks(data->lock, "aborted wait_for_lock", data->type, 0);
}
}
else
{
result= THR_LOCK_SUCCESS;
if (data->lock->get_status &&
(*data->lock->get_status)(data->status_param,
data->type == TL_WRITE_CONCURRENT_INSERT))
result= THR_LOCK_ABORTED;
check_locks(data->lock,"got wait_for_lock", data->type, 0);
}
mysql_mutex_unlock(&data->lock->mutex);
/* The following must be done after unlock of lock->mutex */
mysql_mutex_lock(&thread_var->mutex);
thread_var->current_mutex= 0;
thread_var->current_cond= 0;
mysql_mutex_unlock(&thread_var->mutex);
proc_info_hook(NULL, &old_stage, NULL, __func__, __FILE__, __LINE__);
DBUG_RETURN(result);
} | O3 | c | wait_for_lock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, -0x38(%rbp)
callq 0xac2be
movq %rax, %r13
movq %rax, -0x40(%rbp)
leaq 0x8(%rax), %r12
testb %bl, %bl
jne 0xae1a1
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %r14, (%rax)
movq 0x8(%rcx), %rax
movq %rax, 0x10(%r14)
leaq 0x8(%r14), %rax
movq %rax, 0x8(%rcx)
leaq 0xb68358(%rip), %rax # 0xc16500
incq (%rax)
movq 0x18(%r14), %rax
addq $0x18, %rax
movq %rax, 0x98(%r13)
movq %r12, 0xa0(%r13)
movq %r12, 0x20(%r14)
leaq 0x2e5384(%rip), %rax # 0x393550
leaq 0x2e5005(%rip), %rsi # 0x3931d8
leaq 0x371ae(%rip), %rcx # 0xe5388
leaq 0x3ad04(%rip), %r8 # 0xe8ee5
leaq -0x68(%rbp), %rdx
xorl %edi, %edi
movl $0x219, %r9d # imm = 0x219
callq *(%rax)
cmpl $0x0, 0xe0(%r13)
sete %al
testb %bl, %bl
setne %cl
orb %al, %cl
movq 0xb68300(%rip), %rax # 0xc16508
testq %rax, %rax
setne %dl
andb %cl, %dl
movb %dl, -0x29(%rbp)
cmpb $0x1, %dl
jne 0xae21a
callq *%rax
callq 0xa89b0
imulq $0x3e8, %rax, %rax # imm = 0x3E8
imulq $0x3b9aca00, %r15, %rcx # imm = 0x3B9ACA00
addq %rax, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
leaq -0x50(%rbp), %rsi
movq %rdx, (%rsi)
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rcx
movq %rcx, 0x8(%rsi)
movl 0xe0(%r13), %eax
movl $0x1, %r15d
testb %bl, %bl
jne 0xae272
testl %eax, %eax
jne 0xae2c1
movq 0x18(%r14), %rsi
addq $0x18, %rsi
cmpq $0x0, 0x38(%r13)
jne 0xae2a6
movq %r12, %rdi
leaq -0x50(%rbp), %rdx
callq 0x2a6b0
cmpq $0x0, 0x20(%r14)
je 0xae2c1
movl $0x2, %r15d
cmpl $0x6e, %eax
je 0xae2c1
cmpl $0x3e, %eax
jne 0xae25d
jmp 0xae2c1
movq %r12, %rdi
leaq -0x50(%rbp), %rdx
leaq 0x3ac31(%rip), %rcx # 0xe8ee5
movl $0x22e, %r8d # imm = 0x22E
callq 0x30c50
jmp 0xae28d
movq 0xb68248(%rip), %rax # 0xc16510
testq %rax, %rax
sete %cl
movb -0x29(%rbp), %dl
xorb $0x1, %dl
orb %cl, %dl
jne 0xae2da
callq *%rax
cmpq $0x0, 0x20(%r14)
je 0xae3b5
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movq %rax, (%rcx)
movq -0x38(%rbp), %rdx
addq $0x8, %rdx
leaq 0x10(%rax), %rcx
testq %rax, %rax
cmoveq %rdx, %rcx
movq 0x10(%r14), %rax
movq %rax, (%rcx)
movl $0x0, 0x40(%r14)
movq 0x18(%r14), %rdi
callq 0xacfed
movq 0x18(%r14), %rbx
movq 0x58(%rbx), %rdi
addq $0x18, %rbx
testq %rdi, %rdi
jne 0xae3f6
movq %rbx, %rdi
callq 0x2a1d0
movq -0x40(%rbp), %rbx
addq $0x40, %rbx
cmpq $0x0, 0x80(%r13)
jne 0xae40b
movq %rbx, %rdi
callq 0x2a200
xorl %eax, %eax
movq %rax, 0x98(%r13)
movq %rax, 0xa0(%r13)
movq 0x80(%r13), %rdi
testq %rdi, %rdi
jne 0xae424
movq %rbx, %rdi
callq 0x2a1d0
leaq 0x37003(%rip), %rcx # 0xe5388
leaq 0x3ab59(%rip), %r8 # 0xe8ee5
leaq -0x68(%rbp), %rsi
xorl %edi, %edi
xorl %edx, %edx
movl $0x279, %r9d # imm = 0x279
leaq 0x2e51af(%rip), %rax # 0x393550
callq *(%rax)
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x40(%r14), %eax
testl %eax, %eax
je 0xae31b
movq 0x18(%r14), %rcx
movq 0xb0(%rcx), %rcx
testq %rcx, %rcx
je 0xae3ee
movq 0x28(%r14), %rdi
xorl %esi, %esi
cmpl $0x8, %eax
sete %sil
callq *%rcx
xorl %r15d, %r15d
testb %al, %al
setne %r15b
jmp 0xae31b
xorl %r15d, %r15d
jmp 0xae31b
leaq 0x2e565b(%rip), %rax # 0x393a58
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xae330
leaq 0x3aad3(%rip), %rsi # 0xe8ee5
movq %rbx, %rdi
movl $0x274, %edx # imm = 0x274
callq 0x308cf
jmp 0xae356
leaq 0x2e562d(%rip), %rax # 0x393a58
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xae376
| wait_for_lock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rcx
mov ebx, edx
mov r14, rsi
mov [rbp+var_38], rdi
call _my_thread_var
mov r13, rax
mov [rbp+var_40], rax
lea r12, [rax+8]
test bl, bl
jnz short loc_AE1A1
mov rcx, [rbp+var_38]
mov rax, [rcx+8]
mov [rax], r14
mov rax, [rcx+8]
mov [r14+10h], rax
lea rax, [r14+8]
mov [rcx+8], rax
loc_AE1A1:
lea rax, locks_waited
inc qword ptr [rax]
mov rax, [r14+18h]
add rax, 18h
mov [r13+98h], rax
mov [r13+0A0h], r12
mov [r14+20h], r12
lea rax, proc_info_hook
lea rsi, stage_waiting_for_table_level_lock
lea rcx, aUnknown; "<unknown>"
lea r8, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, [rbp+var_68]
xor edi, edi
mov r9d, 219h
call qword ptr [rax]
cmp dword ptr [r13+0E0h], 0
setz al
test bl, bl
setnz cl
or cl, al
mov rax, cs:before_lock_wait
test rax, rax
setnz dl
and dl, cl
mov [rbp+var_29], dl
cmp dl, 1
jnz short loc_AE21A
call rax ; before_lock_wait
loc_AE21A:
call my_hrtime
imul rax, 3E8h
imul rcx, r15, 3B9ACA00h
add rcx, rax
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
lea rsi, [rbp+var_50]
mov [rsi], rdx
imul rax, rdx, 3B9ACA00h
sub rcx, rax
mov [rsi+8], rcx
loc_AE25D:
mov eax, [r13+0E0h]
mov r15d, 1
test bl, bl
jnz short loc_AE272
test eax, eax
jnz short loc_AE2C1
loc_AE272:
mov rsi, [r14+18h]
add rsi, 18h
cmp qword ptr [r13+38h], 0
jnz short loc_AE2A6
mov rdi, r12
lea rdx, [rbp+var_50]
call _pthread_cond_timedwait
loc_AE28D:
cmp qword ptr [r14+20h], 0
jz short loc_AE2C1
mov r15d, 2
cmp eax, 6Eh ; 'n'
jz short loc_AE2C1
cmp eax, 3Eh ; '>'
jnz short loc_AE25D
jmp short loc_AE2C1
loc_AE2A6:
mov rdi, r12
lea rdx, [rbp+var_50]
lea rcx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 22Eh
call psi_cond_timedwait
jmp short loc_AE28D
loc_AE2C1:
mov rax, cs:after_lock_wait
test rax, rax
setz cl
mov dl, [rbp+var_29]
xor dl, 1
or dl, cl
jnz short loc_AE2DA
call rax ; after_lock_wait
loc_AE2DA:
cmp qword ptr [r14+20h], 0
jz loc_AE3B5
mov rax, [r14+8]
mov rcx, [r14+10h]
mov [rcx], rax
mov rdx, [rbp+var_38]
add rdx, 8
lea rcx, [rax+10h]
test rax, rax
cmovz rcx, rdx
mov rax, [r14+10h]
mov [rcx], rax
mov dword ptr [r14+40h], 0
mov rdi, [r14+18h]
call wake_up_waiters
loc_AE31B:
mov rbx, [r14+18h]
mov rdi, [rbx+58h]
add rbx, 18h
test rdi, rdi
jnz loc_AE3F6
loc_AE330:
mov rdi, rbx
call _pthread_mutex_unlock
mov rbx, [rbp+var_40]
add rbx, 40h ; '@'
cmp qword ptr [r13+80h], 0
jnz loc_AE40B
mov rdi, rbx
call _pthread_mutex_lock
loc_AE356:
xor eax, eax
mov [r13+98h], rax
mov [r13+0A0h], rax
mov rdi, [r13+80h]
test rdi, rdi
jnz loc_AE424
loc_AE376:
mov rdi, rbx
call _pthread_mutex_unlock
lea rcx, aUnknown; "<unknown>"
lea r8, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
lea rsi, [rbp+var_68]
xor edi, edi
xor edx, edx
mov r9d, 279h
lea rax, proc_info_hook
call qword ptr [rax]
mov eax, r15d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AE3B5:
mov eax, [r14+40h]
test eax, eax
jz loc_AE31B
mov rcx, [r14+18h]
mov rcx, [rcx+0B0h]
test rcx, rcx
jz short loc_AE3EE
mov rdi, [r14+28h]
xor esi, esi
cmp eax, 8
setz sil
call rcx
xor r15d, r15d
test al, al
setnz r15b
jmp loc_AE31B
loc_AE3EE:
xor r15d, r15d
jmp loc_AE31B
loc_AE3F6:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_AE330
loc_AE40B:
lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 274h
call psi_mutex_lock
jmp loc_AE356
loc_AE424:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_AE376
| long long wait_for_lock(long long a1, long long a2, char a3, long long a4)
{
long long v7; // r13
long long v8; // r12
long long v9; // rcx
long long v10; // rdi
unsigned long long v11; // rcx
unsigned int v12; // r15d
long long v13; // rsi
int v14; // eax
long long v15; // rax
_QWORD *v16; // rcx
long long v17; // rbx
long long v18; // rdi
long long v19; // rbx
long long v20; // rbx
int v22; // eax
unsigned __int8 ( *v23)(_QWORD, bool); // rcx
_QWORD v24[2]; // [rsp+20h] [rbp-50h] BYREF
long long v25; // [rsp+30h] [rbp-40h]
long long v26; // [rsp+38h] [rbp-38h]
bool v27; // [rsp+47h] [rbp-29h]
v26 = a1;
v7 = my_thread_var();
v25 = v7;
v8 = v7 + 8;
if ( !a3 )
{
v9 = v26;
**(_QWORD **)(v26 + 8) = a2;
*(_QWORD *)(a2 + 16) = *(_QWORD *)(v9 + 8);
*(_QWORD *)(v9 + 8) = a2 + 8;
}
++locks_waited;
*(_QWORD *)(v7 + 152) = *(_QWORD *)(a2 + 24) + 24LL;
*(_QWORD *)(v7 + 160) = v8;
*(_QWORD *)(a2 + 32) = v8;
v10 = 0LL;
proc_info_hook();
v27 = (*(_DWORD *)(v7 + 224) == 0 || a3 != 0) && before_lock_wait != 0;
if ( v27 )
((void ( *)(_QWORD, void *))before_lock_wait)(0LL, &stage_waiting_for_table_level_lock);
v11 = 1000 * my_hrtime() + 1000000000 * a4;
v24[0] = v11 / 0x3B9ACA00;
v24[1] = v11 % 0x3B9ACA00;
do
{
v12 = 1;
if ( !a3 && *(_DWORD *)(v7 + 224) )
break;
v13 = *(_QWORD *)(a2 + 24) + 24LL;
v10 = v7 + 8;
v14 = *(_QWORD *)(v7 + 56)
? psi_cond_timedwait(
v8,
v13,
(long long)v24,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x22Eu)
: pthread_cond_timedwait(v8, v13, v24);
if ( !*(_QWORD *)(a2 + 32) )
break;
v12 = 2;
if ( v14 == 110 )
break;
}
while ( v14 != 62 );
if ( after_lock_wait != 0 && v27 )
((void ( *)(long long))after_lock_wait)(v10);
if ( *(_QWORD *)(a2 + 32) )
{
v15 = *(_QWORD *)(a2 + 8);
**(_QWORD **)(a2 + 16) = v15;
v16 = (_QWORD *)(v15 + 16);
if ( !v15 )
v16 = (_QWORD *)(v26 + 8);
*v16 = *(_QWORD *)(a2 + 16);
*(_DWORD *)(a2 + 64) = 0;
wake_up_waiters(*(_QWORD *)(a2 + 24));
}
else
{
v22 = *(_DWORD *)(a2 + 64);
if ( v22 )
{
v23 = *(unsigned __int8 ( **)(_QWORD, bool))(*(_QWORD *)(a2 + 24) + 176LL);
if ( v23 )
v12 = v23(*(_QWORD *)(a2 + 40), v22 == 8) != 0;
else
v12 = 0;
}
}
v17 = *(_QWORD *)(a2 + 24);
v18 = *(_QWORD *)(v17 + 88);
v19 = v17 + 24;
if ( v18 )
PSI_server[44]();
pthread_mutex_unlock(v19);
v20 = v25 + 64;
if ( *(_QWORD *)(v7 + 128) )
psi_mutex_lock(v25 + 64, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x274u);
else
pthread_mutex_lock(v25 + 64);
*(_QWORD *)(v7 + 152) = 0LL;
*(_QWORD *)(v7 + 160) = 0LL;
if ( *(_QWORD *)(v7 + 128) )
PSI_server[44]();
pthread_mutex_unlock(v20);
proc_info_hook();
return v12;
}
| wait_for_lock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RCX
MOV EBX,EDX
MOV R14,RSI
MOV qword ptr [RBP + -0x38],RDI
CALL 0x001ac2be
MOV R13,RAX
MOV qword ptr [RBP + -0x40],RAX
LEA R12,[RAX + 0x8]
TEST BL,BL
JNZ 0x001ae1a1
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX],R14
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [R14 + 0x10],RAX
LEA RAX,[R14 + 0x8]
MOV qword ptr [RCX + 0x8],RAX
LAB_001ae1a1:
LEA RAX,[0xd16500]
INC qword ptr [RAX]
MOV RAX,qword ptr [R14 + 0x18]
ADD RAX,0x18
MOV qword ptr [R13 + 0x98],RAX
MOV qword ptr [R13 + 0xa0],R12
MOV qword ptr [R14 + 0x20],R12
LEA RAX,[0x493550]
LEA RSI,[0x4931d8]
LEA RCX,[0x1e5388]
LEA R8,[0x1e8ee5]
LEA RDX,[RBP + -0x68]
XOR EDI,EDI
MOV R9D,0x219
CALL qword ptr [RAX]
CMP dword ptr [R13 + 0xe0],0x0
SETZ AL
TEST BL,BL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [0x00d16508]
TEST RAX,RAX
SETNZ DL
AND DL,CL
MOV byte ptr [RBP + -0x29],DL
CMP DL,0x1
JNZ 0x001ae21a
CALL RAX
LAB_001ae21a:
CALL 0x001a89b0
IMUL RAX,RAX,0x3e8
IMUL RCX,R15,0x3b9aca00
ADD RCX,RAX
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
LEA RSI,[RBP + -0x50]
MOV qword ptr [RSI],RDX
IMUL RAX,RDX,0x3b9aca00
SUB RCX,RAX
MOV qword ptr [RSI + 0x8],RCX
LAB_001ae25d:
MOV EAX,dword ptr [R13 + 0xe0]
MOV R15D,0x1
TEST BL,BL
JNZ 0x001ae272
TEST EAX,EAX
JNZ 0x001ae2c1
LAB_001ae272:
MOV RSI,qword ptr [R14 + 0x18]
ADD RSI,0x18
CMP qword ptr [R13 + 0x38],0x0
JNZ 0x001ae2a6
MOV RDI,R12
LEA RDX,[RBP + -0x50]
CALL 0x0012a6b0
LAB_001ae28d:
CMP qword ptr [R14 + 0x20],0x0
JZ 0x001ae2c1
MOV R15D,0x2
CMP EAX,0x6e
JZ 0x001ae2c1
CMP EAX,0x3e
JNZ 0x001ae25d
JMP 0x001ae2c1
LAB_001ae2a6:
MOV RDI,R12
LEA RDX,[RBP + -0x50]
LEA RCX,[0x1e8ee5]
MOV R8D,0x22e
CALL 0x00130c50
JMP 0x001ae28d
LAB_001ae2c1:
MOV RAX,qword ptr [0x00d16510]
TEST RAX,RAX
SETZ CL
MOV DL,byte ptr [RBP + -0x29]
XOR DL,0x1
OR DL,CL
JNZ 0x001ae2da
CALL RAX
LAB_001ae2da:
CMP qword ptr [R14 + 0x20],0x0
JZ 0x001ae3b5
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x10]
MOV qword ptr [RCX],RAX
MOV RDX,qword ptr [RBP + -0x38]
ADD RDX,0x8
LEA RCX,[RAX + 0x10]
TEST RAX,RAX
CMOVZ RCX,RDX
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RCX],RAX
MOV dword ptr [R14 + 0x40],0x0
MOV RDI,qword ptr [R14 + 0x18]
CALL 0x001acfed
LAB_001ae31b:
MOV RBX,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [RBX + 0x58]
ADD RBX,0x18
TEST RDI,RDI
JNZ 0x001ae3f6
LAB_001ae330:
MOV RDI,RBX
CALL 0x0012a1d0
MOV RBX,qword ptr [RBP + -0x40]
ADD RBX,0x40
CMP qword ptr [R13 + 0x80],0x0
JNZ 0x001ae40b
MOV RDI,RBX
CALL 0x0012a200
LAB_001ae356:
XOR EAX,EAX
MOV qword ptr [R13 + 0x98],RAX
MOV qword ptr [R13 + 0xa0],RAX
MOV RDI,qword ptr [R13 + 0x80]
TEST RDI,RDI
JNZ 0x001ae424
LAB_001ae376:
MOV RDI,RBX
CALL 0x0012a1d0
LEA RCX,[0x1e5388]
LEA R8,[0x1e8ee5]
LEA RSI,[RBP + -0x68]
XOR EDI,EDI
XOR EDX,EDX
MOV R9D,0x279
LEA RAX,[0x493550]
CALL qword ptr [RAX]
MOV EAX,R15D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ae3b5:
MOV EAX,dword ptr [R14 + 0x40]
TEST EAX,EAX
JZ 0x001ae31b
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0xb0]
TEST RCX,RCX
JZ 0x001ae3ee
MOV RDI,qword ptr [R14 + 0x28]
XOR ESI,ESI
CMP EAX,0x8
SETZ SIL
CALL RCX
XOR R15D,R15D
TEST AL,AL
SETNZ R15B
JMP 0x001ae31b
LAB_001ae3ee:
XOR R15D,R15D
JMP 0x001ae31b
LAB_001ae3f6:
LEA RAX,[0x493a58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001ae330
LAB_001ae40b:
LEA RSI,[0x1e8ee5]
MOV RDI,RBX
MOV EDX,0x274
CALL 0x001308cf
JMP 0x001ae356
LAB_001ae424:
LEA RAX,[0x493a58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001ae376
|
int1 wait_for_lock(long param_1,long param_2,char param_3,long param_4)
{
pthread_cond_t *__cond;
code *pcVar1;
char cVar2;
int iVar3;
long lVar4;
long lVar5;
int8 *puVar6;
pthread_mutex_t *ppVar7;
bool bVar8;
int1 uVar9;
int1 local_70 [24];
timespec local_58;
long local_48;
long local_40;
char local_31;
local_40 = param_1;
lVar4 = _my_thread_var();
__cond = (pthread_cond_t *)(lVar4 + 8);
if (param_3 == '\0') {
**(long **)(local_40 + 8) = param_2;
*(int8 *)(param_2 + 0x10) = *(int8 *)(local_40 + 8);
*(long *)(local_40 + 8) = param_2 + 8;
}
locks_waited = locks_waited + 1;
*(long *)(lVar4 + 0x98) = *(long *)(param_2 + 0x18) + 0x18;
*(pthread_cond_t **)(lVar4 + 0xa0) = __cond;
*(pthread_cond_t **)(param_2 + 0x20) = __cond;
local_48 = lVar4;
(*(code *)proc_info_hook)
(0,stage_waiting_for_table_level_lock,local_70,"<unknown>",
"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x219);
bVar8 = *(int *)(lVar4 + 0xe0) == 0;
local_31 = before_lock_wait != (code *)0x0 && (param_3 != '\0' || bVar8);
if (before_lock_wait != (code *)0x0 && (param_3 != '\0' || bVar8)) {
(*before_lock_wait)();
}
lVar5 = my_hrtime();
local_58.tv_nsec = param_4 * 1000000000 + lVar5 * 1000;
local_58.tv_sec = (ulong)local_58.tv_nsec / 1000000000;
local_58.tv_nsec = (ulong)local_58.tv_nsec % 1000000000;
while( true ) {
uVar9 = 1;
if ((param_3 == '\0') && (*(int *)(lVar4 + 0xe0) != 0)) break;
ppVar7 = (pthread_mutex_t *)(*(long *)(param_2 + 0x18) + 0x18);
if (*(long *)(lVar4 + 0x38) == 0) {
iVar3 = pthread_cond_timedwait(__cond,ppVar7,&local_58);
}
else {
iVar3 = psi_cond_timedwait(__cond,ppVar7,&local_58,
"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x22e);
}
if (((*(long *)(param_2 + 0x20) == 0) || (uVar9 = 2, iVar3 == 0x6e)) || (iVar3 == 0x3e)) break;
}
if (local_31 == '\x01' && after_lock_wait != (code *)0x0) {
(*after_lock_wait)();
}
if (*(long *)(param_2 + 0x20) == 0) {
if (*(int *)(param_2 + 0x40) != 0) {
pcVar1 = *(code **)(*(long *)(param_2 + 0x18) + 0xb0);
if (pcVar1 == (code *)0x0) {
uVar9 = 0;
}
else {
cVar2 = (*pcVar1)(*(int8 *)(param_2 + 0x28),*(int *)(param_2 + 0x40) == 8);
uVar9 = cVar2 != '\0';
}
}
}
else {
lVar5 = *(long *)(param_2 + 8);
**(long **)(param_2 + 0x10) = lVar5;
puVar6 = (int8 *)(lVar5 + 0x10);
if (lVar5 == 0) {
puVar6 = (int8 *)(local_40 + 8);
}
*puVar6 = *(int8 *)(param_2 + 0x10);
*(int4 *)(param_2 + 0x40) = 0;
wake_up_waiters(*(int8 *)(param_2 + 0x18));
}
lVar5 = *(long *)(param_2 + 0x18);
if (*(long *)(lVar5 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar5 + 0x18));
ppVar7 = (pthread_mutex_t *)(local_48 + 0x40);
if (*(long *)(lVar4 + 0x80) == 0) {
pthread_mutex_lock(ppVar7);
}
else {
psi_mutex_lock(ppVar7,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x274);
}
*(int8 *)(lVar4 + 0x98) = 0;
*(int8 *)(lVar4 + 0xa0) = 0;
if (*(long *)(lVar4 + 0x80) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar7);
(*(code *)proc_info_hook)
(0,local_70,0,"<unknown>","/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x279);
return uVar9;
}
| |
34,561 | js_object_getOwnPropertyDescriptor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_object_getOwnPropertyDescriptor(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSValue prop;
JSAtom atom;
JSValue ret, obj;
JSPropertyDescriptor desc;
int res, flags;
if (magic) {
/* Reflect.getOwnPropertyDescriptor case */
if (JS_VALUE_GET_TAG(argv[0]) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
obj = js_dup(argv[0]);
} else {
obj = JS_ToObject(ctx, argv[0]);
if (JS_IsException(obj))
return obj;
}
prop = argv[1];
atom = JS_ValueToAtom(ctx, prop);
if (unlikely(atom == JS_ATOM_NULL))
goto exception;
ret = JS_UNDEFINED;
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), atom);
if (res < 0)
goto exception;
if (res) {
ret = JS_NewObject(ctx);
if (JS_IsException(ret))
goto exception1;
flags = JS_PROP_C_W_E | JS_PROP_THROW;
if (desc.flags & JS_PROP_GETSET) {
if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_get, js_dup(desc.getter), flags) < 0
|| JS_DefinePropertyValue(ctx, ret, JS_ATOM_set, js_dup(desc.setter), flags) < 0)
goto exception1;
} else {
if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_value, js_dup(desc.value), flags) < 0
|| JS_DefinePropertyValue(ctx, ret, JS_ATOM_writable,
js_bool(desc.flags & JS_PROP_WRITABLE),
flags) < 0)
goto exception1;
}
if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_enumerable,
js_bool(desc.flags & JS_PROP_ENUMERABLE),
flags) < 0
|| JS_DefinePropertyValue(ctx, ret, JS_ATOM_configurable,
js_bool(desc.flags & JS_PROP_CONFIGURABLE),
flags) < 0)
goto exception1;
js_free_desc(ctx, &desc);
}
}
JS_FreeAtom(ctx, atom);
JS_FreeValue(ctx, obj);
return ret;
exception1:
js_free_desc(ctx, &desc);
JS_FreeValue(ctx, ret);
exception:
JS_FreeAtom(ctx, atom);
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O2 | c | js_object_getOwnPropertyDescriptor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbp
movq %rdi, %rbx
testl %r9d, %r9d
je 0x5e870
movq 0x8(%rbp), %r14
cmpl $-0x1, %r14d
jne 0x5e91b
movq (%rbp), %r15
incl (%r15)
jmp 0x5e896
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %rbx, %rdi
callq 0x20b92
movq %rax, %r15
movq %rdx, %r14
movq %rax, %r13
movq %rdx, %r12
cmpl $0x6, %r14d
je 0x5e957
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq %rbx, %rdi
callq 0x1e0bc
movl %eax, %ebp
testl %eax, %eax
je 0x5e901
pushq $0x3
popq %r12
cmpl $-0x1, %r14d
jne 0x5e92c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x1db80
testl %eax, %eax
js 0x5e901
je 0x5e92c
movq %rbx, %rdi
callq 0x1b2c9
movq %rax, %r13
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x5e96c
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x360ed
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1801e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1a995
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1801e
jmp 0x5e923
movq %rbx, %rdi
callq 0x1d5e1
pushq $0x6
popq %r12
xorl %r13d, %r13d
jmp 0x5e957
movq %r15, 0x8(%rsp)
movl %ebp, %r15d
xorl %r13d, %r13d
xorl %ebp, %ebp
orq %rbp, %r13
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1a995
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x1801e
movq %r13, %rax
movq %r12, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x10, 0x10(%rsp)
jne 0x5e9c2
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
cmpl $-0x9, %r9d
jb 0x5e986
incl (%r8)
movl $0x4007, (%rsp) # imm = 0x4007
pushq $0x41
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20872
testl %eax, %eax
js 0x5e8e6
movl 0x10(%rsp), %r8d
shrl %r8d
andl $0x1, %r8d
movl $0x4007, (%rsp) # imm = 0x4007
pushq $0x3f
popq %rcx
pushq $0x1
popq %r9
jmp 0x5ea12
movq 0x28(%rsp), %r8
movq 0x30(%rsp), %r9
cmpl $-0x9, %r9d
jb 0x5e9d5
incl (%r8)
movl $0x4007, (%rsp) # imm = 0x4007
pushq $0x42
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20872
testl %eax, %eax
js 0x5e8e6
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r9
cmpl $-0x9, %r9d
jb 0x5ea08
incl (%r8)
movl $0x4007, (%rsp) # imm = 0x4007
pushq $0x43
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20872
testl %eax, %eax
js 0x5e8e6
movl 0x10(%rsp), %r8d
shrl $0x2, %r8d
andl $0x1, %r8d
movl $0x4007, (%rsp) # imm = 0x4007
pushq $0x40
popq %rcx
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20872
testl %eax, %eax
js 0x5e8e6
movl 0x10(%rsp), %r8d
andl $0x1, %r8d
movl $0x4007, (%rsp) # imm = 0x4007
pushq $0x3e
popq %rcx
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x20872
testl %eax, %eax
js 0x5e8e6
movq %r15, 0x8(%rsp)
movl %ebp, %r15d
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r13, %rbp
andq %rax, %rbp
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x360ed
movl %r13d, %r13d
jmp 0x5e939
| js_object_getOwnPropertyDescriptor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbp, r8
mov rbx, rdi
test r9d, r9d
jz short loc_5E870
mov r14, [rbp+8]
cmp r14d, 0FFFFFFFFh
jnz loc_5E91B
mov r15, [rbp+0]
inc dword ptr [r15]
jmp short loc_5E896
loc_5E870:
mov rsi, [rbp+0]
mov rdx, [rbp+8]
mov rdi, rbx
call JS_ToObject
mov r15, rax
mov r14, rdx
mov r13, rax
mov r12, rdx
cmp r14d, 6
jz loc_5E957
loc_5E896:
mov rsi, [rbp+10h]
mov rdx, [rbp+18h]
mov rdi, rbx
call JS_ValueToAtom
mov ebp, eax
test eax, eax
jz short loc_5E901
push 3
pop r12
cmp r14d, 0FFFFFFFFh
jnz short loc_5E92C
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
mov rdx, r15
mov ecx, ebp
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_5E901
jz short loc_5E92C
mov rdi, rbx
call JS_NewObject
mov r13, rax
mov r12, rdx
cmp r12d, 6
jnz loc_5E96C
loc_5E8E6:
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call js_free_desc
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_FreeValue
loc_5E901:
mov rdi, rbx
mov esi, ebp
call JS_FreeAtom
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_FreeValue
jmp short loc_5E923
loc_5E91B:
mov rdi, rbx
call JS_ThrowTypeErrorNotAnObject
loc_5E923:
push 6
pop r12
xor r13d, r13d
jmp short loc_5E957
loc_5E92C:
mov [rsp+78h+var_70], r15
mov r15d, ebp
xor r13d, r13d
xor ebp, ebp
loc_5E939:
or r13, rbp
mov rdi, rbx
mov esi, r15d
call JS_FreeAtom
mov rdi, rbx
mov rsi, [rsp+78h+var_70]
mov rdx, r14
call JS_FreeValue
loc_5E957:
mov rax, r13
mov rdx, r12
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5E96C:
test byte ptr [rsp+78h+var_68], 10h
jnz short loc_5E9C2
mov r8, [rsp+78h+var_60]
mov r9, [rsp+78h+var_58]
cmp r9d, 0FFFFFFF7h
jb short loc_5E986
inc dword ptr [r8]
loc_5E986:
mov [rsp+78h+var_78], 4007h
push 41h ; 'A'
pop rcx
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_DefinePropertyValue
test eax, eax
js loc_5E8E6
mov r8d, [rsp+78h+var_68]
shr r8d, 1
and r8d, 1
mov [rsp+78h+var_78], 4007h
push 3Fh ; '?'
pop rcx
push 1
pop r9
jmp short loc_5EA12
loc_5E9C2:
mov r8, [rsp+78h+var_50]
mov r9, [rsp+78h+var_48]
cmp r9d, 0FFFFFFF7h
jb short loc_5E9D5
inc dword ptr [r8]
loc_5E9D5:
mov [rsp+78h+var_78], 4007h
push 42h ; 'B'
pop rcx
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_DefinePropertyValue
test eax, eax
js loc_5E8E6
mov r8, [rsp+78h+var_40]
mov r9, [rsp+78h+var_38]
cmp r9d, 0FFFFFFF7h
jb short loc_5EA08
inc dword ptr [r8]
loc_5EA08:
mov [rsp+78h+var_78], 4007h
push 43h ; 'C'
pop rcx
loc_5EA12:
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_DefinePropertyValue
test eax, eax
js loc_5E8E6
mov r8d, [rsp+78h+var_68]
shr r8d, 2
and r8d, 1
mov [rsp+78h+var_78], 4007h
push 40h ; '@'
pop rcx
push 1
pop r9
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_DefinePropertyValue
test eax, eax
js loc_5E8E6
mov r8d, [rsp+78h+var_68]
and r8d, 1
mov [rsp+78h+var_78], 4007h
push 3Eh ; '>'
pop rcx
push 1
pop r9
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_DefinePropertyValue
test eax, eax
js loc_5E8E6
mov [rsp+78h+var_70], r15
mov r15d, ebp
mov rax, 0FFFFFFFF00000000h
mov rbp, r13
and rbp, rax
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call js_free_desc
mov r13d, r13d
jmp loc_5E939
| _DWORD * js_object_getOwnPropertyDescriptor(
long long a1,
long long a2,
long long a3,
long long a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // r14
_DWORD *v16; // r15
long long v17; // rdx
_DWORD *v18; // r13
unsigned int v19; // eax
unsigned int *v20; // r8
int v21; // ebp
int v22; // eax
long long v23; // rax
long long v24; // rdx
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // r13
long long v28; // r12
int v29; // r15d
unsigned long long v30; // rbp
_DWORD *v32; // r8
long long v33; // r9
__m128 v34; // xmm4
__m128 v35; // xmm5
int v36; // eax
__m128 v37; // xmm4
__m128 v38; // xmm5
_DWORD *v39; // r8
long long v40; // r9
__m128 v41; // xmm4
__m128 v42; // xmm5
_DWORD *v43; // r8
long long v44; // r9
__m128 v45; // xmm4
__m128 v46; // xmm5
char v47; // [rsp+0h] [rbp-78h]
long long v48; // [rsp+8h] [rbp-70h]
long long v49; // [rsp+10h] [rbp-68h] BYREF
_DWORD *v50; // [rsp+18h] [rbp-60h]
long long v51; // [rsp+20h] [rbp-58h]
_DWORD *v52; // [rsp+28h] [rbp-50h]
long long v53; // [rsp+30h] [rbp-48h]
_DWORD *v54; // [rsp+38h] [rbp-40h]
long long v55; // [rsp+40h] [rbp-38h]
if ( (_DWORD)a6 )
{
v15 = a5[1];
if ( (_DWORD)v15 != -1 )
{
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, (long long)a5, a6, v47);
return 0LL;
}
v16 = (_DWORD *)*a5;
++*(_DWORD *)*a5;
LABEL_5:
v19 = JS_ValueToAtom(a1, a5[2], a5[3]);
v21 = v19;
if ( v19 )
{
if ( (_DWORD)v15 != -1 )
goto LABEL_14;
LOBYTE(v22) = JS_GetOwnPropertyInternal(a1, (long long)&v49, (long long)v16, v19, v20);
if ( v22 >= 0 )
{
if ( v22 )
{
v23 = JS_NewObject(a1);
v27 = v23;
v28 = v24;
if ( (_DWORD)v24 == 6 )
goto LABEL_10;
if ( (v49 & 0x10) != 0 )
{
v39 = v52;
v40 = v53;
if ( (unsigned int)v53 >= 0xFFFFFFF7 )
++*v52;
if ( (int)JS_DefinePropertyValue(
a1,
v23,
v24,
66LL,
v39,
v40,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v25,
v26,
a13,
a14,
16391) < 0 )
goto LABEL_10;
v43 = v54;
v44 = v55;
if ( (unsigned int)v55 >= 0xFFFFFFF7 )
++*v54;
v36 = JS_DefinePropertyValue(
a1,
v27,
v28,
67LL,
v43,
v44,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v41,
v42,
a13,
a14,
16391);
}
else
{
v32 = v50;
v33 = v51;
if ( (unsigned int)v51 >= 0xFFFFFFF7 )
++*v50;
if ( (int)JS_DefinePropertyValue(
a1,
v23,
v24,
65LL,
v32,
v33,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v25,
v26,
a13,
a14,
16391) < 0 )
goto LABEL_10;
v36 = JS_DefinePropertyValue(
a1,
v27,
v28,
63LL,
(_DWORD *)(((unsigned int)v49 >> 1) & 1),
1LL,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v34,
v35,
a13,
a14,
16391);
}
if ( v36 < 0
|| (int)JS_DefinePropertyValue(
a1,
v27,
v28,
64LL,
(_DWORD *)(((unsigned int)v49 >> 2) & 1),
1LL,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v37,
v38,
a13,
a14,
16391) < 0
|| (int)JS_DefinePropertyValue(
a1,
v27,
v28,
62LL,
(_DWORD *)(v49 & 1),
1LL,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v45,
v46,
a13,
a14,
16391) < 0 )
{
LABEL_10:
js_free_desc(a1, &v49);
JS_FreeValue(a1, v27, v28);
goto LABEL_11;
}
v48 = (long long)v16;
v29 = v21;
v30 = v27 & 0xFFFFFFFF00000000LL;
js_free_desc(a1, &v49);
v27 = (unsigned int)v27;
LABEL_15:
v18 = (_DWORD *)(v30 | v27);
JS_FreeAtom(a1, v29);
JS_FreeValue(a1, v48, v15);
return v18;
}
LABEL_14:
v48 = (long long)v16;
v29 = v21;
v27 = 0LL;
v30 = 0LL;
goto LABEL_15;
}
}
LABEL_11:
JS_FreeAtom(a1, v21);
JS_FreeValue(a1, (long long)v16, v15);
return 0LL;
}
v16 = (_DWORD *)JS_ToObject(a1, *a5, a5[1], a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v15 = v17;
v18 = v16;
if ( (_DWORD)v17 != 6 )
goto LABEL_5;
return v18;
}
| js_object_getOwnPropertyDescriptor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBP,R8
MOV RBX,RDI
TEST R9D,R9D
JZ 0x0015e870
MOV R14,qword ptr [RBP + 0x8]
CMP R14D,-0x1
JNZ 0x0015e91b
MOV R15,qword ptr [RBP]
INC dword ptr [R15]
JMP 0x0015e896
LAB_0015e870:
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
MOV RDI,RBX
CALL 0x00120b92
MOV R15,RAX
MOV R14,RDX
MOV R13,RAX
MOV R12,RDX
CMP R14D,0x6
JZ 0x0015e957
LAB_0015e896:
MOV RSI,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + 0x18]
MOV RDI,RBX
CALL 0x0011e0bc
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0015e901
PUSH 0x3
POP R12
CMP R14D,-0x1
JNZ 0x0015e92c
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
MOV RDX,R15
MOV ECX,EBP
CALL 0x0011db80
TEST EAX,EAX
JS 0x0015e901
JZ 0x0015e92c
MOV RDI,RBX
CALL 0x0011b2c9
MOV R13,RAX
MOV R12,RDX
CMP R12D,0x6
JNZ 0x0015e96c
LAB_0015e8e6:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001360ed
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x0011801e
LAB_0015e901:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0011a995
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011801e
JMP 0x0015e923
LAB_0015e91b:
MOV RDI,RBX
CALL 0x0011d5e1
LAB_0015e923:
PUSH 0x6
POP R12
XOR R13D,R13D
JMP 0x0015e957
LAB_0015e92c:
MOV qword ptr [RSP + 0x8],R15
MOV R15D,EBP
XOR R13D,R13D
XOR EBP,EBP
LAB_0015e939:
OR R13,RBP
MOV RDI,RBX
MOV ESI,R15D
CALL 0x0011a995
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R14
CALL 0x0011801e
LAB_0015e957:
MOV RAX,R13
MOV RDX,R12
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015e96c:
TEST byte ptr [RSP + 0x10],0x10
JNZ 0x0015e9c2
MOV R8,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x20]
CMP R9D,-0x9
JC 0x0015e986
INC dword ptr [R8]
LAB_0015e986:
MOV dword ptr [RSP],0x4007
PUSH 0x41
POP RCX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x00120872
TEST EAX,EAX
JS 0x0015e8e6
MOV R8D,dword ptr [RSP + 0x10]
SHR R8D,0x1
AND R8D,0x1
MOV dword ptr [RSP],0x4007
PUSH 0x3f
POP RCX
PUSH 0x1
POP R9
JMP 0x0015ea12
LAB_0015e9c2:
MOV R8,qword ptr [RSP + 0x28]
MOV R9,qword ptr [RSP + 0x30]
CMP R9D,-0x9
JC 0x0015e9d5
INC dword ptr [R8]
LAB_0015e9d5:
MOV dword ptr [RSP],0x4007
PUSH 0x42
POP RCX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x00120872
TEST EAX,EAX
JS 0x0015e8e6
MOV R8,qword ptr [RSP + 0x38]
MOV R9,qword ptr [RSP + 0x40]
CMP R9D,-0x9
JC 0x0015ea08
INC dword ptr [R8]
LAB_0015ea08:
MOV dword ptr [RSP],0x4007
PUSH 0x43
POP RCX
LAB_0015ea12:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x00120872
TEST EAX,EAX
JS 0x0015e8e6
MOV R8D,dword ptr [RSP + 0x10]
SHR R8D,0x2
AND R8D,0x1
MOV dword ptr [RSP],0x4007
PUSH 0x40
POP RCX
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x00120872
TEST EAX,EAX
JS 0x0015e8e6
MOV R8D,dword ptr [RSP + 0x10]
AND R8D,0x1
MOV dword ptr [RSP],0x4007
PUSH 0x3e
POP RCX
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x00120872
TEST EAX,EAX
JS 0x0015e8e6
MOV qword ptr [RSP + 0x8],R15
MOV R15D,EBP
MOV RAX,-0x100000000
MOV RBP,R13
AND RBP,RAX
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001360ed
MOV R13D,R13D
JMP 0x0015e939
|
int1 [16] js_object_getOwnPropertyDescriptor(int8 param_1)
{
int *piVar1;
int iVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
int8 *in_R8;
int in_R9D;
int8 uVar6;
ulong uVar7;
int8 uVar8;
int1 auVar9 [16];
int1 auVar10 [16];
uint local_68 [2];
int *local_60;
int8 local_58;
int *local_50;
int8 local_48;
int *local_40;
int8 local_38;
if (in_R9D == 0) {
auVar9 = JS_ToObject(param_1,*in_R8,in_R8[1]);
if (auVar9._8_4_ == 6) {
return auVar9;
}
}
else {
if ((int)in_R8[1] != -1) {
JS_ThrowTypeErrorNotAnObject(param_1);
goto LAB_0015e923;
}
piVar1 = (int *)*in_R8;
auVar9._8_8_ = in_R8[1];
auVar9._0_8_ = piVar1;
*piVar1 = *piVar1 + 1;
}
uVar8 = auVar9._0_8_;
iVar2 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]);
if (iVar2 != 0) {
uVar6 = 3;
if (auVar9._8_4_ != -1) {
LAB_0015e92c:
uVar7 = 0;
uVar5 = 0;
LAB_0015e939:
auVar10._8_8_ = uVar6;
auVar10._0_8_ = uVar7 | uVar5;
JS_FreeAtom(param_1,iVar2);
JS_FreeValue(param_1,uVar8,auVar9._8_8_);
return auVar10;
}
iVar3 = JS_GetOwnPropertyInternal(param_1,local_68,uVar8,iVar2);
if (-1 < iVar3) {
if (iVar3 == 0) goto LAB_0015e92c;
auVar10 = JS_NewObject(param_1);
uVar6 = auVar10._8_8_;
uVar7 = auVar10._0_8_;
if (auVar10._8_4_ != 6) {
if ((local_68[0] & 0x10) == 0) {
if (0xfffffff6 < (uint)local_58) {
*local_60 = *local_60 + 1;
}
iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,0x41,local_60,local_58,0x4007);
if (-1 < iVar3) {
local_40 = (int *)(ulong)(local_68[0] >> 1 & 1);
uVar4 = 0x3f;
local_38 = 1;
LAB_0015ea12:
iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,uVar4,local_40,local_38,0x4007);
if (((-1 < iVar3) &&
(iVar3 = JS_DefinePropertyValue
(param_1,uVar7,uVar6,0x40,local_68[0] >> 2 & 1,1,0x4007),
-1 < iVar3)) &&
(iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,0x3e,local_68[0] & 1,1,0x4007),
-1 < iVar3)) {
uVar5 = uVar7 & 0xffffffff00000000;
js_free_desc(param_1,local_68);
uVar7 = uVar7 & 0xffffffff;
goto LAB_0015e939;
}
}
}
else {
if (0xfffffff6 < (uint)local_48) {
*local_50 = *local_50 + 1;
}
iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,0x42,local_50,local_48,0x4007);
if (-1 < iVar3) {
if (0xfffffff6 < (uint)local_38) {
*local_40 = *local_40 + 1;
}
uVar4 = 0x43;
goto LAB_0015ea12;
}
}
}
js_free_desc(param_1,local_68);
JS_FreeValue(param_1,uVar7,uVar6);
}
}
JS_FreeAtom(param_1,iVar2);
JS_FreeValue(param_1,uVar8,auVar9._8_8_);
LAB_0015e923:
return ZEXT816(6) << 0x40;
}
| |
34,562 | translog_disable_purge | eloqsql/storage/maria/ma_loghandler.c | void translog_disable_purge()
{
mysql_mutex_lock(&log_descriptor.purger_lock);
log_purge_disabled++;
mysql_mutex_unlock(&log_descriptor.purger_lock);
} | O3 | c | translog_disable_purge:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0xbb1de2(%rip) # 0xc01930
jne 0x4fb7b
leaq 0xbb1d99(%rip), %rdi # 0xc018f0
callq 0x29220
incl 0x3afcde(%rip) # 0x3ff840
movq 0xbb1dc7(%rip), %rdi # 0xc01930
testq %rdi, %rdi
jne 0x4fb82
leaq 0xbb1d7b(%rip), %rdi # 0xc018f0
popq %rbp
jmp 0x291e0
callq 0x2cd31
jmp 0x4fb5c
leaq 0x338537(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4fb6e
| translog_disable_purge:
push rbp
mov rbp, rsp
cmp cs:qword_C01930, 0
jnz short loc_4FB7B
lea rdi, unk_C018F0
call _pthread_mutex_lock
loc_4FB5C:
inc cs:log_purge_disabled
mov rdi, cs:qword_C01930
test rdi, rdi
jnz short loc_4FB82
loc_4FB6E:
lea rdi, unk_C018F0
pop rbp
jmp _pthread_mutex_unlock
loc_4FB7B:
call translog_disable_purge_cold_1
jmp short loc_4FB5C
loc_4FB82:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4FB6E
| long long translog_disable_purge()
{
if ( qword_C01930 )
translog_disable_purge_cold_1();
else
pthread_mutex_lock(&unk_C018F0);
++log_purge_disabled;
if ( qword_C01930 )
PSI_server[44]();
return pthread_mutex_unlock(&unk_C018F0);
}
| translog_disable_purge:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [0x00d01930],0x0
JNZ 0x0014fb7b
LEA RDI,[0xd018f0]
CALL 0x00129220
LAB_0014fb5c:
INC dword ptr [0x004ff840]
MOV RDI,qword ptr [0x00d01930]
TEST RDI,RDI
JNZ 0x0014fb82
LAB_0014fb6e:
LEA RDI,[0xd018f0]
POP RBP
JMP 0x001291e0
LAB_0014fb7b:
CALL 0x0012cd31
JMP 0x0014fb5c
LAB_0014fb82:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014fb6e
|
void translog_disable_purge(void)
{
if (DAT_00d01930 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d018f0);
}
else {
translog_disable_purge_cold_1();
}
log_purge_disabled = log_purge_disabled + 1;
if (DAT_00d01930 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d018f0);
return;
}
| |
34,563 | ma_send | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | static ssize_t ma_send(my_socket socket, const uchar *buffer, size_t length, int flags)
{
ssize_t r;
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
struct sigaction act, oldact;
act.sa_handler= SIG_IGN;
sigaction(SIGPIPE, &act, &oldact);
#endif
do {
r = send(socket, (const char *)buffer, IF_WIN((int)length,length), flags);
}
while (r == -1 && IS_SOCKET_EINTR(socket_errno));
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
sigaction(SIGPIPE, &oldact, NULL);
#endif
return r;
} | O0 | c | ma_send:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x141f0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $-0x1, -0x28(%rbp)
movb %al, -0x29(%rbp)
jne 0x5cec7
callq 0x14050
cmpl $0x4, (%rax)
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x5ce96
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ma_send:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
loc_5CE96:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
call _send
mov [rbp+var_28], rax
xor eax, eax
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_29], al
jnz short loc_5CEC7
call ___errno_location
cmp dword ptr [rax], 4
setz al
mov [rbp+var_29], al
loc_5CEC7:
mov al, [rbp+var_29]
test al, 1
jnz short loc_5CE96
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
| long long ma_send(unsigned int a1, long long a2, long long a3, unsigned int a4)
{
bool v5; // [rsp+7h] [rbp-29h]
long long v6; // [rsp+8h] [rbp-28h]
do
{
v6 = send(a1, a2, a3, a4);
v5 = 0;
if ( v6 == -1 )
v5 = *(_DWORD *)__errno_location(a1) == 4;
}
while ( v5 );
return v6;
}
| ma_send:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
LAB_0015ce96:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CALL 0x001141f0
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x28],-0x1
MOV byte ptr [RBP + -0x29],AL
JNZ 0x0015cec7
CALL 0x00114050
CMP dword ptr [RAX],0x4
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_0015cec7:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x0015ce96
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
ssize_t ma_send(int param_1,void *param_2,size_t param_3,int param_4)
{
ssize_t sVar1;
int *piVar2;
bool bVar3;
do {
sVar1 = send(param_1,param_2,param_3,param_4);
bVar3 = false;
if (sVar1 == -1) {
piVar2 = __errno_location();
bVar3 = *piVar2 == 4;
}
} while (bVar3);
return sVar1;
}
| |
34,564 | my_strnxfrm_unicode_full_bin_internal | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs,
uchar *dst, uchar *de, uint *nweights,
const uchar *src, const uchar *se)
{
my_wc_t UNINIT_VAR(wc);
uchar *dst0= dst;
DBUG_ASSERT(src || !se);
DBUG_ASSERT(cs->state & MY_CS_BINSORT);
for (; dst < de && *nweights; (*nweights)--)
{
int res;
if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0)
break;
src+= res;
*dst++= (uchar) (wc >> 16);
if (dst < de)
{
*dst++= (uchar) ((wc >> 8) & 0xFF);
if (dst < de)
*dst++= (uchar) (wc & 0xFF);
}
}
return dst - dst0;
} | O3 | c | my_strnxfrm_unicode_full_bin_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x40(%rbp)
movq %rsi, %rax
movq %rsi, -0x38(%rbp)
cmpq %rdx, %rsi
jae 0x8a841
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
movl (%rcx), %ecx
movq -0x38(%rbp), %r14
testl %ecx, %ecx
je 0x8a83e
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq -0x40(%rbp), %rcx
callq *0x28(%rax)
testl %eax, %eax
jle 0x8a83e
movl %eax, %ecx
movb -0x2e(%rbp), %dl
leaq 0x1(%r14), %rax
movb %dl, (%r14)
cmpq %r13, %rax
jae 0x8a825
movb -0x2f(%rbp), %dl
leaq 0x2(%r14), %rax
movb %dl, 0x1(%r14)
cmpq %r13, %rax
jae 0x8a825
movb -0x30(%rbp), %al
movb %al, 0x2(%r14)
addq $0x3, %r14
movq %r14, %rax
movl %ecx, %ecx
addq %rcx, %r15
movl (%r12), %ecx
decl %ecx
movl %ecx, (%r12)
movq %rax, %r14
cmpq %r13, %rax
jb 0x8a7d6
jmp 0x8a841
movq %r14, %rax
subq -0x38(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_unicode_full_bin_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r9
mov rax, rsi
mov [rbp+var_38], rsi
cmp rsi, rdx
jnb short loc_8A841
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
mov ecx, [rcx]
mov r14, [rbp+var_38]
loc_8A7D6:
test ecx, ecx
jz short loc_8A83E
mov rax, [rbx+0B8h]
mov rdi, rbx
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, [rbp+var_40]
call qword ptr [rax+28h]
test eax, eax
jle short loc_8A83E
mov ecx, eax
mov dl, [rbp+var_2E]
lea rax, [r14+1]
mov [r14], dl
cmp rax, r13
jnb short loc_8A825
mov dl, [rbp+var_2F]
lea rax, [r14+2]
mov [r14+1], dl
cmp rax, r13
jnb short loc_8A825
mov al, [rbp+var_30]
mov [r14+2], al
add r14, 3
mov rax, r14
loc_8A825:
mov ecx, ecx
add r15, rcx
mov ecx, [r12]
dec ecx
mov [r12], ecx
mov r14, rax
cmp rax, r13
jb short loc_8A7D6
jmp short loc_8A841
loc_8A83E:
mov rax, r14
loc_8A841:
sub rax, [rbp+var_38]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strnxfrm_unicode_full_bin_internal(
long long a1,
_BYTE *a2,
unsigned long long a3,
int *a4,
long long a5,
long long a6)
{
_BYTE *v6; // rax
int v10; // ecx
_BYTE *v11; // r14
int v12; // eax
unsigned int v13; // ecx
_BYTE v16[48]; // [rsp+10h] [rbp-30h] BYREF
v6 = a2;
if ( (unsigned long long)a2 < a3 )
{
v10 = *a4;
v11 = a2;
while ( v10 )
{
v12 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v16,
a5,
a6);
if ( v12 <= 0 )
break;
v13 = v12;
v6 = v11 + 1;
*v11 = v16[2];
if ( (unsigned long long)(v11 + 1) < a3 )
{
v6 = v11 + 2;
v11[1] = v16[1];
if ( (unsigned long long)(v11 + 2) < a3 )
{
v11[2] = v16[0];
v6 = v11 + 3;
}
}
a5 += v13;
v10 = *a4 - 1;
*a4 = v10;
v11 = v6;
if ( (unsigned long long)v6 >= a3 )
return v6 - a2;
}
v6 = v11;
}
return v6 - a2;
}
| my_strnxfrm_unicode_full_bin_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R9
MOV RAX,RSI
MOV qword ptr [RBP + -0x38],RSI
CMP RSI,RDX
JNC 0x0018a841
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV RBX,RDI
MOV ECX,dword ptr [RCX]
MOV R14,qword ptr [RBP + -0x38]
LAB_0018a7d6:
TEST ECX,ECX
JZ 0x0018a83e
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x0018a83e
MOV ECX,EAX
MOV DL,byte ptr [RBP + -0x2e]
LEA RAX,[R14 + 0x1]
MOV byte ptr [R14],DL
CMP RAX,R13
JNC 0x0018a825
MOV DL,byte ptr [RBP + -0x2f]
LEA RAX,[R14 + 0x2]
MOV byte ptr [R14 + 0x1],DL
CMP RAX,R13
JNC 0x0018a825
MOV AL,byte ptr [RBP + -0x30]
MOV byte ptr [R14 + 0x2],AL
ADD R14,0x3
MOV RAX,R14
LAB_0018a825:
MOV ECX,ECX
ADD R15,RCX
MOV ECX,dword ptr [R12]
DEC ECX
MOV dword ptr [R12],ECX
MOV R14,RAX
CMP RAX,R13
JC 0x0018a7d6
JMP 0x0018a841
LAB_0018a83e:
MOV RAX,R14
LAB_0018a841:
SUB RAX,qword ptr [RBP + -0x38]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin_internal
(long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5,
int8 param_6)
{
uint uVar1;
int iVar2;
int1 *puVar3;
int1 *puVar4;
int1 local_38;
int1 local_37;
int1 local_36;
puVar4 = param_2;
if (param_2 < param_3) {
iVar2 = *param_4;
puVar3 = param_2;
do {
puVar4 = puVar3;
if ((iVar2 == 0) ||
(uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_38,param_5,param_6)
, (int)uVar1 < 1)) break;
puVar4 = puVar3 + 1;
*puVar3 = local_36;
if (puVar4 < param_3) {
puVar4 = puVar3 + 2;
puVar3[1] = local_37;
if (puVar4 < param_3) {
puVar3[2] = local_38;
puVar4 = puVar3 + 3;
}
}
param_5 = param_5 + (ulong)uVar1;
iVar2 = *param_4 + -1;
*param_4 = iVar2;
puVar3 = puVar4;
} while (puVar4 < param_3);
}
return (long)puVar4 - (long)param_2;
}
| |
34,565 | MNN::CreateTensorQuantInfo(flatbuffers::FlatBufferBuilder&, MNN::TensorQuantInfoT const*, std::__1::function<unsigned long (void*)> const*) | mnn-tts/MNN/schema/current/MNN_generated.h | inline flatbuffers::Offset<TensorQuantInfo> CreateTensorQuantInfo(flatbuffers::FlatBufferBuilder &_fbb, const TensorQuantInfoT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
(void)_rehasher;
(void)_o;
struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TensorQuantInfoT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
auto _scale = _o->scale;
auto _zero = _o->zero;
auto _min = _o->min;
auto _max = _o->max;
auto _type = _o->type;
return MNN::CreateTensorQuantInfo(
_fbb,
_scale,
_zero,
_min,
_max,
_type);
} | O0 | c | MNN::CreateTensorQuantInfo(flatbuffers::FlatBufferBuilder&, MNN::TensorQuantInfoT const*, std::__1::function<unsigned long (void*)> const*):
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
movss (%rax), %xmm0
movss %xmm0, 0x1c(%rsp)
movq 0x40(%rsp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, 0x18(%rsp)
movq 0x40(%rsp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x40(%rsp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x40(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rdi
movss 0x1c(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
movss 0x14(%rsp), %xmm2
movss 0x10(%rsp), %xmm3
movl 0xc(%rsp), %esi
callq 0x3dd00
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nop
| _ZN3MNN21CreateTensorQuantInfoERN11flatbuffers17FlatBufferBuilderEPKNS_16TensorQuantInfoTEPKNSt3__18functionIFmPvEEE:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_20], rdx
mov rax, [rsp+58h+var_10]
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_18]
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_20]
mov [rsp+58h+var_28], rax
mov rax, [rsp+58h+var_18]
movss xmm0, dword ptr [rax]
movss [rsp+58h+var_3C], xmm0
mov rax, [rsp+58h+var_18]
movss xmm0, dword ptr [rax+4]
movss [rsp+58h+var_40], xmm0
mov rax, [rsp+58h+var_18]
movss xmm0, dword ptr [rax+8]
movss [rsp+58h+var_44], xmm0
mov rax, [rsp+58h+var_18]
movss xmm0, dword ptr [rax+0Ch]
movss [rsp+58h+var_48], xmm0
mov rax, [rsp+58h+var_18]
mov eax, [rax+10h]
mov [rsp+58h+var_4C], eax
mov rdi, [rsp+58h+var_10]
movss xmm0, [rsp+58h+var_3C]
movss xmm1, [rsp+58h+var_40]
movss xmm2, [rsp+58h+var_44]
movss xmm3, [rsp+58h+var_48]
mov esi, [rsp+58h+var_4C]
call _ZN3MNN21CreateTensorQuantInfoERN11flatbuffers17FlatBufferBuilderEffffNS_8DataTypeE; MNN::CreateTensorQuantInfo(flatbuffers::FlatBufferBuilder &,float,float,float,float,MNN::DataType)
mov [rsp+58h+var_4], eax
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
| long long MNN::CreateTensorQuantInfo(long long a1, long long a2)
{
return (unsigned int)MNN::CreateTensorQuantInfo(
a1,
*(unsigned int *)(a2 + 16),
*(float *)a2,
*(float *)(a2 + 4),
*(float *)(a2 + 8),
*(float *)(a2 + 12));
}
| CreateTensorQuantInfo:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RSP + 0x1c],XMM0
MOV RAX,qword ptr [RSP + 0x40]
MOVSS XMM0,dword ptr [RAX + 0x4]
MOVSS dword ptr [RSP + 0x18],XMM0
MOV RAX,qword ptr [RSP + 0x40]
MOVSS XMM0,dword ptr [RAX + 0x8]
MOVSS dword ptr [RSP + 0x14],XMM0
MOV RAX,qword ptr [RSP + 0x40]
MOVSS XMM0,dword ptr [RAX + 0xc]
MOVSS dword ptr [RSP + 0x10],XMM0
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x48]
MOVSS XMM0,dword ptr [RSP + 0x1c]
MOVSS XMM1,dword ptr [RSP + 0x18]
MOVSS XMM2,dword ptr [RSP + 0x14]
MOVSS XMM3,dword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x0013dd00
MOV dword ptr [RSP + 0x54],EAX
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
/* MNN::CreateTensorQuantInfo(flatbuffers::FlatBufferBuilder&, MNN::TensorQuantInfoT const*,
std::function<unsigned long (void*)> const*) */
int4
MNN::CreateTensorQuantInfo(FlatBufferBuilder *param_1,TensorQuantInfoT *param_2,function *param_3)
{
int4 uVar1;
uVar1 = CreateTensorQuantInfo
(*(int4 *)param_2,*(int4 *)(param_2 + 4),
*(int4 *)(param_2 + 8),*(int4 *)(param_2 + 0xc),param_1,
*(int4 *)(param_2 + 0x10));
return uVar1;
}
| |
34,566 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++() | monkey531[P]llama/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x12106a
leaq 0xed64e(%rip), %rdi # 0x20e69e
movl $0x33c0, %esi # imm = 0x33C0
leaq 0xed68c(%rip), %rdx # 0x20e6e8
leaq 0xf2d71(%rip), %rcx # 0x213dd4
movb $0x0, %al
callq 0x59e90
movq 0x8(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, (%rsp)
subq $0x9, %rax
ja 0x1210c3
movq (%rsp), %rax
leaq 0xf01e6(%rip), %rcx # 0x211270
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xb8ca0
jmp 0x1210d5
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0xb8cf0
jmp 0x1210d5
jmp 0x1210c3
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0xb8d40
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
cmp qword ptr [rax], 0
jnz short loc_12106A
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 33C0h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov al, 0
call _ggml_abort
loc_12106A:
mov rax, [rsp+18h+var_10]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+18h+var_18], rax
sub rax, 9; switch 10 cases
ja short def_121091; jumptable 0000000000121091 default case
mov rax, [rsp+18h+var_18]
lea rcx, jpt_121091
movsxd rax, ds:(jpt_121091 - 211270h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_121093:
mov rdi, [rsp+18h+var_10]; jumptable 0000000000121091 case 1
add rdi, 8
mov esi, 1
call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEiEvRT_T0_; std::advance<__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>>>>,int>(__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>>>> &,int)
jmp short loc_1210D5
loc_1210A8:
mov rdi, [rsp+18h+var_10]; jumptable 0000000000121091 case 2
add rdi, 8
add rdi, 8
mov esi, 1
call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES6_ISG_SaISG_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,int>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> &,int)
jmp short loc_1210D5
loc_1210C1:
jmp short $+2; jumptable 0000000000121091 cases 0,3-9
def_121091:
mov rdi, [rsp+18h+var_10]; jumptable 0000000000121091 default case
add rdi, 8
add rdi, 10h
call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tppEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(void)
loc_1210D5:
mov rax, [rsp+18h+var_10]
add rsp, 18h
retn
| _QWORD * 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++(
_QWORD *a1)
{
if ( !*a1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
switch ( *(_BYTE *)*a1 )
{
case 1:
std::advance<__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>>>>,int>(
(long long)(a1 + 1),
1);
break;
case 2:
std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,int>(
(long long)(a1 + 2),
1);
break;
default:
nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(a1 + 3);
break;
}
return a1;
}
| |||
34,567 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++() | monkey531[P]llama/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++():
movq (%rdi), %rax
testq %rax, %rax
je 0x68447
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x68438
cmpl $0x1, %eax
jne 0x6843f
addq $0x30, 0x8(%rdi)
jmp 0x68443
addq $0x10, 0x10(%rdi)
jmp 0x68443
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x47cb3(%rip), %rdi # 0xb0102
leaq 0x47cf6(%rip), %rdx # 0xb014c
leaq 0x4cf80(%rip), %rcx # 0xb53dd
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x23e50
| _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_68447
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_68438
cmp eax, 1
jnz short loc_6843F
add qword ptr [rdi+8], 30h ; '0'
jmp short loc_68443
loc_68438:
add qword ptr [rdi+10h], 10h
jmp short loc_68443
loc_6843F:
inc qword ptr [rdi+18h]
loc_68443:
mov rax, rdi
retn
loc_68447:
push rax
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
| 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 std::make_shared<std::vector<minja::Value>>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
13248LL);
}
}
| operator++:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00168447
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x00168438
CMP EAX,0x1
JNZ 0x0016843f
ADD qword ptr [RDI + 0x8],0x30
JMP 0x00168443
LAB_00168438:
ADD qword ptr [RDI + 0x10],0x10
JMP 0x00168443
LAB_0016843f:
INC qword ptr [RDI + 0x18]
LAB_00168443:
MOV RAX,RDI
RET
LAB_00168447:
PUSH RAX
LEA RDI,[0x1b0102]
LEA RDX,[0x1b014c]
LEA RCX,[0x1b53dd]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x00123e50
|
/* 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);
}
| |
34,568 | arena_create | eshkol/src/core/memory/arena.c | Arena* arena_create(size_t initial_capacity) {
size_t min_size = 1024; // Minimum 1KB
size_t block_size = initial_capacity > min_size ? initial_capacity : min_size;
// Allocate the arena control structure
Arena* arena = malloc(sizeof(Arena));
if (!arena) return NULL;
// Allocate the initial block
size_t header_size = sizeof(Block);
Block* block = malloc(header_size + block_size);
if (!block) {
free(arena);
return NULL;
}
// Initialize the block
block->next = NULL;
block->size = block_size;
block->used = 0;
// Initialize the arena
arena->current = block;
arena->first = block;
arena->total_used = 0;
arena->allocation_count = 0;
arena->min_block_size = min_size;
return arena;
} | O0 | c | arena_create:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq $0x400, -0x18(%rbp) # imm = 0x400
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x3a68
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x3a70
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x28, %edi
callq 0x1100
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3a9a
movq $0x0, -0x8(%rbp)
jmp 0x3b33
movq $0x18, -0x30(%rbp)
movq -0x30(%rbp), %rdi
addq -0x20(%rbp), %rdi
callq 0x1100
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x3acd
movq -0x28(%rbp), %rdi
callq 0x1030
movq $0x0, -0x8(%rbp)
jmp 0x3b33
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| arena_create:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], 400h
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jbe short loc_3A68
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
jmp short loc_3A70
loc_3A68:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
loc_3A70:
mov rax, [rbp+var_40]
mov [rbp+var_20], rax
mov edi, 28h ; '('
call _malloc
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_3A9A
mov [rbp+var_8], 0
jmp loc_3B33
loc_3A9A:
mov [rbp+var_30], 18h
mov rdi, [rbp+var_30]
add rdi, [rbp+var_20]
call _malloc
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_3ACD
mov rdi, [rbp+var_28]
call _free
mov [rbp+var_8], 0
jmp short loc_3B33
loc_3ACD:
mov rax, [rbp+var_38]
mov qword ptr [rax], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_38]
mov [rax+8], rcx
mov rax, [rbp+var_38]
mov qword ptr [rax+10h], 0
mov rcx, [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax+8], rcx
mov rax, [rbp+var_28]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_28]
mov qword ptr [rax+18h], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+20h], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_3B33:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| _QWORD * arena_create(unsigned long long a1)
{
long long v2; // [rsp+0h] [rbp-40h]
_QWORD *v3; // [rsp+8h] [rbp-38h]
_QWORD *v4; // [rsp+18h] [rbp-28h]
if ( a1 <= 0x400 )
v2 = 1024LL;
else
v2 = a1;
v4 = (_QWORD *)malloc(40LL);
if ( !v4 )
return 0LL;
v3 = (_QWORD *)malloc(v2 + 24);
if ( v3 )
{
*v3 = 0LL;
v3[1] = v2;
v3[2] = 0LL;
*v4 = v3;
v4[1] = v3;
v4[2] = 0LL;
v4[3] = 0LL;
v4[4] = 1024LL;
return v4;
}
else
{
free(v4);
return 0LL;
}
}
| arena_create:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],0x400
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x00103a68
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00103a70
LAB_00103a68:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
LAB_00103a70:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x20],RAX
MOV EDI,0x28
CALL 0x00101100
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00103a9a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00103b33
LAB_00103a9a:
MOV qword ptr [RBP + -0x30],0x18
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,qword ptr [RBP + -0x20]
CALL 0x00101100
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00103acd
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00101030
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00103b33
LAB_00103acd:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],0x0
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x18],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00103b33:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 * arena_create(ulong param_1)
{
int8 *puVar1;
ulong local_48;
int8 *local_10;
local_48 = param_1;
if (param_1 < 0x401) {
local_48 = 0x400;
}
local_10 = (int8 *)malloc(0x28);
if (local_10 == (int8 *)0x0) {
local_10 = (int8 *)0x0;
}
else {
puVar1 = (int8 *)malloc(local_48 + 0x18);
if (puVar1 == (int8 *)0x0) {
free(local_10);
local_10 = (int8 *)0x0;
}
else {
*puVar1 = 0;
puVar1[1] = local_48;
puVar1[2] = 0;
*local_10 = puVar1;
local_10[1] = puVar1;
local_10[2] = 0;
local_10[3] = 0;
local_10[4] = 0x400;
}
}
return local_10;
}
| |
34,569 | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::number_float_t) | monkey531[P]llama/common/json.hpp | static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept
{
j.m_data.m_value.destroy(j.m_data.m_type);
j.m_data.m_type = value_t::number_float;
j.m_data.m_value = val;
j.assert_invariant();
} | O1 | cpp | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::number_float_t):
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
addq $0x8, %rdi
movzbl (%rbx), %esi
callq 0x6b986
movb $0x7, (%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
jmp 0x65cc4
movq %rax, %rdi
callq 0x2d543
| _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE:
push rbx
sub rsp, 10h
movsd [rsp+18h+var_18], xmm0
mov rbx, rdi
add rdi, 8
movzx esi, byte ptr [rbx]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_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::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
mov byte ptr [rbx], 7
movsd xmm0, [rsp+18h+var_18]
movsd [rsp+18h+var_10], xmm0
mov rax, [rsp+18h+var_10]
mov [rbx+8], rax
mov rdi, rbx
mov esi, 1
add rsp, 10h
pop rbx
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)
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::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 *a1,
double a2)
{
long long result; // rax
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::destroy(
(long long **)a1 + 1,
*a1);
*a1 = 7;
result = *(_QWORD *)&a2;
*((double *)a1 + 1) = 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 *)a1);
return result;
}
| 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>>:
PUSH RBX
SUB RSP,0x10
MOVSD qword ptr [RSP],XMM0
MOV RBX,RDI
ADD RDI,0x8
MOVZX ESI,byte ptr [RBX]
LAB_0016d296:
CALL 0x0016b986
MOV byte ptr [RBX],0x7
MOVSD XMM0,qword ptr [RSP]
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,RBX
MOV ESI,0x1
ADD RSP,0x10
POP RBX
JMP 0x00165cc4
|
/* void
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::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> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::number_float_t) */
void nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
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>>
(int8 param_1_00,int1 *param_1)
{
/* try { // try from 0016d296 to 0016d29a has its CatchHandler @ 0016d2c4 */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::json_value::destroy((json_value *)(param_1 + 8),*param_1);
*param_1 = 7;
*(int8 *)(param_1 + 8) = param_1_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
return;
}
| |
34,570 | list_cons | eloqsql/libmariadb/libmariadb/ma_list.c | LIST *list_cons(void *data, LIST *list)
{
LIST *new_charset=(LIST*) malloc(sizeof(LIST));
if (!new_charset)
return 0;
new_charset->data=data;
return list_add(list,new_charset);
} | O3 | c | list_cons:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x36960
testq %rax, %rax
je 0x43106
movq %r14, 0x10(%rax)
testq %rbx, %rbx
je 0x430f1
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x430fa
movq %rax, 0x8(%rcx)
movq (%rbx), %rcx
jmp 0x430fc
movq $0x0, (%rax)
jmp 0x43102
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rax, (%rbx)
movq %rbx, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
| list_cons:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov edi, 18h
call _malloc
test rax, rax
jz short loc_43106
mov [rax+10h], r14
test rbx, rbx
jz short loc_430F1
mov rcx, [rbx]
test rcx, rcx
jz short loc_430FA
mov [rcx+8], rax
mov rcx, [rbx]
jmp short loc_430FC
loc_430F1:
mov qword ptr [rax], 0
jmp short loc_43102
loc_430FA:
xor ecx, ecx
loc_430FC:
mov [rax], rcx
mov [rbx], rax
loc_43102:
mov [rax+8], rbx
loc_43106:
pop rbx
pop r14
pop rbp
retn
| _QWORD * list_cons(long long a1, long long *a2)
{
_QWORD *result; // rax
long long v3; // rcx
result = (_QWORD *)malloc(24LL);
if ( result )
{
result[2] = a1;
if ( a2 )
{
if ( *a2 )
{
*(_QWORD *)(*a2 + 8) = result;
v3 = *a2;
}
else
{
v3 = 0LL;
}
*result = v3;
*a2 = (long long)result;
}
else
{
*result = 0LL;
}
result[1] = a2;
}
return result;
}
| list_cons:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV EDI,0x18
CALL 0x00136960
TEST RAX,RAX
JZ 0x00143106
MOV qword ptr [RAX + 0x10],R14
TEST RBX,RBX
JZ 0x001430f1
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JZ 0x001430fa
MOV qword ptr [RCX + 0x8],RAX
MOV RCX,qword ptr [RBX]
JMP 0x001430fc
LAB_001430f1:
MOV qword ptr [RAX],0x0
JMP 0x00143102
LAB_001430fa:
XOR ECX,ECX
LAB_001430fc:
MOV qword ptr [RAX],RCX
MOV qword ptr [RBX],RAX
LAB_00143102:
MOV qword ptr [RAX + 0x8],RBX
LAB_00143106:
POP RBX
POP R14
POP RBP
RET
|
void list_cons(long param_1,long *param_2)
{
long *plVar1;
long lVar2;
plVar1 = (long *)malloc(0x18);
if (plVar1 != (long *)0x0) {
plVar1[2] = param_1;
if (param_2 == (long *)0x0) {
*plVar1 = 0;
}
else {
if (*param_2 == 0) {
lVar2 = 0;
}
else {
*(long **)(*param_2 + 8) = plVar1;
lVar2 = *param_2;
}
*plVar1 = lVar2;
*param_2 = (long)plVar1;
}
plVar1[1] = (long)param_2;
}
return;
}
| |
34,571 | aimrt::runtime::core::logger::LogFormatter::FormatTime(aimrt::runtime::core::logger::LogDataWrapper const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/logger/formatter.h | static void FormatTime(const LogDataWrapper& data, std::string& buffer) {
buffer.append(aimrt::common::util::GetTimeStr(std::chrono::system_clock::to_time_t(data.t)));
} | O3 | c | aimrt::runtime::core::logger::LogFormatter::FormatTime(aimrt::runtime::core::logger::LogDataWrapper const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movabsq $0x112e0be826d694b3, %rax # imm = 0x112E0BE826D694B3
imulq 0x18(%rdi)
movq %rsi, (%rsp)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, (%rdi)
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x1e8b0
movl (%r14), %r13d
movl 0x4(%r14), %r12d
movl 0x8(%r14), %ebp
movl 0xc(%r14), %r15d
movl 0x10(%r14), %ebx
movl 0x14(%r14), %r14d
leaq 0x50df3(%rip), %rdi # 0xafcf0
callq 0x1fe40
leaq 0x10(%rax), %rdi
movl %r14d, %eax
addl $0x76c, %eax # imm = 0x76C
movl $0xd1b71759, %ecx # imm = 0xD1B71759
imulq %rax, %rcx
shrq $0x2d, %rcx
imull $0x2710, %ecx, %eax # imm = 0x2710
negl %eax
leal (%r14,%rax), %ecx
addl $0x76c, %ecx # imm = 0x76C
movl %ebx, %eax
incl %eax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $0x64, %eax, %eax
negl %eax
leal (%rbx,%rax), %r8d
incl %r8d
imulq $0x51eb851f, %r15, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $0x64, %eax, %eax
subl %eax, %r15d
imulq $0x51eb851f, %rbp, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $0x64, %eax, %eax
subl %eax, %ebp
imulq $0x51eb851f, %r12, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $0x64, %eax, %eax
subl %eax, %r12d
imulq $0x51eb851f, %r13, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $0x64, %eax, %eax
subl %eax, %r13d
subq $0x8, %rsp
leaq 0x24cb6(%rip), %rdx # 0x83c4f
movl $0x14, %esi
movq %rdi, %rbx
movl %r15d, %r9d
xorl %eax, %eax
pushq %r13
pushq %r12
pushq %rbp
callq 0x1fcc0
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x1e730
movq (%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1e2c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5aimrt7runtime4core6logger12LogFormatter10FormatTimeERKNS2_14LogDataWrapperERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rax, 112E0BE826D694B3h
imul qword ptr [rdi+18h]
mov [rsp+78h+var_78], rsi
mov rax, rdx
shr rax, 3Fh
sar rdx, 1Ah
add rdx, rax
lea rdi, [rsp+78h+var_70]
mov [rdi], rdx
lea r14, [rsp+78h+var_68]
mov rsi, r14
call _localtime_r
mov r13d, [r14]
mov r12d, [r14+4]
mov ebp, [r14+8]
mov r15d, [r14+0Ch]
mov ebx, [r14+10h]
mov r14d, [r14+14h]
lea rdi, _ZZN5aimrt6common4util12SimpleLogger3LogEjjPKcS4_S4_mE3tid_tlsind
call ___tls_get_addr
lea rdi, [rax+10h]
mov eax, r14d
add eax, 76Ch
mov ecx, 0D1B71759h
imul rcx, rax
shr rcx, 2Dh
imul eax, ecx, 2710h
neg eax
lea ecx, [r14+rax]
add ecx, 76Ch
mov eax, ebx
inc eax
imul rax, 51EB851Fh
shr rax, 25h
imul eax, 64h ; 'd'
neg eax
lea r8d, [rbx+rax]
inc r8d
imul rax, r15, 51EB851Fh
shr rax, 25h
imul eax, 64h ; 'd'
sub r15d, eax
imul rax, rbp, 51EB851Fh
shr rax, 25h
imul eax, 64h ; 'd'
sub ebp, eax
imul rax, r12, 51EB851Fh
shr rax, 25h
imul eax, 64h ; 'd'
sub r12d, eax
imul rax, r13, 51EB851Fh
shr rax, 25h
imul eax, 64h ; 'd'
sub r13d, eax
sub rsp, 8
lea rdx, a04d02d02d02d02; "%04d-%02d-%02d %02d:%02d:%02d"
mov esi, 14h
mov rbx, rdi
mov r9d, r15d
xor eax, eax
push r13
push r12
push rbp
call _snprintf
add rsp, 20h
mov rdi, rbx
call _strlen
mov rdi, [rsp+78h+var_78]
mov rsi, rbx
mov rdx, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long aimrt::runtime::core::logger::LogFormatter::FormatTime(long long a1, long long a2)
{
unsigned int v2; // r13d
unsigned int v3; // r12d
unsigned int v4; // ebp
unsigned int v5; // r15d
int v6; // ebx
int v7; // r14d
long long addr; // rax
unsigned int v9; // r8d
long long v10; // rbx
long long v11; // rax
long long v13; // [rsp+8h] [rbp-70h] BYREF
unsigned int v14; // [rsp+10h] [rbp-68h] BYREF
unsigned int v15; // [rsp+14h] [rbp-64h]
unsigned int v16; // [rsp+18h] [rbp-60h]
unsigned int v17; // [rsp+1Ch] [rbp-5Ch]
int v18; // [rsp+20h] [rbp-58h]
int v19; // [rsp+24h] [rbp-54h]
v13 = *(_QWORD *)(a1 + 24) / 1000000000LL;
localtime_r(&v13, &v14);
v2 = v14;
v3 = v15;
v4 = v16;
v5 = v17;
v6 = v18;
v7 = v19;
addr = __tls_get_addr(&ZZN5aimrt6common4util12SimpleLogger3LogEjjPKcS4_S4_mE3tid_tlsind);
v9 = v6 - 100 * ((v6 + 1) / 0x64u) + 1;
v10 = addr + 16;
snprintf(
addr + 16,
20LL,
"%04d-%02d-%02d %02d:%02d:%02d",
v7 - 10000 * ((v7 + 1900) / 0x2710u) + 1900,
v9,
v5 % 0x64,
v4 % 0x64,
v3 % 0x64,
v2 % 0x64);
v11 = strlen(v10);
return std::string::append(a2, v10, v11);
}
| FormatTime:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RAX,0x112e0be826d694b3
IMUL qword ptr [RDI + 0x18]
MOV qword ptr [RSP],RSI
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x1a
ADD RDX,RAX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RDX
LEA R14,[RSP + 0x10]
MOV RSI,R14
CALL 0x0011e8b0
MOV R13D,dword ptr [R14]
MOV R12D,dword ptr [R14 + 0x4]
MOV EBP,dword ptr [R14 + 0x8]
MOV R15D,dword ptr [R14 + 0xc]
MOV EBX,dword ptr [R14 + 0x10]
MOV R14D,dword ptr [R14 + 0x14]
LEA RDI,[0x1afcf0]
CALL 0x0011fe40
LEA RDI,[RAX + 0x10]
MOV EAX,R14D
ADD EAX,0x76c
MOV ECX,0xd1b71759
IMUL RCX,RAX
SHR RCX,0x2d
IMUL EAX,ECX,0x2710
NEG EAX
LEA ECX,[R14 + RAX*0x1]
ADD ECX,0x76c
MOV EAX,EBX
INC EAX
IMUL RAX,RAX,0x51eb851f
SHR RAX,0x25
IMUL EAX,EAX,0x64
NEG EAX
LEA R8D,[RBX + RAX*0x1]
INC R8D
IMUL RAX,R15,0x51eb851f
SHR RAX,0x25
IMUL EAX,EAX,0x64
SUB R15D,EAX
IMUL RAX,RBP,0x51eb851f
SHR RAX,0x25
IMUL EAX,EAX,0x64
SUB EBP,EAX
IMUL RAX,R12,0x51eb851f
SHR RAX,0x25
IMUL EAX,EAX,0x64
SUB R12D,EAX
IMUL RAX,R13,0x51eb851f
SHR RAX,0x25
IMUL EAX,EAX,0x64
SUB R13D,EAX
SUB RSP,0x8
LEA RDX,[0x183c4f]
MOV ESI,0x14
MOV RBX,RDI
MOV R9D,R15D
XOR EAX,EAX
PUSH R13
PUSH R12
PUSH RBP
CALL 0x0011fcc0
ADD RSP,0x20
MOV RDI,RBX
CALL 0x0011e730
MOV RDI,qword ptr [RSP]
MOV RSI,RBX
MOV RDX,RAX
CALL 0x0011e2c0
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* aimrt::runtime::core::logger::LogFormatter::FormatTime(aimrt::runtime::core::logger::LogDataWrapper
const&, std::__cxx11::string&) */
void aimrt::runtime::core::logger::LogFormatter::FormatTime(LogDataWrapper *param_1,string *param_2)
{
char *__s;
long lVar1;
size_t sVar2;
long local_70;
tm local_68;
local_70 = *(long *)(param_1 + 0x18) / 1000000000;
localtime_r(&local_70,&local_68);
lVar1 = __tls_get_addr(&PTR_001afcf0);
__s = (char *)(lVar1 + 0x10);
snprintf(__s,0x14,"%04d-%02d-%02d %02d:%02d:%02d",
(ulong)(local_68.tm_year + ((local_68.tm_year + 0x76cU) / 10000) * -10000 + 0x76c),
(ulong)(local_68.tm_mon + ((local_68.tm_mon + 1U) / 100) * -100 + 1),
(ulong)((uint)local_68.tm_mday % 100),(ulong)((uint)local_68.tm_hour % 100),
(ulong)((uint)local_68.tm_min % 100),(ulong)((uint)local_68.tm_sec % 100));
sVar2 = strlen(__s);
std::__cxx11::string::append(param_2,__s,sVar2);
return;
}
| |
34,572 | ma_reset_trn_for_table | eloqsql/storage/maria/ma_trnman.h | static inline void _ma_reset_trn_for_table(MARIA_HA *tbl)
{
DBUG_PRINT("info",("table: %p trn: %p -> NULL", tbl, tbl->trn));
/* The following is only false if tbl->trn == &dummy_transaction_object */
if (tbl->trn_prev)
{
if (tbl->trn_next)
tbl->trn_next->trn_prev= tbl->trn_prev;
*tbl->trn_prev= tbl->trn_next;
tbl->trn_prev= 0;
tbl->trn_next= 0;
}
tbl->trn= 0;
} | O0 | c | ma_reset_trn_for_table:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
jmp 0x46a7a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x46acf
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x46aa4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
popq %rbp
retq
nopl (%rax)
| _ma_reset_trn_for_table:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
jmp short $+2
loc_46A7A:
mov rax, [rbp+var_8]
cmp qword ptr [rax+18h], 0
jz short loc_46ACF
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_46AA4
mov rax, [rbp+var_8]
mov rcx, [rax+18h]
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rax+18h], rcx
loc_46AA4:
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_46ACF:
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
pop rbp
retn
| _QWORD * ma_reset_trn_for_table(_QWORD *a1)
{
_QWORD *result; // rax
if ( a1[3] )
{
if ( a1[2] )
*(_QWORD *)(a1[2] + 24LL) = a1[3];
*(_QWORD *)a1[3] = a1[2];
a1[3] = 0LL;
a1[2] = 0LL;
}
result = a1;
a1[1] = 0LL;
return result;
}
| _ma_reset_trn_for_table:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00146a7a
LAB_00146a7a:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00146acf
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00146aa4
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x18],RCX
LAB_00146aa4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_00146acf:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
POP RBP
RET
|
void _ma_reset_trn_for_table(long param_1)
{
if (*(long *)(param_1 + 0x18) != 0) {
if (*(long *)(param_1 + 0x10) != 0) {
*(int8 *)(*(long *)(param_1 + 0x10) + 0x18) = *(int8 *)(param_1 + 0x18);
}
**(int8 **)(param_1 + 0x18) = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x10) = 0;
}
*(int8 *)(param_1 + 8) = 0;
return;
}
| |
34,573 | mysql_get_timeout_value | eloqsql/libmariadb/libmariadb/mariadb_lib.c | unsigned int STDCALL
mysql_get_timeout_value(const MYSQL *mysql)
{
unsigned int timeout= 0;
if (mysql->options.extension && mysql->options.extension->async_context)
timeout= mysql->options.extension->async_context->timeout_value;
/* Avoid overflow. */
if (timeout > UINT_MAX - 999)
return (timeout - 1)/1000 + 1;
else
return (timeout+999)/1000;
} | O3 | c | mysql_get_timeout_value:
pushq %rbp
movq %rsp, %rbp
movq 0x480(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x1ea8f
movq 0x28(%rcx), %rcx
testq %rcx, %rcx
je 0x1ea8f
movl 0x10(%rcx), %eax
cmpl $0xfffffc19, %eax # imm = 0xFFFFFC19
jb 0x1ea8f
decl %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
incl %eax
jmp 0x1ea9f
addl $0x3e7, %eax # imm = 0x3E7
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
popq %rbp
retq
| mysql_get_timeout_value:
push rbp
mov rbp, rsp
mov rcx, [rdi+480h]
xor eax, eax
test rcx, rcx
jz short loc_1EA8F
mov rcx, [rcx+28h]
test rcx, rcx
jz short loc_1EA8F
mov eax, [rcx+10h]
cmp eax, 0FFFFFC19h
jb short loc_1EA8F
dec eax
imul rax, 10624DD3h
shr rax, 26h
inc eax
jmp short loc_1EA9F
loc_1EA8F:
add eax, 3E7h
imul rax, 10624DD3h
shr rax, 26h
loc_1EA9F:
pop rbp
retn
| unsigned long long mysql_get_timeout_value(long long a1)
{
long long v1; // rcx
unsigned int v2; // eax
long long v3; // rcx
v1 = *(_QWORD *)(a1 + 1152);
v2 = 0;
if ( v1 && (v3 = *(_QWORD *)(v1 + 40)) != 0 && (v2 = *(_DWORD *)(v3 + 16), v2 >= 0xFFFFFC19) )
return (v2 - 1) / 0x3E8 + 1;
else
return (v2 + 999) / 0x3E8uLL;
}
| mysql_get_timeout_value:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI + 0x480]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0011ea8f
MOV RCX,qword ptr [RCX + 0x28]
TEST RCX,RCX
JZ 0x0011ea8f
MOV EAX,dword ptr [RCX + 0x10]
CMP EAX,0xfffffc19
JC 0x0011ea8f
DEC EAX
IMUL RAX,RAX,0x10624dd3
SHR RAX,0x26
INC EAX
JMP 0x0011ea9f
LAB_0011ea8f:
ADD EAX,0x3e7
IMUL RAX,RAX,0x10624dd3
SHR RAX,0x26
LAB_0011ea9f:
POP RBP
RET
|
ulong mysql_get_timeout_value(long param_1)
{
long lVar1;
uint uVar2;
ulong uVar3;
uVar2 = 0;
if (((*(long *)(param_1 + 0x480) == 0) ||
(lVar1 = *(long *)(*(long *)(param_1 + 0x480) + 0x28), uVar2 = 0, lVar1 == 0)) ||
(uVar2 = *(uint *)(lVar1 + 0x10), uVar2 < 0xfffffc19)) {
uVar3 = (ulong)(uVar2 + 999) / 1000;
}
else {
uVar3 = (ulong)((uVar2 - 1) / 1000 + 1);
}
return uVar3;
}
| |
34,574 | pow5mult | eloqsql/strings/dtoa.c | static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
{
Bigint *b1, *p5, *p51=NULL;
int i;
static int p05[3]= { 5, 25, 125 };
my_bool overflow= FALSE;
if ((i= k & 3))
b= multadd(b, p05[i-1], 0, alloc);
if (!(k>>= 2))
return b;
p5= p5_a;
for (;;)
{
if (k & 1)
{
b1= mult(b, p5, alloc);
Bfree(b, alloc);
b= b1;
}
if (!(k>>= 1))
break;
/* Calculate next power of 5 */
if (overflow)
{
p51= mult(p5, p5, alloc);
Bfree(p5, alloc);
p5= p51;
}
else if (p5 < p5_a + P5A_MAX)
++p5;
else if (p5 == p5_a + P5A_MAX)
{
p5= mult(p5, p5, alloc);
overflow= TRUE;
}
}
if (p51)
Bfree(p51, alloc);
return b;
} | O0 | c | pow5mult:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x0, -0x3d(%rbp)
movl -0x14(%rbp), %eax
andl $0x3, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x72343
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x31209f(%rip), %rax # 0x3843d0
movl (%rax,%rcx,4), %esi
movq -0x20(%rbp), %rcx
xorl %edx, %edx
callq 0x72c90
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
sarl $0x2, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x7235e
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x72454
leaq 0x31207b(%rip), %rax # 0x3843e0
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7239e
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x72460
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x726b0
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
sarl %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jne 0x723b0
jmp 0x72438
cmpb $0x0, -0x3d(%rbp)
je 0x723e2
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x72460
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x726b0
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x72433
leaq 0x311ff7(%rip), %rax # 0x3843e0
addq $0x90, %rax
cmpq %rax, -0x30(%rbp)
jae 0x72403
movq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
jmp 0x72431
leaq 0x311fd6(%rip), %rax # 0x3843e0
addq $0x90, %rax
cmpq %rax, -0x30(%rbp)
jne 0x7242f
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x72460
movq %rax, -0x30(%rbp)
movb $0x1, -0x3d(%rbp)
jmp 0x72431
jmp 0x72433
jmp 0x72369
cmpq $0x0, -0x38(%rbp)
je 0x7244c
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x726b0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| pow5mult:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_38], 0
mov [rbp+var_3D], 0
mov eax, [rbp+var_14]
and eax, 3
mov [rbp+var_3C], eax
cmp eax, 0
jz short loc_72343
mov rdi, [rbp+var_10]
mov eax, [rbp+var_3C]
sub eax, 1
movsxd rcx, eax
lea rax, pow5mult_p05
mov esi, [rax+rcx*4]
mov rcx, [rbp+var_20]
xor edx, edx
call multadd
mov [rbp+var_10], rax
loc_72343:
mov eax, [rbp+var_14]
sar eax, 2
mov [rbp+var_14], eax
cmp eax, 0
jnz short loc_7235E
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp loc_72454
loc_7235E:
lea rax, p5_a
mov [rbp+var_30], rax
loc_72369:
mov eax, [rbp+var_14]
and eax, 1
cmp eax, 0
jz short loc_7239E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
call mult
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call Bfree
mov rax, [rbp+var_28]
mov [rbp+var_10], rax
loc_7239E:
mov eax, [rbp+var_14]
sar eax, 1
mov [rbp+var_14], eax
cmp eax, 0
jnz short loc_723B0
jmp loc_72438
loc_723B0:
cmp [rbp+var_3D], 0
jz short loc_723E2
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
call mult
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_20]
call Bfree
mov rax, [rbp+var_38]
mov [rbp+var_30], rax
jmp short loc_72433
loc_723E2:
lea rax, p5_a
add rax, 90h
cmp [rbp+var_30], rax
jnb short loc_72403
mov rax, [rbp+var_30]
add rax, 18h
mov [rbp+var_30], rax
jmp short loc_72431
loc_72403:
lea rax, p5_a
add rax, 90h
cmp [rbp+var_30], rax
jnz short loc_7242F
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
call mult
mov [rbp+var_30], rax
mov [rbp+var_3D], 1
loc_7242F:
jmp short $+2
loc_72431:
jmp short $+2
loc_72433:
jmp loc_72369
loc_72438:
cmp [rbp+var_38], 0
jz short loc_7244C
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_20]
call Bfree
loc_7244C:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_72454:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pow5mult(long long a1, int a2, long long a3)
{
char v4; // [rsp+3h] [rbp-3Dh]
_BYTE v5[12]; // [rsp+4h] [rbp-3Ch]
_UNKNOWN **v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
int v9; // [rsp+2Ch] [rbp-14h]
long long v10; // [rsp+30h] [rbp-10h]
v10 = a1;
*(_DWORD *)&v5[8] = 0;
v4 = 0;
*(_QWORD *)v5 = a2 & 3;
if ( (a2 & 3) != 0 )
v10 = multadd(a1, pow5mult_p05[*(_DWORD *)v5 - 1], 0LL, a3);
v9 = a2 >> 2;
if ( !(a2 >> 2) )
return v10;
v6 = &p5_a;
while ( 1 )
{
if ( (v9 & 1) != 0 )
{
v7 = mult(v10, v6, a3);
Bfree(v10, a3);
v10 = v7;
}
v9 >>= 1;
if ( !v9 )
break;
if ( v4 )
{
*(_QWORD *)&v5[4] = mult(v6, v6, a3);
Bfree(v6, a3);
v6 = *(_UNKNOWN ***)&v5[4];
}
else if ( v6 >= &p5_a + 18 )
{
if ( v6 == &p5_a + 18 )
{
v6 = (_UNKNOWN **)mult(v6, v6, a3);
v4 = 1;
}
}
else
{
v6 += 3;
}
}
if ( *(_QWORD *)&v5[4] )
Bfree(*(_QWORD *)&v5[4], a3);
return v10;
}
| pow5mult:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x38],0x0
MOV byte ptr [RBP + -0x3d],0x0
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x3
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JZ 0x00172343
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x1
MOVSXD RCX,EAX
LEA RAX,[0x4843d0]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV RCX,qword ptr [RBP + -0x20]
XOR EDX,EDX
CALL 0x00172c90
MOV qword ptr [RBP + -0x10],RAX
LAB_00172343:
MOV EAX,dword ptr [RBP + -0x14]
SAR EAX,0x2
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JNZ 0x0017235e
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00172454
LAB_0017235e:
LEA RAX,[0x4843e0]
MOV qword ptr [RBP + -0x30],RAX
LAB_00172369:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0017239e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00172460
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001726b0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x10],RAX
LAB_0017239e:
MOV EAX,dword ptr [RBP + -0x14]
SAR EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JNZ 0x001723b0
JMP 0x00172438
LAB_001723b0:
CMP byte ptr [RBP + -0x3d],0x0
JZ 0x001723e2
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00172460
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001726b0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00172433
LAB_001723e2:
LEA RAX,[0x4843e0]
ADD RAX,0x90
CMP qword ptr [RBP + -0x30],RAX
JNC 0x00172403
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x18
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00172431
LAB_00172403:
LEA RAX,[0x4843e0]
ADD RAX,0x90
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x0017242f
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00172460
MOV qword ptr [RBP + -0x30],RAX
MOV byte ptr [RBP + -0x3d],0x1
LAB_0017242f:
JMP 0x00172431
LAB_00172431:
JMP 0x00172433
LAB_00172433:
JMP 0x00172369
LAB_00172438:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0017244c
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001726b0
LAB_0017244c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_00172454:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 pow5mult(int8 param_1,uint param_2,int8 param_3)
{
bool bVar1;
int8 uVar2;
int1 *local_40;
int1 *local_38;
uint local_1c;
int8 local_18;
int8 local_10;
local_40 = (int1 *)0x0;
bVar1 = false;
local_18 = param_1;
if ((param_2 & 3) != 0) {
local_18 = multadd(param_1,*(int4 *)(pow5mult_p05 + (long)(int)((param_2 & 3) - 1) * 4),0,
param_3);
}
local_1c = (int)param_2 >> 2;
if (local_1c == 0) {
local_10 = local_18;
}
else {
local_38 = p5_a;
while( true ) {
if ((local_1c & 1) != 0) {
uVar2 = mult(local_18,local_38,param_3);
Bfree(local_18,param_3);
local_18 = uVar2;
}
local_1c = (int)local_1c >> 1;
if (local_1c == 0) break;
if (bVar1) {
local_40 = (int1 *)mult(local_38,local_38,param_3);
Bfree(local_38,param_3);
local_38 = local_40;
}
else if (local_38 < (int1 *)0x484470) {
local_38 = local_38 + 0x18;
}
else if (local_38 == (int1 *)0x484470) {
local_38 = (int1 *)mult(0x484470,0x484470,param_3);
bVar1 = true;
}
}
if (local_40 != (int1 *)0x0) {
Bfree(local_40,param_3);
}
local_10 = local_18;
}
return local_10;
}
| |
34,575 | pow5mult | eloqsql/strings/dtoa.c | static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
{
Bigint *b1, *p5, *p51=NULL;
int i;
static int p05[3]= { 5, 25, 125 };
my_bool overflow= FALSE;
if ((i= k & 3))
b= multadd(b, p05[i-1], 0, alloc);
if (!(k>>= 2))
return b;
p5= p5_a;
for (;;)
{
if (k & 1)
{
b1= mult(b, p5, alloc);
Bfree(b, alloc);
b= b1;
}
if (!(k>>= 1))
break;
/* Calculate next power of 5 */
if (overflow)
{
p51= mult(p5, p5, alloc);
Bfree(p5, alloc);
p5= p51;
}
else if (p5 < p5_a + P5A_MAX)
++p5;
else if (p5 == p5_a + P5A_MAX)
{
p5= mult(p5, p5, alloc);
overflow= TRUE;
}
}
if (p51)
Bfree(p51, alloc);
return b;
} | O3 | c | pow5mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r13
movl %esi, %eax
andl $0x3, %eax
je 0x57fed
decl %eax
leaq 0x28005e(%rip), %rcx # 0x2d8038
movl (%rcx,%rax,4), %esi
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x5843a
movq %rax, %r13
cmpl $0x4, %r15d
jb 0x580d5
movq %rbx, -0x38(%rbp)
shrl $0x2, %r15d
movb $0x1, %cl
leaq 0x30ca58(%rip), %rbx # 0x364a60
movq $0x0, -0x40(%rbp)
leaq 0x30cad9(%rip), %r12 # 0x364af0
movl %ecx, %r14d
cmpq %r12, %rbx
setb %cl
movl %ecx, -0x2c(%rbp)
testb $0x1, %r15b
je 0x58058
movq %r13, %rdi
movq %rbx, %rsi
movq %r13, %r12
movq -0x38(%rbp), %r13
movq %r13, %rdx
callq 0x580e7
movq %rax, -0x48(%rbp)
movq %r12, %rdi
leaq 0x30caa4(%rip), %r12 # 0x364af0
movq %r13, %rsi
callq 0x58209
movq -0x48(%rbp), %r13
cmpl $0x2, %r15d
jb 0x580c3
shrl %r15d
testb $0x1, %r14b
je 0x58088
cmpq %r12, %rbx
jb 0x580b7
movb $0x1, %r14b
jne 0x58023
movq %r12, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
callq 0x580e7
movq %rax, %rbx
movl -0x2c(%rbp), %ecx
jmp 0x58017
movq %rbx, %rdi
movq %rbx, %r14
movq %rbx, %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0x580e7
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x58209
xorl %ecx, %ecx
movq -0x40(%rbp), %rbx
jmp 0x58017
addq $0x18, %rbx
movl -0x2c(%rbp), %ecx
jmp 0x58017
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x580d5
movq -0x38(%rbp), %rsi
callq 0x58209
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| pow5mult:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r15d, esi
mov r13, rdi
mov eax, esi
and eax, 3
jz short loc_57FED
dec eax
lea rcx, pow5mult_p05
mov esi, [rcx+rax*4]
mov rdi, r13
xor edx, edx
mov rcx, rbx
call multadd
mov r13, rax
loc_57FED:
cmp r15d, 4
jb loc_580D5
mov [rbp+var_38], rbx
shr r15d, 2
mov cl, 1
lea rbx, p5_a
mov [rbp+var_40], 0
lea r12, off_364AF0
loc_58017:
mov r14d, ecx
cmp rbx, r12
setb cl
mov [rbp+var_2C], ecx
loc_58023:
test r15b, 1
jz short loc_58058
mov rdi, r13
mov rsi, rbx
mov r12, r13
mov r13, [rbp+var_38]
mov rdx, r13
call mult
mov [rbp+var_48], rax
mov rdi, r12
lea r12, off_364AF0
mov rsi, r13
call Bfree
mov r13, [rbp+var_48]
loc_58058:
cmp r15d, 2
jb short loc_580C3
shr r15d, 1
test r14b, 1
jz short loc_58088
cmp rbx, r12
jb short loc_580B7
mov r14b, 1
jnz short loc_58023
mov rdi, r12
mov rsi, r12
mov rdx, [rbp+var_38]
call mult
mov rbx, rax
mov ecx, [rbp+var_2C]
jmp short loc_58017
loc_58088:
mov rdi, rbx
mov r14, rbx
mov rsi, rbx
mov rbx, [rbp+var_38]
mov rdx, rbx
call mult
mov [rbp+var_40], rax
mov rdi, r14
mov rsi, rbx
call Bfree
xor ecx, ecx
mov rbx, [rbp+var_40]
jmp loc_58017
loc_580B7:
add rbx, 18h
mov ecx, [rbp+var_2C]
jmp loc_58017
loc_580C3:
mov rdi, [rbp+var_40]
test rdi, rdi
jz short loc_580D5
mov rsi, [rbp+var_38]
call Bfree
loc_580D5:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long pow5mult(long long a1, unsigned int a2, long long a3, int a4)
{
long long v5; // r13
unsigned int v6; // r15d
_UNKNOWN **v7; // rbx
char v8; // r14
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
int v13; // [rsp+24h] [rbp-2Ch]
v5 = a1;
if ( (a2 & 3) != 0 )
v5 = multadd(a1, pow5mult_p05[(a2 & 3) - 1], 0LL, a3);
if ( a2 >= 4 )
{
v12 = a3;
v6 = a2 >> 2;
LOBYTE(a4) = 1;
v7 = &p5_a;
v11 = 0LL;
LABEL_5:
v8 = a4;
LOBYTE(a4) = v7 < &off_364AF0;
v13 = a4;
while ( 1 )
{
if ( (v6 & 1) != 0 )
{
v10 = mult(v5, v7, v12);
Bfree(v5, v12);
v5 = v10;
}
if ( v6 < 2 )
break;
v6 >>= 1;
if ( (v8 & 1) == 0 )
{
v11 = mult(v7, v7, v12);
Bfree(v7, v12);
a4 = 0;
v7 = (_UNKNOWN **)v11;
goto LABEL_5;
}
if ( v7 < &off_364AF0 )
{
v7 += 3;
a4 = v13;
goto LABEL_5;
}
v8 = 1;
if ( v7 == &off_364AF0 )
{
v7 = (_UNKNOWN **)mult(&off_364AF0, &off_364AF0, v12);
a4 = v13;
goto LABEL_5;
}
}
if ( v11 )
Bfree(v11, v12);
}
return v5;
}
| pow5mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R15D,ESI
MOV R13,RDI
MOV EAX,ESI
AND EAX,0x3
JZ 0x00157fed
DEC EAX
LEA RCX,[0x3d8038]
MOV ESI,dword ptr [RCX + RAX*0x4]
MOV RDI,R13
XOR EDX,EDX
MOV RCX,RBX
CALL 0x0015843a
MOV R13,RAX
LAB_00157fed:
CMP R15D,0x4
JC 0x001580d5
MOV qword ptr [RBP + -0x38],RBX
SHR R15D,0x2
MOV CL,0x1
LEA RBX,[0x464a60]
MOV qword ptr [RBP + -0x40],0x0
LEA R12,[0x464af0]
LAB_00158017:
MOV R14D,ECX
CMP RBX,R12
SETC CL
MOV dword ptr [RBP + -0x2c],ECX
LAB_00158023:
TEST R15B,0x1
JZ 0x00158058
MOV RDI,R13
MOV RSI,RBX
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
MOV RDX,R13
CALL 0x001580e7
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,R12
LEA R12,[0x464af0]
MOV RSI,R13
CALL 0x00158209
MOV R13,qword ptr [RBP + -0x48]
LAB_00158058:
CMP R15D,0x2
JC 0x001580c3
SHR R15D,0x1
TEST R14B,0x1
JZ 0x00158088
CMP RBX,R12
JC 0x001580b7
MOV R14B,0x1
JNZ 0x00158023
MOV RDI,R12
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001580e7
MOV RBX,RAX
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x00158017
LAB_00158088:
MOV RDI,RBX
MOV R14,RBX
MOV RSI,RBX
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
CALL 0x001580e7
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x00158209
XOR ECX,ECX
MOV RBX,qword ptr [RBP + -0x40]
JMP 0x00158017
LAB_001580b7:
ADD RBX,0x18
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x00158017
LAB_001580c3:
MOV RDI,qword ptr [RBP + -0x40]
TEST RDI,RDI
JZ 0x001580d5
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00158209
LAB_001580d5:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 pow5mult(int8 param_1,uint param_2,int8 param_3)
{
int1 *puVar1;
int8 uVar2;
bool bVar3;
bool bVar4;
int1 *local_48;
if ((param_2 & 3) != 0) {
param_1 = multadd(param_1,*(int4 *)(pow5mult_p05 + (ulong)((param_2 & 3) - 1) * 4),0,
param_3);
}
if (param_2 < 4) {
return param_1;
}
param_2 = param_2 >> 2;
local_48 = (int1 *)0x0;
puVar1 = p5_a;
bVar3 = true;
LAB_00158017:
do {
bVar4 = puVar1 < (int1 *)0x464af0;
uVar2 = param_1;
do {
param_1 = uVar2;
if ((param_2 & 1) != 0) {
param_1 = mult(uVar2,puVar1,param_3);
Bfree(uVar2,param_3);
}
if (param_2 < 2) {
if (local_48 == (int1 *)0x0) {
return param_1;
}
Bfree(local_48,param_3);
return param_1;
}
param_2 = param_2 >> 1;
if (!bVar3) {
local_48 = (int1 *)mult(puVar1,puVar1,param_3);
Bfree(puVar1,param_3);
bVar3 = false;
puVar1 = local_48;
goto LAB_00158017;
}
if (puVar1 < (int1 *)0x464af0) {
puVar1 = puVar1 + 0x18;
bVar3 = bVar4;
goto LAB_00158017;
}
bVar3 = true;
uVar2 = param_1;
} while (puVar1 != (int1 *)0x464af0);
puVar1 = (int1 *)mult(0x464af0,0x464af0,param_3);
bVar3 = bVar4;
} while( true );
}
| |
34,576 | mysql_stmt_close | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
{
my_bool rc= 1;
if (stmt)
{
if (stmt->mysql && stmt->mysql->net.pvio)
mysql_stmt_internal_reset(stmt, 1);
rc= net_stmt_close(stmt, 1);
free(stmt->extension);
free(stmt);
}
return(rc);
} | O3 | c | mysql_stmt_close:
testq %rdi, %rdi
je 0x23668
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x2363c
cmpq $0x0, (%rax)
je 0x2363c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x22d18
movq %rbx, %rdi
movl $0x1, %esi
callq 0x22e7a
movl %eax, %r14d
movq 0x340(%rbx), %rdi
callq 0x13570
movq %rbx, %rdi
callq 0x13570
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
retq
| mysql_stmt_close:
test rdi, rdi
jz short loc_23668
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rax, [rdi+38h]
test rax, rax
jz short loc_2363C
cmp qword ptr [rax], 0
jz short loc_2363C
mov rdi, rbx
mov esi, 1
call mysql_stmt_internal_reset
loc_2363C:
mov rdi, rbx
mov esi, 1
call net_stmt_close
mov r14d, eax
mov rdi, [rbx+340h]
call _free
mov rdi, rbx
call _free
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
loc_23668:
mov al, 1
retn
| char mysql_stmt_close(long long a1)
{
_QWORD *v1; // rax
char v2; // r14
if ( !a1 )
return 1;
v1 = *(_QWORD **)(a1 + 56);
if ( v1 )
{
if ( *v1 )
mysql_stmt_internal_reset(a1, 1);
}
v2 = net_stmt_close(a1, 1);
free(*(_QWORD *)(a1 + 832));
free(a1);
return v2;
}
| mysql_stmt_close:
TEST RDI,RDI
JZ 0x00123668
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x38]
TEST RAX,RAX
JZ 0x0012363c
CMP qword ptr [RAX],0x0
JZ 0x0012363c
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00122d18
LAB_0012363c:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00122e7a
MOV R14D,EAX
MOV RDI,qword ptr [RBX + 0x340]
CALL 0x00113570
MOV RDI,RBX
CALL 0x00113570
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
LAB_00123668:
MOV AL,0x1
RET
|
int4 mysql_stmt_close(void *param_1)
{
int4 uVar1;
if (param_1 != (void *)0x0) {
if ((*(long **)((long)param_1 + 0x38) != (long *)0x0) &&
(**(long **)((long)param_1 + 0x38) != 0)) {
mysql_stmt_internal_reset(param_1,1);
}
uVar1 = net_stmt_close(param_1,1);
free(*(void **)((long)param_1 + 0x340));
free(param_1);
return uVar1;
}
return 1;
}
| |
34,577 | my_hash_sort_latin1_de | eloqsql/strings/ctype-latin1.c | void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
leaq (%rsi,%rdx), %r9
cmpq $0x15, %rdx
jb 0x3deb7
movq %r9, %rdx
andq $-0x4, %rdx
cmpq %rsi, %rdx
jbe 0x3deb7
leaq 0x3(%rsi), %rax
andq $-0x4, %rax
movq %r9, %rdi
movb -0x1(%r9), %r10b
cmpq %rdx, %r9
jbe 0x3df60
leaq -0x1(%rdi), %r9
cmpb $0x20, %r10b
je 0x3de9b
jmp 0x3deba
movq %r9, %rdi
movq (%rcx), %r11
movq (%r8), %rax
cmpq %rsi, %rdi
jbe 0x3df4d
leaq -0x1(%rdi), %rdx
cmpb $0x20, -0x1(%rdi)
movq %rdx, %rdi
je 0x3dec0
incq %rdx
leaq 0x16c2c0(%rip), %r9 # 0x1aa1a0
leaq 0x16c3b9(%rip), %r10 # 0x1aa2a0
movq %r11, %rdi
movzbl (%rsi), %r14d
movzbl (%r14,%r9), %ebx
movl %r11d, %r15d
andl $0x3f, %r15d
addq %rax, %r15
imulq %rbx, %r15
shlq $0x8, %rdi
addq %r15, %rdi
xorq %r11, %rdi
leaq 0x3(%rax), %rbx
movzbl (%r14,%r10), %r11d
testq %r11, %r11
je 0x3df3d
movl %edi, %r14d
andl $0x3f, %r14d
addq %rbx, %r14
imulq %r11, %r14
movq %rdi, %r11
shlq $0x8, %r11
addq %r14, %r11
xorq %r11, %rdi
addq $0x6, %rax
movq %rax, %rbx
jmp 0x3df40
movq %rbx, %rax
incq %rsi
movq %rdi, %r11
cmpq %rdx, %rsi
jb 0x3deea
jmp 0x3df53
movq %r11, %rdi
movq %rax, %rbx
movq %rdi, (%rcx)
movq %rbx, (%r8)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x20, %r10b
setne %r9b
cmpq %rdx, %rax
setae %dl
orb %r9b, %dl
jne 0x3deba
movq %rdi, %rdx
movq %rdx, %rdi
cmpq %rax, %rdx
jbe 0x3deba
leaq -0x4(%rdi), %rdx
cmpl $0x20202020, -0x4(%rdi) # imm = 0x20202020
je 0x3df7a
jmp 0x3deba
| my_hash_sort_latin1_de:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
lea r9, [rsi+rdx]
cmp rdx, 15h
jb short loc_3DEB7
mov rdx, r9
and rdx, 0FFFFFFFFFFFFFFFCh
cmp rdx, rsi
jbe short loc_3DEB7
lea rax, [rsi+3]
and rax, 0FFFFFFFFFFFFFFFCh
loc_3DE9B:
mov rdi, r9
mov r10b, [r9-1]
cmp r9, rdx
jbe loc_3DF60
lea r9, [rdi-1]
cmp r10b, 20h ; ' '
jz short loc_3DE9B
jmp short loc_3DEBA
loc_3DEB7:
mov rdi, r9
loc_3DEBA:
mov r11, [rcx]
mov rax, [r8]
loc_3DEC0:
cmp rdi, rsi
jbe loc_3DF4D
lea rdx, [rdi-1]
cmp byte ptr [rdi-1], 20h ; ' '
mov rdi, rdx
jz short loc_3DEC0
inc rdx
lea r9, combo1map
lea r10, combo2map
mov rdi, r11
loc_3DEEA:
movzx r14d, byte ptr [rsi]
movzx ebx, byte ptr [r14+r9]
mov r15d, r11d
and r15d, 3Fh
add r15, rax
imul r15, rbx
shl rdi, 8
add rdi, r15
xor rdi, r11
lea rbx, [rax+3]
movzx r11d, byte ptr [r14+r10]
test r11, r11
jz short loc_3DF3D
mov r14d, edi
and r14d, 3Fh
add r14, rbx
imul r14, r11
mov r11, rdi
shl r11, 8
add r11, r14
xor rdi, r11
add rax, 6
mov rbx, rax
jmp short loc_3DF40
loc_3DF3D:
mov rax, rbx
loc_3DF40:
inc rsi
mov r11, rdi
cmp rsi, rdx
jb short loc_3DEEA
jmp short loc_3DF53
loc_3DF4D:
mov rdi, r11
mov rbx, rax
loc_3DF53:
mov [rcx], rdi
mov [r8], rbx
pop rbx
pop r14
pop r15
pop rbp
retn
loc_3DF60:
cmp r10b, 20h ; ' '
setnz r9b
cmp rax, rdx
setnb dl
or dl, r9b
jnz loc_3DEBA
mov rdx, rdi
loc_3DF7A:
mov rdi, rdx
cmp rdx, rax
jbe loc_3DEBA
lea rdx, [rdi-4]
cmp dword ptr [rdi-4], 20202020h
jz short loc_3DF7A
jmp loc_3DEBA
| long long my_hash_sort_latin1_de(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
long long *a4,
long long *a5)
{
unsigned long long v5; // r9
unsigned long long v6; // rdx
unsigned long long v7; // rax
unsigned long long v8; // rdi
char v9; // r10
long long v10; // r11
long long result; // rax
unsigned long long v12; // rdx
unsigned long long v14; // rdx
long long v15; // rdi
long long v16; // r14
long long v17; // rbx
unsigned long long v18; // rdx
v5 = (unsigned long long)&a2[a3];
if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) )
{
v8 = v5;
}
else
{
v7 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v8 = v5;
v9 = *(_BYTE *)(v5 - 1);
if ( v5 <= v6 )
break;
--v5;
if ( v9 != 32 )
goto LABEL_8;
}
if ( v9 == 32 && v7 < v6 )
{
v18 = v5;
do
{
v8 = v18;
if ( v18 <= v7 )
break;
v18 -= 4LL;
}
while ( *(_DWORD *)(v8 - 4) == 538976288 );
}
}
LABEL_8:
v10 = *a4;
result = *a5;
do
{
if ( v8 <= (unsigned long long)a2 )
{
v15 = *a4;
v17 = *a5;
goto LABEL_18;
}
v12 = v8 - 1;
}
while ( *(_BYTE *)--v8 == 32 );
v14 = v12 + 1;
v15 = *a4;
do
{
v16 = *a2;
v15 = v10 ^ (combo1map[v16] * (result + (v10 & 0x3F)) + (v15 << 8));
v17 = result + 3;
if ( combo2map[v16] )
{
v15 ^= combo2map[v16] * (v17 + (v15 & 0x3F)) + (v15 << 8);
result += 6LL;
v17 = result;
}
else
{
result += 3LL;
}
++a2;
v10 = v15;
}
while ( (unsigned long long)a2 < v14 );
LABEL_18:
*a4 = v15;
*a5 = v17;
return result;
}
| my_hash_sort_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
LEA R9,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x0013deb7
MOV RDX,R9
AND RDX,-0x4
CMP RDX,RSI
JBE 0x0013deb7
LEA RAX,[RSI + 0x3]
AND RAX,-0x4
LAB_0013de9b:
MOV RDI,R9
MOV R10B,byte ptr [R9 + -0x1]
CMP R9,RDX
JBE 0x0013df60
LEA R9,[RDI + -0x1]
CMP R10B,0x20
JZ 0x0013de9b
JMP 0x0013deba
LAB_0013deb7:
MOV RDI,R9
LAB_0013deba:
MOV R11,qword ptr [RCX]
MOV RAX,qword ptr [R8]
LAB_0013dec0:
CMP RDI,RSI
JBE 0x0013df4d
LEA RDX,[RDI + -0x1]
CMP byte ptr [RDI + -0x1],0x20
MOV RDI,RDX
JZ 0x0013dec0
INC RDX
LEA R9,[0x2aa1a0]
LEA R10,[0x2aa2a0]
MOV RDI,R11
LAB_0013deea:
MOVZX R14D,byte ptr [RSI]
MOVZX EBX,byte ptr [R14 + R9*0x1]
MOV R15D,R11D
AND R15D,0x3f
ADD R15,RAX
IMUL R15,RBX
SHL RDI,0x8
ADD RDI,R15
XOR RDI,R11
LEA RBX,[RAX + 0x3]
MOVZX R11D,byte ptr [R14 + R10*0x1]
TEST R11,R11
JZ 0x0013df3d
MOV R14D,EDI
AND R14D,0x3f
ADD R14,RBX
IMUL R14,R11
MOV R11,RDI
SHL R11,0x8
ADD R11,R14
XOR RDI,R11
ADD RAX,0x6
MOV RBX,RAX
JMP 0x0013df40
LAB_0013df3d:
MOV RAX,RBX
LAB_0013df40:
INC RSI
MOV R11,RDI
CMP RSI,RDX
JC 0x0013deea
JMP 0x0013df53
LAB_0013df4d:
MOV RDI,R11
MOV RBX,RAX
LAB_0013df53:
MOV qword ptr [RCX],RDI
MOV qword ptr [R8],RBX
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0013df60:
CMP R10B,0x20
SETNZ R9B
CMP RAX,RDX
SETNC DL
OR DL,R9B
JNZ 0x0013deba
MOV RDX,RDI
LAB_0013df7a:
MOV RDI,RDX
CMP RDX,RAX
JBE 0x0013deba
LEA RDX,[RDI + -0x4]
CMP dword ptr [RDI + -0x4],0x20202020
JZ 0x0013df7a
JMP 0x0013deba
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
long lVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
pbVar5 = param_2 + param_3;
if ((0x14 < param_3) && (pbVar4 = (byte *)((ulong)pbVar5 & 0xfffffffffffffffc), param_2 < pbVar4))
{
pbVar1 = pbVar5;
do {
pbVar5 = pbVar1;
if (pbVar5 <= pbVar4) {
pbVar1 = pbVar5;
if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar4 && pbVar5[-1] == 0x20)
goto LAB_0013df7a;
break;
}
pbVar1 = pbVar5 + -1;
} while (pbVar5[-1] == 0x20);
}
goto LAB_0013deba;
while (pbVar1 = pbVar5 + -4, *(int *)(pbVar5 + -4) == 0x20202020) {
LAB_0013df7a:
pbVar5 = pbVar1;
if (pbVar5 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break;
}
LAB_0013deba:
uVar6 = *param_4;
lVar2 = *param_5;
do {
pbVar4 = pbVar5;
lVar3 = lVar2;
if (pbVar4 <= param_2) goto LAB_0013df53;
pbVar5 = pbVar4 + -1;
} while (pbVar4[-1] == 0x20);
do {
uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar2) * (ulong)(byte)combo1map[*param_2]
^ uVar6;
lVar3 = lVar2 + 3;
if ((ulong)(byte)combo2map[*param_2] != 0) {
uVar6 = uVar6 ^ uVar6 * 0x100 +
((ulong)((uint)uVar6 & 0x3f) + lVar3) * (ulong)(byte)combo2map[*param_2];
lVar3 = lVar2 + 6;
}
param_2 = param_2 + 1;
lVar2 = lVar3;
} while (param_2 < pbVar4);
LAB_0013df53:
*param_4 = uVar6;
*param_5 = lVar3;
return;
}
| |
34,578 | CLI::TypeValidator<double>::TypeValidator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)::operator()[abi:cxx11](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/Validators.hpp | explicit TypeValidator(const std::string &validator_name)
: Validator(validator_name, [](std::string &input_string) {
using CLI::detail::lexical_cast;
auto val = DesiredType();
if(!lexical_cast(input_string, val)) {
return std::string("Failed parsing ") + input_string + " as a " + detail::type_name<DesiredType>();
}
return std::string();
}) {} | O0 | cpp | CLI::TypeValidator<double>::TypeValidator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)::operator()[abi:cxx11](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0xa8(%rbp)
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x21540
testb $0x1, %al
jne 0x4eb84
leaq -0x81(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x9a80
movq -0xb0(%rbp), %rdx
leaq 0x21710(%rip), %rsi # 0x70196
leaq -0x80(%rbp), %rdi
callq 0xbb20
jmp 0x4ea91
movq -0x18(%rbp), %rdx
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xf5d0
jmp 0x4eaa4
leaq 0x216fb(%rip), %rdx # 0x701a6
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1e250
jmp 0x4eaba
callq 0x4ebb0
movq %rax, -0xb8(%rbp)
jmp 0x4eac8
movq -0xb8(%rbp), %rdx
movq -0xa8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1e250
jmp 0x4eae1
leaq -0x40(%rbp), %rdi
callq 0x9b90
leaq -0x60(%rbp), %rdi
callq 0x9b90
leaq -0x80(%rbp), %rdi
callq 0x9b90
leaq -0x81(%rbp), %rdi
callq 0x9690
jmp 0x4eb90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4eb76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4eb6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4eb64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x9b90
leaq -0x60(%rbp), %rdi
callq 0x9b90
leaq -0x80(%rbp), %rdi
callq 0x9b90
leaq -0x81(%rbp), %rdi
callq 0x9690
jmp 0x4eba0
movq -0xa8(%rbp), %rdi
callq 0x9890
movq -0xa0(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x9a70
nopl (%rax)
| _ZZN3CLI13TypeValidatorIdEC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENKUlRS7_E_clB5cxx11ESA_:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_A8], rdi
mov rax, rdi
mov [rbp+var_A0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
xorps xmm0, xmm0
movsd [rbp+var_20], xmm0
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_20]
call _ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_
test al, 1
jnz loc_4EB84
lea rdi, [rbp+var_81]
mov [rbp+var_B0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_B0]
lea rsi, aFailedParsing; "Failed parsing "
lea rdi, [rbp+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_4EA91:
mov rdx, [rbp+var_18]
lea rdi, [rbp+var_60]
lea rsi, [rbp+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_4EAA4:
lea rdx, aAsA; " as a "
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_4EABA:
call _ZN3CLI6detail9type_nameIdTnNSt9enable_ifIXooooeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10Eeqsr15classify_objectIS3_EE5valueLS4_12Eeqsr15classify_objectIS3_EE5valueLS4_14EENS0_7enablerEE4typeELS5_0EEEPKcv
mov [rbp+var_B8], rax
jmp short $+2
loc_4EAC8:
mov rdx, [rbp+var_B8]
mov rdi, [rbp+var_A8]
lea rsi, [rbp+var_40]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_4EAE1:
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_81]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_4EB90
mov rcx, rax
mov eax, edx
mov [rbp+var_90], rcx
mov [rbp+var_94], eax
jmp short loc_4EB76
mov rcx, rax
mov eax, edx
mov [rbp+var_90], rcx
mov [rbp+var_94], eax
jmp short loc_4EB6D
mov rcx, rax
mov eax, edx
mov [rbp+var_90], rcx
mov [rbp+var_94], eax
jmp short loc_4EB64
mov rcx, rax
mov eax, edx
mov [rbp+var_90], rcx
mov [rbp+var_94], eax
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4EB64:
lea rdi, [rbp+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4EB6D:
lea rdi, [rbp+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_4EB76:
lea rdi, [rbp+var_81]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_4EBA0
loc_4EB84:
mov rdi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
loc_4EB90:
mov rax, [rbp+var_A0]
add rsp, 0C0h
pop rbp
retn
loc_4EBA0:
mov rdi, [rbp+var_90]
call __Unwind_Resume
| long long CLI::TypeValidator<double>::TypeValidator(std::string const&)::{lambda(std::string&)#1}::operator()[abi:cxx11](
long long a1,
long long a2,
long long a3)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
long long v6; // r9
long long v8; // [rsp+8h] [rbp-B8h]
char v9; // [rsp+3Fh] [rbp-81h] BYREF
_BYTE v10[32]; // [rsp+40h] [rbp-80h] BYREF
_BYTE v11[32]; // [rsp+60h] [rbp-60h] BYREF
_BYTE v12[32]; // [rsp+80h] [rbp-40h] BYREF
long long v13; // [rsp+A0h] [rbp-20h] BYREF
long long v14; // [rsp+A8h] [rbp-18h]
long long v15; // [rsp+B0h] [rbp-10h]
long long v16; // [rsp+B8h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = 0LL;
if ( ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_(
a3,
(double *)&v13) )
{
std::string::basic_string(a1, &v13, v3, v4, v5, v6);
}
else
{
std::allocator<char>::allocator(&v9, &v13, v3);
std::string::basic_string<std::allocator<char>>((long long)v10, (long long)"Failed parsing ", (long long)&v9);
std::operator+<char>((long long)v11, (long long)v10, v14);
std::operator+<char>((long long)v12, (long long)v11, (long long)" as a ");
v8 = ZN3CLI6detail9type_nameIdTnNSt9enable_ifIXooooeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10Eeqsr15classify_objectIS3_EE5valueLS4_12Eeqsr15classify_objectIS3_EE5valueLS4_14EENS0_7enablerEE4typeELS5_0EEEPKcv();
std::operator+<char>(a1, (long long)v12, v8);
std::string::~string(v12);
std::string::~string(v11);
std::string::~string(v10);
std::allocator<char>::~allocator(&v9);
}
return a1;
}
| string&)_const:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0xa8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xa0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x20],XMM0
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x20]
CALL 0x00121540
TEST AL,0x1
JNZ 0x0014eb84
LEA RDI,[RBP + -0x81]
MOV qword ptr [RBP + -0xb0],RDI
CALL 0x00109a80
MOV RDX,qword ptr [RBP + -0xb0]
LAB_0014ea7f:
LEA RSI,[0x170196]
LEA RDI,[RBP + -0x80]
CALL 0x0010bb20
JMP 0x0014ea91
LAB_0014ea91:
MOV RDX,qword ptr [RBP + -0x18]
LAB_0014ea95:
LEA RDI,[RBP + -0x60]
LEA RSI,[RBP + -0x80]
CALL 0x0010f5d0
JMP 0x0014eaa4
LAB_0014eaa4:
LEA RDX,[0x1701a6]
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x60]
CALL 0x0011e250
JMP 0x0014eaba
LAB_0014eaba:
CALL 0x0014ebb0
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x0014eac8
LAB_0014eac8:
MOV RDX,qword ptr [RBP + -0xb8]
MOV RDI,qword ptr [RBP + -0xa8]
LEA RSI,[RBP + -0x40]
CALL 0x0011e250
LAB_0014eadf:
JMP 0x0014eae1
LAB_0014eae1:
LEA RDI,[RBP + -0x40]
CALL 0x00109b90
LEA RDI,[RBP + -0x60]
CALL 0x00109b90
LEA RDI,[RBP + -0x80]
CALL 0x00109b90
LEA RDI,[RBP + -0x81]
CALL 0x00109690
JMP 0x0014eb90
LAB_0014eb84:
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x00109890
LAB_0014eb90:
MOV RAX,qword ptr [RBP + -0xa0]
ADD RSP,0xc0
POP RBP
RET
|
/* CLI::TypeValidator<double>::TypeValidator(std::__cxx11::string
const&)::{lambda(std::__cxx11::string&)#1}::operator()[abi:cxx11](std::__cxx11::string&) const */
string * CLI::TypeValidator<double>::TypeValidator(std::__cxx11::string_const&)::
{lambda(std::__cxx11::string&)#1}::operator()::string___const
(string *param_1,int8 param_2,int8 param_3)
{
ulong uVar1;
allocator local_89;
string local_88 [32];
string local_68 [32];
string local_48 [32];
int8 local_28;
int8 local_20;
int8 local_18;
string *local_10;
local_28 = 0;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
uVar1 = _ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_
(param_3,&local_28);
if ((uVar1 & 1) == 0) {
std::allocator<char>::allocator();
/* try { // try from 0014ea7f to 0014ea8e has its CatchHandler @ 0014eb0d */
std::__cxx11::string::string<std::allocator<char>>(local_88,"Failed parsing ",&local_89);
/* try { // try from 0014ea95 to 0014eaa1 has its CatchHandler @ 0014eb21 */
std::operator+(local_68,local_88);
/* try { // try from 0014eaa4 to 0014eab7 has its CatchHandler @ 0014eb35 */
std::operator+(local_48,(char *)local_68);
/* try { // try from 0014eaba to 0014eade has its CatchHandler @ 0014eb49 */
_ZN3CLI6detail9type_nameIdTnNSt9enable_ifIXooooeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10Eeqsr15classify_objectIS3_EE5valueLS4_12Eeqsr15classify_objectIS3_EE5valueLS4_14EENS0_7enablerEE4typeELS5_0EEEPKcv
();
std::operator+(param_1,(char *)local_48);
std::__cxx11::string::~string(local_48);
std::__cxx11::string::~string(local_68);
std::__cxx11::string::~string(local_88);
std::allocator<char>::~allocator((allocator<char> *)&local_89);
}
else {
std::__cxx11::string::string(param_1);
}
return param_1;
}
| |
34,579 | pvio_socket_is_alive | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | my_bool pvio_socket_is_alive(MARIADB_PVIO *pvio)
{
struct st_pvio_socket *csock= NULL;
#ifndef _WIN32
struct pollfd poll_fd;
#else
FD_SET sfds;
struct timeval tv= {0,0};
#endif
int res;
if (!pvio || !pvio->data)
return 0;
csock= (struct st_pvio_socket *)pvio->data;
#ifndef _WIN32
memset(&poll_fd, 0, sizeof(struct pollfd));
poll_fd.events= POLLPRI | POLLIN;
poll_fd.fd= csock->socket;
res= poll(&poll_fd, 1, 0);
if (res <= 0) /* timeout or error */
return FALSE;
if (!(poll_fd.revents & (POLLIN | POLLPRI)))
return FALSE;
return TRUE;
#else
/* We can't use the WSAPoll function, it's broken :-(
(see Windows 8 Bugs 309411 - WSAPoll does not report failed connections)
Instead we need to use select function:
If TIMEVAL is initialized to {0, 0}, select will return immediately;
this is used to poll the state of the selected sockets.
*/
FD_ZERO(&sfds);
FD_SET(csock->socket, &sfds);
res= select((int)csock->socket + 1, &sfds, NULL, NULL, &tv);
if (res > 0 && FD_ISSET(csock->socket, &sfds))
return TRUE;
return FALSE;
#endif
} | O0 | c | pvio_socket_is_alive:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4a245
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x4a24b
movb $0x0, -0x1(%rbp)
jmp 0x4a2aa
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x13250
movw $0x3, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x13690
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x4a294
movb $0x0, -0x1(%rbp)
jmp 0x4a2aa
movswl -0x1a(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x4a2a6
movb $0x0, -0x1(%rbp)
jmp 0x4a2aa
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pvio_socket_is_alive:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], 0
cmp [rbp+var_10], 0
jz short loc_4A245
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_4A24B
loc_4A245:
mov [rbp+var_1], 0
jmp short loc_4A2AA
loc_4A24B:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
lea rdi, [rbp+var_20]
xor esi, esi
mov edx, 8
call _memset
mov [rbp+var_1C], 3
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_20], eax
lea rdi, [rbp+var_20]
mov esi, 1
xor edx, edx
call _poll
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jg short loc_4A294
mov [rbp+var_1], 0
jmp short loc_4A2AA
loc_4A294:
movsx eax, [rbp+var_1A]
and eax, 3
cmp eax, 0
jnz short loc_4A2A6
mov [rbp+var_1], 0
jmp short loc_4A2AA
loc_4A2A6:
mov [rbp+var_1], 1
loc_4A2AA:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| bool pvio_socket_is_alive(int **a1)
{
int v2; // [rsp+10h] [rbp-20h] BYREF
__int16 v3; // [rsp+14h] [rbp-1Ch]
__int16 v4; // [rsp+16h] [rbp-1Ah]
int *v5; // [rsp+18h] [rbp-18h]
int **v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v5 = 0LL;
if ( !a1 || !*v6 )
return 0;
v5 = *v6;
memset(&v2, 0LL, 8LL);
v3 = 3;
v2 = *v5;
return (int)poll(&v2, 1LL, 0LL) > 0 && (v4 & 3) != 0;
}
| pvio_socket_is_alive:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0014a245
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0014a24b
LAB_0014a245:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014a2aa
LAB_0014a24b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0x20]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x00113250
MOV word ptr [RBP + -0x1c],0x3
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x20],EAX
LEA RDI,[RBP + -0x20]
MOV ESI,0x1
XOR EDX,EDX
CALL 0x00113690
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JG 0x0014a294
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014a2aa
LAB_0014a294:
MOVSX EAX,word ptr [RBP + -0x1a]
AND EAX,0x3
CMP EAX,0x0
JNZ 0x0014a2a6
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014a2aa
LAB_0014a2a6:
MOV byte ptr [RBP + -0x1],0x1
LAB_0014a2aa:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 pvio_socket_is_alive(long *param_1)
{
int iVar1;
pollfd local_28;
int *local_20;
long *local_18;
int1 local_9;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_9 = 0;
}
else {
local_20 = (int *)*param_1;
local_18 = param_1;
memset(&local_28,0,8);
local_28.events = 3;
local_28.fd = *local_20;
iVar1 = poll(&local_28,1,0);
if (iVar1 < 1) {
local_9 = 0;
}
else if ((local_28.revents & 3U) == 0) {
local_9 = 0;
}
else {
local_9 = 1;
}
}
return local_9;
}
| |
34,580 | std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | std::vector<std::string> string_split<std::string>(const std::string & input, char separator)
{
std::vector<std::string> parts;
size_t begin_pos = 0;
size_t separator_pos = input.find(separator);
while (separator_pos != std::string::npos) {
std::string part = input.substr(begin_pos, separator_pos - begin_pos);
parts.emplace_back(part);
begin_pos = separator_pos + 1;
separator_pos = input.find(separator, begin_pos);
}
parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos));
return parts;
} | O3 | c | std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(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 $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x1ab30
cmpq $-0x1, %rax
je 0x4f29e
movq %rax, %r12
xorl %r15d, %r15d
leaq 0x8(%rsp), %r13
movsbl %bpl, %ebp
movq %r12, %rcx
subq %r15, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1a930
movq %rbx, %rdi
movq %r13, %rsi
callq 0x56274
movq %r12, %r15
incq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1ab30
movq %rax, %r12
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4f298
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
cmpq $-0x1, %r12
jne 0x4f247
movq %r15, %rcx
notq %rcx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1a930
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x22546
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f2dc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x4f30d
jmp 0x4f2fb
movq %rax, %r14
jmp 0x4f31f
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4f31f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rdi
callq 0x213c6
movq %r14, %rdi
callq 0x1af90
nop
| _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
xor r15d, r15d
mov rdi, rsi
mov esi, edx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_4F29E
mov r12, rax
xor r15d, r15d
lea r13, [rsp+58h+var_50]
movsx ebp, bpl
loc_4F247:
mov rcx, r12
sub rcx, r15
mov rdi, r13
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&)
mov r15, r12
inc r15
mov rdi, r14
mov esi, ebp
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_4F298
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F298:
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_4F247
loc_4F29E:
mov rcx, r15
not rcx
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4F2DC
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F2DC:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
jmp short loc_4F30D
jmp short $+2
loc_4F2FB:
mov r14, rax
jmp short loc_4F31F
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
loc_4F30D:
cmp rdi, rax
jz short loc_4F31F
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F31F:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| void string_split<std::string>(long long a1, long long a2, unsigned int a3)
{
char v3; // bp
long long v4; // r15
long long v5; // rax
long long v6; // r12
void *v7[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v8[8]; // [rsp+18h] [rbp-40h] BYREF
v3 = a3;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = 0LL;
v5 = std::string::find(a2, a3, 0LL);
if ( v5 != -1 )
{
v6 = v5;
v4 = 0LL;
do
{
std::string::substr(v7, a2, v4, v6 - v4);
std::vector<std::string>::emplace_back<std::string&>(a1, v7);
v4 = v6 + 1;
v6 = std::string::find(a2, (unsigned int)v3, v6 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
}
while ( v6 != -1 );
}
std::string::substr(v7, a2, v4, ~v4);
std::vector<std::string>::emplace_back<std::string>(a1, (long long)v7);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
}
| string_split<std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
XOR R15D,R15D
MOV RDI,RSI
MOV ESI,EDX
XOR EDX,EDX
CALL 0x0011ab30
CMP RAX,-0x1
JZ 0x0014f29e
MOV R12,RAX
XOR R15D,R15D
LEA R13,[RSP + 0x8]
MOVSX EBP,BPL
LAB_0014f247:
MOV RCX,R12
SUB RCX,R15
LAB_0014f24d:
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
CALL 0x0011a930
LAB_0014f25b:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00156274
MOV R15,R12
INC R15
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
CALL 0x0011ab30
MOV R12,RAX
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0014f298
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8e0
LAB_0014f298:
CMP R12,-0x1
JNZ 0x0014f247
LAB_0014f29e:
MOV RCX,R15
NOT RCX
LAB_0014f2a4:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011a930
LAB_0014f2b4:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00122546
LAB_0014f2c1:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014f2dc
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8e0
LAB_0014f2dc:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */
void string_split<std::__cxx11::string>(string *param_1,char param_2)
{
long lVar1;
uint in_EDX;
int7 in_register_00000031;
long *local_50 [2];
long local_40 [2];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX);
if (lVar1 != -1) {
do {
/* try { // try from 0014f24d to 0014f25a has its CatchHandler @ 0014f2fb */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0014f25b to 0014f265 has its CatchHandler @ 0014f300 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string&>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
} while (lVar1 != -1);
}
/* try { // try from 0014f2a4 to 0014f2b3 has its CatchHandler @ 0014f2f9 */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 0014f2b4 to 0014f2c0 has its CatchHandler @ 0014f2eb */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return;
}
| |
34,581 | testing::internal::WriteToShardStatusFileIfNeeded() | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc | bool String::CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
if (lhs == nullptr) return rhs == nullptr;
if (rhs == nullptr) return false;
return posix::StrCaseCmp(lhs, rhs) == 0;
} | O3 | cpp | testing::internal::WriteToShardStatusFileIfNeeded():
pushq %rbx
leaq 0x12894(%rip), %rdi # 0x40ed0
callq 0x8660
testq %rax, %rax
je 0x2e666
movq %rax, %rbx
leaq 0x153bc(%rip), %rsi # 0x43a0c
movq %rax, %rdi
callq 0x8610
testq %rax, %rax
je 0x2e668
movq %rax, %rdi
popq %rbx
jmp 0x84a0
popq %rbx
retq
leaq 0x1539f(%rip), %rsi # 0x43a0e
leaq 0x1285a(%rip), %rcx # 0x40ed0
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22129
movq 0x2a8f4(%rip), %rax # 0x58f80
movq (%rax), %rdi
callq 0x8600
movl $0x1, %edi
callq 0x8650
| _ZN7testing8internal30WriteToShardStatusFileIfNeededEv:
push rbx
lea rdi, _ZN7testingL20kTestShardStatusFileE; "GTEST_SHARD_STATUS_FILE"
call _getenv
test rax, rax
jz short loc_2E666
mov rbx, rax
lea rsi, aW; "w"
mov rdi, rax
call _fopen
test rax, rax
jz short loc_2E668
mov rdi, rax
pop rbx
jmp _fclose
loc_2E666:
pop rbx
retn
loc_2E668:
lea rsi, aCouldNotWriteT; "Could not write to the test shard statu"...
lea rcx, _ZN7testingL20kTestShardStatusFileE; "GTEST_SHARD_STATUS_FILE"
mov edi, 1
mov rdx, rbx
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov edi, 1
call _exit
| long long testing::internal::WriteToShardStatusFileIfNeeded(
testing::internal *this,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long result; // rax
long long v10; // rbx
long long v11; // rax
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
char v16; // [rsp+0h] [rbp-8h]
result = getenv("GTEST_SHARD_STATUS_FILE");
if ( result )
{
v10 = result;
v11 = fopen(result, "w");
if ( !v11 )
{
testing::internal::ColoredPrintf(
1,
(long long)"Could not write to the test shard status file \"%s\" specified by the %s environment variable.\n",
v10,
(long long)"GTEST_SHARD_STATUS_FILE",
v12,
v13,
a2,
a3,
a4,
a5,
v14,
v15,
a8,
a9,
v16);
fflush(stdout);
exit(1LL);
}
return fclose(v11);
}
return result;
}
| WriteToShardStatusFileIfNeeded:
PUSH RBX
LEA RDI,[0x140ed0]
CALL 0x00108660
TEST RAX,RAX
JZ 0x0012e666
MOV RBX,RAX
LEA RSI,[0x143a0c]
MOV RDI,RAX
CALL 0x00108610
TEST RAX,RAX
JZ 0x0012e668
MOV RDI,RAX
POP RBX
JMP 0x001084a0
LAB_0012e666:
POP RBX
RET
LAB_0012e668:
LEA RSI,[0x143a0e]
LEA RCX,[0x140ed0]
MOV EDI,0x1
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00122129
MOV RAX,qword ptr [0x00158f80]
MOV RDI,qword ptr [RAX]
CALL 0x00108600
MOV EDI,0x1
CALL 0x00108650
|
/* testing::internal::WriteToShardStatusFileIfNeeded() */
void testing::internal::WriteToShardStatusFileIfNeeded(void)
{
char *__filename;
FILE *__stream;
__filename = getenv("GTEST_SHARD_STATUS_FILE");
if (__filename == (char *)0x0) {
return;
}
__stream = fopen(__filename,"w");
if (__stream != (FILE *)0x0) {
fclose(__stream);
return;
}
ColoredPrintf(1,
"Could not write to the test shard status file \"%s\" specified by the %s environment variable.\n"
,__filename,"GTEST_SHARD_STATUS_FILE");
fflush(*(FILE **)PTR_stdout_00158f80);
/* WARNING: Subroutine does not return */
exit(1);
}
| |
34,582 | icmptime_validate | xtate/src/scan-modules/icmp-time-scan.c | static void icmptime_validate(uint64_t entropy, Recved *recved,
PreHandle *pre) {
/*record icmpv4 to my ip*/
if (recved->parsed.found == FOUND_ICMP && recved->is_myip &&
recved->parsed.src_ip.version == 4)
pre->go_record = 1;
else
return;
ipaddress ip_them = recved->parsed.src_ip;
ipaddress ip_me = recved->parsed.dst_ip;
unsigned cookie = get_cookie(ip_them, 0, ip_me, 0, entropy);
if (recved->parsed.icmp_type == ICMPv4_TYPE_TIMESTAMP_REPLY &&
recved->parsed.icmp_code == ICMPv4_CODE_TIMESTAMP_REPLY &&
recved->parsed.icmp_id == ((cookie >> 16) & 0xFF) &&
recved->parsed.icmp_seqno == ((cookie >> 0) & 0xFF)) {
pre->go_dedup = 1;
pre->dedup_port_them = 0;
pre->dedup_port_me = 0;
}
} | O3 | c | icmptime_validate:
cmpl $0x4, 0x9c(%rsi)
jne 0x38e61
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
testb $0x1, 0xbc(%rsi)
je 0x38e5a
cmpb $0x4, 0x60(%r14)
jne 0x38e5a
movq %rdx, %rbx
movq %rdi, %rdx
orb $0x1, (%rbx)
movq 0x78(%r14), %rax
movq %rax, 0x28(%rsp)
movups 0x68(%r14), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x60(%r14), %rax
movq %rax, 0x10(%rsp)
movups 0x50(%r14), %xmm0
movups %xmm0, (%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x43df0
cmpb $0xe, 0x88(%r14)
jne 0x38e5a
cmpb $0x0, 0x89(%r14)
jne 0x38e5a
movzwl 0x8a(%r14), %ecx
movl %eax, %edx
shrl $0x10, %edx
movzbl %dl, %edx
cmpl %ecx, %edx
jne 0x38e5a
movzwl 0x8c(%r14), %ecx
movzbl %al, %eax
cmpl %ecx, %eax
jne 0x38e5a
orb $0x4, (%rbx)
xorl %eax, %eax
movl %eax, 0x20(%rbx)
movl %eax, 0x40(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
| icmptime_validate:
cmp dword ptr [rsi+9Ch], 4
jnz locret_38E61
push r14
push rbx
sub rsp, 38h
mov r14, rsi
test byte ptr [rsi+0BCh], 1
jz loc_38E5A
cmp byte ptr [r14+60h], 4
jnz short loc_38E5A
mov rbx, rdx
mov rdx, rdi
or byte ptr [rbx], 1
mov rax, [r14+78h]
mov [rsp+48h+var_20], rax
movups xmm0, xmmword ptr [r14+68h]
movups [rsp+48h+var_30], xmm0
mov rax, [r14+60h]
mov [rsp+48h+var_38], rax
movups xmm0, xmmword ptr [r14+50h]
movups [rsp+48h+var_48], xmm0
xor edi, edi
xor esi, esi
call get_cookie
cmp byte ptr [r14+88h], 0Eh
jnz short loc_38E5A
cmp byte ptr [r14+89h], 0
jnz short loc_38E5A
movzx ecx, word ptr [r14+8Ah]
mov edx, eax
shr edx, 10h
movzx edx, dl
cmp edx, ecx
jnz short loc_38E5A
movzx ecx, word ptr [r14+8Ch]
movzx eax, al
cmp eax, ecx
jnz short loc_38E5A
or byte ptr [rbx], 4
xor eax, eax
mov [rbx+20h], eax
mov [rbx+40h], eax
loc_38E5A:
add rsp, 38h
pop rbx
pop r14
locret_38E61:
retn
| void icmptime_validate(int a1, long long a2, long long a3, int a4, int a5, int a6)
{
long long cookie; // rax
if ( *(_DWORD *)(a2 + 156) == 4 && (*(_BYTE *)(a2 + 188) & 1) != 0 && *(_BYTE *)(a2 + 96) == 4 )
{
*(_BYTE *)a3 |= 1u;
cookie = get_cookie(
0,
0,
a1,
a4,
a5,
a6,
*(_OWORD *)(a2 + 80),
*(_QWORD *)(a2 + 88),
*(_QWORD *)(a2 + 96),
*(_QWORD *)(a2 + 104),
*(_QWORD *)(a2 + 112),
*(_QWORD *)(a2 + 120));
if ( *(_BYTE *)(a2 + 136) == 14
&& !*(_BYTE *)(a2 + 137)
&& __PAIR64__((unsigned __int8)cookie, BYTE2(cookie)) == __PAIR64__(
*(unsigned __int16 *)(a2 + 140),
*(unsigned __int16 *)(a2 + 138)) )
{
*(_BYTE *)a3 |= 4u;
*(_DWORD *)(a3 + 32) = 0;
*(_DWORD *)(a3 + 64) = 0;
}
}
}
| icmptime_validate:
CMP dword ptr [RSI + 0x9c],0x4
JNZ 0x00138e61
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
TEST byte ptr [RSI + 0xbc],0x1
JZ 0x00138e5a
CMP byte ptr [R14 + 0x60],0x4
JNZ 0x00138e5a
MOV RBX,RDX
MOV RDX,RDI
OR byte ptr [RBX],0x1
MOV RAX,qword ptr [R14 + 0x78]
MOV qword ptr [RSP + 0x28],RAX
MOVUPS XMM0,xmmword ptr [R14 + 0x68]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV RAX,qword ptr [R14 + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R14 + 0x50]
MOVUPS xmmword ptr [RSP],XMM0
XOR EDI,EDI
XOR ESI,ESI
CALL 0x00143df0
CMP byte ptr [R14 + 0x88],0xe
JNZ 0x00138e5a
CMP byte ptr [R14 + 0x89],0x0
JNZ 0x00138e5a
MOVZX ECX,word ptr [R14 + 0x8a]
MOV EDX,EAX
SHR EDX,0x10
MOVZX EDX,DL
CMP EDX,ECX
JNZ 0x00138e5a
MOVZX ECX,word ptr [R14 + 0x8c]
MOVZX EAX,AL
CMP EAX,ECX
JNZ 0x00138e5a
OR byte ptr [RBX],0x4
XOR EAX,EAX
MOV dword ptr [RBX + 0x20],EAX
MOV dword ptr [RBX + 0x40],EAX
LAB_00138e5a:
ADD RSP,0x38
POP RBX
POP R14
LAB_00138e61:
RET
|
void icmptime_validate(int8 param_1,long param_2,byte *param_3)
{
uint uVar1;
if (((*(int *)(param_2 + 0x9c) == 4) && ((*(byte *)(param_2 + 0xbc) & 1) != 0)) &&
(*(char *)(param_2 + 0x60) == '\x04')) {
*param_3 = *param_3 | 1;
uVar1 = get_cookie(0,0,param_1);
if (((*(char *)(param_2 + 0x88) == '\x0e') && (*(char *)(param_2 + 0x89) == '\0')) &&
(((uVar1 >> 0x10 & 0xff) == (uint)*(ushort *)(param_2 + 0x8a) &&
((uVar1 & 0xff) == (uint)*(ushort *)(param_2 + 0x8c))))) {
*param_3 = *param_3 | 4;
param_3[0x20] = 0;
param_3[0x21] = 0;
param_3[0x22] = 0;
param_3[0x23] = 0;
param_3[0x40] = 0;
param_3[0x41] = 0;
param_3[0x42] = 0;
param_3[0x43] = 0;
}
}
return;
}
| |
34,583 | ImPlot3D::RendererLineStripSkip<ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>>>>::RendererLineStripSkip(ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>>> const&, unsigned int, float) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d_items.cpp | RendererLineStripSkip(const _Getter& getter, ImU32 col, float weight)
: RendererBase(getter.Count - 1, 6, 4),
Getter(getter),
Col(col),
HalfWeight(ImMax(1.0f, weight) * 0.5f) {
// Initialize the first point in plot coordinates
P1_plot = Getter(0);
} | O1 | cpp | ImPlot3D::RendererLineStripSkip<ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>>>>::RendererLineStripSkip(ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>>> const&, unsigned int, float):
movl 0x48(%rsi), %eax
decl %eax
movl %eax, (%rdi)
movabsq $0x400000006, %rax # imm = 0x400000006
movq %rax, 0x4(%rdi)
movq %rsi, 0x10(%rdi)
movl %edx, 0x18(%rdi)
movss 0x20dc06(%rip), %xmm1 # 0x28f008
maxss %xmm0, %xmm1
mulss 0x20dc12(%rip), %xmm1 # 0x28f020
movss %xmm1, 0x1c(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x2c(%rdi)
movq (%rsi), %rcx
movl 0x8(%rsi), %r8d
movl 0xc(%rsi), %eax
movslq 0x10(%rsi), %r9
xorl %edx, %edx
cmpq $0x8, %r9
sete %dl
xorl %r10d, %r10d
testl %eax, %eax
sete %r10b
leal (%r10,%rdx,2), %edx
leaq 0x215f43(%rip), %r10 # 0x29738c
movslq (%r10,%rdx,4), %rdx
addq %r10, %rdx
jmpq *%rdx
movsd (%rcx), %xmm0
movq 0x18(%rsi), %rcx
movl 0x20(%rsi), %r8d
movl 0x24(%rsi), %eax
movslq 0x28(%rsi), %r9
xorl %edx, %edx
cmpq $0x8, %r9
sete %dl
xorl %r10d, %r10d
testl %eax, %eax
sete %r10b
leal (%r10,%rdx,2), %edx
leaq 0x215f1a(%rip), %r10 # 0x29739c
movslq (%r10,%rdx,4), %rdx
addq %r10, %rdx
jmpq *%rdx
cltd
idivl %r8d
movslq %edx, %rax
imulq %r9, %rax
addq %rax, %rcx
movsd (%rcx), %xmm0
movq 0x18(%rsi), %rcx
movl 0x20(%rsi), %r8d
movl 0x24(%rsi), %eax
movslq 0x28(%rsi), %r9
xorl %edx, %edx
cmpq $0x8, %r9
sete %dl
xorl %r10d, %r10d
testl %eax, %eax
sete %r10b
leal (%r10,%rdx,2), %edx
leaq 0x215ed3(%rip), %r10 # 0x29739c
movslq (%r10,%rdx,4), %rdx
addq %r10, %rdx
jmpq *%rdx
cltd
idivl %r8d
movslq %edx, %rax
leaq (%rcx,%rax,8), %rax
movsd (%rax), %xmm0
movq 0x18(%rsi), %rcx
movl 0x20(%rsi), %r8d
movl 0x24(%rsi), %eax
movslq 0x28(%rsi), %r9
xorl %edx, %edx
cmpq $0x8, %r9
sete %dl
xorl %r10d, %r10d
testl %eax, %eax
sete %r10b
leal (%r10,%rdx,2), %edx
leaq 0x215e8f(%rip), %r10 # 0x29739c
movslq (%r10,%rdx,4), %rdx
addq %r10, %rdx
jmpq *%rdx
cltd
idivl %r8d
movslq %edx, %rax
imulq %r9, %rax
addq %rax, %rcx
movsd (%rcx), %xmm1
movq 0x30(%rsi), %rcx
movl 0x38(%rsi), %r8d
movl 0x3c(%rsi), %eax
movslq 0x40(%rsi), %rsi
xorl %edx, %edx
cmpq $0x8, %rsi
sete %dl
xorl %r9d, %r9d
testl %eax, %eax
sete %r9b
leal (%r9,%rdx,2), %edx
leaq 0x215e58(%rip), %r9 # 0x2973ac
movslq (%r9,%rdx,4), %rdx
addq %r9, %rdx
jmpq *%rdx
cltd
idivl %r8d
movslq %edx, %rax
leaq (%rcx,%rax,8), %rax
movsd (%rax), %xmm1
movq 0x30(%rsi), %rcx
movl 0x38(%rsi), %r8d
movl 0x3c(%rsi), %eax
movslq 0x40(%rsi), %rsi
xorl %edx, %edx
cmpq $0x8, %rsi
sete %dl
xorl %r9d, %r9d
testl %eax, %eax
sete %r9b
leal (%r9,%rdx,2), %edx
leaq 0x215e14(%rip), %r9 # 0x2973ac
movslq (%r9,%rdx,4), %rdx
addq %r9, %rdx
jmpq *%rdx
cltd
idivl %r8d
movslq %edx, %rax
imulq %rsi, %rax
addq %rax, %rcx
jmp 0x815bc
cltd
idivl %r8d
movslq %edx, %rax
leaq (%rcx,%rax,8), %rcx
unpcklpd %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
xorps %xmm1, %xmm1
cvtsd2ss (%rcx), %xmm1
cvtpd2ps %xmm0, %xmm0
movlpd %xmm0, 0x20(%rdi)
movss %xmm1, 0x28(%rdi)
retq
| _ZN8ImPlot3D21RendererLineStripSkipINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEEC2ERKS4_jf:
mov eax, [rsi+48h]
dec eax
mov [rdi], eax
mov rax, 400000006h
mov [rdi+4], rax
mov [rdi+10h], rsi
mov [rdi+18h], edx
movss xmm1, cs:flt_28F008
maxss xmm1, xmm0
mulss xmm1, dword ptr cs:xmmword_28F020
movss dword ptr [rdi+1Ch], xmm1
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+2Ch], xmm0
mov rcx, [rsi]
mov r8d, [rsi+8]
mov eax, [rsi+0Ch]
movsxd r9, dword ptr [rsi+10h]
xor edx, edx
cmp r9, 8
setz dl
xor r10d, r10d
test eax, eax
setz r10b
lea edx, [r10+rdx*2]
lea r10, jpt_81450
movsxd rdx, ds:(jpt_81450 - 29738Ch)[r10+rdx*4]; switch 4 cases
add rdx, r10
jmp rdx; switch jump
loc_81452:
movsd xmm0, qword ptr [rcx]; jumptable 0000000000081450 cases 1,3
mov rcx, [rsi+18h]
mov r8d, [rsi+20h]
mov eax, [rsi+24h]
movsxd r9, dword ptr [rsi+28h]
xor edx, edx
cmp r9, 8
setz dl
xor r10d, r10d
test eax, eax
setz r10b
lea edx, [r10+rdx*2]
lea r10, jpt_81489
movsxd rdx, ds:(jpt_81489 - 29739Ch)[r10+rdx*4]; switch 4 cases
add rdx, r10
jmp rdx; switch jump
loc_8148B:
cdq; jumptable 0000000000081450 case 0
idiv r8d
movsxd rax, edx
imul rax, r9
add rcx, rax
movsd xmm0, qword ptr [rcx]
mov rcx, [rsi+18h]
mov r8d, [rsi+20h]
mov eax, [rsi+24h]
movsxd r9, dword ptr [rsi+28h]
xor edx, edx
cmp r9, 8
setz dl
xor r10d, r10d
test eax, eax
setz r10b
lea edx, [r10+rdx*2]
lea r10, jpt_81489
movsxd rdx, ds:(jpt_81489 - 29739Ch)[r10+rdx*4]; switch 4 cases
add rdx, r10
jmp rdx; switch jump
loc_814D2:
cdq; jumptable 0000000000081450 case 2
idiv r8d
movsxd rax, edx
lea rax, [rcx+rax*8]
movsd xmm0, qword ptr [rax]
mov rcx, [rsi+18h]
mov r8d, [rsi+20h]
mov eax, [rsi+24h]
movsxd r9, dword ptr [rsi+28h]
xor edx, edx
cmp r9, 8
setz dl
xor r10d, r10d
test eax, eax
setz r10b
lea edx, [r10+rdx*2]
lea r10, jpt_81489
movsxd rdx, ds:(jpt_81489 - 29739Ch)[r10+rdx*4]; switch 4 cases
add rdx, r10
jmp rdx; switch jump
loc_81516:
cdq; jumptable 0000000000081489 case 0
idiv r8d
movsxd rax, edx
imul rax, r9
add rcx, rax
loc_81524:
movsd xmm1, qword ptr [rcx]; jumptable 0000000000081489 cases 1,3
mov rcx, [rsi+30h]
mov r8d, [rsi+38h]
mov eax, [rsi+3Ch]
movsxd rsi, dword ptr [rsi+40h]
xor edx, edx
cmp rsi, 8
setz dl
xor r9d, r9d
test eax, eax
setz r9b
lea edx, [r9+rdx*2]
lea r9, jpt_8155B
movsxd rdx, ds:(jpt_8155B - 2973ACh)[r9+rdx*4]; switch 4 cases
add rdx, r9
jmp rdx; switch jump
loc_8155D:
cdq; jumptable 0000000000081489 case 2
idiv r8d
movsxd rax, edx
lea rax, [rcx+rax*8]
movsd xmm1, qword ptr [rax]
mov rcx, [rsi+30h]
mov r8d, [rsi+38h]
mov eax, [rsi+3Ch]
movsxd rsi, dword ptr [rsi+40h]
xor edx, edx
cmp rsi, 8
setz dl
xor r9d, r9d
test eax, eax
setz r9b
lea edx, [r9+rdx*2]
lea r9, jpt_8155B
movsxd rdx, ds:(jpt_8155B - 2973ACh)[r9+rdx*4]; switch 4 cases
add rdx, r9
jmp rdx; switch jump
loc_815A1:
cdq; jumptable 000000000008155B case 0
idiv r8d
movsxd rax, edx
imul rax, rsi
add rcx, rax
jmp short loc_815BC; jumptable 000000000008155B cases 1,3
loc_815B1:
cdq; jumptable 000000000008155B case 2
idiv r8d
movsxd rax, edx
lea rcx, [rcx+rax*8]
loc_815BC:
unpcklpd xmm0, xmm1; jumptable 000000000008155B cases 1,3
xorps xmm1, xmm1
cvtsd2ss xmm1, qword ptr [rcx]
cvtpd2ps xmm0, xmm0
movlpd qword ptr [rdi+20h], xmm0
movss dword ptr [rdi+28h], xmm1
retn
| long long ImPlot3D::RendererLineStripSkip<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>::RendererLineStripSkip(
long long a1,
unsigned long long **a2,
int a3,
float a4)
{
unsigned long long *v4; // rcx
int v5; // r8d
int v6; // eax
long long v7; // r9
__m128d v8; // xmm0
unsigned long long *v9; // rcx
int v10; // r8d
int v11; // eax
long long v12; // r9
__m128d v13; // xmm1
double *v14; // rcx
int v15; // r8d
long long result; // rax
long long v17; // rsi
long long v18; // xmm0_8
float v19; // xmm1_4
*(_DWORD *)a1 = *((_DWORD *)a2 + 18) - 1;
*(_QWORD *)(a1 + 4) = 0x400000006LL;
*(_QWORD *)(a1 + 16) = a2;
*(_DWORD *)(a1 + 24) = a3;
*(float *)(a1 + 28) = fmaxf(1.0, a4) * 0.5;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 44) = 0LL;
v4 = *a2;
v5 = *((_DWORD *)a2 + 2);
v6 = *((_DWORD *)a2 + 3);
v7 = *((int *)a2 + 4);
switch ( (v6 == 0) + 2 * (v7 == 8) )
{
case 0:
v8 = (__m128d)*(unsigned long long *)((char *)v4 + v7 * (v6 % v5));
v9 = a2[3];
v10 = *((_DWORD *)a2 + 8);
v11 = *((_DWORD *)a2 + 9);
v12 = *((int *)a2 + 10);
switch ( (v11 == 0) + 2 * (v12 == 8) )
{
case 0:
goto LABEL_5;
case 1:
case 3:
goto LABEL_6;
case 2:
goto LABEL_7;
}
case 1:
case 3:
v8 = (__m128d)*v4;
v9 = a2[3];
v10 = *((_DWORD *)a2 + 8);
v11 = *((_DWORD *)a2 + 9);
v12 = *((int *)a2 + 10);
switch ( (v11 == 0) + 2 * (v12 == 8) )
{
case 0:
goto LABEL_5;
case 1:
case 3:
goto LABEL_6;
case 2:
goto LABEL_7;
}
case 2:
v8 = (__m128d)v4[v6 % v5];
v9 = a2[3];
v10 = *((_DWORD *)a2 + 8);
v11 = *((_DWORD *)a2 + 9);
v12 = *((int *)a2 + 10);
switch ( (v11 == 0) + 2 * (v12 == 8) )
{
case 0:
LABEL_5:
v9 = (unsigned long long *)((char *)v9 + v12 * (v11 % v10));
goto LABEL_6;
case 1:
case 3:
LABEL_6:
v13 = (__m128d)*v9;
v14 = (double *)a2[6];
v15 = *((_DWORD *)a2 + 14);
result = *((unsigned int *)a2 + 15);
v17 = *((int *)a2 + 16);
switch ( ((_DWORD)result == 0) + 2 * (v17 == 8) )
{
case 0:
goto LABEL_8;
case 1:
case 3:
goto LABEL_10;
case 2:
goto LABEL_9;
}
case 2:
LABEL_7:
v13 = (__m128d)v9[v11 % v10];
v14 = (double *)a2[6];
v15 = *((_DWORD *)a2 + 14);
result = *((unsigned int *)a2 + 15);
v17 = *((int *)a2 + 16);
switch ( ((_DWORD)result == 0) + 2 * (v17 == 8) )
{
case 0:
LABEL_8:
result = v17 * ((int)result % v15);
v14 = (double *)((char *)v14 + result);
break;
case 1:
case 3:
goto LABEL_10;
case 2:
LABEL_9:
result = (int)result % v15;
v14 += result;
break;
}
break;
}
LABEL_10:
v18 = *(_OWORD *)&_mm_unpacklo_pd(v8, v13);
v19 = *v14;
*(_QWORD *)(a1 + 32) = v18;
*(float *)(a1 + 40) = v19;
return result;
}
}
| RendererLineStripSkip:
MOV EAX,dword ptr [RSI + 0x48]
DEC EAX
MOV dword ptr [RDI],EAX
MOV RAX,0x400000006
MOV qword ptr [RDI + 0x4],RAX
MOV qword ptr [RDI + 0x10],RSI
MOV dword ptr [RDI + 0x18],EDX
MOVSS XMM1,dword ptr [0x0038f008]
MAXSS XMM1,XMM0
MULSS XMM1,dword ptr [0x0038f020]
MOVSS dword ptr [RDI + 0x1c],XMM1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x2c],XMM0
MOV RCX,qword ptr [RSI]
MOV R8D,dword ptr [RSI + 0x8]
MOV EAX,dword ptr [RSI + 0xc]
MOVSXD R9,dword ptr [RSI + 0x10]
XOR EDX,EDX
CMP R9,0x8
SETZ DL
XOR R10D,R10D
TEST EAX,EAX
SETZ R10B
LEA EDX,[R10 + RDX*0x2]
LEA R10,[0x39738c]
MOVSXD RDX,dword ptr [R10 + RDX*0x4]
ADD RDX,R10
JMP RDX
|
/* ImPlot3D::RendererLineStripSkip<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,
ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double> >
>::RendererLineStripSkip(ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,
ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double> > const&, unsigned int, float) */
void __thiscall
ImPlot3D::
RendererLineStripSkip<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>
::RendererLineStripSkip
(RendererLineStripSkip<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>
*this,GetterXYZ *param_1,uint param_2,float param_3)
{
float fVar1;
*(int *)this = *(int *)(param_1 + 0x48) + -1;
*(int8 *)(this + 4) = 0x400000006;
*(GetterXYZ **)(this + 0x10) = param_1;
*(uint *)(this + 0x18) = param_2;
fVar1 = DAT_0038f008;
if (DAT_0038f008 <= param_3) {
fVar1 = param_3;
}
*(float *)(this + 0x1c) = fVar1 * DAT_0038f020;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x2c) = 0;
*(int8 *)(this + 0x34) = 0;
/* WARNING: Could not recover jumptable at 0x00181450. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_0039738c +
*(int *)(&DAT_0039738c +
(ulong)((uint)(*(int *)(param_1 + 0xc) == 0) +
(uint)(*(int *)(param_1 + 0x10) == 8) * 2) * 4)))
(this,param_1,
&DAT_0039738c +
*(int *)(&DAT_0039738c +
(ulong)((uint)(*(int *)(param_1 + 0xc) == 0) +
(uint)(*(int *)(param_1 + 0x10) == 8) * 2) * 4),*(int8 *)param_1,
*(int4 *)(param_1 + 8));
return;
}
| |
34,584 | my_mb_wc_latin1 | eloqsql/strings/ctype-latin1.c | static
int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *wc,
const uchar *str,
const uchar *end __attribute__((unused)))
{
if (str >= end)
return MY_CS_TOOSMALL;
/*
There are no unassigned characters in latin1.
Every code point in latin1 is mapped to some Unicode code point.
We can always return 1, no needs to check the value of cs_to_uni[*str].
*/
*wc= cs_to_uni[*str];
DBUG_ASSERT(wc[0] || !str[0]);
return 1;
} | O3 | c | my_mb_wc_latin1:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x6f998
movzbl (%rdx), %eax
leaq 0x16f7e4(%rip), %rcx # 0x1df170
movzwl (%rcx,%rax,2), %eax
movq %rax, (%rsi)
movl $0x1, %eax
popq %rbp
retq
| my_mb_wc_latin1:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_6F998
movzx eax, byte ptr [rdx]
lea rcx, cs_to_uni
movzx eax, word ptr [rcx+rax*2]
mov [rsi], rax
mov eax, 1
loc_6F998:
pop rbp
retn
| long long my_mb_wc_latin1(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
*a2 = cs_to_uni[*a3];
return 1LL;
}
return result;
}
| my_mb_wc_latin1:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0016f998
MOVZX EAX,byte ptr [RDX]
LEA RCX,[0x2df170]
MOVZX EAX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RAX
MOV EAX,0x1
LAB_0016f998:
POP RBP
RET
|
int8 my_mb_wc_latin1(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
int8 uVar1;
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
*param_2 = (ulong)*(ushort *)(cs_to_uni + (ulong)*param_3 * 2);
uVar1 = 1;
}
return uVar1;
}
| |
34,585 | tree_search | eloqsql/mysys/tree.c | void *tree_search(TREE *tree, void *key, void *custom_arg)
{
int cmp;
TREE_ELEMENT *element=tree->root;
for (;;)
{
if (element == &null_element)
return (void*) 0;
if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
return ELEMENT_KEY(tree,element);
if (cmp < 0)
element=element->right;
else
element=element->left;
}
} | O3 | c | tree_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
leaq 0x2d0aca(%rip), %r13 # 0x32ff00
cmpq %r13, %rbx
je 0x5f476
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl 0x208(%r15), %esi
testq %rsi, %rsi
je 0x5f455
addq %rbx, %rsi
jmp 0x5f459
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq *0x228(%r15)
testl %eax, %eax
je 0x5f47a
shrl $0x1f, %eax
movq (%rbx,%rax,8), %rbx
cmpq %r13, %rbx
jne 0x5f444
xorl %ebx, %ebx
jmp 0x5f48f
movl 0x208(%r15), %eax
testq %rax, %rax
je 0x5f48b
addq %rax, %rbx
jmp 0x5f48f
movq 0x18(%rbx), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| tree_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, [rdi]
lea r13, null_element
cmp rbx, r13
jz short loc_5F476
mov r14, rdx
mov r12, rsi
mov r15, rdi
loc_5F444:
mov esi, [r15+208h]
test rsi, rsi
jz short loc_5F455
add rsi, rbx
jmp short loc_5F459
loc_5F455:
mov rsi, [rbx+18h]
loc_5F459:
mov rdi, r14
mov rdx, r12
call qword ptr [r15+228h]
test eax, eax
jz short loc_5F47A
shr eax, 1Fh
mov rbx, [rbx+rax*8]
cmp rbx, r13
jnz short loc_5F444
loc_5F476:
xor ebx, ebx
jmp short loc_5F48F
loc_5F47A:
mov eax, [r15+208h]
test rax, rax
jz short loc_5F48B
add rbx, rax
jmp short loc_5F48F
loc_5F48B:
mov rbx, [rbx+18h]
loc_5F48F:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char * tree_search(long long a1, long long a2, long long a3)
{
_QWORD *v3; // rbx
char *v6; // rsi
unsigned int v7; // eax
v3 = *(_QWORD **)a1;
if ( *(_UNKNOWN **)a1 == &null_element )
return 0LL;
while ( 1 )
{
v6 = *(_DWORD *)(a1 + 520) ? (char *)v3 + *(unsigned int *)(a1 + 520) : (char *)v3[3];
v7 = (*(long long ( **)(long long, char *, long long))(a1 + 552))(a3, v6, a2);
if ( !v7 )
break;
v3 = (_QWORD *)v3[v7 >> 31];
if ( v3 == (_QWORD *)&null_element )
return 0LL;
}
if ( *(_DWORD *)(a1 + 520) )
return (char *)v3 + *(unsigned int *)(a1 + 520);
else
return (char *)v3[3];
}
| tree_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RDI]
LEA R13,[0x42ff00]
CMP RBX,R13
JZ 0x0015f476
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
LAB_0015f444:
MOV ESI,dword ptr [R15 + 0x208]
TEST RSI,RSI
JZ 0x0015f455
ADD RSI,RBX
JMP 0x0015f459
LAB_0015f455:
MOV RSI,qword ptr [RBX + 0x18]
LAB_0015f459:
MOV RDI,R14
MOV RDX,R12
CALL qword ptr [R15 + 0x228]
TEST EAX,EAX
JZ 0x0015f47a
SHR EAX,0x1f
MOV RBX,qword ptr [RBX + RAX*0x8]
CMP RBX,R13
JNZ 0x0015f444
LAB_0015f476:
XOR EBX,EBX
JMP 0x0015f48f
LAB_0015f47a:
MOV EAX,dword ptr [R15 + 0x208]
TEST RAX,RAX
JZ 0x0015f48b
ADD RBX,RAX
JMP 0x0015f48f
LAB_0015f48b:
MOV RBX,qword ptr [RBX + 0x18]
LAB_0015f48f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 * tree_search(long *param_1,int8 param_2,int8 param_3)
{
uint uVar1;
int1 *puVar2;
int1 *puVar3;
puVar2 = (int1 *)*param_1;
if (puVar2 != null_element) {
do {
if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
puVar3 = *(int1 **)(puVar2 + 0x18);
}
else {
puVar3 = puVar2 + *(uint *)(param_1 + 0x41);
}
uVar1 = (*(code *)param_1[0x45])(param_3,puVar3,param_2);
if (uVar1 == 0) {
if ((ulong)*(uint *)(param_1 + 0x41) != 0) {
return puVar2 + *(uint *)(param_1 + 0x41);
}
return *(int1 **)(puVar2 + 0x18);
}
puVar2 = *(int1 **)(puVar2 + (ulong)(uVar1 >> 0x1f) * 8);
} while (puVar2 != null_element);
}
return (int1 *)0x0;
}
| |
34,586 | LefDefParser::defwBlockageRect(int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwBlockageRect(int xl,
int yl,
int xh,
int yh)
{
defwFunc = DEFW_BLOCKAGE_RECT; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
// May be user already define layer
if (defwState != DEFW_BLOCKAGE_PLACE && defwState != DEFW_BLOCKAGE_LAYER &&
defwState != DEFW_BLOCKAGE_RECT && defwState != DEFW_BLOCKAGE_MASK)
return DEFW_BAD_DATA;
if (defwState == DEFW_BLOCKAGE_RECT)
fprintf(defwFile, "\n"); // set a newline for the previous rectangle
fprintf(defwFile, " RECT ( %d %d ) ( %d %d )", xl, yl, xh, yh);
defwLines++;
defwState = DEFW_BLOCKAGE_RECT;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwBlockageRect(int, int, int, int):
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
leaq 0xb1ed(%rip), %rax # 0x2b168
movl $0x2e, (%rax)
leaq 0xb1d0(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x1ff9b
movl $0x1, 0x14(%rsp)
jmp 0x2004d
leaq 0xb1c2(%rip), %rax # 0x2b164
cmpl $0x2d, (%rax)
je 0x1ffd5
leaq 0xb1b6(%rip), %rax # 0x2b164
cmpl $0x2c, (%rax)
je 0x1ffd5
leaq 0xb1aa(%rip), %rax # 0x2b164
cmpl $0x2e, (%rax)
je 0x1ffd5
leaq 0xb19e(%rip), %rax # 0x2b164
cmpl $0x65, (%rax)
je 0x1ffd5
movl $0x3, 0x14(%rsp)
jmp 0x2004d
leaq 0xb188(%rip), %rax # 0x2b164
cmpl $0x2e, (%rax)
jne 0x1fff9
leaq 0xb170(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0x4105(%rip), %rsi # 0x240f7
movb $0x0, %al
callq 0x10f0
leaq 0xb158(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl 0x8(%rsp), %r8d
movl 0x4(%rsp), %r9d
leaq 0x514b(%rip), %rsi # 0x25167
movb $0x0, %al
callq 0x10f0
leaq 0xb136(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xb12a(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0xb125(%rip), %rax # 0x2b164
movl $0x2e, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser16defwBlockageRectEiiii:
sub rsp, 18h
mov [rsp+18h+var_8], edi
mov [rsp+18h+var_C], esi
mov [rsp+18h+var_10], edx
mov [rsp+18h+var_14], ecx
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 2Eh ; '.'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_1FF9B
mov [rsp+18h+var_4], 1
jmp loc_2004D
loc_1FF9B:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Dh ; '-'
jz short loc_1FFD5
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Ch ; ','
jz short loc_1FFD5
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Eh ; '.'
jz short loc_1FFD5
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 65h ; 'e'
jz short loc_1FFD5
mov [rsp+18h+var_4], 3
jmp short loc_2004D
loc_1FFD5:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Eh ; '.'
jnz short loc_1FFF9
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, asc_240F5+2; "\n"
mov al, 0
call _fprintf
loc_1FFF9:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+18h+var_8]
mov ecx, [rsp+18h+var_C]
mov r8d, [rsp+18h+var_10]
mov r9d, [rsp+18h+var_14]
lea rsi, aRectDDDD_0; " RECT ( %d %d ) ( %d %d )"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 2Eh ; '.'
mov [rsp+18h+var_4], 0
loc_2004D:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::defwBlockageRect(LefDefParser *this, int a2, int a3, int a4)
{
LefDefParser::defwFunc = 46;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 45
|| LefDefParser::defwState == 44
|| LefDefParser::defwState == 46
|| LefDefParser::defwState == 101 )
{
if ( LefDefParser::defwState == 46 )
fprintf(LefDefParser::defwFile, "\n");
fprintf(LefDefParser::defwFile, " RECT ( %d %d ) ( %d %d )", (_DWORD)this, a2, a3, a4);
++LefDefParser::defwLines;
LefDefParser::defwState = 46;
return 0;
}
else
{
return 3;
}
}
else
{
return 1;
}
}
| defwBlockageRect:
SUB RSP,0x18
MOV dword ptr [RSP + 0x10],EDI
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x8],EDX
MOV dword ptr [RSP + 0x4],ECX
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x2e
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x0011ff9b
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0012004d
LAB_0011ff9b:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2d
JZ 0x0011ffd5
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2c
JZ 0x0011ffd5
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2e
JZ 0x0011ffd5
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x65
JZ 0x0011ffd5
MOV dword ptr [RSP + 0x14],0x3
JMP 0x0012004d
LAB_0011ffd5:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2e
JNZ 0x0011fff9
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1240f7]
MOV AL,0x0
CALL 0x001010f0
LAB_0011fff9:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
MOV R8D,dword ptr [RSP + 0x8]
MOV R9D,dword ptr [RSP + 0x4]
LEA RSI,[0x125167]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x2e
MOV dword ptr [RSP + 0x14],0x0
LAB_0012004d:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::defwBlockageRect(int, int, int, int) */
int4 LefDefParser::defwBlockageRect(int param_1,int param_2,int param_3,int param_4)
{
int4 local_4;
defwFunc = 0x2e;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if ((((defwState == 0x2d) || (defwState == 0x2c)) || (defwState == 0x2e)) ||
(defwState == 0x65)) {
if (defwState == 0x2e) {
fprintf(defwFile,"\n");
}
fprintf(defwFile," RECT ( %d %d ) ( %d %d )",(ulong)(uint)param_1,(ulong)(uint)param_2,
(ulong)(uint)param_3,(ulong)(uint)param_4);
defwLines = defwLines + 1;
defwState = 0x2e;
local_4 = 0;
}
else {
local_4 = 3;
}
return local_4;
}
| |
34,587 | JS_TryGetPropertyInt64 | bluesky950520[P]quickjs/quickjs.c | static int JS_TryGetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx, JSValue *pval)
{
JSValue val;
JSAtom prop;
int present;
if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT &&
(uint64_t)idx <= INT32_MAX)) {
/* fast path for array and typed array access */
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (js_get_fast_array_element(ctx, p, idx, pval))
return TRUE;
}
val = JS_EXCEPTION;
present = -1;
prop = JS_NewAtomInt64(ctx, idx);
if (likely(prop != JS_ATOM_NULL)) {
present = JS_HasProperty(ctx, obj, prop);
if (present > 0) {
val = JS_GetProperty(ctx, obj, prop);
if (unlikely(JS_IsException(val)))
present = -1;
} else if (present == FALSE) {
val = JS_UNDEFINED;
}
JS_FreeAtom(ctx, prop);
}
*pval = val;
return present;
} | O1 | c | JS_TryGetPropertyInt64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq %rsi, 0x10(%rsp)
cmpl $-0x1, %r12d
jne 0x4d722
cmpq $0x7fffffff, %r15 # imm = 0x7FFFFFFF
ja 0x4d722
movq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %r15d, %edx
movq %rbx, %rcx
callq 0xf861
movl $0x1, %ebp
testl %eax, %eax
jne 0x4d7c2
movq %r14, %rdi
movq %r15, %rsi
callq 0x2428a
testl %eax, %eax
je 0x4d7d3
movl %eax, %r15d
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0xf753
movl %eax, %ebp
testl %eax, %eax
jle 0x4d788
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %r15d, %ecx
movq %r13, %r8
movq %r12, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r12
movq %rax, %r13
shrq $0x20, %r13
cmpl $0x6, %edx
movq %rdx, 0x8(%rsp)
jne 0x4d7a1
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
jmp 0x4d7a1
setne %al
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
addq $0x3, %rax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movl %r15d, %esi
callq 0x207d8
shlq $0x20, %r13
movl %r12d, %eax
orq %r13, %rax
movq 0x8(%rsp), %rcx
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x6, %ecx
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x4d7bb
| JS_TryGetPropertyInt64:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov r14, rdi
mov [rsp+48h+var_38], rsi
cmp r12d, 0FFFFFFFFh
jnz short loc_4D722
cmp r15, 7FFFFFFFh
ja short loc_4D722
mov rsi, [rsp+48h+var_38]
mov rdi, r14
mov edx, r15d
mov rcx, rbx
call js_get_fast_array_element
mov ebp, 1
test eax, eax
jnz loc_4D7C2
loc_4D722:
mov rdi, r14
mov rsi, r15
call JS_NewAtomInt64
test eax, eax
jz loc_4D7D3
mov r15d, eax
mov rdi, r14
mov rsi, r13
mov rdx, r12
mov ecx, eax
call JS_HasProperty
mov ebp, eax
test eax, eax
jle short loc_4D788
mov rdi, r14
mov rsi, r13
mov rdx, r12
mov ecx, r15d
mov r8, r13
mov r9, r12
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rax
mov r13, rax
shr r13, 20h
cmp edx, 6
mov [rsp+48h+var_40], rdx
jnz short loc_4D7A1
mov ebp, 0FFFFFFFFh
jmp short loc_4D7A1
loc_4D788:
setnz al
movzx eax, al
lea rax, [rax+rax*2]
add rax, 3
mov [rsp+48h+var_40], rax
xor r12d, r12d
xor r13d, r13d
loc_4D7A1:
mov rdi, r14
mov esi, r15d
call JS_FreeAtom
shl r13, 20h
mov eax, r12d
or rax, r13
mov rcx, [rsp+48h+var_40]
loc_4D7BB:
mov [rbx], rax
mov [rbx+8], rcx
loc_4D7C2:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4D7D3:
mov ecx, 6
mov ebp, 0FFFFFFFFh
xor eax, eax
jmp short loc_4D7BB
| long long JS_TryGetPropertyInt64(long long a1, long long a2, long long a3, unsigned long long a4, long long a5)
{
int HasProperty; // ebp
unsigned int v9; // eax
unsigned int v10; // r15d
unsigned long long PropertyInternal2; // rax
unsigned int v12; // r12d
unsigned long long v13; // r13
long long v14; // rdx
unsigned long long v15; // rax
long long v16; // rcx
long long v18; // [rsp+8h] [rbp-40h]
if ( (_DWORD)a3 != -1
|| a4 > 0x7FFFFFFF
|| (HasProperty = 1, !(unsigned int)js_get_fast_array_element(a1, a2, a4, (double *)a5)) )
{
v9 = JS_NewAtomInt64(a1, a4);
if ( v9 )
{
v10 = v9;
HasProperty = JS_HasProperty(a1, a2, a3, v9);
if ( HasProperty <= 0 )
{
v18 = 3LL * (HasProperty != 0) + 3;
v12 = 0;
v13 = 0LL;
}
else
{
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, v10, a2, a3, 0LL, 0);
v12 = PropertyInternal2;
v13 = HIDWORD(PropertyInternal2);
v18 = v14;
if ( (_DWORD)v14 == 6 )
HasProperty = -1;
}
JS_FreeAtom(a1, v10);
v15 = (v13 << 32) | v12;
v16 = v18;
}
else
{
v16 = 6LL;
HasProperty = -1;
v15 = 0LL;
}
*(_QWORD *)a5 = v15;
*(_QWORD *)(a5 + 8) = v16;
}
return (unsigned int)HasProperty;
}
| JS_TryGetPropertyInt64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x10],RSI
CMP R12D,-0x1
JNZ 0x0014d722
CMP R15,0x7fffffff
JA 0x0014d722
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,R14
MOV EDX,R15D
MOV RCX,RBX
CALL 0x0010f861
MOV EBP,0x1
TEST EAX,EAX
JNZ 0x0014d7c2
LAB_0014d722:
MOV RDI,R14
MOV RSI,R15
CALL 0x0012428a
TEST EAX,EAX
JZ 0x0014d7d3
MOV R15D,EAX
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
MOV ECX,EAX
CALL 0x0010f753
MOV EBP,EAX
TEST EAX,EAX
JLE 0x0014d788
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
MOV ECX,R15D
MOV R8,R13
MOV R9,R12
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
MOV R12,RAX
MOV R13,RAX
SHR R13,0x20
CMP EDX,0x6
MOV qword ptr [RSP + 0x8],RDX
JNZ 0x0014d7a1
MOV EBP,0xffffffff
JMP 0x0014d7a1
LAB_0014d788:
SETNZ AL
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
ADD RAX,0x3
MOV qword ptr [RSP + 0x8],RAX
XOR R12D,R12D
XOR R13D,R13D
LAB_0014d7a1:
MOV RDI,R14
MOV ESI,R15D
CALL 0x001207d8
SHL R13,0x20
MOV EAX,R12D
OR RAX,R13
MOV RCX,qword ptr [RSP + 0x8]
LAB_0014d7bb:
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],RCX
LAB_0014d7c2:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014d7d3:
MOV ECX,0x6
MOV EBP,0xffffffff
XOR EAX,EAX
JMP 0x0014d7bb
|
int JS_TryGetPropertyInt64
(int8 param_1,int8 param_2,int8 param_3,ulong param_4,ulong *param_5
)
{
int iVar1;
int iVar2;
ulong uVar3;
int1 auVar4 [16];
ulong local_40;
if ((((int)param_3 == -1) && (param_4 < 0x80000000)) &&
(iVar1 = js_get_fast_array_element(param_1,param_2,param_4 & 0xffffffff,param_5), iVar1 != 0))
{
return 1;
}
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 == 0) {
local_40 = 6;
iVar2 = -1;
uVar3 = 0;
}
else {
iVar2 = JS_HasProperty(param_1,param_2,param_3,iVar1);
if (iVar2 < 1) {
auVar4._8_8_ = 0;
auVar4._0_8_ = (ulong)(iVar2 != 0) * 3 + 3;
auVar4 = auVar4 << 0x40;
uVar3 = 0;
}
else {
auVar4 = JS_GetPropertyInternal2(param_1,param_2,param_3,iVar1,param_2,param_3,0,0);
uVar3 = auVar4._0_8_ >> 0x20;
if (auVar4._8_4_ == 6) {
iVar2 = -1;
}
}
local_40 = auVar4._8_8_;
JS_FreeAtom(param_1,iVar1);
uVar3 = auVar4._0_8_ & 0xffffffff | uVar3 << 0x20;
}
*param_5 = uVar3;
param_5[1] = local_40;
return iVar2;
}
| |
34,588 | JS_TryGetPropertyInt64 | bluesky950520[P]quickjs/quickjs.c | static int JS_TryGetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx, JSValue *pval)
{
JSValue val;
JSAtom prop;
int present;
if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT &&
(uint64_t)idx <= INT32_MAX)) {
/* fast path for array and typed array access */
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (js_get_fast_array_element(ctx, p, idx, pval))
return TRUE;
}
val = JS_EXCEPTION;
present = -1;
prop = JS_NewAtomInt64(ctx, idx);
if (likely(prop != JS_ATOM_NULL)) {
present = JS_HasProperty(ctx, obj, prop);
if (present > 0) {
val = JS_GetProperty(ctx, obj, prop);
if (unlikely(JS_IsException(val)))
present = -1;
} else if (present == FALSE) {
val = JS_UNDEFINED;
}
JS_FreeAtom(ctx, prop);
}
*pval = val;
return present;
} | O2 | c | JS_TryGetPropertyInt64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
cmpl $-0x1, %r12d
jne 0x426ce
cmpq $0x7fffffff, %r15 # imm = 0x7FFFFFFF
ja 0x426ce
movq %r14, %rdi
movq %r13, %rsi
movl %r15d, %edx
movq %rbx, %rcx
callq 0x1e226
testl %eax, %eax
je 0x426ce
pushq $0x1
popq %rbp
jmp 0x4275b
movq %r14, %rdi
movq %r15, %rsi
callq 0x1e3a6
testl %eax, %eax
je 0x4276c
movl %eax, %r15d
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0x1dfb8
movl %eax, %ebp
testl %eax, %eax
jle 0x42723
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %r15d, %ecx
callq 0x1b043
movq %rax, %r12
movq %rax, %r13
shrq $0x20, %r13
cmpl $0x6, %edx
movq %rdx, (%rsp)
jne 0x4273b
pushq $-0x1
popq %rbp
jmp 0x4273b
setne %al
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
addq $0x3, %rax
movq %rax, (%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movl %r15d, %esi
callq 0x1a995
shlq $0x20, %r13
movl %r12d, %eax
orq %r13, %rax
movq (%rsp), %rcx
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x6
popq %rcx
pushq $-0x1
popq %rbp
xorl %eax, %eax
jmp 0x42754
| JS_TryGetPropertyInt64:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov r14, rdi
cmp r12d, 0FFFFFFFFh
jnz short loc_426CE
cmp r15, 7FFFFFFFh
ja short loc_426CE
mov rdi, r14
mov rsi, r13
mov edx, r15d
mov rcx, rbx
call js_get_fast_array_element
test eax, eax
jz short loc_426CE
push 1
pop rbp
jmp loc_4275B
loc_426CE:
mov rdi, r14
mov rsi, r15
call JS_NewAtomInt64
test eax, eax
jz loc_4276C
mov r15d, eax
mov rdi, r14
mov rsi, r13
mov rdx, r12
mov ecx, eax
call JS_HasProperty
mov ebp, eax
test eax, eax
jle short loc_42723
mov rdi, r14
mov rsi, r13
mov rdx, r12
mov ecx, r15d
call JS_GetProperty
mov r12, rax
mov r13, rax
shr r13, 20h
cmp edx, 6
mov [rsp+38h+var_38], rdx
jnz short loc_4273B
push 0FFFFFFFFFFFFFFFFh
pop rbp
jmp short loc_4273B
loc_42723:
setnz al
movzx eax, al
lea rax, [rax+rax*2]
add rax, 3
mov [rsp+38h+var_38], rax
xor r12d, r12d
xor r13d, r13d
loc_4273B:
mov rdi, r14
mov esi, r15d
call JS_FreeAtom
shl r13, 20h
mov eax, r12d
or rax, r13
mov rcx, [rsp+38h+var_38]
loc_42754:
mov [rbx], rax
mov [rbx+8], rcx
loc_4275B:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4276C:
push 6
pop rcx
push 0FFFFFFFFFFFFFFFFh
pop rbp
xor eax, eax
jmp short loc_42754
| long long JS_TryGetPropertyInt64(long long a1, long long a2, int a3, unsigned long long a4, long long a5)
{
int HasProperty; // ebp
unsigned int v9; // eax
unsigned int *v10; // r8
int v11; // r15d
unsigned long long Property; // rax
unsigned int v13; // r12d
unsigned long long v14; // r13
long long v15; // rdx
unsigned long long v16; // rax
long long v17; // rcx
long long v19; // [rsp+0h] [rbp-38h]
if ( a3 == -1 && a4 <= 0x7FFFFFFF && (unsigned int)js_get_fast_array_element(a1, a2, a4, (double *)a5) )
{
return 1;
}
else
{
v9 = JS_NewAtomInt64(a1, a4);
if ( v9 )
{
v11 = v9;
HasProperty = JS_HasProperty(a1, a2, a3, v9, v10);
if ( HasProperty <= 0 )
{
v19 = 3LL * (HasProperty != 0) + 3;
v13 = 0;
v14 = 0LL;
}
else
{
Property = JS_GetProperty(a1, a2, a3, v11);
v13 = Property;
v14 = HIDWORD(Property);
v19 = v15;
if ( (_DWORD)v15 == 6 )
HasProperty = -1;
}
JS_FreeAtom(a1, v11);
v16 = (v14 << 32) | v13;
v17 = v19;
}
else
{
v17 = 6LL;
HasProperty = -1;
v16 = 0LL;
}
*(_QWORD *)a5 = v16;
*(_QWORD *)(a5 + 8) = v17;
}
return (unsigned int)HasProperty;
}
| JS_TryGetPropertyInt64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV R14,RDI
CMP R12D,-0x1
JNZ 0x001426ce
CMP R15,0x7fffffff
JA 0x001426ce
MOV RDI,R14
MOV RSI,R13
MOV EDX,R15D
MOV RCX,RBX
CALL 0x0011e226
TEST EAX,EAX
JZ 0x001426ce
PUSH 0x1
POP RBP
JMP 0x0014275b
LAB_001426ce:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011e3a6
TEST EAX,EAX
JZ 0x0014276c
MOV R15D,EAX
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
MOV ECX,EAX
CALL 0x0011dfb8
MOV EBP,EAX
TEST EAX,EAX
JLE 0x00142723
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
MOV ECX,R15D
CALL 0x0011b043
MOV R12,RAX
MOV R13,RAX
SHR R13,0x20
CMP EDX,0x6
MOV qword ptr [RSP],RDX
JNZ 0x0014273b
PUSH -0x1
POP RBP
JMP 0x0014273b
LAB_00142723:
SETNZ AL
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
ADD RAX,0x3
MOV qword ptr [RSP],RAX
XOR R12D,R12D
XOR R13D,R13D
LAB_0014273b:
MOV RDI,R14
MOV ESI,R15D
CALL 0x0011a995
SHL R13,0x20
MOV EAX,R12D
OR RAX,R13
MOV RCX,qword ptr [RSP]
LAB_00142754:
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],RCX
LAB_0014275b:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014276c:
PUSH 0x6
POP RCX
PUSH -0x1
POP RBP
XOR EAX,EAX
JMP 0x00142754
|
int JS_TryGetPropertyInt64
(int8 param_1,int8 param_2,int8 param_3,ulong param_4,ulong *param_5
)
{
int iVar1;
int iVar2;
ulong uVar3;
int1 auVar4 [16];
ulong local_38;
if ((((int)param_3 == -1) && (param_4 < 0x80000000)) &&
(iVar1 = js_get_fast_array_element(param_1,param_2,param_4 & 0xffffffff,param_5), iVar1 != 0))
{
return 1;
}
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 == 0) {
local_38 = 6;
iVar2 = -1;
uVar3 = 0;
}
else {
iVar2 = JS_HasProperty(param_1,param_2,param_3,iVar1);
if (iVar2 < 1) {
auVar4._8_8_ = 0;
auVar4._0_8_ = (ulong)(iVar2 != 0) * 3 + 3;
auVar4 = auVar4 << 0x40;
uVar3 = 0;
}
else {
auVar4 = JS_GetProperty(param_1,param_2,param_3,iVar1);
uVar3 = auVar4._0_8_ >> 0x20;
if (auVar4._8_4_ == 6) {
iVar2 = -1;
}
}
local_38 = auVar4._8_8_;
JS_FreeAtom(param_1,iVar1);
uVar3 = auVar4._0_8_ & 0xffffffff | uVar3 << 0x20;
}
*param_5 = uVar3;
param_5[1] = local_38;
return iVar2;
}
| |
34,589 | my_thread_destroy_common_mutex | eloqsql/mysys/my_thr_init.c | void my_thread_destroy_common_mutex(void)
{
mysql_mutex_destroy(&THR_LOCK_open);
mysql_mutex_destroy(&THR_LOCK_lock);
mysql_mutex_destroy(&THR_LOCK_myisam);
mysql_mutex_destroy(&THR_LOCK_myisam_mmap);
mysql_mutex_destroy(&THR_LOCK_heap);
mysql_mutex_destroy(&THR_LOCK_net);
mysql_mutex_destroy(&THR_LOCK_charset);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_destroy(&LOCK_localtime_r);
#endif
} | O3 | c | my_thread_destroy_common_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x38c017(%rip), %rbx # 0x3d2830
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x46837
leaq 0x2d26ff(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38bff2(%rip), %rdi # 0x3d2830
callq 0x263d0
leaq 0x38c02e(%rip), %rbx # 0x3d2878
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x46868
leaq 0x2d26ce(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c009(%rip), %rdi # 0x3d2878
callq 0x263d0
leaq 0x38c045(%rip), %rbx # 0x3d28c0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x46899
leaq 0x2d269d(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c020(%rip), %rdi # 0x3d28c0
callq 0x263d0
leaq 0x38c05c(%rip), %rbx # 0x3d2908
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x468ca
leaq 0x2d266c(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c037(%rip), %rdi # 0x3d2908
callq 0x263d0
leaq 0x38c073(%rip), %rbx # 0x3d2950
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x468fb
leaq 0x2d263b(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c04e(%rip), %rdi # 0x3d2950
callq 0x263d0
leaq 0x38c08a(%rip), %rbx # 0x3d2998
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4692c
leaq 0x2d260a(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c065(%rip), %rdi # 0x3d2998
callq 0x263d0
leaq 0x38c0a1(%rip), %rbx # 0x3d29e0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4695d
leaq 0x2d25d9(%rip), %rax # 0x318f28
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x38c07c(%rip), %rdi # 0x3d29e0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x263d0
| my_thread_destroy_common_mutex:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, THR_LOCK_open
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_46837
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_46837:
lea rdi, THR_LOCK_open
call _pthread_mutex_destroy
lea rbx, THR_LOCK_lock
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_46868
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_46868:
lea rdi, THR_LOCK_lock
call _pthread_mutex_destroy
lea rbx, THR_LOCK_myisam
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_46899
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_46899:
lea rdi, THR_LOCK_myisam
call _pthread_mutex_destroy
lea rbx, THR_LOCK_myisam_mmap
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_468CA
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_468CA:
lea rdi, THR_LOCK_myisam_mmap
call _pthread_mutex_destroy
lea rbx, THR_LOCK_heap
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_468FB
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_468FB:
lea rdi, THR_LOCK_heap
call _pthread_mutex_destroy
lea rbx, THR_LOCK_net
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_4692C
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_4692C:
lea rdi, THR_LOCK_net
call _pthread_mutex_destroy
lea rbx, THR_LOCK_charset
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_4695D
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_4695D:
lea rdi, THR_LOCK_charset
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutex_destroy
| long long my_thread_destroy_common_mutex()
{
long long v0; // rdi
long long v1; // rdi
long long v2; // rdi
long long v3; // rdi
long long v4; // rdi
long long v5; // rdi
long long v6; // rdi
v0 = THR_LOCK_open[8];
if ( v0 )
{
((void ( *)(long long))PSI_server[9])(v0);
THR_LOCK_open[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_open);
v1 = THR_LOCK_lock[8];
if ( v1 )
{
((void ( *)(long long))PSI_server[9])(v1);
THR_LOCK_lock[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_lock);
v2 = THR_LOCK_myisam[8];
if ( v2 )
{
((void ( *)(long long))PSI_server[9])(v2);
THR_LOCK_myisam[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_myisam);
v3 = THR_LOCK_myisam_mmap[8];
if ( v3 )
{
((void ( *)(long long))PSI_server[9])(v3);
THR_LOCK_myisam_mmap[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_myisam_mmap);
v4 = THR_LOCK_heap[8];
if ( v4 )
{
((void ( *)(long long))PSI_server[9])(v4);
THR_LOCK_heap[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_heap);
v5 = THR_LOCK_net[8];
if ( v5 )
{
((void ( *)(long long))PSI_server[9])(v5);
THR_LOCK_net[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_net);
v6 = THR_LOCK_charset[8];
if ( v6 )
{
((void ( *)(long long))PSI_server[9])(v6);
THR_LOCK_charset[8] = 0LL;
}
return pthread_mutex_destroy(THR_LOCK_charset);
}
| my_thread_destroy_common_mutex:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x4d2830]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00146837
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00146837:
LEA RDI,[0x4d2830]
CALL 0x001263d0
LEA RBX,[0x4d2878]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00146868
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00146868:
LEA RDI,[0x4d2878]
CALL 0x001263d0
LEA RBX,[0x4d28c0]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00146899
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00146899:
LEA RDI,[0x4d28c0]
CALL 0x001263d0
LEA RBX,[0x4d2908]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x001468ca
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_001468ca:
LEA RDI,[0x4d2908]
CALL 0x001263d0
LEA RBX,[0x4d2950]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x001468fb
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_001468fb:
LEA RDI,[0x4d2950]
CALL 0x001263d0
LEA RBX,[0x4d2998]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0014692c
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_0014692c:
LEA RDI,[0x4d2998]
CALL 0x001263d0
LEA RBX,[0x4d29e0]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0014695d
LEA RAX,[0x418f28]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_0014695d:
LEA RDI,[0x4d29e0]
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001263d0
|
void my_thread_destroy_common_mutex(void)
{
if (THR_LOCK_open._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_open._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_open);
if (THR_LOCK_lock._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_lock._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_lock);
if (THR_LOCK_myisam._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_myisam._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam);
if (THR_LOCK_myisam_mmap._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_myisam_mmap._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam_mmap);
if (THR_LOCK_heap._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_heap._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_heap);
if (THR_LOCK_net._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_net._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_net);
if (THR_LOCK_charset._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_charset._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_charset);
return;
}
| |
34,590 | PFS_table::safe_aggregate_lock(PFS_table_stat*, PFS_table_share*) | eloqsql/storage/perfschema/pfs_instr.cc | void PFS_table::safe_aggregate_lock(PFS_table_stat *table_stat,
PFS_table_share *table_share)
{
assert(table_stat != NULL);
assert(table_share != NULL);
PFS_table_lock_stat *from_stat= & table_stat->m_lock_stat;
PFS_table_share_lock *to_stat;
to_stat= table_share->find_or_create_lock_stat();
if (to_stat != NULL)
{
/* Aggregate to TABLE_LOCK_SUMMARY */
to_stat->m_stat.aggregate(from_stat);
}
table_stat->fast_reset_lock();
} | O3 | cpp | PFS_table::safe_aggregate_lock(PFS_table_stat*, PFS_table_share*):
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3b0b0
testq %rax, %rax
je 0x36e5d
movq $-0x20, %rcx
movq 0x22a8(%rbx,%rcx), %rdx
testq %rdx, %rdx
je 0x36e40
addq %rdx, 0x28(%rax,%rcx)
movq 0x22b0(%rbx,%rcx), %rdx
addq %rdx, 0x30(%rax,%rcx)
movq 0x22b8(%rbx,%rcx), %rdx
cmpq %rdx, 0x38(%rax,%rcx)
ja 0x36e4f
movq 0x22c0(%rbx,%rcx), %rdx
cmpq %rdx, 0x40(%rax,%rcx)
jb 0x36e56
addq $0x20, %rcx
cmpq $0x140, %rcx # imm = 0x140
jb 0x36e03
jmp 0x36e5d
movq %rdx, 0x38(%rax,%rcx)
jmp 0x36e31
movq %rdx, 0x40(%rax,%rcx)
jmp 0x36e40
movl $0x2288, %esi # imm = 0x2288
addq %rsi, %rbx
addq 0x2e5144(%rip), %rsi # 0x31bfb0
movl $0x160, %edx # imm = 0x160
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x26290
nop
| _ZN9PFS_table19safe_aggregate_lockEP14PFS_table_statP15PFS_table_share:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, rsi; this
call _ZN15PFS_table_share24find_or_create_lock_statEv; PFS_table_share::find_or_create_lock_stat(void)
test rax, rax
jz short loc_36E5D
mov rcx, 0FFFFFFFFFFFFFFE0h
loc_36E03:
mov rdx, [rbx+rcx+22A8h]
test rdx, rdx
jz short loc_36E40
add [rax+rcx+28h], rdx
mov rdx, [rbx+rcx+22B0h]
add [rax+rcx+30h], rdx
mov rdx, [rbx+rcx+22B8h]
cmp [rax+rcx+38h], rdx
ja short loc_36E4F
loc_36E31:
mov rdx, [rbx+rcx+22C0h]
cmp [rax+rcx+40h], rdx
jb short loc_36E56
loc_36E40:
add rcx, 20h ; ' '
cmp rcx, 140h
jb short loc_36E03
jmp short loc_36E5D
loc_36E4F:
mov [rax+rcx+38h], rdx
jmp short loc_36E31
loc_36E56:
mov [rax+rcx+40h], rdx
jmp short loc_36E40
loc_36E5D:
mov esi, 2288h
add rbx, rsi
add rsi, cs:_ZN14PFS_table_stat16g_reset_templateE_ptr
mov edx, 160h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp _memcpy
| long long PFS_table::safe_aggregate_lock(long long a1, PFS_table_share *a2)
{
long long lock_stat; // rax
unsigned long long v3; // rcx
long long v4; // rdx
unsigned long long v5; // rdx
unsigned long long v6; // rdx
lock_stat = PFS_table_share::find_or_create_lock_stat(a2);
if ( lock_stat )
{
v3 = -32LL;
do
{
v4 = *(_QWORD *)(a1 + v3 + 8872);
if ( v4 )
{
*(_QWORD *)(lock_stat + v3 + 40) += v4;
*(_QWORD *)(lock_stat + v3 + 48) += *(_QWORD *)(a1 + v3 + 8880);
v5 = *(_QWORD *)(a1 + v3 + 8888);
if ( *(_QWORD *)(lock_stat + v3 + 56) > v5 )
*(_QWORD *)(lock_stat + v3 + 56) = v5;
v6 = *(_QWORD *)(a1 + v3 + 8896);
if ( *(_QWORD *)(lock_stat + v3 + 64) < v6 )
*(_QWORD *)(lock_stat + v3 + 64) = v6;
}
v3 += 32LL;
}
while ( v3 < 0x140 );
}
return memcpy(a1 + 8840, &PFS_table_stat::g_reset_template[8840], 352LL);
}
| safe_aggregate_lock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,RSI
CALL 0x0013b0b0
TEST RAX,RAX
JZ 0x00136e5d
MOV RCX,-0x20
LAB_00136e03:
MOV RDX,qword ptr [RBX + RCX*0x1 + 0x22a8]
TEST RDX,RDX
JZ 0x00136e40
ADD qword ptr [RAX + RCX*0x1 + 0x28],RDX
MOV RDX,qword ptr [RBX + RCX*0x1 + 0x22b0]
ADD qword ptr [RAX + RCX*0x1 + 0x30],RDX
MOV RDX,qword ptr [RBX + RCX*0x1 + 0x22b8]
CMP qword ptr [RAX + RCX*0x1 + 0x38],RDX
JA 0x00136e4f
LAB_00136e31:
MOV RDX,qword ptr [RBX + RCX*0x1 + 0x22c0]
CMP qword ptr [RAX + RCX*0x1 + 0x40],RDX
JC 0x00136e56
LAB_00136e40:
ADD RCX,0x20
CMP RCX,0x140
JC 0x00136e03
JMP 0x00136e5d
LAB_00136e4f:
MOV qword ptr [RAX + RCX*0x1 + 0x38],RDX
JMP 0x00136e31
LAB_00136e56:
MOV qword ptr [RAX + RCX*0x1 + 0x40],RDX
JMP 0x00136e40
LAB_00136e5d:
MOV ESI,0x2288
ADD RBX,RSI
ADD RSI,qword ptr [0x0041bfb0]
MOV EDX,0x160
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00126290
|
/* PFS_table::safe_aggregate_lock(PFS_table_stat*, PFS_table_share*) */
void PFS_table::safe_aggregate_lock(PFS_table_stat *param_1,PFS_table_share *param_2)
{
long *plVar1;
long lVar2;
ulong uVar3;
lVar2 = PFS_table_share::find_or_create_lock_stat(param_2);
if (lVar2 != 0) {
uVar3 = 0xffffffffffffffe0;
do {
if (*(long *)(param_1 + uVar3 + 0x22a8) != 0) {
plVar1 = (long *)(lVar2 + 0x28 + uVar3);
*plVar1 = *plVar1 + *(long *)(param_1 + uVar3 + 0x22a8);
plVar1 = (long *)(lVar2 + 0x30 + uVar3);
*plVar1 = *plVar1 + *(long *)(param_1 + uVar3 + 0x22b0);
if (*(ulong *)(param_1 + uVar3 + 0x22b8) < *(ulong *)(lVar2 + 0x38 + uVar3)) {
*(ulong *)(lVar2 + 0x38 + uVar3) = *(ulong *)(param_1 + uVar3 + 0x22b8);
}
if (*(ulong *)(lVar2 + 0x40 + uVar3) < *(ulong *)(param_1 + uVar3 + 0x22c0)) {
*(ulong *)(lVar2 + 0x40 + uVar3) = *(ulong *)(param_1 + uVar3 + 0x22c0);
}
}
uVar3 = uVar3 + 0x20;
} while (uVar3 < 0x140);
}
memcpy(param_1 + 0x2288,PTR_g_reset_template_0041bfb0 + 0x2288,0x160);
return;
}
| |
34,591 | get_collation_number | eloqsql/mysys/charset.c | uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
} | O0 | c | get_collation_number:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
leaq 0x37e490(%rip), %rdi # 0x3b6424
leaq 0x85(%rip), %rsi # 0x38020
callq 0x24260
movq -0x60(%rbp), %rdi
callq 0x381b0
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0x37fb9
movl -0x6c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x37fee
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rcx
movl $0x40, %edx
callq 0x38250
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0x37fe7
movq -0x60(%rbp), %rdi
callq 0x381b0
movl %eax, -0x54(%rbp)
jmp 0x37fee
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x70(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3800f
movl -0x70(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
callq 0x242c0
nopw %cs:(%rax,%rax)
| get_collation_number:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_6C], eax
cmp eax, 0
jz short loc_37FB9
mov eax, [rbp+var_6C]
mov [rbp+var_54], eax
jmp short loc_37FEE
loc_37FB9:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_50]
mov rcx, [rbp+var_68]
mov edx, 40h ; '@'
call get_collation_name_alias
mov [rbp+var_60], rax
cmp rax, 0
jz short loc_37FE7
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_54], eax
jmp short loc_37FEE
loc_37FE7:
mov [rbp+var_54], 0
loc_37FEE:
mov eax, [rbp+var_54]
mov [rbp+var_70], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3800F
mov eax, [rbp+var_70]
add rsp, 70h
pop rbp
retn
loc_3800F:
call ___stack_chk_fail
| long long get_collation_number(long long a1, long long a2)
{
unsigned int collation_number_internal; // [rsp+4h] [rbp-6Ch]
long long collation_name_alias; // [rsp+10h] [rbp-60h]
_BYTE v6[72]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v7; // [rsp+68h] [rbp-8h]
v7 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number_internal = get_collation_number_internal(a1);
if ( collation_number_internal )
{
return collation_number_internal;
}
else
{
collation_name_alias = get_collation_name_alias(a1, v6, 64LL, a2);
if ( collation_name_alias )
return (unsigned int)get_collation_number_internal(collation_name_alias);
else
return 0;
}
}
| get_collation_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
LEA RDI,[0x4b6424]
LEA RSI,[0x138020]
CALL 0x00124260
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001381b0
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x00137fb9
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x00137fee
LAB_00137fb9:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x68]
MOV EDX,0x40
CALL 0x00138250
MOV qword ptr [RBP + -0x60],RAX
CMP RAX,0x0
JZ 0x00137fe7
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001381b0
MOV dword ptr [RBP + -0x54],EAX
JMP 0x00137fee
LAB_00137fe7:
MOV dword ptr [RBP + -0x54],0x0
LAB_00137fee:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x70],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013800f
MOV EAX,dword ptr [RBP + -0x70]
ADD RSP,0x70
POP RBP
RET
LAB_0013800f:
CALL 0x001242c0
|
int get_collation_number(int8 param_1,int8 param_2)
{
long lVar1;
long in_FS_OFFSET;
int local_5c;
int1 local_58 [72];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
local_5c = get_collation_number_internal(param_1);
if (local_5c == 0) {
lVar1 = get_collation_name_alias(param_1,local_58,0x40,param_2);
if (lVar1 == 0) {
local_5c = 0;
}
else {
local_5c = get_collation_number_internal(lVar1);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_5c;
}
| |
34,592 | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCache.cpp | void simulateCache(std::ofstream &csvFile, uint32_t cacheSize,
uint32_t blockSize, uint32_t associativity, bool writeBack,
bool writeAllocate) {
Cache::Policy policy;
policy.cacheSize = cacheSize;
policy.blockSize = blockSize;
policy.blockNum = cacheSize / blockSize;
policy.associativity = associativity;
policy.hitLatency = 1;
policy.missLatency = 8;
// Initialize memory and cache
MemoryManager *memory = nullptr;
Cache *cache = nullptr;
memory = new MemoryManager();
cache = new Cache(memory, policy, nullptr, writeBack, writeAllocate);
memory->setCache(cache);
cache->printInfo(false);
// Read and execute trace in cache-trace/ folder
std::ifstream trace(traceFilePath);
if (!trace.is_open()) {
printf("Unable to open file %s\n", traceFilePath);
exit(-1);
}
char type; //'r' for read, 'w' for write
uint32_t addr;
while (trace >> type >> std::hex >> addr) {
if (verbose)
printf("%c %x\n", type, addr);
switch (type) {
case 'r':
cache->getByte(addr);
break;
case 'w':
cache->setByte(addr, 0);
break;
default:
dbgprintf("Illegal type %c\n", type);
exit(-1);
}
if (verbose)
cache->printInfo(true);
if (isSingleStep) {
printf("Press Enter to Continue...");
getchar();
}
}
// Output Simulation Results
cache->printStatistics();
float missRate = (float)cache->statistics.numMiss /
(cache->statistics.numHit + cache->statistics.numMiss);
csvFile << cacheSize << "," << blockSize << "," << associativity << ","
<< writeBack << "," << writeAllocate << "," << missRate << ","
<< cache->statistics.totalCycles << std::endl;
delete cache;
delete memory;
} | O0 | cpp | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool):
subq $0x368, %rsp # imm = 0x368
movl %r8d, 0xd0(%rsp)
movl %ecx, %eax
movl 0xd0(%rsp), %ecx
movl %eax, 0xd4(%rsp)
movl %edx, %eax
movl 0xd4(%rsp), %edx
movl %eax, 0xd8(%rsp)
movl %esi, %eax
movl 0xd8(%rsp), %esi
movl %eax, 0xdc(%rsp)
movq %rdi, %r8
movl 0xdc(%rsp), %edi
movb %r9b, %al
movq %r8, 0x360(%rsp)
movl %edi, 0x35c(%rsp)
movl %esi, 0x358(%rsp)
movl %edx, 0x354(%rsp)
andb $0x1, %cl
movb %cl, 0x353(%rsp)
andb $0x1, %al
movb %al, 0x352(%rsp)
movl 0x35c(%rsp), %eax
movl %eax, 0x338(%rsp)
movl 0x358(%rsp), %eax
movl %eax, 0x33c(%rsp)
movl 0x35c(%rsp), %eax
movl 0x358(%rsp), %ecx
xorl %edx, %edx
divl %ecx
movl %eax, 0x340(%rsp)
movl 0x354(%rsp), %eax
movl %eax, 0x344(%rsp)
movl $0x1, 0x348(%rsp)
movl $0x8, 0x34c(%rsp)
movq $0x0, 0x330(%rsp)
movq $0x0, 0x328(%rsp)
movl $0x10, %edi
callq 0x6180
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0xe0(%rsp)
callq 0x7710
jmp 0x6acc
movq 0xe0(%rsp), %rax
movq %rax, 0x330(%rsp)
movl $0x60, %edi
callq 0x6180
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0xc8(%rsp)
movq 0x330(%rsp), %rsi
movq 0x348(%rsp), %rax
movq %rax, 0x310(%rsp)
movups 0x338(%rsp), %xmm0
movaps %xmm0, 0x300(%rsp)
movzbl 0x352(%rsp), %r8d
movzbl 0x353(%rsp), %ecx
movq 0x310(%rsp), %rdx
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movaps 0x300(%rsp), %xmm0
movups %xmm0, (%rax)
andl $0x1, %ecx
andl $0x1, %r8d
xorl %eax, %eax
movl %eax, %edx
callq 0x8250
jmp 0x6b59
movq 0xc8(%rsp), %rax
movq %rax, 0x328(%rsp)
movq 0x330(%rsp), %rdi
movq 0x328(%rsp), %rsi
callq 0x8230
movq 0x328(%rsp), %rdi
xorl %esi, %esi
callq 0x91b0
movq 0x9624(%rip), %rsi # 0x101b8
leaq 0xf8(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
movl $0x8, %edx
callq 0x62f0
movq 0xb8(%rsp), %rdi
callq 0x6280
movb %al, 0xc7(%rsp)
jmp 0x6bc4
movb 0xc7(%rsp), %al
testb $0x1, %al
jne 0x6c68
jmp 0x6bd5
movq 0x95dc(%rip), %rsi # 0x101b8
leaq 0x54ea(%rip), %rdi # 0xc0cd
xorl %eax, %eax
callq 0x6040
jmp 0x6bec
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x61b0
movq 0xe0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
callq 0x6150
jmp 0x6ff0
movq 0xc8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
callq 0x6150
jmp 0x6ff0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x320(%rsp)
movl %eax, 0x31c(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x6080
jmp 0x6ff0
jmp 0x6c6a
leaq 0xf8(%rsp), %rdi
leaq 0xf7(%rsp), %rsi
callq 0x61e0
movq %rax, 0xb0(%rsp)
jmp 0x6c89
movq 0xb0(%rsp), %rdi
leaq 0x3d8(%rip), %rsi # 0x7070
callq 0x62b0
movq %rax, 0xa8(%rsp)
jmp 0x6ca7
movq 0xa8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6050
movq %rax, 0xa0(%rsp)
jmp 0x6cc6
movq 0xa0(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x61c0
movb %al, 0x9f(%rsp)
jmp 0x6ce6
movb 0x9f(%rsp), %al
testb $0x1, %al
jne 0x6cf6
jmp 0x6de4
testb $0x1, 0x94b4(%rip) # 0x101b1
je 0x6d20
movsbl 0xf7(%rsp), %esi
movl 0xf0(%rsp), %edx
leaq 0x53d0(%rip), %rdi # 0xc0e5
xorl %eax, %eax
callq 0x6040
jmp 0x6d1e
jmp 0x6d20
movsbl 0xf7(%rsp), %eax
movl %eax, 0x98(%rsp)
subl $0x72, %eax
je 0x6d44
jmp 0x6d36
movl 0x98(%rsp), %eax
subl $0x77, %eax
je 0x6d60
jmp 0x6d7c
movq 0x328(%rsp), %rdi
movl 0xf0(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x8860
jmp 0x6d5e
jmp 0x6d9e
movq 0x328(%rsp), %rdi
movl 0xf0(%rsp), %esi
xorl %edx, %edx
movl %edx, %ecx
callq 0x8e30
jmp 0x6d7a
jmp 0x6d9e
movsbl 0xf7(%rsp), %esi
leaq 0x5361(%rip), %rdi # 0xc0ec
xorl %eax, %eax
callq 0x7090
jmp 0x6d94
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x61b0
testb $0x1, 0x940c(%rip) # 0x101b1
je 0x6dbd
movq 0x328(%rsp), %rdi
movl $0x1, %esi
callq 0x91b0
jmp 0x6dbb
jmp 0x6dbd
testb $0x1, 0x93ee(%rip) # 0x101b2
je 0x6ddf
leaq 0x5330(%rip), %rdi # 0xc0fd
xorl %eax, %eax
callq 0x6040
jmp 0x6dd6
callq 0x6220
jmp 0x6ddd
jmp 0x6ddf
jmp 0x6c6a
movq 0x328(%rsp), %rdi
callq 0x9340
jmp 0x6df3
movq 0x328(%rsp), %rcx
movl 0x8(%rcx), %eax
movl 0xc(%rcx), %ecx
movl %ecx, %edx
movl %edx, %ecx
cvtsi2ss %rdx, %xmm0
addl %ecx, %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0xec(%rsp)
movq 0x360(%rsp), %rdi
movl 0x35c(%rsp), %esi
callq 0x61f0
movq %rax, 0x90(%rsp)
jmp 0x6e3c
movq 0x90(%rsp), %rdi
leaq 0x52cd(%rip), %rsi # 0xc118
callq 0x6170
movq %rax, 0x88(%rsp)
jmp 0x6e5a
movq 0x88(%rsp), %rdi
movl 0x358(%rsp), %esi
callq 0x61f0
movq %rax, 0x80(%rsp)
jmp 0x6e78
movq 0x80(%rsp), %rdi
leaq 0x5291(%rip), %rsi # 0xc118
callq 0x6170
movq %rax, 0x78(%rsp)
jmp 0x6e93
movq 0x78(%rsp), %rdi
movl 0x354(%rsp), %esi
callq 0x61f0
movq %rax, 0x70(%rsp)
jmp 0x6eab
movq 0x70(%rsp), %rdi
leaq 0x5261(%rip), %rsi # 0xc118
callq 0x6170
movq %rax, 0x68(%rsp)
jmp 0x6ec3
movq 0x68(%rsp), %rdi
movzbl 0x353(%rsp), %esi
andl $0x1, %esi
callq 0x62e0
movq %rax, 0x60(%rsp)
jmp 0x6edf
movq 0x60(%rsp), %rdi
leaq 0x522d(%rip), %rsi # 0xc118
callq 0x6170
movq %rax, 0x58(%rsp)
jmp 0x6ef7
movq 0x58(%rsp), %rdi
movzbl 0x352(%rsp), %esi
andl $0x1, %esi
callq 0x62e0
movq %rax, 0x50(%rsp)
jmp 0x6f13
movq 0x50(%rsp), %rdi
leaq 0x51f9(%rip), %rsi # 0xc118
callq 0x6170
movq %rax, 0x48(%rsp)
jmp 0x6f2b
movq 0x48(%rsp), %rdi
movss 0xec(%rsp), %xmm0
callq 0x6120
movq %rax, 0x40(%rsp)
jmp 0x6f45
movq 0x40(%rsp), %rdi
leaq 0x51c7(%rip), %rsi # 0xc118
callq 0x6170
movq %rax, 0x38(%rsp)
jmp 0x6f5d
movq 0x38(%rsp), %rdi
movq 0x328(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x6070
movq %rax, 0x30(%rsp)
jmp 0x6f7a
movq 0x30(%rsp), %rdi
movq 0x9042(%rip), %rsi # 0xffc8
callq 0x6190
jmp 0x6f8d
movq 0x328(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x6fb4
movq 0x28(%rsp), %rdi
callq 0x7170
movq 0x28(%rsp), %rdi
callq 0x6150
movq 0x330(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x6fdb
movq 0x20(%rsp), %rdi
callq 0x7760
movq 0x20(%rsp), %rdi
callq 0x6150
leaq 0xf8(%rsp), %rdi
callq 0x6080
addq $0x368, %rsp # imm = 0x368
retq
movq 0x320(%rsp), %rdi
callq 0x62c0
nopl (%rax)
| _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb:
sub rsp, 368h
mov [rsp+368h+var_298], r8d
mov eax, ecx
mov ecx, [rsp+368h+var_298]
mov [rsp+368h+var_294], eax
mov eax, edx
mov edx, [rsp+368h+var_294]
mov [rsp+368h+var_290], eax
mov eax, esi
mov esi, [rsp+368h+var_290]
mov [rsp+368h+var_28C], eax
mov r8, rdi
mov edi, [rsp+368h+var_28C]
mov al, r9b
mov [rsp+368h+var_8], r8
mov [rsp+368h+var_C], edi
mov [rsp+368h+var_10], esi
mov [rsp+368h+var_14], edx
and cl, 1
mov [rsp+368h+var_15], cl
and al, 1
mov [rsp+368h+var_16], al
mov eax, [rsp+368h+var_C]
mov dword ptr [rsp+368h+var_30], eax
mov eax, [rsp+368h+var_10]
mov dword ptr [rsp+368h+var_30+4], eax
mov eax, [rsp+368h+var_C]
mov ecx, [rsp+368h+var_10]
xor edx, edx
div ecx
mov dword ptr [rsp+368h+var_30+8], eax
mov eax, [rsp+368h+var_14]
mov dword ptr [rsp+368h+var_30+0Ch], eax
mov dword ptr [rsp+368h+var_20], 1
mov dword ptr [rsp+368h+var_20+4], 8
mov [rsp+368h+var_38], 0
mov [rsp+368h+var_40], 0
mov edi, 10h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov rax, rdi
mov [rsp+368h+var_288], rax
call _ZN13MemoryManagerC2Ev; MemoryManager::MemoryManager(void)
jmp short $+2
loc_6ACC:
mov rax, [rsp+368h+var_288]
mov [rsp+368h+var_38], rax
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov rax, rdi
mov [rsp+368h+var_2A0], rax
mov rsi, [rsp+368h+var_38]
mov rax, [rsp+368h+var_20]
mov [rsp+368h+var_58], rax
movups xmm0, [rsp+368h+var_30]
movaps [rsp+368h+var_68], xmm0
movzx r8d, [rsp+368h+var_16]
movzx ecx, [rsp+368h+var_15]
mov rdx, [rsp+368h+var_58]
mov rax, rsp
mov [rax+10h], rdx
movaps xmm0, [rsp+368h+var_68]
movups xmmword ptr [rax], xmm0
and ecx, 1
and r8d, 1
xor eax, eax
mov edx, eax
call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_bb; Cache::Cache(MemoryManager *,Cache::Policy,Cache*,bool,bool)
jmp short $+2
loc_6B59:
mov rax, [rsp+368h+var_2A0]
mov [rsp+368h+var_40], rax
mov rdi, [rsp+368h+var_38]
mov rsi, [rsp+368h+var_40]
call _ZN13MemoryManager8setCacheEP5Cache; MemoryManager::setCache(Cache *)
mov rdi, [rsp+368h+var_40]; this
xor esi, esi; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
mov rsi, cs:traceFilePath
lea rdi, [rsp+368h+var_270]
mov [rsp+368h+var_2B0], rdi
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
mov rdi, [rsp+368h+var_2B0]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv; std::ifstream::is_open(void)
mov [rsp+368h+var_2A1], al
jmp short $+2
loc_6BC4:
mov al, [rsp+368h+var_2A1]
test al, 1
jnz loc_6C68
jmp short $+2
loc_6BD5:
mov rsi, cs:traceFilePath
lea rdi, aUnableToOpenFi; "Unable to open file %s\n"
xor eax, eax
call _printf
jmp short $+2
loc_6BEC:
mov edi, 0FFFFFFFFh
call _exit
mov rdi, [rsp+368h+var_288]; void *
mov rcx, rax
mov eax, edx
mov [rsp+368h+var_48], rcx
mov [rsp+368h+var_4C], eax
call __ZdlPv; operator delete(void *)
jmp loc_6FF0
mov rdi, [rsp+368h+var_2A0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+368h+var_48], rcx
mov [rsp+368h+var_4C], eax
call __ZdlPv; operator delete(void *)
jmp loc_6FF0
mov rcx, rax
mov eax, edx
mov [rsp+368h+var_48], rcx
mov [rsp+368h+var_4C], eax
lea rdi, [rsp+368h+var_270]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
jmp loc_6FF0
loc_6C68:
jmp short $+2
loc_6C6A:
lea rdi, [rsp+368h+var_270]
lea rsi, [rsp+368h+var_271]
call __ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_; std::operator>><char,std::char_traits<char>>(std::istream &,char&)
mov [rsp+368h+var_2B8], rax
jmp short $+2
loc_6C89:
mov rdi, [rsp+368h+var_2B8]
lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &)
call __ZNSirsEPFRSt8ios_baseS0_E; std::istream::operator>>(std::ios_base & (*)(std::ios_base &))
mov [rsp+368h+var_2C0], rax
jmp short $+2
loc_6CA7:
mov rdi, [rsp+368h+var_2C0]
lea rsi, [rsp+368h+var_278]
call __ZNSirsERj; std::istream::operator>>(uint &)
mov [rsp+368h+var_2C8], rax
jmp short $+2
loc_6CC6:
mov rdi, [rsp+368h+var_2C8]
mov rax, [rdi]
mov rax, [rax-18h]
add rdi, rax
call __ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv; std::ios::operator bool(void)
mov [rsp+368h+var_2C9], al
jmp short $+2
loc_6CE6:
mov al, [rsp+368h+var_2C9]
test al, 1
jnz short loc_6CF6
jmp loc_6DE4
loc_6CF6:
test cs:verbose, 1
jz short loc_6D20
movsx esi, [rsp+368h+var_271]
mov edx, [rsp+368h+var_278]
lea rdi, aCX; "%c %x\n"
xor eax, eax
call _printf
jmp short $+2
loc_6D1E:
jmp short $+2
loc_6D20:
movsx eax, [rsp+368h+var_271]
mov [rsp+368h+var_2D0], eax
sub eax, 72h ; 'r'
jz short loc_6D44
jmp short $+2
loc_6D36:
mov eax, [rsp+368h+var_2D0]
sub eax, 77h ; 'w'
jz short loc_6D60
jmp short loc_6D7C
loc_6D44:
mov rdi, [rsp+368h+var_40]; this
mov esi, [rsp+368h+var_278]; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *)
jmp short $+2
loc_6D5E:
jmp short loc_6D9E
loc_6D60:
mov rdi, [rsp+368h+var_40]; this
mov esi, [rsp+368h+var_278]; unsigned int
xor edx, edx; unsigned __int8
mov ecx, edx; unsigned int *
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
jmp short $+2
loc_6D7A:
jmp short loc_6D9E
loc_6D7C:
movsx esi, [rsp+368h+var_271]
lea rdi, aIllegalTypeC; "Illegal type %c\n"
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short $+2
loc_6D94:
mov edi, 0FFFFFFFFh
call _exit
loc_6D9E:
test cs:verbose, 1
jz short loc_6DBD
mov rdi, [rsp+368h+var_40]; this
mov esi, 1; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
jmp short $+2
loc_6DBB:
jmp short $+2
loc_6DBD:
test cs:isSingleStep, 1
jz short loc_6DDF
lea rdi, aPressEnterToCo; "Press Enter to Continue..."
xor eax, eax
call _printf
jmp short $+2
loc_6DD6:
call _getchar
jmp short $+2
loc_6DDD:
jmp short $+2
loc_6DDF:
jmp loc_6C6A
loc_6DE4:
mov rdi, [rsp+368h+var_40]; this
call _ZN5Cache15printStatisticsEv; Cache::printStatistics(void)
jmp short $+2
loc_6DF3:
mov rcx, [rsp+368h+var_40]
mov eax, [rcx+8]
mov ecx, [rcx+0Ch]
mov edx, ecx
mov ecx, edx
cvtsi2ss xmm0, rdx
add eax, ecx
cvtsi2ss xmm1, rax
divss xmm0, xmm1
movss [rsp+368h+var_27C], xmm0
mov rdi, [rsp+368h+var_8]
mov esi, [rsp+368h+var_C]
call __ZNSolsEj; std::ostream::operator<<(uint)
mov [rsp+368h+var_2D8], rax
jmp short $+2
loc_6E3C:
mov rdi, [rsp+368h+var_2D8]
lea rsi, asc_C118; ","
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+368h+var_2E0], rax
jmp short $+2
loc_6E5A:
mov rdi, [rsp+368h+var_2E0]
mov esi, [rsp+368h+var_10]
call __ZNSolsEj; std::ostream::operator<<(uint)
mov [rsp+368h+var_2E8], rax
jmp short $+2
loc_6E78:
mov rdi, [rsp+368h+var_2E8]
lea rsi, asc_C118; ","
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+368h+var_2F0], rax
jmp short $+2
loc_6E93:
mov rdi, [rsp+368h+var_2F0]
mov esi, [rsp+368h+var_14]
call __ZNSolsEj; std::ostream::operator<<(uint)
mov [rsp+368h+var_2F8], rax
jmp short $+2
loc_6EAB:
mov rdi, [rsp+368h+var_2F8]
lea rsi, asc_C118; ","
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+368h+var_300], rax
jmp short $+2
loc_6EC3:
mov rdi, [rsp+368h+var_300]
movzx esi, [rsp+368h+var_15]
and esi, 1
call __ZNSolsEb; std::ostream::operator<<(bool)
mov [rsp+368h+var_308], rax
jmp short $+2
loc_6EDF:
mov rdi, [rsp+368h+var_308]
lea rsi, asc_C118; ","
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+368h+var_310], rax
jmp short $+2
loc_6EF7:
mov rdi, [rsp+368h+var_310]
movzx esi, [rsp+368h+var_16]
and esi, 1
call __ZNSolsEb; std::ostream::operator<<(bool)
mov [rsp+368h+var_318], rax
jmp short $+2
loc_6F13:
mov rdi, [rsp+368h+var_318]
lea rsi, asc_C118; ","
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+368h+var_320], rax
jmp short $+2
loc_6F2B:
mov rdi, [rsp+368h+var_320]
movss xmm0, [rsp+368h+var_27C]
call __ZNSolsEf; std::ostream::operator<<(float)
mov [rsp+368h+var_328], rax
jmp short $+2
loc_6F45:
mov rdi, [rsp+368h+var_328]
lea rsi, asc_C118; ","
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+368h+var_330], rax
jmp short $+2
loc_6F5D:
mov rdi, [rsp+368h+var_330]
mov rax, [rsp+368h+var_40]
mov rsi, [rax+10h]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rsp+368h+var_338], rax
jmp short $+2
loc_6F7A:
mov rdi, [rsp+368h+var_338]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_6F8D:
mov rax, [rsp+368h+var_40]
mov [rsp+368h+var_340], rax
cmp rax, 0
jz short loc_6FB4
mov rdi, [rsp+368h+var_340]; this
call _ZN5CacheD2Ev; Cache::~Cache()
mov rdi, [rsp+368h+var_340]; void *
call __ZdlPv; operator delete(void *)
loc_6FB4:
mov rax, [rsp+368h+var_38]
mov [rsp+368h+var_348], rax
cmp rax, 0
jz short loc_6FDB
mov rdi, [rsp+368h+var_348]; this
call _ZN13MemoryManagerD2Ev; MemoryManager::~MemoryManager()
mov rdi, [rsp+368h+var_348]; void *
call __ZdlPv; operator delete(void *)
loc_6FDB:
lea rdi, [rsp+368h+var_270]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
add rsp, 368h
retn
loc_6FF0:
mov rdi, [rsp+368h+var_48]
call __Unwind_Resume
| long long simulateCache(long long a1, unsigned int a2, unsigned int a3, unsigned int a4, char a5, char a6)
{
int v6; // r9d
MemoryManager *v8; // [rsp+20h] [rbp-348h]
Cache *v9; // [rsp+28h] [rbp-340h]
long long v10; // [rsp+30h] [rbp-338h]
long long v11; // [rsp+38h] [rbp-330h]
long long v12; // [rsp+40h] [rbp-328h]
long long v13; // [rsp+48h] [rbp-320h]
long long v14; // [rsp+50h] [rbp-318h]
long long v15; // [rsp+58h] [rbp-310h]
long long v16; // [rsp+60h] [rbp-308h]
long long v17; // [rsp+68h] [rbp-300h]
long long v18; // [rsp+70h] [rbp-2F8h]
long long v19; // [rsp+78h] [rbp-2F0h]
long long v20; // [rsp+80h] [rbp-2E8h]
long long v21; // [rsp+88h] [rbp-2E0h]
long long v22; // [rsp+90h] [rbp-2D8h]
_QWORD *v23; // [rsp+A0h] [rbp-2C8h]
long long v24; // [rsp+A8h] [rbp-2C0h]
long long v25; // [rsp+B0h] [rbp-2B8h]
Cache *v26; // [rsp+C8h] [rbp-2A0h]
MemoryManager *v27; // [rsp+E0h] [rbp-288h]
float v28; // [rsp+ECh] [rbp-27Ch]
unsigned int v29; // [rsp+F0h] [rbp-278h] BYREF
char v30; // [rsp+F7h] [rbp-271h] BYREF
_BYTE v31[520]; // [rsp+F8h] [rbp-270h] BYREF
__int128 v32; // [rsp+300h] [rbp-68h]
long long v33; // [rsp+310h] [rbp-58h]
Cache *v34; // [rsp+328h] [rbp-40h]
MemoryManager *v35; // [rsp+330h] [rbp-38h]
__int128 v36; // [rsp+338h] [rbp-30h]
long long v37; // [rsp+348h] [rbp-20h]
char v38; // [rsp+352h] [rbp-16h]
char v39; // [rsp+353h] [rbp-15h]
unsigned int v40; // [rsp+354h] [rbp-14h]
unsigned int v41; // [rsp+358h] [rbp-10h]
unsigned int v42; // [rsp+35Ch] [rbp-Ch]
long long v43; // [rsp+360h] [rbp-8h]
v43 = a1;
v42 = a2;
v41 = a3;
v40 = a4;
v39 = a5 & 1;
v38 = a6 & 1;
*(_QWORD *)&v36 = __PAIR64__(a3, a2);
DWORD2(v36) = a2 / a3;
HIDWORD(v36) = a4;
v37 = 0x800000001LL;
v27 = (MemoryManager *)operator new(0x10uLL);
MemoryManager::MemoryManager(v27);
v35 = v27;
v26 = (Cache *)operator new(0x60uLL);
v33 = 0x800000001LL;
v32 = v36;
Cache::Cache((_DWORD)v26, (_DWORD)v27, 0, v39 & 1, v38 & 1, v6, v36, 0x800000001LL);
v34 = v26;
MemoryManager::setCache(v27, v26);
Cache::printInfo(v26, 0);
std::ifstream::basic_ifstream(v31, traceFilePath, 8LL);
if ( (std::ifstream::is_open(v31) & 1) == 0 )
{
printf("Unable to open file %s\n", (const char *)traceFilePath);
exit(0xFFFFFFFFLL);
}
while ( 1 )
{
v25 = std::operator>><char,std::char_traits<char>>(v31, &v30);
v24 = std::istream::operator>>(v25, std::hex);
v23 = (_QWORD *)std::istream::operator>>(v24, &v29);
if ( (std::ios::operator bool((char *)v23 + *(_QWORD *)(*v23 - 24LL)) & 1) == 0 )
break;
if ( (verbose & 1) != 0 )
printf("%c %x\n", (unsigned int)v30, v29);
if ( v30 == 114 )
{
Cache::getByte(v34, v29, 0LL);
}
else
{
if ( v30 != 119 )
{
dbgprintf("Illegal type %c\n", (unsigned int)v30);
exit(0xFFFFFFFFLL);
}
Cache::setByte(v34, v29, 0, 0LL);
}
if ( (verbose & 1) != 0 )
Cache::printInfo(v34, 1);
if ( (isSingleStep & 1) != 0 )
{
printf("Press Enter to Continue...");
getchar();
}
}
Cache::printStatistics(v34);
v28 = (float)*((int *)v34 + 3) / (float)(*((_DWORD *)v34 + 3) + *((_DWORD *)v34 + 2));
v22 = std::ostream::operator<<(v43, v42);
v21 = std::operator<<<std::char_traits<char>>(v22, ",");
v20 = std::ostream::operator<<(v21, v41);
v19 = std::operator<<<std::char_traits<char>>(v20, ",");
v18 = std::ostream::operator<<(v19, v40);
v17 = std::operator<<<std::char_traits<char>>(v18, ",");
v16 = std::ostream::operator<<(v17, v39 & 1);
v15 = std::operator<<<std::char_traits<char>>(v16, ",");
v14 = std::ostream::operator<<(v15, v38 & 1);
v13 = std::operator<<<std::char_traits<char>>(v14, ",");
v12 = std::ostream::operator<<(v13, v28);
v11 = std::operator<<<std::char_traits<char>>(v12, ",");
v10 = std::ostream::operator<<(v11, *((_QWORD *)v34 + 2));
std::ostream::operator<<(v10, &std::endl<char,std::char_traits<char>>);
v9 = v34;
if ( v34 )
{
Cache::~Cache(v34);
operator delete(v9);
}
v8 = v35;
if ( v35 )
{
MemoryManager::~MemoryManager(v35);
operator delete(v8);
}
return std::ifstream::~ifstream(v31);
}
| simulateCache:
SUB RSP,0x368
MOV dword ptr [RSP + 0xd0],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RSP + 0xd0]
MOV dword ptr [RSP + 0xd4],EAX
MOV EAX,EDX
MOV EDX,dword ptr [RSP + 0xd4]
MOV dword ptr [RSP + 0xd8],EAX
MOV EAX,ESI
MOV ESI,dword ptr [RSP + 0xd8]
MOV dword ptr [RSP + 0xdc],EAX
MOV R8,RDI
MOV EDI,dword ptr [RSP + 0xdc]
MOV AL,R9B
MOV qword ptr [RSP + 0x360],R8
MOV dword ptr [RSP + 0x35c],EDI
MOV dword ptr [RSP + 0x358],ESI
MOV dword ptr [RSP + 0x354],EDX
AND CL,0x1
MOV byte ptr [RSP + 0x353],CL
AND AL,0x1
MOV byte ptr [RSP + 0x352],AL
MOV EAX,dword ptr [RSP + 0x35c]
MOV dword ptr [RSP + 0x338],EAX
MOV EAX,dword ptr [RSP + 0x358]
MOV dword ptr [RSP + 0x33c],EAX
MOV EAX,dword ptr [RSP + 0x35c]
MOV ECX,dword ptr [RSP + 0x358]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + 0x340],EAX
MOV EAX,dword ptr [RSP + 0x354]
MOV dword ptr [RSP + 0x344],EAX
MOV dword ptr [RSP + 0x348],0x1
MOV dword ptr [RSP + 0x34c],0x8
MOV qword ptr [RSP + 0x330],0x0
MOV qword ptr [RSP + 0x328],0x0
MOV EDI,0x10
CALL 0x00106180
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0xe0],RAX
LAB_00106ac5:
CALL 0x00107710
LAB_00106aca:
JMP 0x00106acc
LAB_00106acc:
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x330],RAX
MOV EDI,0x60
CALL 0x00106180
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0xc8],RAX
MOV RSI,qword ptr [RSP + 0x330]
MOV RAX,qword ptr [RSP + 0x348]
MOV qword ptr [RSP + 0x310],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x338]
MOVAPS xmmword ptr [RSP + 0x300],XMM0
MOVZX R8D,byte ptr [RSP + 0x352]
MOVZX ECX,byte ptr [RSP + 0x353]
LAB_00106b2d:
MOV RDX,qword ptr [RSP + 0x310]
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],RDX
MOVAPS XMM0,xmmword ptr [RSP + 0x300]
MOVUPS xmmword ptr [RAX],XMM0
AND ECX,0x1
AND R8D,0x1
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00108250
LAB_00106b57:
JMP 0x00106b59
LAB_00106b59:
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x328],RAX
MOV RDI,qword ptr [RSP + 0x330]
MOV RSI,qword ptr [RSP + 0x328]
CALL 0x00108230
MOV RDI,qword ptr [RSP + 0x328]
XOR ESI,ESI
CALL 0x001091b0
MOV RSI,qword ptr [0x001101b8]
LEA RDI,[RSP + 0xf8]
MOV qword ptr [RSP + 0xb8],RDI
MOV EDX,0x8
CALL 0x001062f0
MOV RDI,qword ptr [RSP + 0xb8]
LAB_00106bb6:
CALL 0x00106280
MOV byte ptr [RSP + 0xc7],AL
JMP 0x00106bc4
LAB_00106bc4:
MOV AL,byte ptr [RSP + 0xc7]
TEST AL,0x1
JNZ 0x00106c68
JMP 0x00106bd5
LAB_00106bd5:
MOV RSI,qword ptr [0x001101b8]
LEA RDI,[0x10c0cd]
XOR EAX,EAX
CALL 0x00106040
JMP 0x00106bec
LAB_00106bec:
MOV EDI,0xffffffff
CALL 0x001061b0
LAB_00106c68:
JMP 0x00106c6a
LAB_00106c6a:
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0xf7]
CALL 0x001061e0
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x00106c89
LAB_00106c89:
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x107070]
CALL 0x001062b0
MOV qword ptr [RSP + 0xa8],RAX
JMP 0x00106ca7
LAB_00106ca7:
MOV RDI,qword ptr [RSP + 0xa8]
LEA RSI,[RSP + 0xf0]
CALL 0x00106050
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x00106cc6
LAB_00106cc6:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
ADD RDI,RAX
CALL 0x001061c0
MOV byte ptr [RSP + 0x9f],AL
JMP 0x00106ce6
LAB_00106ce6:
MOV AL,byte ptr [RSP + 0x9f]
TEST AL,0x1
JNZ 0x00106cf6
JMP 0x00106de4
LAB_00106cf6:
TEST byte ptr [0x001101b1],0x1
JZ 0x00106d20
MOVSX ESI,byte ptr [RSP + 0xf7]
MOV EDX,dword ptr [RSP + 0xf0]
LEA RDI,[0x10c0e5]
XOR EAX,EAX
CALL 0x00106040
JMP 0x00106d1e
LAB_00106d1e:
JMP 0x00106d20
LAB_00106d20:
MOVSX EAX,byte ptr [RSP + 0xf7]
MOV dword ptr [RSP + 0x98],EAX
SUB EAX,0x72
JZ 0x00106d44
JMP 0x00106d36
LAB_00106d36:
MOV EAX,dword ptr [RSP + 0x98]
SUB EAX,0x77
JZ 0x00106d60
JMP 0x00106d7c
LAB_00106d44:
MOV RDI,qword ptr [RSP + 0x328]
MOV ESI,dword ptr [RSP + 0xf0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00108860
JMP 0x00106d5e
LAB_00106d5e:
JMP 0x00106d9e
LAB_00106d60:
MOV RDI,qword ptr [RSP + 0x328]
MOV ESI,dword ptr [RSP + 0xf0]
XOR EDX,EDX
MOV ECX,EDX
CALL 0x00108e30
JMP 0x00106d7a
LAB_00106d7a:
JMP 0x00106d9e
LAB_00106d7c:
MOVSX ESI,byte ptr [RSP + 0xf7]
LEA RDI,[0x10c0ec]
XOR EAX,EAX
CALL 0x00107090
JMP 0x00106d94
LAB_00106d94:
MOV EDI,0xffffffff
CALL 0x001061b0
LAB_00106d9e:
TEST byte ptr [0x001101b1],0x1
JZ 0x00106dbd
MOV RDI,qword ptr [RSP + 0x328]
MOV ESI,0x1
CALL 0x001091b0
JMP 0x00106dbb
LAB_00106dbb:
JMP 0x00106dbd
LAB_00106dbd:
TEST byte ptr [0x001101b2],0x1
JZ 0x00106ddf
LEA RDI,[0x10c0fd]
XOR EAX,EAX
CALL 0x00106040
JMP 0x00106dd6
LAB_00106dd6:
CALL 0x00106220
JMP 0x00106ddd
LAB_00106ddd:
JMP 0x00106ddf
LAB_00106ddf:
JMP 0x00106c6a
LAB_00106de4:
MOV RDI,qword ptr [RSP + 0x328]
CALL 0x00109340
JMP 0x00106df3
LAB_00106df3:
MOV RCX,qword ptr [RSP + 0x328]
MOV EAX,dword ptr [RCX + 0x8]
MOV ECX,dword ptr [RCX + 0xc]
MOV EDX,ECX
MOV ECX,EDX
CVTSI2SS XMM0,RDX
ADD EAX,ECX
CVTSI2SS XMM1,RAX
DIVSS XMM0,XMM1
MOVSS dword ptr [RSP + 0xec],XMM0
MOV RDI,qword ptr [RSP + 0x360]
MOV ESI,dword ptr [RSP + 0x35c]
CALL 0x001061f0
MOV qword ptr [RSP + 0x90],RAX
JMP 0x00106e3c
LAB_00106e3c:
MOV RDI,qword ptr [RSP + 0x90]
LEA RSI,[0x10c118]
CALL 0x00106170
MOV qword ptr [RSP + 0x88],RAX
JMP 0x00106e5a
LAB_00106e5a:
MOV RDI,qword ptr [RSP + 0x88]
MOV ESI,dword ptr [RSP + 0x358]
CALL 0x001061f0
MOV qword ptr [RSP + 0x80],RAX
JMP 0x00106e78
LAB_00106e78:
MOV RDI,qword ptr [RSP + 0x80]
LEA RSI,[0x10c118]
CALL 0x00106170
MOV qword ptr [RSP + 0x78],RAX
JMP 0x00106e93
LAB_00106e93:
MOV RDI,qword ptr [RSP + 0x78]
MOV ESI,dword ptr [RSP + 0x354]
CALL 0x001061f0
MOV qword ptr [RSP + 0x70],RAX
JMP 0x00106eab
LAB_00106eab:
MOV RDI,qword ptr [RSP + 0x70]
LEA RSI,[0x10c118]
CALL 0x00106170
MOV qword ptr [RSP + 0x68],RAX
JMP 0x00106ec3
LAB_00106ec3:
MOV RDI,qword ptr [RSP + 0x68]
MOVZX ESI,byte ptr [RSP + 0x353]
AND ESI,0x1
CALL 0x001062e0
MOV qword ptr [RSP + 0x60],RAX
JMP 0x00106edf
LAB_00106edf:
MOV RDI,qword ptr [RSP + 0x60]
LEA RSI,[0x10c118]
CALL 0x00106170
MOV qword ptr [RSP + 0x58],RAX
JMP 0x00106ef7
LAB_00106ef7:
MOV RDI,qword ptr [RSP + 0x58]
MOVZX ESI,byte ptr [RSP + 0x352]
AND ESI,0x1
CALL 0x001062e0
MOV qword ptr [RSP + 0x50],RAX
JMP 0x00106f13
LAB_00106f13:
MOV RDI,qword ptr [RSP + 0x50]
LEA RSI,[0x10c118]
CALL 0x00106170
MOV qword ptr [RSP + 0x48],RAX
JMP 0x00106f2b
LAB_00106f2b:
MOV RDI,qword ptr [RSP + 0x48]
MOVSS XMM0,dword ptr [RSP + 0xec]
CALL 0x00106120
MOV qword ptr [RSP + 0x40],RAX
JMP 0x00106f45
LAB_00106f45:
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[0x10c118]
CALL 0x00106170
MOV qword ptr [RSP + 0x38],RAX
JMP 0x00106f5d
LAB_00106f5d:
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x328]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x00106070
MOV qword ptr [RSP + 0x30],RAX
JMP 0x00106f7a
LAB_00106f7a:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [0x0010ffc8]
CALL 0x00106190
LAB_00106f8b:
JMP 0x00106f8d
LAB_00106f8d:
MOV RAX,qword ptr [RSP + 0x328]
MOV qword ptr [RSP + 0x28],RAX
CMP RAX,0x0
JZ 0x00106fb4
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00107170
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00106150
LAB_00106fb4:
MOV RAX,qword ptr [RSP + 0x330]
MOV qword ptr [RSP + 0x20],RAX
CMP RAX,0x0
JZ 0x00106fdb
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00107760
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00106150
LAB_00106fdb:
LEA RDI,[RSP + 0xf8]
CALL 0x00106080
ADD RSP,0x368
RET
|
/* simulateCache(std::ofstream&, unsigned int, unsigned int, unsigned int, bool, bool) */
void simulateCache(ofstream *param_1,uint param_2,uint param_3,uint param_4,bool param_5,
bool param_6)
{
int iVar1;
uint uVar2;
byte bVar3;
bool bVar4;
MemoryManager *pMVar5;
Cache *pCVar6;
istream *piVar7;
long *plVar8;
ostream *poVar9;
uint local_278;
char local_271;
ifstream local_270 [520];
int8 local_68;
int8 uStack_60;
int8 local_58;
Cache *local_40;
MemoryManager *local_38;
uint local_30;
uint uStack_2c;
uint uStack_28;
uint uStack_24;
int4 local_20;
int4 uStack_1c;
byte local_16;
byte local_15;
uint local_14;
uint local_10;
uint local_c;
ofstream *local_8;
uStack_28 = param_2 / param_3;
local_20 = 1;
uStack_1c = 8;
local_38 = (MemoryManager *)0x0;
local_40 = (Cache *)0x0;
local_30 = param_2;
uStack_2c = param_3;
uStack_24 = param_4;
local_16 = param_6;
local_15 = param_5;
local_14 = param_4;
local_10 = param_3;
local_c = param_2;
local_8 = param_1;
pMVar5 = (MemoryManager *)operator_new(0x10);
/* try { // try from 00106ac5 to 00106ac9 has its CatchHandler @ 00106bf6 */
MemoryManager::MemoryManager(pMVar5);
local_38 = pMVar5;
pCVar6 = (Cache *)operator_new(0x60);
local_58 = CONCAT44(uStack_1c,local_20);
local_68 = CONCAT44(uStack_2c,local_30);
uStack_60 = CONCAT44(uStack_24,uStack_28);
/* try { // try from 00106b2d to 00106b56 has its CatchHandler @ 00106c1c */
Cache::Cache(pCVar6,local_38,0,local_15 & 1,local_16 & 1);
local_40 = pCVar6;
MemoryManager::setCache(local_38,pCVar6);
Cache::printInfo(local_40,false);
std::ifstream::ifstream(local_270,traceFilePath,8);
/* try { // try from 00106bb6 to 00106f8a has its CatchHandler @ 00106c42 */
bVar3 = std::ifstream::is_open();
if ((bVar3 & 1) == 0) {
printf("Unable to open file %s\n",traceFilePath);
/* WARNING: Subroutine does not return */
exit(-1);
}
do {
piVar7 = std::operator>>((istream *)local_270,&local_271);
piVar7 = (istream *)std::istream::operator>>(piVar7,std::hex);
plVar8 = (long *)std::istream::operator>>(piVar7,&local_278);
bVar4 = std::ios::operator_cast_to_bool((ios *)((long)plVar8 + *(long *)(*plVar8 + -0x18)));
if (!bVar4) {
Cache::printStatistics(local_40);
iVar1 = *(int *)(local_40 + 8);
uVar2 = *(uint *)(local_40 + 0xc);
poVar9 = (ostream *)std::ostream::operator<<((ostream *)local_8,local_c);
poVar9 = std::operator<<(poVar9,",");
poVar9 = (ostream *)std::ostream::operator<<(poVar9,local_10);
poVar9 = std::operator<<(poVar9,",");
poVar9 = (ostream *)std::ostream::operator<<(poVar9,local_14);
poVar9 = std::operator<<(poVar9,",");
poVar9 = (ostream *)std::ostream::operator<<(poVar9,(bool)(local_15 & 1));
poVar9 = std::operator<<(poVar9,",");
poVar9 = (ostream *)std::ostream::operator<<(poVar9,(bool)(local_16 & 1));
poVar9 = std::operator<<(poVar9,",");
poVar9 = (ostream *)std::ostream::operator<<(poVar9,(float)uVar2 / (float)(iVar1 + uVar2));
poVar9 = std::operator<<(poVar9,",");
poVar9 = (ostream *)std::ostream::operator<<(poVar9,*(ulong *)(local_40 + 0x10));
std::ostream::operator<<
(poVar9,(_func_ostream_ptr_ostream_ptr *)
PTR_endl<char,std_char_traits<char>>_0010ffc8);
pCVar6 = local_40;
if (local_40 != (Cache *)0x0) {
Cache::~Cache(local_40);
operator_delete(pCVar6);
}
pMVar5 = local_38;
if (local_38 != (MemoryManager *)0x0) {
MemoryManager::~MemoryManager(local_38);
operator_delete(pMVar5);
}
std::ifstream::~ifstream(local_270);
return;
}
if ((verbose & 1) != 0) {
printf("%c %x\n",(ulong)(uint)(int)local_271,(ulong)local_278);
}
if (local_271 == 'r') {
Cache::getByte(local_40,local_278,(uint *)0x0);
}
else {
if (local_271 != 'w') {
dbgprintf("Illegal type %c\n",(ulong)(uint)(int)local_271);
/* WARNING: Subroutine does not return */
exit(-1);
}
Cache::setByte(local_40,local_278,'\0',(uint *)0x0);
}
if ((verbose & 1) != 0) {
Cache::printInfo(local_40,true);
}
if ((isSingleStep & 1) != 0) {
printf("Press Enter to Continue...");
getchar();
}
} while( true );
}
| |
34,593 | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCache.cpp | void simulateCache(std::ofstream &csvFile, uint32_t cacheSize,
uint32_t blockSize, uint32_t associativity, bool writeBack,
bool writeAllocate) {
Cache::Policy policy;
policy.cacheSize = cacheSize;
policy.blockSize = blockSize;
policy.blockNum = cacheSize / blockSize;
policy.associativity = associativity;
policy.hitLatency = 1;
policy.missLatency = 8;
// Initialize memory and cache
MemoryManager *memory = nullptr;
Cache *cache = nullptr;
memory = new MemoryManager();
cache = new Cache(memory, policy, nullptr, writeBack, writeAllocate);
memory->setCache(cache);
cache->printInfo(false);
// Read and execute trace in cache-trace/ folder
std::ifstream trace(traceFilePath);
if (!trace.is_open()) {
printf("Unable to open file %s\n", traceFilePath);
exit(-1);
}
char type; //'r' for read, 'w' for write
uint32_t addr;
while (trace >> type >> std::hex >> addr) {
if (verbose)
printf("%c %x\n", type, addr);
switch (type) {
case 'r':
cache->getByte(addr);
break;
case 'w':
cache->setByte(addr, 0);
break;
default:
dbgprintf("Illegal type %c\n", type);
exit(-1);
}
if (verbose)
cache->printInfo(true);
if (isSingleStep) {
printf("Press Enter to Continue...");
getchar();
}
}
// Output Simulation Results
cache->printStatistics();
float missRate = (float)cache->statistics.numMiss /
(cache->statistics.numHit + cache->statistics.numMiss);
csvFile << cacheSize << "," << blockSize << "," << associativity << ","
<< writeBack << "," << writeAllocate << "," << missRate << ","
<< cache->statistics.totalCycles << std::endl;
delete cache;
delete memory;
} | O1 | cpp | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movl %r9d, 0x20(%rsp)
movl %r8d, %ebp
movl %ecx, %r13d
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, 0x58(%rsp)
movl $0x10, %edi
callq 0x3170
movq %rax, %r12
movq %rax, %rdi
callq 0x3d88
movl %r15d, %eax
xorl %edx, %edx
divl %r14d
movl %eax, %ebx
movl $0x60, %edi
callq 0x3170
movl %r14d, %ecx
movq %rax, %r14
movl %r15d, 0x3c(%rsp)
movl %r15d, 0x40(%rsp)
movl %ecx, 0x38(%rsp)
movl %ecx, 0x44(%rsp)
movl %ebx, 0x48(%rsp)
movl %r13d, 0x4c(%rsp)
movabsq $0x800000001, %rax # imm = 0x800000001
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movzbl %bpl, %ebp
movzbl 0x20(%rsp), %ebx
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x4378
movl %ebp, 0x30(%rsp)
movl %r13d, 0x34(%rsp)
movl %ebx, 0x2c(%rsp)
movq %r12, 0x20(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x4370
movq %r14, %rdi
xorl %esi, %esi
callq 0x4caa
movq 0x5727(%rip), %rsi # 0x9180
leaq 0x60(%rsp), %rdi
movl $0x8, %edx
callq 0x3270
leaq 0xd8(%rsp), %rdi
callq 0x3070
testb %al, %al
je 0x3ce8
leaq 0x60(%rsp), %r15
leaq 0x1b(%rsp), %r12
leaq 0x1c(%rsp), %rbx
leaq 0x25fd(%rip), %r13 # 0x6090
leaq 0x260e(%rip), %rbp # 0x60a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x31c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3b5d
cmpb $0x1, 0x569b(%rip) # 0x9179
jne 0x3af3
movsbl 0x1b(%rsp), %esi
movl 0x1c(%rsp), %edx
movq %r13, %rdi
xorl %eax, %eax
callq 0x3050
movzbl 0x1b(%rsp), %eax
cmpl $0x77, %eax
je 0x3b16
cmpl $0x72, %eax
jne 0x3ccd
movl 0x1c(%rsp), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x4754
jmp 0x3b26
movl 0x1c(%rsp), %esi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4aba
cmpb $0x1, 0x564c(%rip) # 0x9179
jne 0x3b3c
movq %r14, %rdi
movl $0x1, %esi
callq 0x4caa
cmpb $0x1, 0x5637(%rip) # 0x917a
jne 0x3a9a
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3050
callq 0x31d0
jmp 0x3a9a
movq %r14, %rdi
callq 0x4dd2
movl 0xc(%r14), %r15d
movl 0x8(%r14), %r12d
addl %r15d, %r12d
movl 0x3c(%rsp), %esi
movq 0x58(%rsp), %rdi
callq 0x30f0
movq 0x20(%rsp), %r13
movq %rax, %rbx
leaq 0x2536(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movl 0x38(%rsp), %esi
movq %rbx, %rdi
callq 0x30f0
movq %rax, %rbx
leaq 0x2513(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movl 0x34(%rsp), %esi
movq %rbx, %rdi
callq 0x30f0
movq %rax, %rbx
leaq 0x24f0(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movq %rbx, %rdi
movl 0x30(%rsp), %esi
callq 0x3240
movq %rax, %rbx
leaq 0x24cd(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movq %rbx, %rdi
movl 0x2c(%rsp), %esi
callq 0x3240
movq %rax, %rbx
leaq 0x24aa(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
cvtsi2ss %r15, %xmm0
cvtsi2ss %r12, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x3220
movq %rax, %rbx
leaq 0x2479(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x30f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %r14, %rdi
addq $0x48, %rdi
callq 0x3d48
movq %r14, %rdi
callq 0x3150
movq %r13, %rdi
callq 0x3db2
movq %r13, %rdi
callq 0x3150
leaq 0x60(%rsp), %rdi
callq 0x3080
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %esi
leaq 0x23c0(%rip), %rdi # 0x6097
xorl %eax, %eax
callq 0x32c0
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x31a0
movq 0x5491(%rip), %rsi # 0x9180
leaq 0x2382(%rip), %rdi # 0x6078
xorl %eax, %eax
callq 0x3050
jmp 0x3cde
jmp 0x3d18
movq %rax, %rbx
movq %r14, %rdi
jmp 0x3d0f
movq %rax, %rbx
movq %r12, %rdi
callq 0x3150
jmp 0x3d25
jmp 0x3d18
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3260
| _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov dword ptr [rsp+298h+var_278], r9d
mov ebp, r8d
mov r13d, ecx
mov r14d, edx
mov r15d, esi
mov [rsp+298h+var_240], rdi
mov edi, 10h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rdi, rax; this
call _ZN13MemoryManagerC2Ev; MemoryManager::MemoryManager(void)
mov eax, r15d
xor edx, edx
div r14d
mov ebx, eax
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov ecx, r14d
mov r14, rax
mov [rsp+298h+var_25C], r15d
mov dword ptr [rsp+298h+var_258], r15d
mov [rsp+298h+var_260], ecx
mov dword ptr [rsp+298h+var_258+4], ecx
mov dword ptr [rsp+298h+var_258+8], ebx
mov dword ptr [rsp+298h+var_258+0Ch], r13d
mov rax, 800000001h
mov [rsp+298h+var_248], rax
mov rax, [rsp+298h+var_248]
mov [rsp+298h+var_288], rax; __int64
movups xmm0, [rsp+298h+var_258]
movups [rsp+298h+var_298], xmm0; __int128
movzx ebp, bpl
movzx ebx, byte ptr [rsp+298h+var_278]
mov rdi, r14; this
mov rsi, r12
xor edx, edx
mov ecx, ebp
mov r8d, ebx
call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_bb; Cache::Cache(MemoryManager *,Cache::Policy,Cache*,bool,bool)
mov [rsp+298h+var_268], ebp
mov [rsp+298h+var_264], r13d
mov [rsp+298h+var_26C], ebx
mov [rsp+298h+var_278], r12
mov rdi, r12
mov rsi, r14
call _ZN13MemoryManager8setCacheEP5Cache; MemoryManager::setCache(Cache *)
mov rdi, r14; this
xor esi, esi; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
mov rsi, cs:traceFilePath
lea rdi, [rsp+298h+var_238]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+298h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_3CE8
lea r15, [rsp+298h+var_238]
lea r12, [rsp+298h+var_27D]
lea rbx, [rsp+298h+var_27C]
lea r13, aCX; "%c %x\n"
lea rbp, aPressEnterToCo; "Press Enter to Continue..."
loc_3A9A:
mov rdi, r15
mov rsi, r12
call __ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_; std::operator>><char,std::char_traits<char>>(std::istream &,char&)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov edx, [rax+rcx+18h]
and edx, 0FFFFFFB5h
or edx, 8
mov [rax+rcx+18h], edx
mov rdi, rax
mov rsi, rbx
call __ZNSi10_M_extractIjEERSiRT_; std::istream::_M_extract<uint>(uint &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_3B5D
cmp cs:verbose, 1
jnz short loc_3AF3
movsx esi, [rsp+298h+var_27D]
mov edx, [rsp+298h+var_27C]
mov rdi, r13
xor eax, eax
call _printf
loc_3AF3:
movzx eax, [rsp+298h+var_27D]
cmp eax, 77h ; 'w'
jz short loc_3B16
cmp eax, 72h ; 'r'
jnz loc_3CCD
mov esi, [rsp+298h+var_27C]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *)
jmp short loc_3B26
loc_3B16:
mov esi, [rsp+298h+var_27C]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
loc_3B26:
cmp cs:verbose, 1
jnz short loc_3B3C
mov rdi, r14; this
mov esi, 1; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
loc_3B3C:
cmp cs:isSingleStep, 1
jnz loc_3A9A
mov rdi, rbp
xor eax, eax
call _printf
call _getchar
jmp loc_3A9A
loc_3B5D:
mov rdi, r14; this
call _ZN5Cache15printStatisticsEv; Cache::printStatistics(void)
mov r15d, [r14+0Ch]
mov r12d, [r14+8]
add r12d, r15d
mov esi, [rsp+298h+var_25C]
mov rdi, [rsp+298h+var_240]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r13, [rsp+298h+var_278]
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [rsp+298h+var_260]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [rsp+298h+var_264]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, [rsp+298h+var_268]
call __ZNSo9_M_insertIbEERSoT_; std::ostream::_M_insert<bool>(bool)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, [rsp+298h+var_26C]
call __ZNSo9_M_insertIbEERSoT_; std::ostream::_M_insert<bool>(bool)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
cvtsi2ss xmm0, r15
cvtsi2ss xmm1, r12
divss xmm0, xmm1
cvtss2sd xmm0, xmm0
mov rdi, rbx
call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14+10h]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbx, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r14
add rdi, 48h ; 'H'
call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector()
mov rdi, r14; void *
call __ZdlPv; operator delete(void *)
mov rdi, r13; this
call _ZN13MemoryManagerD2Ev; MemoryManager::~MemoryManager()
mov rdi, r13; void *
call __ZdlPv; operator delete(void *)
lea rdi, [rsp+298h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3CCD:
movsx esi, al
lea rdi, aIllegalTypeC; "Illegal type %c\n"
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
loc_3CDE:
mov edi, 0FFFFFFFFh
call _exit
loc_3CE8:
mov rsi, cs:traceFilePath
lea rdi, aUnableToOpenFi; "Unable to open file %s\n"
xor eax, eax
call _printf
jmp short loc_3CDE
jmp short loc_3D18
mov rbx, rax
mov rdi, r14
jmp short loc_3D0F
mov rbx, rax
mov rdi, r12; void *
loc_3D0F:
call __ZdlPv; operator delete(void *)
jmp short loc_3D25
jmp short $+2
loc_3D18:
mov rbx, rax
lea rdi, [rsp+arg_58]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_3D25:
mov rdi, rbx
call __Unwind_Resume
| long long simulateCache(
long long a1,
unsigned int a2,
unsigned int a3,
unsigned int a4,
unsigned __int8 a5,
char a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
MemoryManager *v17; // r12
int v18; // ebx
Cache *v19; // rax
unsigned int v20; // ecx
Cache *v21; // r14
__int128 v22; // xmm0
_QWORD *v23; // rax
_QWORD *v24; // rax
long long v25; // rdx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v30; // rcx
int v31; // r15d
int v32; // r12d
long long v33; // rax
MemoryManager *v34; // r13
long long v35; // rbx
long long v36; // rbx
long long v37; // rbx
long long v38; // rbx
long long v39; // rbx
long long v40; // rbx
std::ostream *v41; // rbx
char v42; // al
std::ostream *v43; // rax
char v45; // [rsp+0h] [rbp-298h]
char v46; // [rsp+1Bh] [rbp-27Dh] BYREF
unsigned int v47; // [rsp+1Ch] [rbp-27Ch] BYREF
MemoryManager *v48; // [rsp+20h] [rbp-278h]
unsigned int v49; // [rsp+2Ch] [rbp-26Ch]
unsigned int v50; // [rsp+30h] [rbp-268h]
unsigned int v51; // [rsp+34h] [rbp-264h]
unsigned int v52; // [rsp+38h] [rbp-260h]
unsigned int v53; // [rsp+3Ch] [rbp-25Ch]
__int128 v54; // [rsp+40h] [rbp-258h]
long long v55; // [rsp+50h] [rbp-248h]
long long v56; // [rsp+58h] [rbp-240h]
_BYTE v57[120]; // [rsp+60h] [rbp-238h] BYREF
_BYTE v58[448]; // [rsp+D8h] [rbp-1C0h] BYREF
LOBYTE(v48) = a6;
v56 = a1;
v17 = (MemoryManager *)operator new(0x10uLL);
MemoryManager::MemoryManager(v17);
v18 = a2 / a3;
v19 = (Cache *)operator new(0x60uLL);
v20 = a3;
v21 = v19;
v53 = a2;
*(_QWORD *)&v54 = __PAIR64__(v20, a2);
v52 = v20;
*((_QWORD *)&v54 + 1) = __PAIR64__(a4, v18);
v55 = 0x800000001LL;
v22 = v54;
Cache::Cache(v19, v54, 0x800000001LL);
v50 = a5;
v51 = a4;
v49 = (unsigned __int8)v48;
v48 = v17;
MemoryManager::setCache(v17, v21);
Cache::printInfo(v21, 0);
std::ifstream::basic_ifstream(v57, traceFilePath, 8LL);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v58) )
{
printf("Unable to open file %s\n", (const char *)traceFilePath);
LABEL_15:
exit(0xFFFFFFFFLL);
}
while ( 1 )
{
v23 = (_QWORD *)std::operator>><char,std::char_traits<char>>(v57, &v46);
*(_DWORD *)((char *)v23 + *(_QWORD *)(*v23 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v23 + *(_QWORD *)(*v23 - 24LL) + 24) & 0xFFFFFFB5 | 8;
v24 = (_QWORD *)std::istream::_M_extract<unsigned int>(v23, &v47);
v30 = *(_QWORD *)(*v24 - 24LL);
if ( (*((_BYTE *)v24 + v30 + 32) & 5) != 0 )
break;
if ( verbose == 1 )
printf("%c %x\n", (unsigned int)v46, v47);
if ( v46 == 119 )
{
Cache::setByte(v21, v47, 0, 0LL);
}
else
{
if ( v46 != 114 )
{
dbgprintf(
"Illegal type %c\n",
(unsigned int)v46,
v25,
v30,
v26,
v27,
(__m128)v22,
a8,
a9,
a10,
v28,
v29,
a13,
a14,
v45);
goto LABEL_15;
}
Cache::getByte(v21, v47, 0LL);
}
if ( verbose == 1 )
Cache::printInfo(v21, 1);
if ( isSingleStep == 1 )
{
printf("Press Enter to Continue...");
getchar();
}
}
Cache::printStatistics(v21);
v31 = *((_DWORD *)v21 + 3);
v32 = v31 + *((_DWORD *)v21 + 2);
v33 = std::ostream::_M_insert<unsigned long>(v56, v53);
v34 = v48;
v35 = v33;
std::__ostream_insert<char,std::char_traits<char>>(v33, ",", 1LL);
v36 = std::ostream::_M_insert<unsigned long>(v35, v52);
std::__ostream_insert<char,std::char_traits<char>>(v36, ",", 1LL);
v37 = std::ostream::_M_insert<unsigned long>(v36, v51);
std::__ostream_insert<char,std::char_traits<char>>(v37, ",", 1LL);
v38 = std::ostream::_M_insert<bool>(v37, v50);
std::__ostream_insert<char,std::char_traits<char>>(v38, ",", 1LL);
v39 = std::ostream::_M_insert<bool>(v38, v49);
std::__ostream_insert<char,std::char_traits<char>>(v39, ",", 1LL);
v40 = std::ostream::_M_insert<double>(v39, (float)((float)v31 / (float)v32));
std::__ostream_insert<char,std::char_traits<char>>(v40, ",", 1LL);
v41 = (std::ostream *)std::ostream::_M_insert<unsigned long>(v40, *((_QWORD *)v21 + 2));
v42 = std::ios::widen((char *)v41 + *(_QWORD *)(*(_QWORD *)v41 - 24LL), 10LL);
v43 = (std::ostream *)std::ostream::put(v41, v42);
std::ostream::flush(v43);
std::vector<Cache::Block>::~vector((char *)v21 + 72);
operator delete(v21);
MemoryManager::~MemoryManager(v34);
operator delete(v34);
return std::ifstream::~ifstream(v57);
}
| simulateCache:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV dword ptr [RSP + 0x20],R9D
MOV EBP,R8D
MOV R13D,ECX
MOV R14D,EDX
MOV R15D,ESI
MOV qword ptr [RSP + 0x58],RDI
MOV EDI,0x10
CALL 0x00103170
MOV R12,RAX
LAB_001039b1:
MOV RDI,RAX
CALL 0x00103d88
LAB_001039b9:
MOV EAX,R15D
XOR EDX,EDX
DIV R14D
MOV EBX,EAX
MOV EDI,0x60
CALL 0x00103170
MOV ECX,R14D
MOV R14,RAX
MOV dword ptr [RSP + 0x3c],R15D
MOV dword ptr [RSP + 0x40],R15D
MOV dword ptr [RSP + 0x38],ECX
MOV dword ptr [RSP + 0x44],ECX
MOV dword ptr [RSP + 0x48],EBX
MOV dword ptr [RSP + 0x4c],R13D
MOV RAX,0x800000001
MOV qword ptr [RSP + 0x50],RAX
LAB_001039fd:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
MOVZX EBP,BPL
MOVZX EBX,byte ptr [RSP + 0x20]
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
MOV ECX,EBP
MOV R8D,EBX
CALL 0x00104378
LAB_00103a2b:
MOV dword ptr [RSP + 0x30],EBP
MOV dword ptr [RSP + 0x34],R13D
MOV dword ptr [RSP + 0x2c],EBX
MOV qword ptr [RSP + 0x20],R12
MOV RDI,R12
MOV RSI,R14
CALL 0x00104370
MOV RDI,R14
XOR ESI,ESI
CALL 0x00104caa
MOV RSI,qword ptr [0x00109180]
LEA RDI,[RSP + 0x60]
MOV EDX,0x8
CALL 0x00103270
LEA RDI,[RSP + 0xd8]
CALL 0x00103070
TEST AL,AL
JZ 0x00103ce8
LEA R15,[RSP + 0x60]
LEA R12,[RSP + 0x1b]
LEA RBX,[RSP + 0x1c]
LEA R13,[0x106090]
LEA RBP,[0x1060a8]
LAB_00103a9a:
MOV RDI,R15
MOV RSI,R12
CALL 0x001031c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18]
AND EDX,0xffffffb5
OR EDX,0x8
MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00103250
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00103b5d
CMP byte ptr [0x00109179],0x1
JNZ 0x00103af3
MOVSX ESI,byte ptr [RSP + 0x1b]
MOV EDX,dword ptr [RSP + 0x1c]
MOV RDI,R13
XOR EAX,EAX
CALL 0x00103050
LAB_00103af3:
MOVZX EAX,byte ptr [RSP + 0x1b]
CMP EAX,0x77
JZ 0x00103b16
CMP EAX,0x72
JNZ 0x00103ccd
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00104754
JMP 0x00103b26
LAB_00103b16:
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00104aba
LAB_00103b26:
CMP byte ptr [0x00109179],0x1
JNZ 0x00103b3c
MOV RDI,R14
MOV ESI,0x1
CALL 0x00104caa
LAB_00103b3c:
CMP byte ptr [0x0010917a],0x1
JNZ 0x00103a9a
MOV RDI,RBP
XOR EAX,EAX
CALL 0x00103050
CALL 0x001031d0
JMP 0x00103a9a
LAB_00103b5d:
MOV RDI,R14
CALL 0x00104dd2
MOV R15D,dword ptr [R14 + 0xc]
MOV R12D,dword ptr [R14 + 0x8]
ADD R12D,R15D
MOV ESI,dword ptr [RSP + 0x3c]
LAB_00103b74:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001030f0
MOV R13,qword ptr [RSP + 0x20]
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV ESI,dword ptr [RSP + 0x38]
MOV RDI,RBX
CALL 0x001030f0
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV ESI,dword ptr [RSP + 0x34]
MOV RDI,RBX
CALL 0x001030f0
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV RDI,RBX
MOV ESI,dword ptr [RSP + 0x30]
CALL 0x00103240
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV RDI,RBX
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00103240
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
CVTSI2SS XMM0,R15
CVTSI2SS XMM1,R12
DIVSS XMM0,XMM1
CVTSS2SD XMM0,XMM0
MOV RDI,RBX
CALL 0x00103220
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RBX
CALL 0x001030f0
MOV RBX,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00103160
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00103040
MOV RDI,RAX
CALL 0x00103100
LAB_00103c8d:
MOV RDI,R14
ADD RDI,0x48
CALL 0x00103d48
MOV RDI,R14
CALL 0x00103150
MOV RDI,R13
CALL 0x00103db2
MOV RDI,R13
CALL 0x00103150
LEA RDI,[RSP + 0x60]
CALL 0x00103080
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00103ccd:
MOVSX ESI,AL
LEA RDI,[0x106097]
XOR EAX,EAX
CALL 0x001032c0
LAB_00103cde:
MOV EDI,0xffffffff
CALL 0x001031a0
LAB_00103ce8:
MOV RSI,qword ptr [0x00109180]
LEA RDI,[0x106078]
XOR EAX,EAX
CALL 0x00103050
JMP 0x00103cde
|
/* simulateCache(std::ofstream&, unsigned int, unsigned int, unsigned int, bool, bool) */
void simulateCache(ofstream *param_1,uint param_2,uint param_3,uint param_4,bool param_5,
bool param_6)
{
int iVar1;
char cVar2;
MemoryManager *pMVar3;
Cache *this;
istream *piVar4;
ostream *poVar5;
uint uVar6;
int3 in_register_00000089;
char local_27d;
uint local_27c;
MemoryManager *local_278;
uint local_26c;
uint local_268;
uint local_264;
uint local_260;
uint local_25c;
uint local_258;
uint uStack_254;
uint uStack_250;
uint uStack_24c;
int8 local_248;
ofstream *local_240;
ifstream local_238 [520];
local_278 = (MemoryManager *)CONCAT44(local_278._4_4_,CONCAT31(in_register_00000089,param_6));
local_240 = param_1;
pMVar3 = (MemoryManager *)operator_new(0x10);
/* try { // try from 001039b1 to 001039b8 has its CatchHandler @ 00103d09 */
MemoryManager::MemoryManager(pMVar3);
this = (Cache *)operator_new(0x60);
local_248 = 0x800000001;
/* try { // try from 001039fd to 00103a2a has its CatchHandler @ 00103d01 */
uVar6 = (uint)(byte)local_278;
local_260 = param_3;
local_25c = param_2;
local_258 = param_2;
uStack_254 = param_3;
uStack_250 = param_2 / param_3;
uStack_24c = param_4;
Cache::Cache(this,pMVar3,0,param_5,uVar6);
local_278 = pMVar3;
local_26c = uVar6;
local_268 = (uint)param_5;
local_264 = param_4;
MemoryManager::setCache(pMVar3,this);
Cache::printInfo(this,false);
std::ifstream::ifstream(local_238,traceFilePath,8);
cVar2 = std::__basic_file<char>::is_open();
if (cVar2 == '\0') {
printf("Unable to open file %s\n",traceFilePath);
LAB_00103cde:
/* WARNING: Subroutine does not return */
exit(-1);
}
do {
/* try { // try from 00103a9a to 00103b3b has its CatchHandler @ 00103d18 */
piVar4 = std::operator>>((istream *)local_238,&local_27d);
*(uint *)(piVar4 + *(long *)(*(long *)piVar4 + -0x18) + 0x18) =
*(uint *)(piVar4 + *(long *)(*(long *)piVar4 + -0x18) + 0x18) & 0xffffffb5 | 8;
piVar4 = std::istream::_M_extract<unsigned_int>((uint *)piVar4);
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) {
/* try { // try from 00103b5d to 00103b64 has its CatchHandler @ 00103cff */
Cache::printStatistics(this);
uVar6 = *(uint *)(this + 0xc);
iVar1 = *(int *)(this + 8);
/* try { // try from 00103b74 to 00103c8c has its CatchHandler @ 00103d16 */
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)local_240);
pMVar3 = local_278;
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<bool>(SUB81(poVar5,0));
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<bool>(SUB81(poVar5,0));
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<double>((double)((float)uVar6 / (float)(iVar1 + uVar6)));
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::ios::widen((char)*(int8 *)(*(long *)poVar5 + -0x18) + (char)poVar5);
std::ostream::put((char)poVar5);
std::ostream::flush();
std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48));
operator_delete(this);
MemoryManager::~MemoryManager(pMVar3);
operator_delete(pMVar3);
std::ifstream::~ifstream(local_238);
return;
}
if (verbose == '\x01') {
printf("%c %x\n",(ulong)(uint)(int)local_27d,(ulong)local_27c);
}
if (local_27d == 'w') {
Cache::setByte((uint)this,(uchar)local_27c,(uint *)0x0);
}
else {
if (local_27d != 'r') {
dbgprintf("Illegal type %c\n",(ulong)(uint)(int)local_27d);
goto LAB_00103cde;
}
Cache::getByte(this,local_27c,(uint *)0x0);
}
if (verbose == '\x01') {
Cache::printInfo(this,true);
}
if (isSingleStep == '\x01') {
printf("Press Enter to Continue...");
getchar();
}
} while( true );
}
| |
34,594 | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCache.cpp | void simulateCache(std::ofstream &csvFile, uint32_t cacheSize,
uint32_t blockSize, uint32_t associativity, bool writeBack,
bool writeAllocate) {
Cache::Policy policy;
policy.cacheSize = cacheSize;
policy.blockSize = blockSize;
policy.blockNum = cacheSize / blockSize;
policy.associativity = associativity;
policy.hitLatency = 1;
policy.missLatency = 8;
// Initialize memory and cache
MemoryManager *memory = nullptr;
Cache *cache = nullptr;
memory = new MemoryManager();
cache = new Cache(memory, policy, nullptr, writeBack, writeAllocate);
memory->setCache(cache);
cache->printInfo(false);
// Read and execute trace in cache-trace/ folder
std::ifstream trace(traceFilePath);
if (!trace.is_open()) {
printf("Unable to open file %s\n", traceFilePath);
exit(-1);
}
char type; //'r' for read, 'w' for write
uint32_t addr;
while (trace >> type >> std::hex >> addr) {
if (verbose)
printf("%c %x\n", type, addr);
switch (type) {
case 'r':
cache->getByte(addr);
break;
case 'w':
cache->setByte(addr, 0);
break;
default:
dbgprintf("Illegal type %c\n", type);
exit(-1);
}
if (verbose)
cache->printInfo(true);
if (isSingleStep) {
printf("Press Enter to Continue...");
getchar();
}
}
// Output Simulation Results
cache->printStatistics();
float missRate = (float)cache->statistics.numMiss /
(cache->statistics.numHit + cache->statistics.numMiss);
csvFile << cacheSize << "," << blockSize << "," << associativity << ","
<< writeBack << "," << writeAllocate << "," << missRate << ","
<< cache->statistics.totalCycles << std::endl;
delete cache;
delete memory;
} | O2 | cpp | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movl %r9d, 0x20(%rsp)
movl %r8d, %ebp
movl %ecx, %r13d
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, 0x58(%rsp)
pushq $0x10
popq %rdi
callq 0x3170
movq %rax, %r12
movq %rax, %rdi
callq 0x3b2c
movl %r15d, %eax
xorl %edx, %edx
divl %r14d
movl %eax, %ebx
pushq $0x60
popq %rdi
callq 0x3170
movl %r14d, %ecx
movq %rax, %r14
movl %r15d, 0x3c(%rsp)
movl %r15d, 0x40(%rsp)
movl %ecx, 0x34(%rsp)
movl %ecx, 0x44(%rsp)
movl %ebx, 0x48(%rsp)
movl %r13d, 0x4c(%rsp)
movabsq $0x800000001, %rax # imm = 0x800000001
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movzbl %bpl, %ebp
movzbl 0x20(%rsp), %ebx
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x40fc
movl %ebp, 0x30(%rsp)
movl %r13d, 0x38(%rsp)
movl %ebx, 0x2c(%rsp)
movq %r12, 0x20(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x40f6
movq %r14, %rdi
xorl %esi, %esi
callq 0x4870
movq 0x4a23(%rip), %rsi # 0x8180
leaq 0x60(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x3270
leaq 0xd8(%rsp), %rdi
callq 0x3060
testb %al, %al
je 0x3991
leaq 0x60(%rsp), %r15
leaq 0x1b(%rsp), %r12
leaq 0x1c(%rsp), %rbx
pushq $0x1
popq %rbp
leaq 0x1910(%rip), %r13 # 0x50a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x31c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x385c
cmpb $0x1, 0x499d(%rip) # 0x8179
jne 0x37f5
movsbl 0x1b(%rsp), %esi
movl 0x1c(%rsp), %edx
leaq 0x18a2(%rip), %rdi # 0x5090
xorl %eax, %eax
callq 0x3040
movzbl 0x1b(%rsp), %eax
cmpl $0x77, %eax
je 0x3818
cmpl $0x72, %eax
jne 0x3978
movl 0x1c(%rsp), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x4432
jmp 0x3828
movl 0x1c(%rsp), %esi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x46ba
cmpb $0x1, 0x494a(%rip) # 0x8179
jne 0x383b
movq %r14, %rdi
movl %ebp, %esi
callq 0x4870
cmpb $0x1, 0x4938(%rip) # 0x817a
jne 0x3798
movq %r13, %rdi
xorl %eax, %eax
callq 0x3040
callq 0x31d0
jmp 0x3798
movq %r14, %rdi
callq 0x497e
movl 0xc(%r14), %ebx
movl 0x8(%r14), %r15d
addl %ebx, %r15d
movl 0x3c(%rsp), %esi
movq 0x58(%rsp), %rdi
callq 0x3110
movq 0x20(%rsp), %r12
movl 0x38(%rsp), %ebp
leaq 0x1836(%rip), %rsi # 0x50c3
movq %rax, %rdi
callq 0x3160
movl 0x34(%rsp), %esi
movq %rax, %rdi
callq 0x3110
leaq 0x181b(%rip), %rsi # 0x50c3
movq %rax, %rdi
callq 0x3160
movl %ebp, %esi
movq %rax, %rdi
callq 0x3110
leaq 0x1802(%rip), %rsi # 0x50c3
movq %rax, %rdi
callq 0x3160
movq %rax, %rdi
movl 0x30(%rsp), %esi
callq 0x3240
leaq 0x17e7(%rip), %rsi # 0x50c3
movq %rax, %rdi
callq 0x3160
movq %rax, %rdi
movl 0x2c(%rsp), %esi
callq 0x3240
leaq 0x17cc(%rip), %rsi # 0x50c3
movq %rax, %rdi
callq 0x3160
cvtsi2ss %rbx, %xmm0
cvtsi2ss %r15, %xmm1
divss %xmm1, %xmm0
movq %rax, %rdi
callq 0x3120
leaq 0x17a7(%rip), %rsi # 0x50c3
movq %rax, %rdi
callq 0x3160
movq 0x10(%r14), %rsi
movq %rax, %rdi
callq 0x3110
movq %rax, %rdi
callq 0x30e0
movq %r14, %rdi
addq $0x48, %rdi
callq 0x3abc
movq %r14, %rdi
callq 0x3150
movq %r12, %rdi
callq 0x3b52
movq %r12, %rdi
callq 0x3150
leaq 0x60(%rsp), %rdi
callq 0x3070
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %esi
leaq 0x1715(%rip), %rdi # 0x5097
xorl %eax, %eax
callq 0x3a0f
pushq $-0x1
popq %rdi
callq 0x3190
movq 0x47e8(%rip), %rsi # 0x8180
leaq 0x16d9(%rip), %rdi # 0x5078
xorl %eax, %eax
callq 0x3040
jmp 0x3989
jmp 0x39c1
movq %rax, %rbx
movq %r14, %rdi
jmp 0x39b8
movq %rax, %rbx
movq %r12, %rdi
callq 0x3150
jmp 0x39ce
jmp 0x39c1
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3070
movq %rbx, %rdi
callq 0x3260
| _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov dword ptr [rsp+298h+var_278], r9d
mov ebp, r8d
mov r13d, ecx
mov r14d, edx
mov r15d, esi
mov [rsp+298h+var_240], rdi
push 10h
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rdi, rax; this
call _ZN13MemoryManagerC2Ev; MemoryManager::MemoryManager(void)
mov eax, r15d
xor edx, edx
div r14d
mov ebx, eax
push 60h ; '`'
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov ecx, r14d
mov r14, rax
mov [rsp+298h+var_25C], r15d
mov dword ptr [rsp+298h+var_258], r15d
mov [rsp+298h+var_264], ecx
mov dword ptr [rsp+298h+var_258+4], ecx
mov dword ptr [rsp+298h+var_258+8], ebx
mov dword ptr [rsp+298h+var_258+0Ch], r13d
mov rax, 800000001h
mov [rsp+298h+var_248], rax
mov rax, [rsp+298h+var_248]
mov [rsp+298h+var_288], rax; __int64
movups xmm0, [rsp+298h+var_258]
movups [rsp+298h+var_298], xmm0; __int128
movzx ebp, bpl
movzx ebx, byte ptr [rsp+298h+var_278]
mov rdi, r14; this
mov rsi, r12
xor edx, edx
mov ecx, ebp
mov r8d, ebx
call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_bb; Cache::Cache(MemoryManager *,Cache::Policy,Cache*,bool,bool)
mov [rsp+298h+var_268], ebp
mov [rsp+298h+var_260], r13d
mov [rsp+298h+var_26C], ebx
mov [rsp+298h+var_278], r12
mov rdi, r12
mov rsi, r14
call _ZN13MemoryManager8setCacheEP5Cache; MemoryManager::setCache(Cache *)
mov rdi, r14; this
xor esi, esi; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
mov rsi, cs:traceFilePath
lea rdi, [rsp+298h+var_238]
push 8
pop rdx
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+298h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_3991
lea r15, [rsp+298h+var_238]
lea r12, [rsp+298h+var_27D]
lea rbx, [rsp+298h+var_27C]
push 1
pop rbp
lea r13, aPressEnterToCo; "Press Enter to Continue..."
loc_3798:
mov rdi, r15
mov rsi, r12
call __ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_; std::operator>><char,std::char_traits<char>>(std::istream &,char&)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov edx, [rax+rcx+18h]
and edx, 0FFFFFFB5h
or edx, 8
mov [rax+rcx+18h], edx
mov rdi, rax
mov rsi, rbx
call __ZNSi10_M_extractIjEERSiRT_; std::istream::_M_extract<uint>(uint &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_385C
cmp cs:verbose, 1
jnz short loc_37F5
movsx esi, [rsp+298h+var_27D]
mov edx, [rsp+298h+var_27C]
lea rdi, aCX; "%c %x\n"
xor eax, eax
call _printf
loc_37F5:
movzx eax, [rsp+298h+var_27D]
cmp eax, 77h ; 'w'
jz short loc_3818
cmp eax, 72h ; 'r'
jnz loc_3978
mov esi, [rsp+298h+var_27C]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *)
jmp short loc_3828
loc_3818:
mov esi, [rsp+298h+var_27C]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
loc_3828:
cmp cs:verbose, 1
jnz short loc_383B
mov rdi, r14; this
mov esi, ebp; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
loc_383B:
cmp cs:isSingleStep, 1
jnz loc_3798
mov rdi, r13
xor eax, eax
call _printf
call _getchar
jmp loc_3798
loc_385C:
mov rdi, r14; this
call _ZN5Cache15printStatisticsEv; Cache::printStatistics(void)
mov ebx, [r14+0Ch]
mov r15d, [r14+8]
add r15d, ebx
mov esi, [rsp+298h+var_25C]
mov rdi, [rsp+298h+var_240]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r12, [rsp+298h+var_278]
mov ebp, [rsp+298h+var_260]
lea rsi, asc_50C3; ","
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [rsp+298h+var_264]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, asc_50C3; ","
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, ebp
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, asc_50C3; ","
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov esi, [rsp+298h+var_268]
call __ZNSo9_M_insertIbEERSoT_; std::ostream::_M_insert<bool>(bool)
lea rsi, asc_50C3; ","
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov esi, [rsp+298h+var_26C]
call __ZNSo9_M_insertIbEERSoT_; std::ostream::_M_insert<bool>(bool)
lea rsi, asc_50C3; ","
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
cvtsi2ss xmm0, rbx
cvtsi2ss xmm1, r15
divss xmm0, xmm1
mov rdi, rax
call __ZNSolsEf; std::ostream::operator<<(float)
lea rsi, asc_50C3; ","
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+10h]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
mov rdi, r14
add rdi, 48h ; 'H'
call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector()
mov rdi, r14; void *
call __ZdlPv; operator delete(void *)
mov rdi, r12; this
call _ZN13MemoryManagerD2Ev; MemoryManager::~MemoryManager()
mov rdi, r12; void *
call __ZdlPv; operator delete(void *)
lea rdi, [rsp+298h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3978:
movsx esi, al
lea rdi, aIllegalTypeC; "Illegal type %c\n"
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
loc_3989:
push 0FFFFFFFFFFFFFFFFh
pop rdi
call _exit
loc_3991:
mov rsi, cs:traceFilePath
lea rdi, aUnableToOpenFi; "Unable to open file %s\n"
xor eax, eax
call _printf
jmp short loc_3989
jmp short loc_39C1
mov rbx, rax
mov rdi, r14
jmp short loc_39B8
mov rbx, rax
mov rdi, r12; void *
loc_39B8:
call __ZdlPv; operator delete(void *)
jmp short loc_39CE
jmp short $+2
loc_39C1:
mov rbx, rax
lea rdi, [rsp+arg_58]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_39CE:
mov rdi, rbx
call __Unwind_Resume
| long long simulateCache(
long long a1,
unsigned int a2,
unsigned int a3,
unsigned int a4,
unsigned __int8 a5,
char a6)
{
MemoryManager *v9; // r12
int v10; // ebx
Cache *v11; // rax
unsigned int v12; // ecx
Cache *v13; // r14
_QWORD *v14; // rax
_QWORD *v15; // rax
int v16; // ebx
int v17; // r15d
long long v18; // rax
MemoryManager *v19; // r12
unsigned int v20; // ebp
long long v21; // rax
long long v22; // rax
long long v23; // rax
long long v24; // rax
long long v25; // rax
long long v26; // rax
long long v27; // rax
long long v28; // rax
long long v29; // rax
long long v30; // rax
long long v31; // rax
long long v32; // rax
char v34; // [rsp+1Bh] [rbp-27Dh] BYREF
unsigned int v35; // [rsp+1Ch] [rbp-27Ch] BYREF
MemoryManager *v36; // [rsp+20h] [rbp-278h]
unsigned int v37; // [rsp+2Ch] [rbp-26Ch]
unsigned int v38; // [rsp+30h] [rbp-268h]
unsigned int v39; // [rsp+34h] [rbp-264h]
unsigned int v40; // [rsp+38h] [rbp-260h]
unsigned int v41; // [rsp+3Ch] [rbp-25Ch]
__int128 v42; // [rsp+40h] [rbp-258h]
long long v43; // [rsp+50h] [rbp-248h]
long long v44; // [rsp+58h] [rbp-240h]
_BYTE v45[120]; // [rsp+60h] [rbp-238h] BYREF
_BYTE v46[448]; // [rsp+D8h] [rbp-1C0h] BYREF
LOBYTE(v36) = a6;
v44 = a1;
v9 = (MemoryManager *)operator new(0x10uLL);
MemoryManager::MemoryManager(v9);
v10 = a2 / a3;
v11 = (Cache *)operator new(0x60uLL);
v12 = a3;
v13 = v11;
v41 = a2;
*(_QWORD *)&v42 = __PAIR64__(v12, a2);
v39 = v12;
*((_QWORD *)&v42 + 1) = __PAIR64__(a4, v10);
v43 = 0x800000001LL;
Cache::Cache(v11, v42, 0x800000001LL);
v38 = a5;
v40 = a4;
v37 = (unsigned __int8)v36;
v36 = v9;
MemoryManager::setCache(v9, v13);
Cache::printInfo(v13, 0);
std::ifstream::basic_ifstream(v45, traceFilePath, 8LL);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v46) )
{
printf("Unable to open file %s\n", (const char *)traceFilePath);
LABEL_15:
exit(-1LL);
}
while ( 1 )
{
v14 = (_QWORD *)std::operator>><char,std::char_traits<char>>(v45, &v34);
*(_DWORD *)((char *)v14 + *(_QWORD *)(*v14 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v14 + *(_QWORD *)(*v14 - 24LL) + 24) & 0xFFFFFFB5 | 8;
v15 = (_QWORD *)std::istream::_M_extract<unsigned int>(v14, &v35);
if ( (*((_BYTE *)v15 + *(_QWORD *)(*v15 - 24LL) + 32) & 5) != 0 )
break;
if ( verbose == 1 )
printf("%c %x\n", (unsigned int)v34, v35);
if ( v34 == 119 )
{
Cache::setByte(v13, v35, 0, 0LL);
}
else
{
if ( v34 != 114 )
{
dbgprintf("Illegal type %c\n", (unsigned int)v34);
goto LABEL_15;
}
Cache::getByte(v13, v35, 0LL);
}
if ( verbose == 1 )
Cache::printInfo(v13, 1);
if ( isSingleStep == 1 )
{
printf("Press Enter to Continue...");
getchar();
}
}
Cache::printStatistics(v13);
v16 = *((_DWORD *)v13 + 3);
v17 = v16 + *((_DWORD *)v13 + 2);
v18 = std::ostream::_M_insert<unsigned long>(v44, v41);
v19 = v36;
v20 = v40;
v21 = std::operator<<<std::char_traits<char>>(v18, ",");
v22 = std::ostream::_M_insert<unsigned long>(v21, v39);
v23 = std::operator<<<std::char_traits<char>>(v22, ",");
v24 = std::ostream::_M_insert<unsigned long>(v23, v20);
v25 = std::operator<<<std::char_traits<char>>(v24, ",");
v26 = std::ostream::_M_insert<bool>(v25, v38);
v27 = std::operator<<<std::char_traits<char>>(v26, ",");
v28 = std::ostream::_M_insert<bool>(v27, v37);
v29 = std::operator<<<std::char_traits<char>>(v28, ",");
v30 = std::ostream::operator<<(v29, (float)v16 / (float)v17);
v31 = std::operator<<<std::char_traits<char>>(v30, ",");
v32 = std::ostream::_M_insert<unsigned long>(v31, *((_QWORD *)v13 + 2));
std::endl<char,std::char_traits<char>>(v32);
std::vector<Cache::Block>::~vector((char *)v13 + 72);
operator delete(v13);
MemoryManager::~MemoryManager(v19);
operator delete(v19);
return std::ifstream::~ifstream(v45);
}
| simulateCache:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV dword ptr [RSP + 0x20],R9D
MOV EBP,R8D
MOV R13D,ECX
MOV R14D,EDX
MOV R15D,ESI
MOV qword ptr [RSP + 0x58],RDI
PUSH 0x10
POP RDI
CALL 0x00103170
MOV R12,RAX
LAB_001036b7:
MOV RDI,RAX
CALL 0x00103b2c
LAB_001036bf:
MOV EAX,R15D
XOR EDX,EDX
DIV R14D
MOV EBX,EAX
PUSH 0x60
POP RDI
CALL 0x00103170
MOV ECX,R14D
MOV R14,RAX
MOV dword ptr [RSP + 0x3c],R15D
MOV dword ptr [RSP + 0x40],R15D
MOV dword ptr [RSP + 0x34],ECX
MOV dword ptr [RSP + 0x44],ECX
MOV dword ptr [RSP + 0x48],EBX
MOV dword ptr [RSP + 0x4c],R13D
MOV RAX,0x800000001
MOV qword ptr [RSP + 0x50],RAX
LAB_00103701:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
MOVZX EBP,BPL
MOVZX EBX,byte ptr [RSP + 0x20]
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
MOV ECX,EBP
MOV R8D,EBX
CALL 0x001040fc
LAB_0010372f:
MOV dword ptr [RSP + 0x30],EBP
MOV dword ptr [RSP + 0x38],R13D
MOV dword ptr [RSP + 0x2c],EBX
MOV qword ptr [RSP + 0x20],R12
MOV RDI,R12
MOV RSI,R14
CALL 0x001040f6
MOV RDI,R14
XOR ESI,ESI
CALL 0x00104870
MOV RSI,qword ptr [0x00108180]
LEA RDI,[RSP + 0x60]
PUSH 0x8
POP RDX
CALL 0x00103270
LEA RDI,[RSP + 0xd8]
CALL 0x00103060
TEST AL,AL
JZ 0x00103991
LEA R15,[RSP + 0x60]
LEA R12,[RSP + 0x1b]
LEA RBX,[RSP + 0x1c]
PUSH 0x1
POP RBP
LEA R13,[0x1050a8]
LAB_00103798:
MOV RDI,R15
MOV RSI,R12
CALL 0x001031c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18]
AND EDX,0xffffffb5
OR EDX,0x8
MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00103250
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x0010385c
CMP byte ptr [0x00108179],0x1
JNZ 0x001037f5
MOVSX ESI,byte ptr [RSP + 0x1b]
MOV EDX,dword ptr [RSP + 0x1c]
LEA RDI,[0x105090]
XOR EAX,EAX
CALL 0x00103040
LAB_001037f5:
MOVZX EAX,byte ptr [RSP + 0x1b]
CMP EAX,0x77
JZ 0x00103818
CMP EAX,0x72
JNZ 0x00103978
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00104432
JMP 0x00103828
LAB_00103818:
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001046ba
LAB_00103828:
CMP byte ptr [0x00108179],0x1
JNZ 0x0010383b
MOV RDI,R14
MOV ESI,EBP
CALL 0x00104870
LAB_0010383b:
CMP byte ptr [0x0010817a],0x1
JNZ 0x00103798
MOV RDI,R13
XOR EAX,EAX
CALL 0x00103040
CALL 0x001031d0
JMP 0x00103798
LAB_0010385c:
MOV RDI,R14
CALL 0x0010497e
MOV EBX,dword ptr [R14 + 0xc]
MOV R15D,dword ptr [R14 + 0x8]
ADD R15D,EBX
MOV ESI,dword ptr [RSP + 0x3c]
LAB_00103873:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00103110
MOV R12,qword ptr [RSP + 0x20]
MOV EBP,dword ptr [RSP + 0x38]
LEA RSI,[0x1050c3]
MOV RDI,RAX
CALL 0x00103160
MOV ESI,dword ptr [RSP + 0x34]
MOV RDI,RAX
CALL 0x00103110
LEA RSI,[0x1050c3]
MOV RDI,RAX
CALL 0x00103160
MOV ESI,EBP
MOV RDI,RAX
CALL 0x00103110
LEA RSI,[0x1050c3]
MOV RDI,RAX
CALL 0x00103160
MOV RDI,RAX
MOV ESI,dword ptr [RSP + 0x30]
CALL 0x00103240
LEA RSI,[0x1050c3]
MOV RDI,RAX
CALL 0x00103160
MOV RDI,RAX
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00103240
LEA RSI,[0x1050c3]
MOV RDI,RAX
CALL 0x00103160
CVTSI2SS XMM0,RBX
CVTSI2SS XMM1,R15
DIVSS XMM0,XMM1
MOV RDI,RAX
CALL 0x00103120
LEA RSI,[0x1050c3]
MOV RDI,RAX
CALL 0x00103160
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RAX
CALL 0x00103110
MOV RDI,RAX
CALL 0x001030e0
LAB_00103938:
MOV RDI,R14
ADD RDI,0x48
CALL 0x00103abc
MOV RDI,R14
CALL 0x00103150
MOV RDI,R12
CALL 0x00103b52
MOV RDI,R12
CALL 0x00103150
LEA RDI,[RSP + 0x60]
CALL 0x00103070
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00103978:
MOVSX ESI,AL
LEA RDI,[0x105097]
XOR EAX,EAX
CALL 0x00103a0f
LAB_00103989:
PUSH -0x1
POP RDI
CALL 0x00103190
LAB_00103991:
MOV RSI,qword ptr [0x00108180]
LEA RDI,[0x105078]
XOR EAX,EAX
CALL 0x00103040
JMP 0x00103989
|
/* simulateCache(std::ofstream&, unsigned int, unsigned int, unsigned int, bool, bool) */
void simulateCache(ofstream *param_1,uint param_2,uint param_3,uint param_4,bool param_5,
bool param_6)
{
int iVar1;
char cVar2;
MemoryManager *pMVar3;
Cache *this;
istream *piVar4;
ostream *poVar5;
uint uVar6;
int3 in_register_00000089;
char local_27d;
uint local_27c;
MemoryManager *local_278;
uint local_26c;
uint local_268;
uint local_264;
uint local_260;
uint local_25c;
uint local_258;
uint uStack_254;
uint uStack_250;
uint uStack_24c;
int8 local_248;
ofstream *local_240;
ifstream local_238 [520];
local_278 = (MemoryManager *)CONCAT44(local_278._4_4_,CONCAT31(in_register_00000089,param_6));
local_240 = param_1;
pMVar3 = (MemoryManager *)operator_new(0x10);
/* try { // try from 001036b7 to 001036be has its CatchHandler @ 001039b2 */
MemoryManager::MemoryManager(pMVar3);
this = (Cache *)operator_new(0x60);
local_248 = 0x800000001;
/* try { // try from 00103701 to 0010372e has its CatchHandler @ 001039aa */
uVar6 = (uint)(byte)local_278;
local_264 = param_3;
local_25c = param_2;
local_258 = param_2;
uStack_254 = param_3;
uStack_250 = param_2 / param_3;
uStack_24c = param_4;
Cache::Cache(this,pMVar3,0,param_5,uVar6);
local_278 = pMVar3;
local_26c = uVar6;
local_268 = (uint)param_5;
local_260 = param_4;
MemoryManager::setCache(pMVar3,this);
Cache::printInfo(this,false);
std::ifstream::ifstream(local_238,traceFilePath,8);
cVar2 = std::__basic_file<char>::is_open();
if (cVar2 == '\0') {
printf("Unable to open file %s\n",traceFilePath);
LAB_00103989:
/* WARNING: Subroutine does not return */
exit(-1);
}
do {
/* try { // try from 00103798 to 0010383a has its CatchHandler @ 001039c1 */
piVar4 = std::operator>>((istream *)local_238,&local_27d);
*(uint *)(piVar4 + *(long *)(*(long *)piVar4 + -0x18) + 0x18) =
*(uint *)(piVar4 + *(long *)(*(long *)piVar4 + -0x18) + 0x18) & 0xffffffb5 | 8;
piVar4 = std::istream::_M_extract<unsigned_int>((uint *)piVar4);
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) {
/* try { // try from 0010385c to 00103863 has its CatchHandler @ 001039a8 */
Cache::printStatistics(this);
uVar6 = *(uint *)(this + 0xc);
iVar1 = *(int *)(this + 8);
/* try { // try from 00103873 to 00103937 has its CatchHandler @ 001039bf */
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)local_240);
pMVar3 = local_278;
poVar5 = std::operator<<(poVar5,",");
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
poVar5 = std::operator<<(poVar5,",");
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
poVar5 = std::operator<<(poVar5,",");
poVar5 = std::ostream::_M_insert<bool>(SUB81(poVar5,0));
poVar5 = std::operator<<(poVar5,",");
poVar5 = std::ostream::_M_insert<bool>(SUB81(poVar5,0));
poVar5 = std::operator<<(poVar5,",");
poVar5 = (ostream *)std::ostream::operator<<(poVar5,(float)uVar6 / (float)(iVar1 + uVar6));
poVar5 = std::operator<<(poVar5,",");
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::endl<char,std::char_traits<char>>(poVar5);
std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48));
operator_delete(this);
MemoryManager::~MemoryManager(pMVar3);
operator_delete(pMVar3);
std::ifstream::~ifstream(local_238);
return;
}
if (verbose == '\x01') {
printf("%c %x\n",(ulong)(uint)(int)local_27d,(ulong)local_27c);
}
if (local_27d == 'w') {
Cache::setByte(this,local_27c,'\0',(uint *)0x0);
}
else {
if (local_27d != 'r') {
dbgprintf("Illegal type %c\n",(ulong)(uint)(int)local_27d);
goto LAB_00103989;
}
Cache::getByte(this,local_27c,(uint *)0x0);
}
if (verbose == '\x01') {
Cache::printInfo(this,true);
}
if (isSingleStep == '\x01') {
printf("Press Enter to Continue...");
getchar();
}
} while( true );
}
| |
34,595 | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCache.cpp | void simulateCache(std::ofstream &csvFile, uint32_t cacheSize,
uint32_t blockSize, uint32_t associativity, bool writeBack,
bool writeAllocate) {
Cache::Policy policy;
policy.cacheSize = cacheSize;
policy.blockSize = blockSize;
policy.blockNum = cacheSize / blockSize;
policy.associativity = associativity;
policy.hitLatency = 1;
policy.missLatency = 8;
// Initialize memory and cache
MemoryManager *memory = nullptr;
Cache *cache = nullptr;
memory = new MemoryManager();
cache = new Cache(memory, policy, nullptr, writeBack, writeAllocate);
memory->setCache(cache);
cache->printInfo(false);
// Read and execute trace in cache-trace/ folder
std::ifstream trace(traceFilePath);
if (!trace.is_open()) {
printf("Unable to open file %s\n", traceFilePath);
exit(-1);
}
char type; //'r' for read, 'w' for write
uint32_t addr;
while (trace >> type >> std::hex >> addr) {
if (verbose)
printf("%c %x\n", type, addr);
switch (type) {
case 'r':
cache->getByte(addr);
break;
case 'w':
cache->setByte(addr, 0);
break;
default:
dbgprintf("Illegal type %c\n", type);
exit(-1);
}
if (verbose)
cache->printInfo(true);
if (isSingleStep) {
printf("Press Enter to Continue...");
getchar();
}
}
// Output Simulation Results
cache->printStatistics();
float missRate = (float)cache->statistics.numMiss /
(cache->statistics.numHit + cache->statistics.numMiss);
csvFile << cacheSize << "," << blockSize << "," << associativity << ","
<< writeBack << "," << writeAllocate << "," << missRate << ","
<< cache->statistics.totalCycles << std::endl;
delete cache;
delete memory;
} | O3 | cpp | simulateCache(std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned int, unsigned int, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movl %r9d, 0x20(%rsp)
movl %r8d, %ebp
movl %ecx, %r13d
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, 0x58(%rsp)
movl $0x10, %edi
callq 0x3170
movq %rax, %r12
movq %rax, %rdi
callq 0x3d60
movl %r15d, %eax
xorl %edx, %edx
divl %r14d
movl %eax, %ebx
movl $0x60, %edi
callq 0x3170
movl %r14d, %ecx
movq %rax, %r14
movl %r15d, 0x3c(%rsp)
movl %r15d, 0x40(%rsp)
movl %ecx, 0x38(%rsp)
movl %ecx, 0x44(%rsp)
movl %ebx, 0x48(%rsp)
movl %r13d, 0x4c(%rsp)
movabsq $0x800000001, %rax # imm = 0x800000001
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movzbl %bpl, %ebp
movzbl 0x20(%rsp), %ebx
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x4364
movl %ebp, 0x30(%rsp)
movl %r13d, 0x34(%rsp)
movl %ebx, 0x2c(%rsp)
movq %r12, 0x20(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x435e
movq %r14, %rdi
xorl %esi, %esi
callq 0x4bd0
movq 0x5756(%rip), %rsi # 0x9180
leaq 0x60(%rsp), %rdi
movl $0x8, %edx
callq 0x3270
leaq 0xd8(%rsp), %rdi
callq 0x3070
testb %al, %al
je 0x3cb9
leaq 0x60(%rsp), %r15
leaq 0x1b(%rsp), %r12
leaq 0x1c(%rsp), %rbx
leaq 0x262c(%rip), %r13 # 0x6090
leaq 0x263d(%rip), %rbp # 0x60a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x31c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3b2e
cmpb $0x1, 0x56ca(%rip) # 0x9179
jne 0x3ac4
movsbl 0x1b(%rsp), %esi
movl 0x1c(%rsp), %edx
movq %r13, %rdi
xorl %eax, %eax
callq 0x3050
movzbl 0x1b(%rsp), %eax
cmpl $0x77, %eax
je 0x3ae7
cmpl $0x72, %eax
jne 0x3c9e
movl 0x1c(%rsp), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x46fe
jmp 0x3af7
movl 0x1c(%rsp), %esi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x49ee
cmpb $0x1, 0x567b(%rip) # 0x9179
jne 0x3b0d
movq %r14, %rdi
movl $0x1, %esi
callq 0x4bd0
cmpb $0x1, 0x5666(%rip) # 0x917a
jne 0x3a6b
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3050
callq 0x31d0
jmp 0x3a6b
movq %r14, %rdi
callq 0x4cf8
movl 0xc(%r14), %r15d
movl 0x8(%r14), %r12d
addl %r15d, %r12d
movl 0x3c(%rsp), %esi
movq 0x58(%rsp), %rdi
callq 0x30f0
movq 0x20(%rsp), %r13
movq %rax, %rbx
leaq 0x2565(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movl 0x38(%rsp), %esi
movq %rbx, %rdi
callq 0x30f0
movq %rax, %rbx
leaq 0x2542(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movl 0x34(%rsp), %esi
movq %rbx, %rdi
callq 0x30f0
movq %rax, %rbx
leaq 0x251f(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movq %rbx, %rdi
movl 0x30(%rsp), %esi
callq 0x3240
movq %rax, %rbx
leaq 0x24fc(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movq %rbx, %rdi
movl 0x2c(%rsp), %esi
callq 0x3240
movq %rax, %rbx
leaq 0x24d9(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
cvtsi2ss %r15, %xmm0
cvtsi2ss %r12, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x3220
movq %rax, %rbx
leaq 0x24a8(%rip), %rsi # 0x60c3
movl $0x1, %edx
movq %rax, %rdi
callq 0x3190
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x30f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %r14, %rdi
addq $0x48, %rdi
callq 0x3d18
movq %r14, %rdi
callq 0x3150
movq %r13, %rdi
callq 0x3d8a
movq %r13, %rdi
callq 0x3150
leaq 0x60(%rsp), %rdi
callq 0x3080
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %esi
leaq 0x23ef(%rip), %rdi # 0x6097
xorl %eax, %eax
callq 0x32c0
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x31a0
movq 0x54c0(%rip), %rsi # 0x9180
leaq 0x23b1(%rip), %rdi # 0x6078
xorl %eax, %eax
callq 0x3050
jmp 0x3caf
jmp 0x3ce9
movq %rax, %rbx
movq %r14, %rdi
jmp 0x3ce0
movq %rax, %rbx
movq %r12, %rdi
callq 0x3150
jmp 0x3cf6
jmp 0x3ce9
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3260
| _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjjbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov dword ptr [rsp+298h+var_278], r9d
mov ebp, r8d
mov r13d, ecx
mov r14d, edx
mov r15d, esi
mov [rsp+298h+var_240], rdi
mov edi, 10h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rdi, rax; this
call _ZN13MemoryManagerC2Ev; MemoryManager::MemoryManager(void)
mov eax, r15d
xor edx, edx
div r14d
mov ebx, eax
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov ecx, r14d
mov r14, rax
mov [rsp+298h+var_25C], r15d
mov dword ptr [rsp+298h+var_258], r15d
mov [rsp+298h+var_260], ecx
mov dword ptr [rsp+298h+var_258+4], ecx
mov dword ptr [rsp+298h+var_258+8], ebx
mov dword ptr [rsp+298h+var_258+0Ch], r13d
mov rax, 800000001h
mov [rsp+298h+var_248], rax
mov rax, [rsp+298h+var_248]
mov [rsp+298h+var_288], rax; __int64
movups xmm0, [rsp+298h+var_258]
movups [rsp+298h+var_298], xmm0; __int128
movzx ebp, bpl
movzx ebx, byte ptr [rsp+298h+var_278]
mov rdi, r14; this
mov rsi, r12
xor edx, edx
mov ecx, ebp
mov r8d, ebx
call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_bb; Cache::Cache(MemoryManager *,Cache::Policy,Cache*,bool,bool)
mov [rsp+298h+var_268], ebp
mov [rsp+298h+var_264], r13d
mov [rsp+298h+var_26C], ebx
mov [rsp+298h+var_278], r12
mov rdi, r12
mov rsi, r14
call _ZN13MemoryManager8setCacheEP5Cache; MemoryManager::setCache(Cache *)
mov rdi, r14; this
xor esi, esi; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
mov rsi, cs:traceFilePath
lea rdi, [rsp+298h+var_238]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+298h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_3CB9
lea r15, [rsp+298h+var_238]
lea r12, [rsp+298h+var_27D]
lea rbx, [rsp+298h+var_27C]
lea r13, aCX; "%c %x\n"
lea rbp, aPressEnterToCo; "Press Enter to Continue..."
loc_3A6B:
mov rdi, r15
mov rsi, r12
call __ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_; std::operator>><char,std::char_traits<char>>(std::istream &,char&)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov edx, [rax+rcx+18h]
and edx, 0FFFFFFB5h
or edx, 8
mov [rax+rcx+18h], edx
mov rdi, rax
mov rsi, rbx
call __ZNSi10_M_extractIjEERSiRT_; std::istream::_M_extract<uint>(uint &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_3B2E
cmp cs:verbose, 1
jnz short loc_3AC4
movsx esi, [rsp+298h+var_27D]
mov edx, [rsp+298h+var_27C]
mov rdi, r13
xor eax, eax
call _printf
loc_3AC4:
movzx eax, [rsp+298h+var_27D]
cmp eax, 77h ; 'w'
jz short loc_3AE7
cmp eax, 72h ; 'r'
jnz loc_3C9E
mov esi, [rsp+298h+var_27C]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *)
jmp short loc_3AF7
loc_3AE7:
mov esi, [rsp+298h+var_27C]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *)
loc_3AF7:
cmp cs:verbose, 1
jnz short loc_3B0D
mov rdi, r14; this
mov esi, 1; bool
call _ZN5Cache9printInfoEb; Cache::printInfo(bool)
loc_3B0D:
cmp cs:isSingleStep, 1
jnz loc_3A6B
mov rdi, rbp
xor eax, eax
call _printf
call _getchar
jmp loc_3A6B
loc_3B2E:
mov rdi, r14; this
call _ZN5Cache15printStatisticsEv; Cache::printStatistics(void)
mov r15d, [r14+0Ch]
mov r12d, [r14+8]
add r12d, r15d
mov esi, [rsp+298h+var_25C]
mov rdi, [rsp+298h+var_240]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r13, [rsp+298h+var_278]
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [rsp+298h+var_260]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [rsp+298h+var_264]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, [rsp+298h+var_268]
call __ZNSo9_M_insertIbEERSoT_; std::ostream::_M_insert<bool>(bool)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rbx
mov esi, [rsp+298h+var_26C]
call __ZNSo9_M_insertIbEERSoT_; std::ostream::_M_insert<bool>(bool)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
cvtsi2ss xmm0, r15
cvtsi2ss xmm1, r12
divss xmm0, xmm1
cvtss2sd xmm0, xmm0
mov rdi, rbx
call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double)
mov rbx, rax
lea rsi, asc_60C3; ","
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14+10h]
mov rdi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbx, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r14
add rdi, 48h ; 'H'
call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector()
mov rdi, r14; void *
call __ZdlPv; operator delete(void *)
mov rdi, r13; this
call _ZN13MemoryManagerD2Ev; MemoryManager::~MemoryManager()
mov rdi, r13; void *
call __ZdlPv; operator delete(void *)
lea rdi, [rsp+298h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3C9E:
movsx esi, al
lea rdi, aIllegalTypeC; "Illegal type %c\n"
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
loc_3CAF:
mov edi, 0FFFFFFFFh
call _exit
loc_3CB9:
mov rsi, cs:traceFilePath
lea rdi, aUnableToOpenFi; "Unable to open file %s\n"
xor eax, eax
call _printf
jmp short loc_3CAF
jmp short loc_3CE9
mov rbx, rax
mov rdi, r14
jmp short loc_3CE0
mov rbx, rax
mov rdi, r12; void *
loc_3CE0:
call __ZdlPv; operator delete(void *)
jmp short loc_3CF6
jmp short $+2
loc_3CE9:
mov rbx, rax
lea rdi, [rsp+arg_58]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_3CF6:
mov rdi, rbx
call __Unwind_Resume
| long long simulateCache(
long long a1,
unsigned int a2,
unsigned int a3,
unsigned int a4,
unsigned __int8 a5,
char a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
MemoryManager *v17; // r12
int v18; // ebx
Cache *v19; // rax
unsigned int v20; // ecx
Cache *v21; // r14
__int128 v22; // xmm0
_QWORD *v23; // rax
_QWORD *v24; // rax
long long v25; // rdx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v30; // rcx
int v31; // r15d
int v32; // r12d
long long v33; // rax
MemoryManager *v34; // r13
long long v35; // rbx
long long v36; // rbx
long long v37; // rbx
long long v38; // rbx
long long v39; // rbx
long long v40; // rbx
std::ostream *v41; // rbx
char v42; // al
std::ostream *v43; // rax
char v45; // [rsp+0h] [rbp-298h]
char v46; // [rsp+1Bh] [rbp-27Dh] BYREF
unsigned int v47; // [rsp+1Ch] [rbp-27Ch] BYREF
MemoryManager *v48; // [rsp+20h] [rbp-278h]
unsigned int v49; // [rsp+2Ch] [rbp-26Ch]
unsigned int v50; // [rsp+30h] [rbp-268h]
unsigned int v51; // [rsp+34h] [rbp-264h]
unsigned int v52; // [rsp+38h] [rbp-260h]
unsigned int v53; // [rsp+3Ch] [rbp-25Ch]
__int128 v54; // [rsp+40h] [rbp-258h]
long long v55; // [rsp+50h] [rbp-248h]
long long v56; // [rsp+58h] [rbp-240h]
_BYTE v57[120]; // [rsp+60h] [rbp-238h] BYREF
_BYTE v58[448]; // [rsp+D8h] [rbp-1C0h] BYREF
LOBYTE(v48) = a6;
v56 = a1;
v17 = (MemoryManager *)operator new(0x10uLL);
MemoryManager::MemoryManager(v17);
v18 = a2 / a3;
v19 = (Cache *)operator new(0x60uLL);
v20 = a3;
v21 = v19;
v53 = a2;
*(_QWORD *)&v54 = __PAIR64__(v20, a2);
v52 = v20;
*((_QWORD *)&v54 + 1) = __PAIR64__(a4, v18);
v55 = 0x800000001LL;
v22 = v54;
Cache::Cache(v19, v54, 0x800000001LL);
v50 = a5;
v51 = a4;
v49 = (unsigned __int8)v48;
v48 = v17;
MemoryManager::setCache(v17, v21);
Cache::printInfo(v21, 0);
std::ifstream::basic_ifstream(v57, traceFilePath, 8LL);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v58) )
{
printf("Unable to open file %s\n", (const char *)traceFilePath);
LABEL_15:
exit(0xFFFFFFFFLL);
}
while ( 1 )
{
v23 = (_QWORD *)std::operator>><char,std::char_traits<char>>(v57, &v46);
*(_DWORD *)((char *)v23 + *(_QWORD *)(*v23 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v23 + *(_QWORD *)(*v23 - 24LL) + 24) & 0xFFFFFFB5 | 8;
v24 = (_QWORD *)std::istream::_M_extract<unsigned int>(v23, &v47);
v30 = *(_QWORD *)(*v24 - 24LL);
if ( (*((_BYTE *)v24 + v30 + 32) & 5) != 0 )
break;
if ( verbose == 1 )
printf("%c %x\n", (unsigned int)v46, v47);
if ( v46 == 119 )
{
Cache::setByte(v21, v47, 0, 0LL);
}
else
{
if ( v46 != 114 )
{
dbgprintf(
"Illegal type %c\n",
(unsigned int)v46,
v25,
v30,
v26,
v27,
(__m128)v22,
a8,
a9,
a10,
v28,
v29,
a13,
a14,
v45);
goto LABEL_15;
}
Cache::getByte(v21, v47, 0LL);
}
if ( verbose == 1 )
Cache::printInfo(v21, 1);
if ( isSingleStep == 1 )
{
printf("Press Enter to Continue...");
getchar();
}
}
Cache::printStatistics(v21);
v31 = *((_DWORD *)v21 + 3);
v32 = v31 + *((_DWORD *)v21 + 2);
v33 = std::ostream::_M_insert<unsigned long>(v56, v53);
v34 = v48;
v35 = v33;
std::__ostream_insert<char,std::char_traits<char>>(v33, ",", 1LL);
v36 = std::ostream::_M_insert<unsigned long>(v35, v52);
std::__ostream_insert<char,std::char_traits<char>>(v36, ",", 1LL);
v37 = std::ostream::_M_insert<unsigned long>(v36, v51);
std::__ostream_insert<char,std::char_traits<char>>(v37, ",", 1LL);
v38 = std::ostream::_M_insert<bool>(v37, v50);
std::__ostream_insert<char,std::char_traits<char>>(v38, ",", 1LL);
v39 = std::ostream::_M_insert<bool>(v38, v49);
std::__ostream_insert<char,std::char_traits<char>>(v39, ",", 1LL);
v40 = std::ostream::_M_insert<double>(v39, (float)((float)v31 / (float)v32));
std::__ostream_insert<char,std::char_traits<char>>(v40, ",", 1LL);
v41 = (std::ostream *)std::ostream::_M_insert<unsigned long>(v40, *((_QWORD *)v21 + 2));
v42 = std::ios::widen((char *)v41 + *(_QWORD *)(*(_QWORD *)v41 - 24LL), 10LL);
v43 = (std::ostream *)std::ostream::put(v41, v42);
std::ostream::flush(v43);
std::vector<Cache::Block>::~vector((char *)v21 + 72);
operator delete(v21);
MemoryManager::~MemoryManager(v34);
operator delete(v34);
return std::ifstream::~ifstream(v57);
}
| simulateCache:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV dword ptr [RSP + 0x20],R9D
MOV EBP,R8D
MOV R13D,ECX
MOV R14D,EDX
MOV R15D,ESI
MOV qword ptr [RSP + 0x58],RDI
MOV EDI,0x10
CALL 0x00103170
MOV R12,RAX
LAB_00103982:
MOV RDI,RAX
CALL 0x00103d60
LAB_0010398a:
MOV EAX,R15D
XOR EDX,EDX
DIV R14D
MOV EBX,EAX
MOV EDI,0x60
CALL 0x00103170
MOV ECX,R14D
MOV R14,RAX
MOV dword ptr [RSP + 0x3c],R15D
MOV dword ptr [RSP + 0x40],R15D
MOV dword ptr [RSP + 0x38],ECX
MOV dword ptr [RSP + 0x44],ECX
MOV dword ptr [RSP + 0x48],EBX
MOV dword ptr [RSP + 0x4c],R13D
MOV RAX,0x800000001
MOV qword ptr [RSP + 0x50],RAX
LAB_001039ce:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
MOVZX EBP,BPL
MOVZX EBX,byte ptr [RSP + 0x20]
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
MOV ECX,EBP
MOV R8D,EBX
CALL 0x00104364
LAB_001039fc:
MOV dword ptr [RSP + 0x30],EBP
MOV dword ptr [RSP + 0x34],R13D
MOV dword ptr [RSP + 0x2c],EBX
MOV qword ptr [RSP + 0x20],R12
MOV RDI,R12
MOV RSI,R14
CALL 0x0010435e
MOV RDI,R14
XOR ESI,ESI
CALL 0x00104bd0
MOV RSI,qword ptr [0x00109180]
LEA RDI,[RSP + 0x60]
MOV EDX,0x8
CALL 0x00103270
LEA RDI,[RSP + 0xd8]
CALL 0x00103070
TEST AL,AL
JZ 0x00103cb9
LEA R15,[RSP + 0x60]
LEA R12,[RSP + 0x1b]
LEA RBX,[RSP + 0x1c]
LEA R13,[0x106090]
LEA RBP,[0x1060a8]
LAB_00103a6b:
MOV RDI,R15
MOV RSI,R12
CALL 0x001031c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18]
AND EDX,0xffffffb5
OR EDX,0x8
MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00103250
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00103b2e
CMP byte ptr [0x00109179],0x1
JNZ 0x00103ac4
MOVSX ESI,byte ptr [RSP + 0x1b]
MOV EDX,dword ptr [RSP + 0x1c]
MOV RDI,R13
XOR EAX,EAX
CALL 0x00103050
LAB_00103ac4:
MOVZX EAX,byte ptr [RSP + 0x1b]
CMP EAX,0x77
JZ 0x00103ae7
CMP EAX,0x72
JNZ 0x00103c9e
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDI,R14
XOR EDX,EDX
CALL 0x001046fe
JMP 0x00103af7
LAB_00103ae7:
MOV ESI,dword ptr [RSP + 0x1c]
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001049ee
LAB_00103af7:
CMP byte ptr [0x00109179],0x1
JNZ 0x00103b0d
MOV RDI,R14
MOV ESI,0x1
CALL 0x00104bd0
LAB_00103b0d:
CMP byte ptr [0x0010917a],0x1
JNZ 0x00103a6b
MOV RDI,RBP
XOR EAX,EAX
CALL 0x00103050
CALL 0x001031d0
JMP 0x00103a6b
LAB_00103b2e:
MOV RDI,R14
CALL 0x00104cf8
MOV R15D,dword ptr [R14 + 0xc]
MOV R12D,dword ptr [R14 + 0x8]
ADD R12D,R15D
MOV ESI,dword ptr [RSP + 0x3c]
LAB_00103b45:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001030f0
MOV R13,qword ptr [RSP + 0x20]
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV ESI,dword ptr [RSP + 0x38]
MOV RDI,RBX
CALL 0x001030f0
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV ESI,dword ptr [RSP + 0x34]
MOV RDI,RBX
CALL 0x001030f0
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV RDI,RBX
MOV ESI,dword ptr [RSP + 0x30]
CALL 0x00103240
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV RDI,RBX
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00103240
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
CVTSI2SS XMM0,R15
CVTSI2SS XMM1,R12
DIVSS XMM0,XMM1
CVTSS2SD XMM0,XMM0
MOV RDI,RBX
CALL 0x00103220
MOV RBX,RAX
LEA RSI,[0x1060c3]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00103190
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RBX
CALL 0x001030f0
MOV RBX,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00103160
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00103040
MOV RDI,RAX
CALL 0x00103100
LAB_00103c5e:
MOV RDI,R14
ADD RDI,0x48
CALL 0x00103d18
MOV RDI,R14
CALL 0x00103150
MOV RDI,R13
CALL 0x00103d8a
MOV RDI,R13
CALL 0x00103150
LEA RDI,[RSP + 0x60]
CALL 0x00103080
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00103c9e:
MOVSX ESI,AL
LEA RDI,[0x106097]
XOR EAX,EAX
CALL 0x001032c0
LAB_00103caf:
MOV EDI,0xffffffff
CALL 0x001031a0
LAB_00103cb9:
MOV RSI,qword ptr [0x00109180]
LEA RDI,[0x106078]
XOR EAX,EAX
CALL 0x00103050
JMP 0x00103caf
|
/* simulateCache(std::ofstream&, unsigned int, unsigned int, unsigned int, bool, bool) */
void simulateCache(ofstream *param_1,uint param_2,uint param_3,uint param_4,bool param_5,
bool param_6)
{
int iVar1;
char cVar2;
MemoryManager *pMVar3;
Cache *this;
istream *piVar4;
ostream *poVar5;
uint uVar6;
int3 in_register_00000089;
char local_27d;
uint local_27c;
MemoryManager *local_278;
uint local_26c;
uint local_268;
uint local_264;
uint local_260;
uint local_25c;
uint local_258;
uint uStack_254;
uint uStack_250;
uint uStack_24c;
int8 local_248;
ofstream *local_240;
ifstream local_238 [520];
local_278 = (MemoryManager *)CONCAT44(local_278._4_4_,CONCAT31(in_register_00000089,param_6));
local_240 = param_1;
pMVar3 = (MemoryManager *)operator_new(0x10);
/* try { // try from 00103982 to 00103989 has its CatchHandler @ 00103cda */
MemoryManager::MemoryManager(pMVar3);
this = (Cache *)operator_new(0x60);
local_248 = 0x800000001;
/* try { // try from 001039ce to 001039fb has its CatchHandler @ 00103cd2 */
uVar6 = (uint)(byte)local_278;
local_260 = param_3;
local_25c = param_2;
local_258 = param_2;
uStack_254 = param_3;
uStack_250 = param_2 / param_3;
uStack_24c = param_4;
Cache::Cache(this,pMVar3,0,param_5,uVar6);
local_278 = pMVar3;
local_26c = uVar6;
local_268 = (uint)param_5;
local_264 = param_4;
MemoryManager::setCache(pMVar3,this);
Cache::printInfo(this,false);
std::ifstream::ifstream(local_238,traceFilePath,8);
cVar2 = std::__basic_file<char>::is_open();
if (cVar2 == '\0') {
printf("Unable to open file %s\n",traceFilePath);
LAB_00103caf:
/* WARNING: Subroutine does not return */
exit(-1);
}
do {
/* try { // try from 00103a6b to 00103b0c has its CatchHandler @ 00103ce9 */
piVar4 = std::operator>>((istream *)local_238,&local_27d);
*(uint *)(piVar4 + *(long *)(*(long *)piVar4 + -0x18) + 0x18) =
*(uint *)(piVar4 + *(long *)(*(long *)piVar4 + -0x18) + 0x18) & 0xffffffb5 | 8;
piVar4 = std::istream::_M_extract<unsigned_int>((uint *)piVar4);
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) {
/* try { // try from 00103b2e to 00103b35 has its CatchHandler @ 00103cd0 */
Cache::printStatistics(this);
uVar6 = *(uint *)(this + 0xc);
iVar1 = *(int *)(this + 8);
/* try { // try from 00103b45 to 00103c5d has its CatchHandler @ 00103ce7 */
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)local_240);
pMVar3 = local_278;
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<bool>(SUB81(poVar5,0));
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<bool>(SUB81(poVar5,0));
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<double>((double)((float)uVar6 / (float)(iVar1 + uVar6)));
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",",1);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::ios::widen((char)*(int8 *)(*(long *)poVar5 + -0x18) + (char)poVar5);
std::ostream::put((char)poVar5);
std::ostream::flush();
std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48));
operator_delete(this);
MemoryManager::~MemoryManager(pMVar3);
operator_delete(pMVar3);
std::ifstream::~ifstream(local_238);
return;
}
if (verbose == '\x01') {
printf("%c %x\n",(ulong)(uint)(int)local_27d,(ulong)local_27c);
}
if (local_27d == 'w') {
Cache::setByte((uint)this,(uchar)local_27c,(uint *)0x0);
}
else {
if (local_27d != 'r') {
dbgprintf("Illegal type %c\n",(ulong)(uint)(int)local_27d);
goto LAB_00103caf;
}
Cache::getByte(this,local_27c,(uint *)0x0);
}
if (verbose == '\x01') {
Cache::printInfo(this,true);
}
if (isSingleStep == '\x01') {
printf("Press Enter to Continue...");
getchar();
}
} while( true );
}
| |
34,596 | js_shape_hash_unlink | bluesky950520[P]quickjs/quickjs.c | static void js_shape_hash_unlink(JSRuntime *rt, JSShape *sh)
{
uint32_t h;
JSShape **psh;
h = get_shape_hash(sh->hash, rt->shape_hash_bits);
psh = &rt->shape_hash[h];
while (*psh != sh)
psh = &(*psh)->shape_hash_next;
*psh = sh->shape_hash_next;
rt->shape_hash_count--;
} | O0 | c | js_shape_hash_unlink:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl 0x1c(%rax), %edi
movq 0x20(%rsp), %rax
movl 0x184(%rax), %esi
callq 0x63b80
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq 0x190(%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
je 0x63b18
movq 0x8(%rsp), %rax
movq (%rax), %rax
addq $0x30, %rax
movq %rax, 0x8(%rsp)
jmp 0x63af6
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
movl 0x18c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18c(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| js_shape_hash_unlink:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_10]
mov edi, [rax+1Ch]
mov rax, [rsp+28h+var_8]
mov esi, [rax+184h]
call get_shape_hash
mov [rsp+28h+var_14], eax
mov rax, [rsp+28h+var_8]
mov rax, [rax+190h]
mov ecx, [rsp+28h+var_14]
shl rcx, 3
add rax, rcx
mov [rsp+28h+var_20], rax
loc_63AF6:
mov rax, [rsp+28h+var_20]
mov rax, [rax]
cmp rax, [rsp+28h+var_10]
jz short loc_63B18
mov rax, [rsp+28h+var_20]
mov rax, [rax]
add rax, 30h ; '0'
mov [rsp+28h+var_20], rax
jmp short loc_63AF6
loc_63B18:
mov rax, [rsp+28h+var_10]
mov rcx, [rax+30h]
mov rax, [rsp+28h+var_20]
mov [rax], rcx
mov rax, [rsp+28h+var_8]
mov ecx, [rax+18Ch]
add ecx, 0FFFFFFFFh
mov [rax+18Ch], ecx
add rsp, 28h
retn
| long long js_shape_hash_unlink(long long a1, long long a2)
{
long long result; // rax
_QWORD *i; // [rsp+8h] [rbp-20h]
for ( i = (_QWORD *)(8LL * (unsigned int)get_shape_hash(*(unsigned int *)(a2 + 28), *(unsigned int *)(a1 + 388))
+ *(_QWORD *)(a1 + 400)); *i != a2; i = (_QWORD *)(*i + 48LL) )
;
*i = *(_QWORD *)(a2 + 48);
result = a1;
--*(_DWORD *)(a1 + 396);
return result;
}
| js_shape_hash_unlink:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV EDI,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RAX + 0x184]
CALL 0x00163b80
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x190]
MOV ECX,dword ptr [RSP + 0x14]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
LAB_00163af6:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RSP + 0x18]
JZ 0x00163b18
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
ADD RAX,0x30
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00163af6
LAB_00163b18:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RAX + 0x18c]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x18c],ECX
ADD RSP,0x28
RET
|
void js_shape_hash_unlink(long param_1,long param_2)
{
uint uVar1;
int8 local_20;
uVar1 = get_shape_hash(*(int4 *)(param_2 + 0x1c),*(int4 *)(param_1 + 0x184));
for (local_20 = (long *)(*(long *)(param_1 + 400) + (ulong)uVar1 * 8); *local_20 != param_2;
local_20 = (long *)(*local_20 + 0x30)) {
}
*local_20 = *(long *)(param_2 + 0x30);
*(int *)(param_1 + 0x18c) = *(int *)(param_1 + 0x18c) + -1;
return;
}
| |
34,597 | js_shape_hash_unlink | bluesky950520[P]quickjs/quickjs.c | static void js_shape_hash_unlink(JSRuntime *rt, JSShape *sh)
{
uint32_t h;
JSShape **psh;
h = get_shape_hash(sh->hash, rt->shape_hash_bits);
psh = &rt->shape_hash[h];
while (*psh != sh)
psh = &(*psh)->shape_hash_next;
*psh = sh->shape_hash_next;
rt->shape_hash_count--;
} | O2 | c | js_shape_hash_unlink:
movl 0x1c(%rsi), %eax
xorl %ecx, %ecx
subb 0x184(%rdi), %cl
shrl %cl, %eax
shlq $0x3, %rax
addq 0x190(%rdi), %rax
movq %rax, %rcx
movq (%rax), %rdx
leaq 0x30(%rdx), %rax
cmpq %rsi, %rdx
jne 0x386f7
movq 0x30(%rsi), %rax
movq %rax, (%rcx)
decl 0x18c(%rdi)
retq
| js_shape_hash_unlink:
mov eax, [rsi+1Ch]
xor ecx, ecx
sub cl, [rdi+184h]
shr eax, cl
shl rax, 3
add rax, [rdi+190h]
loc_386F7:
mov rcx, rax
mov rdx, [rax]
lea rax, [rdx+30h]
cmp rdx, rsi
jnz short loc_386F7
mov rax, [rsi+30h]
mov [rcx], rax
dec dword ptr [rdi+18Ch]
retn
| long long js_shape_hash_unlink(long long a1, long long a2)
{
_QWORD *v2; // rax
_QWORD *v3; // rcx
long long v4; // rdx
long long result; // rax
v2 = (_QWORD *)(*(_QWORD *)(a1 + 400) + 8LL * (unsigned int)(*(_DWORD *)(a2 + 28) >> -*(_BYTE *)(a1 + 388)));
do
{
v3 = v2;
v4 = *v2;
v2 = (_QWORD *)(*v2 + 48LL);
}
while ( v4 != a2 );
result = *(_QWORD *)(a2 + 48);
*v3 = result;
--*(_DWORD *)(a1 + 396);
return result;
}
| js_shape_hash_unlink:
MOV EAX,dword ptr [RSI + 0x1c]
XOR ECX,ECX
SUB CL,byte ptr [RDI + 0x184]
SHR EAX,CL
SHL RAX,0x3
ADD RAX,qword ptr [RDI + 0x190]
LAB_001386f7:
MOV RCX,RAX
MOV RDX,qword ptr [RAX]
LEA RAX,[RDX + 0x30]
CMP RDX,RSI
JNZ 0x001386f7
MOV RAX,qword ptr [RSI + 0x30]
MOV qword ptr [RCX],RAX
DEC dword ptr [RDI + 0x18c]
RET
|
void js_shape_hash_unlink(long param_1,long param_2)
{
long lVar1;
long *plVar2;
long *plVar3;
plVar2 = (long *)((ulong)(*(uint *)(param_2 + 0x1c) >> (-*(char *)(param_1 + 0x184) & 0x1fU)) * 8
+ *(long *)(param_1 + 400));
do {
plVar3 = plVar2;
lVar1 = *plVar3;
plVar2 = (long *)(lVar1 + 0x30);
} while (lVar1 != param_2);
*plVar3 = *(long *)(param_2 + 0x30);
*(int *)(param_1 + 0x18c) = *(int *)(param_1 + 0x18c) + -1;
return;
}
| |
34,598 | my_xml_error_lineno | eloqsql/strings/xml.c | uint my_xml_error_lineno(MY_XML_PARSER *p)
{
uint res=0;
const char *s;
for (s=p->beg ; s<p->cur; s++)
{
if (s[0] == '\n')
res++;
}
return res;
} | O3 | c | my_xml_error_lineno:
movq 0x128(%rdi), %rcx
movq 0x130(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0xd7b3c
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %esi, %esi
cmpb $0xa, (%rcx)
sete %sil
addl %esi, %eax
incq %rcx
cmpq %rdx, %rcx
jne 0xd7b28
popq %rbp
retq
nopl (%rax)
| my_xml_error_lineno:
mov rcx, [rdi+128h]
mov rdx, [rdi+130h]
xor eax, eax
cmp rcx, rdx
jnb short locret_D7B3C
push rbp
mov rbp, rsp
xor eax, eax
loc_D7B28:
xor esi, esi
cmp byte ptr [rcx], 0Ah
setz sil
add eax, esi
inc rcx
cmp rcx, rdx
jnz short loc_D7B28
pop rbp
locret_D7B3C:
retn
| long long my_xml_error_lineno(long long a1)
{
_BYTE *v1; // rcx
_BYTE *v2; // rdx
long long result; // rax
v1 = *(_BYTE **)(a1 + 296);
v2 = *(_BYTE **)(a1 + 304);
result = 0LL;
if ( v1 < v2 )
{
LODWORD(result) = 0;
do
result = (*v1++ == 10) + (unsigned int)result;
while ( v1 != v2 );
}
return result;
}
| my_xml_error_lineno:
MOV RCX,qword ptr [RDI + 0x128]
MOV RDX,qword ptr [RDI + 0x130]
XOR EAX,EAX
CMP RCX,RDX
JNC 0x001d7b3c
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001d7b28:
XOR ESI,ESI
CMP byte ptr [RCX],0xa
SETZ SIL
ADD EAX,ESI
INC RCX
CMP RCX,RDX
JNZ 0x001d7b28
POP RBP
LAB_001d7b3c:
RET
|
int my_xml_error_lineno(long param_1)
{
int iVar1;
char *pcVar2;
pcVar2 = *(char **)(param_1 + 0x128);
iVar1 = 0;
if (pcVar2 < *(char **)(param_1 + 0x130)) {
iVar1 = 0;
do {
iVar1 = iVar1 + (uint)(*pcVar2 == '\n');
pcVar2 = pcVar2 + 1;
} while (pcVar2 != *(char **)(param_1 + 0x130));
}
return iVar1;
}
| |
34,599 | mi_unique_comp | eloqsql/storage/myisam/mi_unique.c | int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *(uchar*) pos_a++;
b_length= (uint) *(uchar*) pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _mi_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _mi_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((char**) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((char**) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length,
(uchar *) pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
} | O3 | c | mi_unique_comp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %r15
movq %rdi, -0x48(%rbp)
cmpq 0x10(%rdi), %r15
jae 0x8a7d7
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movl %ecx, -0x2c(%rbp)
movzbl 0x18(%r15), %r12d
movzwl 0x14(%r15), %ecx
movb 0x19(%r15), %dil
testb %dil, %dil
je 0x8a6be
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movl $0x1, %eax
cmpb %dil, %r8b
jne 0x8a7d9
testb %r8b, %r8b
je 0x8a6be
testb %r14b, %r14b
jne 0x8a794
jmp 0x8a7d9
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0x8a6dd
testb $0x20, %al
jne 0x8a6f4
movl %ecx, %esi
jmp 0x8a761
cmpb $0x1, 0x1a(%r15)
jne 0x8a743
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0x8a753
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x7b9ed
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x7b9ed
movzwl 0x14(%r15), %edx
cmpl %edx, %r14d
movl %edx, %ecx
cmovbl %r14d, %ecx
cmpl %edx, %eax
movl %edx, %esi
cmovbl %eax, %esi
testl %edx, %edx
cmovel %r14d, %ecx
movl -0x2c(%rbp), %r14d
cmovel %eax, %esi
movzbl 0x1a(%r15), %eax
movq (%rbx,%rax), %rbx
movq (%r13,%rax), %r13
jmp 0x8a761
movzwl (%rbx), %eax
movzwl (%r13), %edx
addq $0x2, %rbx
addq $0x2, %r13
cmpl %ecx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
movl %ecx, %esi
cmovbl %edx, %esi
movl %eax, %ecx
cmpl $0x11, %r12d
ja 0x8a7a8
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0x8a7a8
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0xa4e34
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x8a7e8
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0x8a67b
jmp 0x8a7d7
movl $0x1, %eax
cmpl %esi, %ecx
jne 0x8a7d9
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0x8a794
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0x8a7be
jmp 0x8a7d9
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x8a7d9
nop
| mi_unique_comp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, [rdi+8]
mov [rbp+var_48], rdi
cmp r15, [rdi+10h]
jnb loc_8A7D7
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_8A67B:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_8A6BE
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov eax, 1
cmp r8b, dil
jnz loc_8A7D9
test r8b, r8b
jz short loc_8A6BE
test r14b, r14b
jnz loc_8A794
jmp loc_8A7D9
loc_8A6BE:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_8A6DD
test al, 20h
jnz short loc_8A6F4
mov esi, ecx
jmp loc_8A761
loc_8A6DD:
cmp byte ptr [r15+1Ah], 1
jnz short loc_8A743
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_8A753
loc_8A6F4:
movzx edi, byte ptr [r15+1Ah]
mov rsi, rbx
call _mi_calc_blob_length
mov r14, rax
movzx edi, byte ptr [r15+1Ah]
mov rsi, r13
call _mi_calc_blob_length
movzx edx, word ptr [r15+14h]
cmp r14d, edx
mov ecx, edx
cmovb ecx, r14d
cmp eax, edx
mov esi, edx
cmovb esi, eax
test edx, edx
cmovz ecx, r14d
mov r14d, [rbp+var_2C]
cmovz esi, eax
movzx eax, byte ptr [r15+1Ah]
mov rbx, [rbx+rax]
mov r13, [r13+rax+0]
jmp short loc_8A761
loc_8A743:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_8A753:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_8A761:
cmp r12d, 11h
ja short loc_8A7A8
mov eax, 28002h
bt eax, r12d
jnb short loc_8A7A8
mov rdi, [r15]
mov edx, ecx
mov r8d, esi
mov rsi, rbx
mov rcx, r13
xor r9d, r9d
call ha_compare_text
test eax, eax
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_8A7E8
loc_8A794:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_8A67B
jmp short loc_8A7D7
loc_8A7A8:
mov eax, 1
cmp ecx, esi
jnz short loc_8A7D9
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_8A7BE:
cmp rcx, r8
jz short loc_8A794
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_8A7BE
jmp short loc_8A7D9
loc_8A7D7:
xor eax, eax
loc_8A7D9:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8A7E8:
mov eax, 1
jmp short loc_8A7D9
| long long mi_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned long long v4; // r15
char v5; // r14
unsigned int v6; // r12d
unsigned int v7; // ecx
char v8; // di
long long v9; // rax
char v10; // r8
char v11; // di
long long result; // rax
long long v13; // r13
unsigned __int8 *v14; // rbx
unsigned __int8 *v15; // r13
__int16 v16; // ax
unsigned int v17; // esi
unsigned int v18; // eax
unsigned int v19; // edx
unsigned int v20; // r14d
unsigned int v21; // eax
unsigned int v22; // edx
long long v23; // rax
int v24; // eax
int v25; // eax
long long v26; // r8
bool v27; // zf
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 8);
if ( v4 < *(_QWORD *)(a1 + 16) )
{
v5 = a4;
v29 = a3;
v30 = a2;
do
{
v6 = *(unsigned __int8 *)(v4 + 24);
v7 = *(unsigned __int16 *)(v4 + 20);
v8 = *(_BYTE *)(v4 + 25);
if ( !v8 )
goto LABEL_8;
v9 = *(unsigned int *)(v4 + 12);
v10 = v8 & *(_BYTE *)(a2 + v9);
v11 = *(_BYTE *)(a3 + v9) & v8;
result = 1LL;
if ( v10 != v11 )
return result;
if ( v10 )
{
if ( !v5 )
return result;
}
else
{
LABEL_8:
v13 = *(unsigned int *)(v4 + 8);
v14 = (unsigned __int8 *)(a2 + v13);
v15 = (unsigned __int8 *)(a3 + v13);
v16 = *(_WORD *)(v4 + 18);
if ( (v16 & 8) != 0 )
{
if ( *(_BYTE *)(v4 + 26) == 1 )
{
v18 = *v14++;
v19 = *v15++;
}
else
{
v18 = *(unsigned __int16 *)v14;
v19 = *(unsigned __int16 *)v15;
v14 += 2;
v15 += 2;
}
if ( v18 >= v7 )
v18 = *(unsigned __int16 *)(v4 + 20);
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v19 < v7 )
v17 = v19;
v7 = v18;
}
else if ( (v16 & 0x20) != 0 )
{
v20 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14);
v21 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15);
v22 = *(unsigned __int16 *)(v4 + 20);
v7 = v22;
if ( v20 < v22 )
v7 = v20;
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v21 < v22 )
v17 = v21;
if ( !*(_WORD *)(v4 + 20) )
v7 = v20;
v5 = a4;
if ( !*(_WORD *)(v4 + 20) )
v17 = v21;
v23 = *(unsigned __int8 *)(v4 + 26);
v14 = *(unsigned __int8 **)&v14[v23];
v15 = *(unsigned __int8 **)&v15[v23];
}
else
{
v17 = *(unsigned __int16 *)(v4 + 20);
}
if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) )
{
v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL);
a3 = v29;
a2 = v30;
if ( v25 )
return 1LL;
}
else
{
result = 1LL;
if ( v7 != v17 )
return result;
v26 = 0LL;
a3 = v29;
a2 = v30;
while ( v7 != v26 )
{
v27 = v14[v26] == v15[v26];
++v26;
if ( !v27 )
return result;
}
}
}
v4 += 32LL;
}
while ( v4 < *(_QWORD *)(a1 + 16) );
}
return 0LL;
}
| mi_unique_comp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x48],RDI
CMP R15,qword ptr [RDI + 0x10]
JNC 0x0018a7d7
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_0018a67b:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x0018a6be
MOV EAX,dword ptr [R15 + 0xc]
MOV R8B,byte ptr [RSI + RAX*0x1]
AND R8B,DIL
AND DIL,byte ptr [RDX + RAX*0x1]
MOV EAX,0x1
CMP R8B,DIL
JNZ 0x0018a7d9
TEST R8B,R8B
JZ 0x0018a6be
TEST R14B,R14B
JNZ 0x0018a794
JMP 0x0018a7d9
LAB_0018a6be:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x0018a6dd
TEST AL,0x20
JNZ 0x0018a6f4
MOV ESI,ECX
JMP 0x0018a761
LAB_0018a6dd:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x0018a743
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x0018a753
LAB_0018a6f4:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x0017b9ed
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x0017b9ed
MOVZX EDX,word ptr [R15 + 0x14]
CMP R14D,EDX
MOV ECX,EDX
CMOVC ECX,R14D
CMP EAX,EDX
MOV ESI,EDX
CMOVC ESI,EAX
TEST EDX,EDX
CMOVZ ECX,R14D
MOV R14D,dword ptr [RBP + -0x2c]
CMOVZ ESI,EAX
MOVZX EAX,byte ptr [R15 + 0x1a]
MOV RBX,qword ptr [RBX + RAX*0x1]
MOV R13,qword ptr [R13 + RAX*0x1]
JMP 0x0018a761
LAB_0018a743:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_0018a753:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_0018a761:
CMP R12D,0x11
JA 0x0018a7a8
MOV EAX,0x28002
BT EAX,R12D
JNC 0x0018a7a8
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x001a4e34
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x0018a7e8
LAB_0018a794:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x0018a67b
JMP 0x0018a7d7
LAB_0018a7a8:
MOV EAX,0x1
CMP ECX,ESI
JNZ 0x0018a7d9
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_0018a7be:
CMP RCX,R8
JZ 0x0018a794
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x0018a7be
JMP 0x0018a7d9
LAB_0018a7d7:
XOR EAX,EAX
LAB_0018a7d9:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018a7e8:
MOV EAX,0x1
JMP 0x0018a7d9
|
int8 mi_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
byte bVar14;
ulong uVar15;
ushort *puVar16;
int8 *puVar17;
puVar17 = *(int8 **)(param_1 + 8);
if (puVar17 < *(int8 **)(param_1 + 0x10)) {
do {
bVar4 = *(byte *)(puVar17 + 3);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar11 = (ulong)uVar5;
bVar3 = *(byte *)((long)puVar17 + 0x19);
if (bVar3 == 0) {
LAB_0018a6be:
puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1));
puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3);
if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) {
uVar10 = (uint)uVar5;
}
else {
uVar7 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13);
uVar8 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar6 = (uint)uVar5;
if (uVar7 < uVar5) {
uVar6 = uVar7;
}
uVar12 = (uint)uVar5;
uVar10 = uVar12;
if (uVar8 < uVar12) {
uVar10 = uVar8;
}
if (uVar12 == 0) {
uVar10 = uVar8;
uVar6 = uVar7;
}
uVar11 = (ulong)uVar6;
puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a));
puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a));
}
}
else {
if (*(char *)((long)puVar17 + 0x1a) == '\x01') {
uVar6 = (uint)(byte)*puVar13;
puVar13 = (ushort *)((long)puVar13 + 1);
uVar7 = (uint)(byte)*puVar16;
puVar16 = (ushort *)((long)puVar16 + 1);
}
else {
uVar6 = (uint)*puVar13;
uVar7 = (uint)*puVar16;
puVar13 = puVar13 + 1;
puVar16 = puVar16 + 1;
}
uVar10 = (uint)uVar5;
if (uVar10 <= uVar6) {
uVar6 = uVar10;
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
uVar11 = (ulong)uVar6;
}
if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) {
iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0);
if (iVar9 != 0) {
return 1;
}
}
else {
if ((uint)uVar11 != uVar10) {
return 1;
}
uVar15 = 0;
while (uVar11 != uVar15) {
pbVar1 = (byte *)((long)puVar13 + uVar15);
pbVar2 = (byte *)((long)puVar16 + uVar15);
uVar15 = uVar15 + 1;
if (*pbVar1 != *pbVar2) {
return 1;
}
}
}
}
else {
bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3;
if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) {
return 1;
}
if (bVar14 == 0) goto LAB_0018a6be;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
|
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.