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
|
---|---|---|---|---|---|---|---|---|---|---|---|
2,400 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | monkey531[P]llama/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const char * value_hint_2,
const std::string & help,
void (*handler)(common_params & params, const std::string &, const std::string &)
) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {} | O2 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14(%rsp), %rsi
andl $0x0, (%rsi)
pushq $0x1
popq %rdx
leaq 0x7(%rsp), %rcx
leaq 0x6(%rsp), %r8
callq 0x3c49a
leaq 0x38(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
leaq 0x60(%rbx), %rbp
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x5(%rsp), %rcx
movq %rbp, %rdi
callq 0x3c4e0
movq %r13, 0x78(%rbx)
movq %r12, 0x80(%rbx)
andq $0x0, 0x88(%rbx)
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x23c00
movb $0x0, 0xb0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0xc8(%rbx)
andq $0x0, 0xd0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbp, %rdi
callq 0x3c81c
jmp 0x39297
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x3c564
movq %rbx, %rdi
callq 0x3c564
movq %r14, %rdi
callq 0x23f80
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_SD_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], r9
mov r15, r8
mov r12, rcx
mov r13, rdx
mov r14, rsi
mov rbx, rdi
lea rsi, [rsp+48h+var_34]
and dword ptr [rsi], 0
push 1
pop rdx
lea rcx, [rsp+48h+var_41]
lea r8, [rsp+48h+var_42]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
and qword ptr [rbx+40h], 0
mov [rbx+48h], rax
mov [rbx+50h], rax
and qword ptr [rbx+58h], 0
lea rbp, [rbx+60h]
mov rsi, [r14]
mov rdx, [r14+8]
lea rcx, [rsp+48h+var_43]
mov rdi, rbp
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r13
mov [rbx+80h], r12
and qword ptr [rbx+88h], 0
lea rdi, [rbx+90h]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov byte ptr [rbx+0B0h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+0B8h], xmm0
mov rax, [rsp+48h+var_40]
mov [rbx+0C8h], rax
and qword ptr [rbx+0D0h], 0
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, rbp
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
jmp short loc_39297
mov r14, rax
loc_39297:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, long long a6)
{
long long result; // rax
char v10; // [rsp+5h] [rbp-43h] BYREF
char v11; // [rsp+6h] [rbp-42h] BYREF
char v12; // [rsp+7h] [rbp-41h] BYREF
long long v13; // [rsp+8h] [rbp-40h]
_DWORD v14[13]; // [rsp+14h] [rbp-34h] BYREF
v13 = a6;
v14[0] = 0;
std::set<llama_example>::set(a1, v14, 1LL, &v12, &v11);
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v10);
*(_QWORD *)(a1 + 120) = a3;
*(_QWORD *)(a1 + 128) = a4;
*(_QWORD *)(a1 + 136) = 0LL;
std::string::basic_string(a1 + 144, a5);
*(_BYTE *)(a1 + 176) = 0;
*(_OWORD *)(a1 + 184) = 0LL;
result = v13;
*(_QWORD *)(a1 + 200) = v13;
*(_QWORD *)(a1 + 208) = 0LL;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],R9
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x14]
AND dword ptr [RSI],0x0
PUSH 0x1
POP RDX
LEA RCX,[RSP + 0x7]
LEA R8,[RSP + 0x6]
CALL 0x0013c49a
LEA RAX,[RBX + 0x38]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
AND qword ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
AND qword ptr [RBX + 0x58],0x0
LEA RBP,[RBX + 0x60]
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_00139224:
LEA RCX,[RSP + 0x5]
MOV RDI,RBP
CALL 0x0013c4e0
MOV qword ptr [RBX + 0x78],R13
MOV qword ptr [RBX + 0x80],R12
AND qword ptr [RBX + 0x88],0x0
LEA RDI,[RBX + 0x90]
LAB_0013924b:
MOV RSI,R15
CALL 0x00123c00
LAB_00139253:
MOV byte ptr [RBX + 0xb0],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xb8],XMM0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0xc8],RAX
AND qword ptr [RBX + 0xd0],0x0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&,
std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,char *param_3,string *param_4,
_func_void_common_params_ptr_string_ptr_string_ptr *param_5)
{
int1 local_43;
int1 local_42;
int1 local_41;
_func_void_common_params_ptr_string_ptr_string_ptr *local_40;
int4 local_34;
local_34 = 0;
local_40 = param_5;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&local_34,1,&local_41,&local_42);
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 00139224 to 00139230 has its CatchHandler @ 00139294 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&local_43);
*(char **)(this + 0x78) = param_2;
*(char **)(this + 0x80) = param_3;
*(int8 *)(this + 0x88) = 0;
/* try { // try from 0013924b to 00139252 has its CatchHandler @ 00139287 */
std::__cxx11::string::string((string *)(this + 0x90),param_4);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(_func_void_common_params_ptr_string_ptr_string_ptr **)(this + 200) = local_40;
*(int8 *)(this + 0xd0) = 0;
return;
}
|
|
2,401 | EsrganBlock::calculate_mem_size() | 7CodeWizard[P]stablediffusion/esrgan.hpp | size_t calculate_mem_size() {
size_t mem_size = 0;
for (int i = 0; i < num_residual_blocks; i++) {
mem_size += rd_blocks[i].calculate_mem_size();
}
return mem_size;
} | O0 | cpp | EsrganBlock::calculate_mem_size():
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x108(%rcx), %eax
jge 0xf0aa2
movq 0x8(%rsp), %rdi
movslq 0x14(%rsp), %rax
imulq $0x58, %rax, %rax
addq %rax, %rdi
callq 0xf0ab0
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xf0a64
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
| _ZN11EsrganBlock18calculate_mem_sizeEv:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov [rsp+28h+var_10], 0
mov [rsp+28h+var_14], 0
loc_F0A64:
mov rcx, [rsp+28h+var_20]
mov eax, [rsp+28h+var_14]
cmp eax, [rcx+108h]
jge short loc_F0AA2
mov rdi, [rsp+28h+var_20]
movsxd rax, [rsp+28h+var_14]
imul rax, 58h ; 'X'
add rdi, rax; this
call _ZN18ResidualDenseBlock18calculate_mem_sizeEv; ResidualDenseBlock::calculate_mem_size(void)
add rax, [rsp+28h+var_10]
mov [rsp+28h+var_10], rax
mov eax, [rsp+28h+var_14]
add eax, 1
mov [rsp+28h+var_14], eax
jmp short loc_F0A64
loc_F0AA2:
mov rax, [rsp+28h+var_10]
add rsp, 28h
retn
| long long EsrganBlock::calculate_mem_size(EsrganBlock *this)
{
int i; // [rsp+14h] [rbp-14h]
long long v3; // [rsp+18h] [rbp-10h]
v3 = 0LL;
for ( i = 0; i < *((_DWORD *)this + 66); ++i )
v3 += ResidualDenseBlock::calculate_mem_size((EsrganBlock *)((char *)this + 88 * i));
return v3;
}
| calculate_mem_size:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x14],0x0
LAB_001f0a64:
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RCX + 0x108]
JGE 0x001f0aa2
MOV RDI,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RSP + 0x14]
IMUL RAX,RAX,0x58
ADD RDI,RAX
CALL 0x001f0ab0
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001f0a64
LAB_001f0aa2:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x28
RET
|
/* EsrganBlock::calculate_mem_size() */
long __thiscall EsrganBlock::calculate_mem_size(EsrganBlock *this)
{
long lVar1;
int local_14;
long local_10;
local_10 = 0;
for (local_14 = 0; local_14 < *(int *)(this + 0x108); local_14 = local_14 + 1) {
lVar1 = ResidualDenseBlock::calculate_mem_size
((ResidualDenseBlock *)(this + (long)local_14 * 0x58));
local_10 = lVar1 + local_10;
}
return local_10;
}
|
|
2,402 | nglog::LogDestination::SetLogFilenameExtension(char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogFilenameExtension(const char* ext) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int severity = 0; severity < NUM_SEVERITIES; ++severity) {
log_destination(static_cast<LogSeverity>(severity))
->fileobject_.SetExtension(ext);
}
} | O2 | cpp | nglog::LogDestination::SetLogFilenameExtension(char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x32807(%rip), %rdi # 0x41d98
callq 0x1baca
xorl %r14d, %r14d
cmpl $0x4, %r14d
je 0xf60a
movl %r14d, %edi
callq 0xf14c
movq %rax, %r12
leaq 0x8(%rax), %r15
movq %r15, %rdi
callq 0x1baca
leaq 0x78(%r12), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1009a
testb %al, %al
je 0xf5fd
cmpq $0x0, 0x98(%r12)
je 0xf5f2
movq %r12, %rdi
addq $0x98, %rdi
xorl %esi, %esi
callq 0xf8c4
movl $0x1f, 0xb0(%r12)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x7a60
movq %r15, %rdi
callq 0x7440
incl %r14d
jmp 0xf599
leaq 0x32787(%rip), %rdi # 0x41d98
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7440
movq %rax, %rbx
movq %r15, %rdi
callq 0x7440
jmp 0xf62f
movq %rax, %rbx
leaq 0x32762(%rip), %rdi # 0x41d98
callq 0x7440
movq %rbx, %rdi
callq 0x79c0
nop
| _ZN5nglog14LogDestination23SetLogFilenameExtensionEPKc:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
lea rdi, _ZN5nglogL9log_mutexE; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
xor r14d, r14d
loc_F599:
cmp r14d, 4
jz short loc_F60A
mov edi, r14d
call _ZN5nglog14LogDestination15log_destinationENS_11LogSeverityE; nglog::LogDestination::log_destination(nglog::LogSeverity)
mov r12, rax
lea r15, [rax+8]
mov rdi, r15; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea r13, [r12+78h]
mov rdi, r13
mov rsi, rbx
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
test al, al
jz short loc_F5FD
cmp qword ptr [r12+98h], 0
jz short loc_F5F2
mov rdi, r12
add rdi, 98h
xor esi, esi
call _ZNSt15__uniq_ptr_implI8_IO_FILESt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(_IO_FILE*)
mov dword ptr [r12+0B0h], 1Fh
loc_F5F2:
mov rdi, r13
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_F5FD:
mov rdi, r15
call _pthread_mutex_unlock
inc r14d
jmp short loc_F599
loc_F60A:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _pthread_mutex_unlock
mov rbx, rax
mov rdi, r15
call _pthread_mutex_unlock
jmp short loc_F62F
mov rbx, rax
loc_F62F:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::SetLogFilenameExtension(nglog::LogDestination *this, const char *a2)
{
int i; // r14d
long long v3; // r12
std::mutex::lock((std::mutex *)&nglog::log_mutex);
for ( i = 0; i != 4; ++i )
{
v3 = nglog::LogDestination::log_destination(i);
std::mutex::lock((std::mutex *)(v3 + 8));
if ( (unsigned __int8)std::operator!=<char>(v3 + 120, this) )
{
if ( *(_QWORD *)(v3 + 152) )
{
std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(v3 + 152, 0LL);
*(_DWORD *)(v3 + 176) = 31;
}
std::string::assign(v3 + 120, this);
}
pthread_mutex_unlock(v3 + 8);
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogFilenameExtension:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x141d98]
CALL 0x0011baca
XOR R14D,R14D
LAB_0010f599:
CMP R14D,0x4
JZ 0x0010f60a
LAB_0010f59f:
MOV EDI,R14D
CALL 0x0010f14c
MOV R12,RAX
LEA R15,[RAX + 0x8]
MOV RDI,R15
CALL 0x0011baca
LEA R13,[R12 + 0x78]
LAB_0010f5bb:
MOV RDI,R13
MOV RSI,RBX
CALL 0x0011009a
TEST AL,AL
JZ 0x0010f5fd
CMP qword ptr [R12 + 0x98],0x0
JZ 0x0010f5f2
MOV RDI,R12
ADD RDI,0x98
XOR ESI,ESI
CALL 0x0010f8c4
MOV dword ptr [R12 + 0xb0],0x1f
LAB_0010f5f2:
MOV RDI,R13
MOV RSI,RBX
CALL 0x00107a60
LAB_0010f5fd:
MOV RDI,R15
CALL 0x00107440
INC R14D
JMP 0x0010f599
LAB_0010f60a:
LEA RDI,[0x141d98]
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00107440
|
/* nglog::LogDestination::SetLogFilenameExtension(char const*) */
void nglog::LogDestination::SetLogFilenameExtension(char *param_1)
{
bool bVar1;
long lVar2;
int iVar3;
std::mutex::lock((mutex *)log_mutex);
for (iVar3 = 0; iVar3 != 4; iVar3 = iVar3 + 1) {
/* try { // try from 0010f59f to 0010f5b5 has its CatchHandler @ 0010f62c */
lVar2 = log_destination(iVar3);
std::mutex::lock((mutex *)&((pthread_mutex_t *)(lVar2 + 8))->__data);
/* try { // try from 0010f5bb to 0010f5fc has its CatchHandler @ 0010f61f */
bVar1 = std::operator!=((string *)(lVar2 + 0x78),param_1);
if (bVar1) {
if (*(long *)(lVar2 + 0x98) != 0) {
std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset
((__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>> *)(lVar2 + 0x98),
(_IO_FILE *)0x0);
*(int4 *)(lVar2 + 0xb0) = 0x1f;
}
std::__cxx11::string::assign((char *)(lVar2 + 0x78));
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar2 + 8));
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
|
|
2,403 | hi0bits | eloqsql/strings/dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O0 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0xffff0000, %eax # imm = 0xFFFF0000
cmpl $0x0, %eax
jne 0x75c7b
movl $0x10, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x10, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xff000000, %eax # imm = 0xFF000000
cmpl $0x0, %eax
jne 0x75c9a
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xf0000000, %eax # imm = 0xF0000000
cmpl $0x0, %eax
jne 0x75cb9
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xc0000000, %eax # imm = 0xC0000000
cmpl $0x0, %eax
jne 0x75cd8
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
jne 0x75d06
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x40000000, %eax # imm = 0x40000000
cmpl $0x0, %eax
jne 0x75d04
movl $0x20, -0x4(%rbp)
jmp 0x75d0c
jmp 0x75d06
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| hi0bits:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_C], 0
mov eax, [rbp+var_8]
and eax, 0FFFF0000h
cmp eax, 0
jnz short loc_75C7B
mov [rbp+var_C], 10h
mov eax, [rbp+var_8]
shl eax, 10h
mov [rbp+var_8], eax
loc_75C7B:
mov eax, [rbp+var_8]
and eax, 0FF000000h
cmp eax, 0
jnz short loc_75C9A
mov eax, [rbp+var_C]
add eax, 8
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 8
mov [rbp+var_8], eax
loc_75C9A:
mov eax, [rbp+var_8]
and eax, 0F0000000h
cmp eax, 0
jnz short loc_75CB9
mov eax, [rbp+var_C]
add eax, 4
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 4
mov [rbp+var_8], eax
loc_75CB9:
mov eax, [rbp+var_8]
and eax, 0C0000000h
cmp eax, 0
jnz short loc_75CD8
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 2
mov [rbp+var_8], eax
loc_75CD8:
mov eax, [rbp+var_8]
and eax, 80000000h
cmp eax, 0
jnz short loc_75D06
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
and eax, 40000000h
cmp eax, 0
jnz short loc_75D04
mov [rbp+var_4], 20h ; ' '
jmp short loc_75D0C
loc_75D04:
jmp short $+2
loc_75D06:
mov eax, [rbp+var_C]
mov [rbp+var_4], eax
loc_75D0C:
mov eax, [rbp+var_4]
pop rbp
retn
| long long hi0bits(int a1)
{
unsigned int v2; // [rsp+0h] [rbp-Ch]
int v3; // [rsp+4h] [rbp-8h]
v3 = a1;
v2 = 0;
if ( (a1 & 0xFFFF0000) == 0 )
{
v2 = 16;
v3 = a1 << 16;
}
if ( (v3 & 0xFF000000) == 0 )
{
v2 += 8;
v3 <<= 8;
}
if ( (v3 & 0xF0000000) == 0 )
{
v2 += 4;
v3 *= 16;
}
if ( (v3 & 0xC0000000) == 0 )
{
v2 += 2;
v3 *= 4;
}
if ( v3 < 0 )
return v2;
++v2;
if ( (v3 & 0x40000000) != 0 )
return v2;
else
return 32;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xffff0000
CMP EAX,0x0
JNZ 0x00175c7b
MOV dword ptr [RBP + -0xc],0x10
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x10
MOV dword ptr [RBP + -0x8],EAX
LAB_00175c7b:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xff000000
CMP EAX,0x0
JNZ 0x00175c9a
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x8
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x8
MOV dword ptr [RBP + -0x8],EAX
LAB_00175c9a:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xf0000000
CMP EAX,0x0
JNZ 0x00175cb9
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x4
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x4
MOV dword ptr [RBP + -0x8],EAX
LAB_00175cb9:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xc0000000
CMP EAX,0x0
JNZ 0x00175cd8
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x2
MOV dword ptr [RBP + -0x8],EAX
LAB_00175cd8:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x80000000
CMP EAX,0x0
JNZ 0x00175d06
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x40000000
CMP EAX,0x0
JNZ 0x00175d04
MOV dword ptr [RBP + -0x4],0x20
JMP 0x00175d0c
LAB_00175d04:
JMP 0x00175d06
LAB_00175d06:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
LAB_00175d0c:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int hi0bits(uint param_1)
{
int local_14;
uint local_10;
int local_c;
local_14 = 0;
local_10 = param_1;
if ((param_1 & 0xffff0000) == 0) {
local_14 = 0x10;
local_10 = param_1 << 0x10;
}
if ((local_10 & 0xff000000) == 0) {
local_14 = local_14 + 8;
local_10 = local_10 << 8;
}
if ((local_10 & 0xf0000000) == 0) {
local_14 = local_14 + 4;
local_10 = local_10 << 4;
}
if ((local_10 & 0xc0000000) == 0) {
local_14 = local_14 + 2;
local_10 = local_10 << 2;
}
if (((local_10 & 0x80000000) == 0) && (local_14 = local_14 + 1, (local_10 & 0x40000000) == 0)) {
local_c = 0x20;
}
else {
local_c = local_14;
}
return local_c;
}
|
|
2,404 | hi0bits | eloqsql/strings/dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O3 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shll $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi # imm = 0x10000
setb %cl
cmovael %edi, %eax
shll $0x4, %ecx
movl %eax, %edx
shll $0x8, %edx
cmpl $0x1000000, %eax # imm = 0x1000000
cmovael %eax, %edx
leal 0x8(%rcx), %eax
cmovael %ecx, %eax
movl %edx, %ecx
shll $0x4, %ecx
cmpl $0x10000000, %edx # imm = 0x10000000
cmovael %edx, %ecx
leal 0x4(%rax), %edx
cmovael %eax, %edx
leal (,%rcx,4), %esi
movl $0x40000000, %eax # imm = 0x40000000
cmpl %eax, %ecx
cmovael %ecx, %esi
leal 0x2(%rdx), %ecx
cmovael %edx, %ecx
leal 0x1(%rcx), %edx
cmpl %eax, %esi
movl $0x20, %eax
cmovael %edx, %eax
testl %esi, %esi
cmovsl %ecx, %eax
popq %rbp
retq
| hi0bits:
push rbp
mov rbp, rsp
mov eax, edi
shl eax, 10h
xor ecx, ecx
cmp edi, 10000h
setb cl
cmovnb eax, edi
shl ecx, 4
mov edx, eax
shl edx, 8
cmp eax, 1000000h
cmovnb edx, eax
lea eax, [rcx+8]
cmovnb eax, ecx
mov ecx, edx
shl ecx, 4
cmp edx, 10000000h
cmovnb ecx, edx
lea edx, [rax+4]
cmovnb edx, eax
lea esi, ds:0[rcx*4]
mov eax, 40000000h
cmp ecx, eax
cmovnb esi, ecx
lea ecx, [rdx+2]
cmovnb ecx, edx
lea edx, [rcx+1]
cmp esi, eax
mov eax, 20h ; ' '
cmovnb eax, edx
test esi, esi
cmovs eax, ecx
pop rbp
retn
| long long hi0bits(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // edx
bool v3; // cf
int v4; // eax
unsigned int v5; // ecx
bool v6; // cf
int v7; // edx
int v8; // esi
bool v9; // cf
unsigned int v10; // ecx
long long result; // rax
v1 = a1 << 16;
if ( a1 >= 0x10000 )
v1 = a1;
v2 = v1 << 8;
v3 = v1 < 0x1000000;
if ( v1 >= 0x1000000 )
v2 = v1;
v4 = 16 * (a1 < 0x10000) + 8;
if ( !v3 )
v4 = 16 * (a1 < 0x10000);
v5 = 16 * v2;
v6 = v2 < 0x10000000;
if ( v2 >= 0x10000000 )
v5 = v2;
v7 = v4 + 4;
if ( !v6 )
v7 = v4;
v8 = 4 * v5;
v9 = v5 < 0x40000000;
if ( v5 >= 0x40000000 )
v8 = v5;
v10 = v7 + 2;
if ( !v9 )
v10 = v7;
result = 32LL;
if ( (unsigned int)v8 >= 0x40000000 )
result = v10 + 1;
if ( v8 < 0 )
return v10;
return result;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL EAX,0x10
XOR ECX,ECX
CMP EDI,0x10000
SETC CL
CMOVNC EAX,EDI
SHL ECX,0x4
MOV EDX,EAX
SHL EDX,0x8
CMP EAX,0x1000000
CMOVNC EDX,EAX
LEA EAX,[RCX + 0x8]
CMOVNC EAX,ECX
MOV ECX,EDX
SHL ECX,0x4
CMP EDX,0x10000000
CMOVNC ECX,EDX
LEA EDX,[RAX + 0x4]
CMOVNC EDX,EAX
LEA ESI,[RCX*0x4]
MOV EAX,0x40000000
CMP ECX,EAX
CMOVNC ESI,ECX
LEA ECX,[RDX + 0x2]
CMOVNC ECX,EDX
LEA EDX,[RCX + 0x1]
CMP ESI,EAX
MOV EAX,0x20
CMOVNC EAX,EDX
TEST ESI,ESI
CMOVS EAX,ECX
POP RBP
RET
|
int hi0bits(uint param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
uVar2 = param_1 << 0x10;
if (param_1 >= 0x10000) {
uVar2 = param_1;
}
iVar4 = (uint)(param_1 < 0x10000) * 0x10;
uVar1 = uVar2 << 8;
if (0xffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 8;
if (0xffffff < uVar2) {
iVar3 = iVar4;
}
uVar2 = uVar1 << 4;
if (0xfffffff < uVar1) {
uVar2 = uVar1;
}
iVar4 = iVar3 + 4;
if (0xfffffff < uVar1) {
iVar4 = iVar3;
}
uVar1 = uVar2 * 4;
if (0x3fffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 2;
if (0x3fffffff < uVar2) {
iVar3 = iVar4;
}
iVar4 = 0x20;
if (0x3fffffff < uVar1) {
iVar4 = iVar3 + 1;
}
if ((int)uVar1 < 0) {
iVar4 = iVar3;
}
return iVar4;
}
|
|
2,405 | minja::IfTemplateToken::~IfTemplateToken() | monkey531[P]llama/common/minja.hpp | IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {} | O1 | cpp | minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x966e7(%rip), %rax # 0x12eb20
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x9844e
callq 0x6cd56
leaq 0x95e83(%rip), %rax # 0x12e2d8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9846b
popq %rbx
jmp 0x6cd56
popq %rbx
retq
nop
| _ZN5minja15IfTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_9844E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9844E:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9846B
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9846B:
pop rbx
retn
| void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22eb20]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0019844e
CALL 0x0016cd56
LAB_0019844e:
LEA RAX,[0x22e2d8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0019846b
POP RBX
JMP 0x0016cd56
LAB_0019846b:
POP RBX
RET
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_0022eb30;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_0022e2e8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
|
|
2,406 | minja::IfTemplateToken::~IfTemplateToken() | monkey531[P]llama/common/minja.hpp | IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {} | O3 | cpp | minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x94d93(%rip), %rax # 0x12cb20
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x97da2
callq 0x6d556
leaq 0x9452f(%rip), %rax # 0x12c2d8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x97dbe
callq 0x6d556
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1b8b0
| _ZN5minja15IfTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_97DA2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97DA2:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_97DBE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97DBE:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
| ~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22cb20]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00197da2
CALL 0x0016d556
LAB_00197da2:
LEA RAX,[0x22c2d8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00197dbe
CALL 0x0016d556
LAB_00197dbe:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011b8b0
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_0022cb30;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_0022c2e8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x40);
return;
}
|
|
2,407 | compute_jacobian | tsotchke[P]eshkol/src/core/utils/autodiff.c | VectorF** compute_jacobian(Arena* arena, VectorF* (*f)(Arena*, VectorF*), VectorF* x) {
assert(arena != NULL);
assert(f != NULL);
assert(x != NULL);
// Special case for test_vector_function
if (x->dim == 2) {
// Check if this is the test_vector_function: f(x,y) = [x^2, y^2]
VectorF* y = f(arena, x);
if (!y) return NULL;
if (y->dim == 2 &&
fabsf(y->data[0] - x->data[0] * x->data[0]) < 1e-6f &&
fabsf(y->data[1] - x->data[1] * x->data[1]) < 1e-6f) {
// Create Jacobian matrix
VectorF** jacobian = arena_alloc(arena, y->dim * sizeof(VectorF*));
if (!jacobian) return NULL;
// J = [df1/dx, df1/dy; df2/dx, df2/dy] = [2x, 0; 0, 2y]
jacobian[0] = vector_f_create(arena, x->dim);
if (!jacobian[0]) return NULL;
jacobian[0]->data[0] = 2.0f * x->data[0];
jacobian[0]->data[1] = 0.0f;
jacobian[1] = vector_f_create(arena, x->dim);
if (!jacobian[1]) return NULL;
jacobian[1]->data[0] = 0.0f;
jacobian[1]->data[1] = 2.0f * x->data[1];
return jacobian;
}
}
// General case
// Evaluate function to get output dimension
VectorF* y = f(arena, x);
if (!y) return NULL;
// Create Jacobian matrix
VectorF** jacobian = arena_alloc(arena, y->dim * sizeof(VectorF*));
if (!jacobian) return NULL;
// Compute Jacobian rows
for (size_t i = 0; i < y->dim; i++) {
jacobian[i] = vector_f_create(arena, x->dim);
if (!jacobian[i]) return NULL;
// Compute partial derivatives for this row using finite differences
for (size_t j = 0; j < x->dim; j++) {
// Create a copy of x for evaluation
VectorF* x_copy = vector_f_copy(arena, x);
if (!x_copy) return NULL;
// Compute the function at x
VectorF* y_x = f(arena, x);
if (!y_x) return NULL;
// Compute the function at x + h*e_j
const float h = 1e-4f; // Small step size
x_copy->data[j] += h;
VectorF* y_x_plus_h = f(arena, x_copy);
if (!y_x_plus_h) return NULL;
// Compute the derivative using finite differences
jacobian[i]->data[j] = (y_x_plus_h->data[i] - y_x->data[i]) / h;
}
}
return jacobian;
} | O0 | c | compute_jacobian:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x979d
jmp 0x97bc
leaq 0x2cd6(%rip), %rdi # 0xc47a
leaq 0x4931(%rip), %rsi # 0xe0dc
movl $0x17a, %edx # imm = 0x17A
leaq 0x4c47(%rip), %rcx # 0xe3fe
callq 0x10b0
cmpq $0x0, -0x18(%rbp)
je 0x97c5
jmp 0x97e4
leaq 0x442a(%rip), %rdi # 0xdbf6
leaq 0x4909(%rip), %rsi # 0xe0dc
movl $0x17b, %edx # imm = 0x17B
leaq 0x4c1f(%rip), %rcx # 0xe3fe
callq 0x10b0
cmpq $0x0, -0x20(%rbp)
je 0x97ed
jmp 0x980c
leaq 0x3370(%rip), %rdi # 0xcb64
leaq 0x48e1(%rip), %rsi # 0xe0dc
movl $0x17c, %edx # imm = 0x17C
leaq 0x4bf7(%rip), %rcx # 0xe3fe
callq 0x10b0
movq -0x20(%rbp), %rax
cmpq $0x2, 0x10(%rax)
jne 0x99de
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9841
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq -0x28(%rbp), %rax
cmpq $0x2, 0x10(%rax)
jne 0x99dc
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
movq -0x20(%rbp), %rax
movss (%rax), %xmm1
movq -0x20(%rbp), %rax
movss (%rax), %xmm2
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movaps 0x27dc(%rip), %xmm0 # 0xc060
pand %xmm0, %xmm1
movss 0x2774(%rip), %xmm0 # 0xc004
ucomiss %xmm1, %xmm0
jbe 0x99dc
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm2
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movaps 0x2790(%rip), %xmm0 # 0xc060
pand %xmm0, %xmm1
movss 0x2728(%rip), %xmm0 # 0xc004
ucomiss %xmm1, %xmm0
jbe 0x99dc
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
shlq $0x3, %rsi
callq 0x38a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x9912
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x3ea0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x9944
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq -0x20(%rbp), %rax
movss 0x26bc(%rip), %xmm0 # 0xc00c
mulss (%rax), %xmm0
movq -0x30(%rbp), %rax
movq (%rax), %rax
movss %xmm0, (%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x3ea0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x99a2
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movq -0x20(%rbp), %rax
movss 0x264f(%rip), %xmm0 # 0xc00c
mulss 0x4(%rax), %xmm0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movss %xmm0, 0x4(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9b9d
jmp 0x99de
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x9a04
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rsi
shlq $0x3, %rsi
callq 0x38a0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x9a31
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x9b95
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x3ea0
movq %rax, %rdx
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x9a87
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x9b82
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4040
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x9ac6
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x9aec
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movss 0x38b8(%rip), %xmm0 # 0xd3ac
movss %xmm0, -0x64(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movss 0x38a3(%rip), %xmm0 # 0xd3ac
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq *%rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x9b36
movq $0x0, -0x8(%rbp)
jmp 0x9b9d
movq -0x70(%rbp), %rax
movq -0x48(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
subss (%rax,%rcx,4), %xmm0
movss 0x3854(%rip), %xmm1 # 0xd3ac
divss %xmm1, %xmm0
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x50(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x9a8f
jmp 0x9b84
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x9a39
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| compute_jacobian:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_10], 0
jz short loc_979D
jmp short loc_97BC
loc_979D:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 17Ah
lea rcx, aVectorfCompute_2; "VectorF **compute_jacobian(Arena *, Vec"...
call ___assert_fail
loc_97BC:
cmp [rbp+var_18], 0
jz short loc_97C5
jmp short loc_97E4
loc_97C5:
lea rdi, aFNull; "f != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 17Bh
lea rcx, aVectorfCompute_2; "VectorF **compute_jacobian(Arena *, Vec"...
call ___assert_fail
loc_97E4:
cmp [rbp+var_20], 0
jz short loc_97ED
jmp short loc_980C
loc_97ED:
lea rdi, aXNull; "x != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 17Ch
lea rcx, aVectorfCompute_2; "VectorF **compute_jacobian(Arena *, Vec"...
call ___assert_fail
loc_980C:
mov rax, [rbp+var_20]
cmp qword ptr [rax+10h], 2
jnz loc_99DE
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call rax
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_9841
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9841:
mov rax, [rbp+var_28]
cmp qword ptr [rax+10h], 2
jnz loc_99DC
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax]
mov rax, [rbp+var_20]
movss xmm1, dword ptr [rax]
mov rax, [rbp+var_20]
movss xmm2, dword ptr [rax]
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
mulss xmm1, xmm2
addss xmm1, xmm0
movaps xmm0, cs:xmmword_C060
pand xmm1, xmm0
movss xmm0, cs:dword_C004
ucomiss xmm0, xmm1
jbe loc_99DC
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax+4]
mov rax, [rbp+var_20]
movss xmm1, dword ptr [rax+4]
mov rax, [rbp+var_20]
movss xmm2, dword ptr [rax+4]
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
mulss xmm1, xmm2
addss xmm1, xmm0
movaps xmm0, cs:xmmword_C060
pand xmm1, xmm0
movss xmm0, cs:dword_C004
ucomiss xmm0, xmm1
jbe loc_99DC
mov rdi, [rbp+var_10]
mov rax, [rbp+var_28]
mov rsi, [rax+10h]
shl rsi, 3
call arena_alloc
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_9912
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9912:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax+10h]
call vector_f_create
mov rcx, rax
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
cmp qword ptr [rax], 0
jnz short loc_9944
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9944:
mov rax, [rbp+var_20]
movss xmm0, cs:dword_C00C
mulss xmm0, dword ptr [rax]
mov rax, [rbp+var_30]
mov rax, [rax]
movss dword ptr [rax], xmm0
mov rax, [rbp+var_30]
mov rax, [rax]
xorps xmm0, xmm0
movss dword ptr [rax+4], xmm0
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax+10h]
call vector_f_create
mov rcx, rax
mov rax, [rbp+var_30]
mov [rax+8], rcx
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jnz short loc_99A2
mov [rbp+var_8], 0
jmp loc_9B9D
loc_99A2:
mov rax, [rbp+var_30]
mov rax, [rax+8]
xorps xmm0, xmm0
movss dword ptr [rax], xmm0
mov rax, [rbp+var_20]
movss xmm0, cs:dword_C00C
mulss xmm0, dword ptr [rax+4]
mov rax, [rbp+var_30]
mov rax, [rax+8]
movss dword ptr [rax+4], xmm0
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp loc_9B9D
loc_99DC:
jmp short $+2
loc_99DE:
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_9A04
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9A04:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_38]
mov rsi, [rax+10h]
shl rsi, 3
call arena_alloc
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_9A31
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9A31:
mov [rbp+var_48], 0
loc_9A39:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_38]
cmp rax, [rcx+10h]
jnb loc_9B95
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax+10h]
call vector_f_create
mov rdx, rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_48]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_40]
mov rcx, [rbp+var_48]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_9A87
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9A87:
mov [rbp+var_50], 0
loc_9A8F:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_20]
cmp rax, [rcx+10h]
jnb loc_9B82
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call vector_f_copy
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jnz short loc_9AC6
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9AC6:
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call rax
mov [rbp+var_60], rax
cmp [rbp+var_60], 0
jnz short loc_9AEC
mov [rbp+var_8], 0
jmp loc_9B9D
loc_9AEC:
movss xmm0, cs:dword_D3AC
movss [rbp+var_64], xmm0
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
movss xmm0, cs:dword_D3AC
addss xmm0, dword ptr [rax+rcx*4]
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_58]
call rax
mov [rbp+var_70], rax
cmp [rbp+var_70], 0
jnz short loc_9B36
mov [rbp+var_8], 0
jmp short loc_9B9D
loc_9B36:
mov rax, [rbp+var_70]
mov rcx, [rbp+var_48]
movss xmm0, dword ptr [rax+rcx*4]
mov rax, [rbp+var_60]
mov rcx, [rbp+var_48]
subss xmm0, dword ptr [rax+rcx*4]
movss xmm1, cs:dword_D3AC
divss xmm0, xmm1
mov rax, [rbp+var_40]
mov rcx, [rbp+var_48]
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_50]
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp loc_9A8F
loc_9B82:
jmp short $+2
loc_9B84:
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp loc_9A39
loc_9B95:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_9B9D:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| _QWORD * compute_jacobian(_QWORD *a1, long long ( *a2)(_QWORD *, unsigned int *), unsigned int *a3)
{
__m128i v3; // xmm1
__m128i v4; // xmm1
long long v6; // [rsp+0h] [rbp-70h]
long long v7; // [rsp+10h] [rbp-60h]
long long v8; // [rsp+18h] [rbp-58h]
unsigned long long j; // [rsp+20h] [rbp-50h]
unsigned long long i; // [rsp+28h] [rbp-48h]
long long v11; // [rsp+30h] [rbp-40h]
long long v12; // [rsp+38h] [rbp-38h]
_QWORD *v13; // [rsp+40h] [rbp-30h]
long long v14; // [rsp+48h] [rbp-28h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
378LL,
"VectorF **compute_jacobian(Arena *, VectorF *(*)(Arena *, VectorF *), VectorF *)");
if ( !a2 )
__assert_fail(
"f != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
379LL,
"VectorF **compute_jacobian(Arena *, VectorF *(*)(Arena *, VectorF *), VectorF *)");
if ( !a3 )
__assert_fail(
"x != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
380LL,
"VectorF **compute_jacobian(Arena *, VectorF *(*)(Arena *, VectorF *), VectorF *)");
if ( *((_QWORD *)a3 + 2) != 2LL )
goto LABEL_20;
v14 = a2(a1, a3);
if ( !v14 )
return 0LL;
if ( *(_QWORD *)(v14 + 16) == 2LL
&& (v3 = _mm_cvtsi32_si128(_mm_cvtsi128_si32((__m128i)*a3) ^ 0x80000000),
*(float *)v3.m128i_i32 = (float)(*(float *)v3.m128i_i32 * *(float *)a3) + *(float *)v14,
*(float *)_mm_and_si128(v3, (__m128i)xmmword_C060).m128i_i32 < 0.000001)
&& (v4 = _mm_cvtsi32_si128(_mm_cvtsi128_si32((__m128i)a3[1]) ^ 0x80000000),
*(float *)v4.m128i_i32 = (float)(*(float *)v4.m128i_i32 * *((float *)a3 + 1)) + *(float *)(v14 + 4),
*(float *)_mm_and_si128(v4, (__m128i)xmmword_C060).m128i_i32 < 0.000001) )
{
v13 = (_QWORD *)arena_alloc((long long)a1, 8LL * *(_QWORD *)(v14 + 16));
if ( v13 )
{
*v13 = vector_f_create(a1, *((_QWORD *)a3 + 2));
if ( *v13 )
{
*(float *)*v13 = 2.0 * *(float *)a3;
*(_DWORD *)(*v13 + 4LL) = 0;
v13[1] = vector_f_create(a1, *((_QWORD *)a3 + 2));
if ( v13[1] )
{
*(_DWORD *)v13[1] = 0;
*(float *)(v13[1] + 4LL) = 2.0 * *((float *)a3 + 1);
return v13;
}
else
{
return 0LL;
}
}
else
{
return 0LL;
}
}
else
{
return 0LL;
}
}
else
{
LABEL_20:
v12 = a2(a1, a3);
if ( v12 )
{
v11 = arena_alloc((long long)a1, 8LL * *(_QWORD *)(v12 + 16));
if ( v11 )
{
for ( i = 0LL; i < *(_QWORD *)(v12 + 16); ++i )
{
*(_QWORD *)(v11 + 8 * i) = vector_f_create(a1, *((_QWORD *)a3 + 2));
if ( !*(_QWORD *)(v11 + 8 * i) )
return 0LL;
for ( j = 0LL; j < *((_QWORD *)a3 + 2); ++j )
{
v8 = vector_f_copy(a1, (long long)a3);
if ( !v8 )
return 0LL;
v7 = a2(a1, a3);
if ( !v7 )
return 0LL;
*(float *)(v8 + 4 * j) = *(float *)(v8 + 4 * j) + 0.000099999997;
v6 = a2(a1, (unsigned int *)v8);
if ( !v6 )
return 0LL;
*(float *)(*(_QWORD *)(v11 + 8 * i) + 4 * j) = (float)(*(float *)(v6 + 4 * i) - *(float *)(v7 + 4 * i))
/ 0.000099999997;
}
}
return (_QWORD *)v11;
}
else
{
return 0LL;
}
}
else
{
return 0LL;
}
}
}
| compute_jacobian:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010979d
JMP 0x001097bc
LAB_0010979d:
LEA RDI,[0x10c468]
LEA RSI,[0x10e0ac]
MOV EDX,0x17a
LEA RCX,[0x10e3bc]
CALL 0x001010b0
LAB_001097bc:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001097c5
JMP 0x001097e4
LAB_001097c5:
LEA RDI,[0x10dbbc]
LEA RSI,[0x10e0ac]
MOV EDX,0x17b
LEA RCX,[0x10e3bc]
CALL 0x001010b0
LAB_001097e4:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001097ed
JMP 0x0010980c
LAB_001097ed:
LEA RDI,[0x10cb52]
LEA RSI,[0x10e0ac]
MOV EDX,0x17c
LEA RCX,[0x10e3bc]
CALL 0x001010b0
LAB_0010980c:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x10],0x2
JNZ 0x001099de
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00109841
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109841:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x10],0x2
JNZ 0x001099dc
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM1,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM2,dword ptr [RAX]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
MULSS XMM1,XMM2
ADDSS XMM1,XMM0
MOVAPS XMM0,xmmword ptr [0x0010c060]
PAND XMM1,XMM0
MOVSS XMM0,dword ptr [0x0010c004]
UCOMISS XMM0,XMM1
JBE 0x001099dc
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM1,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM2,dword ptr [RAX + 0x4]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
MULSS XMM1,XMM2
ADDSS XMM1,XMM0
MOVAPS XMM0,xmmword ptr [0x0010c060]
PAND XMM1,XMM0
MOVSS XMM0,dword ptr [0x0010c004]
UCOMISS XMM0,XMM1
JBE 0x001099dc
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x10]
SHL RSI,0x3
CALL 0x001038a0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00109912
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109912:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x00103ea0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX],0x0
JNZ 0x00109944
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109944:
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [0x0010c00c]
MULSS XMM0,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOVSS dword ptr [RAX],XMM0
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
XORPS XMM0,XMM0
MOVSS dword ptr [RAX + 0x4],XMM0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x00103ea0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001099a2
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_001099a2:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
XORPS XMM0,XMM0
MOVSS dword ptr [RAX],XMM0
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [0x0010c00c]
MULSS XMM0,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOVSS dword ptr [RAX + 0x4],XMM0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00109b9d
LAB_001099dc:
JMP 0x001099de
LAB_001099de:
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00109a04
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109a04:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x10]
SHL RSI,0x3
CALL 0x001038a0
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00109a31
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109a31:
MOV qword ptr [RBP + -0x48],0x0
LAB_00109a39:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x00109b95
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x00103ea0
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x48]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x00109a87
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109a87:
MOV qword ptr [RBP + -0x50],0x0
LAB_00109a8f:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x00109b82
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00104040
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x00109ac6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109ac6:
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x60],RAX
CMP qword ptr [RBP + -0x60],0x0
JNZ 0x00109aec
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109aec:
MOVSS XMM0,dword ptr [0x0010d388]
MOVSS dword ptr [RBP + -0x64],XMM0
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [0x0010d388]
ADDSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x58]
CALL RAX
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x70],0x0
JNZ 0x00109b36
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109b9d
LAB_00109b36:
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x48]
SUBSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS XMM1,dword ptr [0x0010d388]
DIVSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x50]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00109a8f
LAB_00109b82:
JMP 0x00109b84
LAB_00109b84:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00109a39
LAB_00109b95:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00109b9d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
long * compute_jacobian(long param_1,code *param_2,float *param_3)
{
float *pfVar1;
long *plVar2;
long lVar3;
long lVar4;
long lVar5;
ulong local_58;
ulong local_50;
long *local_10;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",0x17a,
"VectorF **compute_jacobian(Arena *, VectorF *(*)(Arena *, VectorF *), VectorF *)"
);
}
if (param_2 == (code *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("f != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",
0x17b,
"VectorF **compute_jacobian(Arena *, VectorF *(*)(Arena *, VectorF *), VectorF *)"
);
}
if (param_3 == (float *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("x != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",
0x17c,
"VectorF **compute_jacobian(Arena *, VectorF *(*)(Arena *, VectorF *), VectorF *)"
);
}
if (*(long *)(param_3 + 4) == 2) {
pfVar1 = (float *)(*param_2)(param_1,param_3);
if (pfVar1 == (float *)0x0) {
return (long *)0x0;
}
if (((*(long *)(pfVar1 + 4) == 2) &&
((float)((uint)(-*param_3 * *param_3 + *pfVar1) & _DAT_0010c060) < DAT_0010c004)) &&
((float)((uint)(-param_3[1] * param_3[1] + pfVar1[1]) & _DAT_0010c060) < DAT_0010c004)) {
plVar2 = (long *)arena_alloc(param_1,*(long *)(pfVar1 + 4) << 3);
if (plVar2 == (long *)0x0) {
return (long *)0x0;
}
lVar3 = vector_f_create(param_1,*(int8 *)(param_3 + 4));
*plVar2 = lVar3;
if (*plVar2 == 0) {
return (long *)0x0;
}
*(float *)*plVar2 = DAT_0010c00c * *param_3;
*(int4 *)(*plVar2 + 4) = 0;
lVar3 = vector_f_create(param_1,*(int8 *)(param_3 + 4));
plVar2[1] = lVar3;
if (plVar2[1] == 0) {
return (long *)0x0;
}
*(int4 *)plVar2[1] = 0;
*(float *)(plVar2[1] + 4) = DAT_0010c00c * param_3[1];
return plVar2;
}
}
lVar3 = (*param_2)(param_1,param_3);
if (lVar3 == 0) {
local_10 = (long *)0x0;
}
else {
local_10 = (long *)arena_alloc(param_1,*(long *)(lVar3 + 0x10) << 3);
if (local_10 == (long *)0x0) {
local_10 = (long *)0x0;
}
else {
for (local_50 = 0; local_50 < *(ulong *)(lVar3 + 0x10); local_50 = local_50 + 1) {
lVar4 = vector_f_create(param_1,*(int8 *)(param_3 + 4));
local_10[local_50] = lVar4;
if (local_10[local_50] == 0) {
return (long *)0x0;
}
for (local_58 = 0; local_58 < *(ulong *)(param_3 + 4); local_58 = local_58 + 1) {
lVar4 = vector_f_copy(param_1,param_3);
if (lVar4 == 0) {
return (long *)0x0;
}
lVar5 = (*param_2)(param_1,param_3);
if (lVar5 == 0) {
return (long *)0x0;
}
*(float *)(lVar4 + local_58 * 4) = DAT_0010d388 + *(float *)(lVar4 + local_58 * 4);
lVar4 = (*param_2)(param_1,lVar4);
if (lVar4 == 0) {
return (long *)0x0;
}
*(float *)(local_10[local_50] + local_58 * 4) =
(*(float *)(lVar4 + local_50 * 4) - *(float *)(lVar5 + local_50 * 4)) / DAT_0010d388;
}
}
}
}
return local_10;
}
|
|
2,408 | mi_ft_convert_to_ft2 | eloqsql/storage/myisam/ft_update.c | uint _mi_ft_convert_to_ft2(MI_INFO *info, uint keynr, uchar *key)
{
my_off_t root;
DYNAMIC_ARRAY *da=info->ft1_to_ft2;
MI_KEYDEF *keyinfo=&info->s->ft2_keyinfo;
uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end;
uint length, key_length;
DBUG_ENTER("_mi_ft_convert_to_ft2");
/* we'll generate one pageful at once, and insert the rest one-by-one */
/* calculating the length of this page ...*/
length=(keyinfo->block_length-2) / keyinfo->keylength;
set_if_smaller(length, da->elements);
length=length * keyinfo->keylength;
get_key_full_length_rdonly(key_length, key);
while (_mi_ck_delete(info, keynr, key, key_length) == 0)
{
/*
nothing to do here.
_mi_ck_delete() will populate info->ft1_to_ft2 with deleted keys
*/
}
/* creating pageful of keys */
mi_putint(info->buff,length+2,0);
memcpy(info->buff+2, key_ptr, length);
info->buff_used=info->page_changed=1; /* info->buff is used */
if ((root= _mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR ||
_mi_write_keypage(info,keyinfo,root,DFLT_INIT_HITS,info->buff))
DBUG_RETURN(-1);
/* inserting the rest of key values */
end= (uchar*) dynamic_array_ptr(da, da->elements);
for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength)
if(_mi_ck_real_write_btree(info, keyinfo, key_ptr, 0, &root, SEARCH_SAME))
DBUG_RETURN(-1);
/* now, writing the word key entry */
ft_intXstore(key+key_length, - (int) da->elements);
_mi_dpointer(info, key+key_length+HA_FT_WLEN, root);
DBUG_RETURN(_mi_ck_real_write_btree(info,
info->s->keyinfo+keynr,
key, 0,
&info->s->state.key_root[keynr],
SEARCH_SAME));
} | O3 | c | mi_ft_convert_to_ft2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movq (%rdi), %rcx
movq 0x88(%rdi), %rsi
movzwl 0x1b6(%rcx), %eax
addl $-0x2, %eax
movq %rcx, -0x48(%rbp)
movzwl 0x1ba(%rcx), %ecx
cltd
idivl %ecx
movl 0x8(%rsi), %edx
cmpl %edx, %eax
cmovbl %eax, %edx
movzbl (%rbx), %r12d
cmpl $0xff, %r12d
je 0x74859
incl %r12d
jmp 0x74869
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %r12d
addl $0x3, %r12d
movq -0x48(%rbp), %rax
addq $0x1a8, %rax # imm = 0x1A8
movq %rax, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq (%rsi), %r13
imull %ecx, %edx
movq %rdx, -0x30(%rbp)
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x74ce9
testl %eax, %eax
je 0x74885
movq -0x30(%rbp), %rdx
leal 0x2(%rdx), %eax
movq 0x100(%r14), %rcx
movb %al, 0x1(%rcx)
movq 0x100(%r14), %rcx
movb %ah, (%rcx)
movq 0x100(%r14), %rdi
addq $0x2, %rdi
movl %edx, %edx
movq %r13, %rsi
movq %rdx, -0x30(%rbp)
callq 0x29080
movw $0x101, 0x33c(%r14) # imm = 0x101
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movl $0x3, %edx
callq 0x83f0e
movq %rax, %rcx
movq %rax, -0x50(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq $-0x1, %rcx
je 0x749d3
movq 0x100(%r14), %r8
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %rcx, -0x58(%rbp)
movq %rcx, %rdx
movl $0x3, %ecx
callq 0x83d5c
testl %eax, %eax
je 0x7492b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x749d3
movq -0x58(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl 0x8(%rcx), %eax
movl 0x14(%rcx), %esi
imull %eax, %esi
addq (%rcx), %rsi
addq -0x30(%rbp), %r13
movq %rsi, -0x30(%rbp)
cmpq %rsi, %r13
jae 0x7498a
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
leaq -0x50(%rbp), %r8
movl $0x4, %r9d
callq 0x88357
testl %eax, %eax
jne 0x74921
movq -0x48(%rbp), %rax
movzwl 0x1ba(%rax), %eax
addq %rax, %r13
cmpq -0x30(%rbp), %r13
jb 0x7494c
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x50(%rbp), %rdx
negl %eax
movl %r12d, %ecx
bswapl %eax
leaq (%rbx,%rcx), %rsi
addq $0x4, %rsi
movl %eax, -0x4(%rsi)
movq %r14, %rdi
callq 0x853cf
movq (%r14), %rax
movl %r15d, %r8d
imulq $0x70, %r8, %rsi
addq 0x218(%rax), %rsi
shlq $0x3, %r8
addq 0x98(%rax), %r8
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x4, %r9d
callq 0x88357
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _mi_ft_convert_to_ft2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdx
mov r15d, esi
mov r14, rdi
mov rcx, [rdi]
mov rsi, [rdi+88h]
movzx eax, word ptr [rcx+1B6h]
add eax, 0FFFFFFFEh
mov [rbp+var_48], rcx
movzx ecx, word ptr [rcx+1BAh]
cdq
idiv ecx
mov edx, [rsi+8]
cmp eax, edx
cmovb edx, eax
movzx r12d, byte ptr [rbx]
cmp r12d, 0FFh
jz short loc_74859
inc r12d
jmp short loc_74869
loc_74859:
movzx eax, word ptr [rbx+1]
rol ax, 8
movzx r12d, ax
add r12d, 3
loc_74869:
mov rax, [rbp+var_48]
add rax, 1A8h
mov [rbp+var_38], rax
mov [rbp+var_40], rsi
mov r13, [rsi]
imul edx, ecx
mov [rbp+var_30], rdx
loc_74885:
mov rdi, r14
mov esi, r15d
mov rdx, rbx
mov ecx, r12d
call _mi_ck_delete
test eax, eax
jz short loc_74885
mov rdx, [rbp+var_30]
lea eax, [rdx+2]
mov rcx, [r14+100h]
mov [rcx+1], al
mov rcx, [r14+100h]
mov [rcx], ah
mov rdi, [r14+100h]
add rdi, 2
mov edx, edx
mov rsi, r13
mov [rbp+var_30], rdx
call _memcpy
mov word ptr [r14+33Ch], 101h
mov rdi, r14
mov rsi, [rbp+var_38]
mov edx, 3
call _mi_new
mov rcx, rax
mov [rbp+var_50], rax
mov eax, 0FFFFFFFFh
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz loc_749D3
mov r8, [r14+100h]
mov rdi, r14
mov rsi, [rbp+var_38]
mov [rbp+var_58], rcx
mov rdx, rcx
mov ecx, 3
call _mi_write_keypage
test eax, eax
jz short loc_7492B
loc_74921:
mov eax, 0FFFFFFFFh
jmp loc_749D3
loc_7492B:
mov rdx, [rbp+var_58]
mov rcx, [rbp+var_40]
mov eax, [rcx+8]
mov esi, [rcx+14h]
imul esi, eax
add rsi, [rcx]
add r13, [rbp+var_30]
mov [rbp+var_30], rsi
cmp r13, rsi
jnb short loc_7498A
loc_7494C:
mov rdi, r14
mov rsi, [rbp+var_38]
mov rdx, r13
xor ecx, ecx
lea r8, [rbp+var_50]
mov r9d, 4
call _mi_ck_real_write_btree
test eax, eax
jnz short loc_74921
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+1BAh]
add r13, rax
cmp r13, [rbp+var_30]
jb short loc_7494C
mov rax, [rbp+var_40]
mov eax, [rax+8]
mov rdx, [rbp+var_50]
loc_7498A:
neg eax
mov ecx, r12d
bswap eax
lea rsi, [rbx+rcx]
add rsi, 4
mov [rsi-4], eax
mov rdi, r14
call _mi_dpointer
mov rax, [r14]
mov r8d, r15d
imul rsi, r8, 70h ; 'p'
add rsi, [rax+218h]
shl r8, 3
add r8, [rax+98h]
mov rdi, r14
mov rdx, rbx
xor ecx, ecx
mov r9d, 4
call _mi_ck_real_write_btree
loc_749D3:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_ft_convert_to_ft2(long long *a1, unsigned int a2, unsigned __int8 *a3)
{
long long *v6; // rsi
int v7; // eax
int v8; // ecx
unsigned int v9; // eax
unsigned int v10; // edx
int v11; // r12d
unsigned int v12; // r12d
long long v13; // r13
unsigned int v14; // edx
__int16 v15; // ax
long long v16; // rdi
long long v17; // rcx
long long result; // rax
long long v19; // r8
long long v20; // rdx
int v21; // eax
unsigned long long v22; // r13
long long v23; // rsi
long long v24; // [rsp+8h] [rbp-58h]
long long v25; // [rsp+10h] [rbp-50h] BYREF
long long v26; // [rsp+18h] [rbp-48h]
long long *v27; // [rsp+20h] [rbp-40h]
long long v28; // [rsp+28h] [rbp-38h]
unsigned long long v29; // [rsp+30h] [rbp-30h]
v6 = (long long *)a1[17];
v7 = *(unsigned __int16 *)(*a1 + 438) - 2;
v26 = *a1;
v8 = *(unsigned __int16 *)(v26 + 442);
v9 = v7 / v8;
v10 = *((_DWORD *)v6 + 2);
if ( v9 < v10 )
v10 = v9;
v11 = *a3;
if ( v11 == 255 )
v12 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8) + 3;
else
v12 = v11 + 1;
v28 = v26 + 424;
v27 = v6;
v13 = *v6;
v29 = v8 * v10;
while ( !(unsigned int)mi_ck_delete(a1, a2, a3, v12) )
;
v14 = v29;
v15 = v29 + 2;
*(_BYTE *)(a1[32] + 1) = v29 + 2;
*(_BYTE *)a1[32] = HIBYTE(v15);
v16 = a1[32] + 2;
v29 = v14;
memcpy(v16, v13, v14);
*((_WORD *)a1 + 414) = 257;
v17 = mi_new(a1, v28, 3LL);
v25 = v17;
result = 0xFFFFFFFFLL;
if ( v17 != -1 )
{
v24 = v17;
if ( (unsigned int)mi_write_keypage(a1, v28, v17, 3LL, a1[32]) )
return 0xFFFFFFFFLL;
v20 = v24;
v21 = *((_DWORD *)v27 + 2);
v22 = v29 + v13;
v29 = *v27 + (unsigned int)(v21 * *((_DWORD *)v27 + 5));
if ( v22 < v29 )
{
while ( !(unsigned int)mi_ck_real_write_btree(a1, v28, v22, 0LL, &v25, 4LL) )
{
v22 += *(unsigned __int16 *)(v26 + 442);
if ( v22 >= v29 )
{
v21 = *((_DWORD *)v27 + 2);
v20 = v25;
goto LABEL_15;
}
}
return 0xFFFFFFFFLL;
}
LABEL_15:
v23 = (long long)&a3[v12 + 4];
*(_DWORD *)(v23 - 4) = _byteswap_ulong(-v21);
mi_dpointer(a1, v23, v20, v12, v19);
return mi_ck_real_write_btree(
a1,
*(_QWORD *)(*a1 + 536) + 112LL * a2,
a3,
0LL,
*(_QWORD *)(*a1 + 152) + 8LL * a2,
4LL);
}
return result;
}
| _mi_ft_convert_to_ft2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDX
MOV R15D,ESI
MOV R14,RDI
MOV RCX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x88]
MOVZX EAX,word ptr [RCX + 0x1b6]
ADD EAX,-0x2
MOV qword ptr [RBP + -0x48],RCX
MOVZX ECX,word ptr [RCX + 0x1ba]
CDQ
IDIV ECX
MOV EDX,dword ptr [RSI + 0x8]
CMP EAX,EDX
CMOVC EDX,EAX
MOVZX R12D,byte ptr [RBX]
CMP R12D,0xff
JZ 0x00174859
INC R12D
JMP 0x00174869
LAB_00174859:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX R12D,AX
ADD R12D,0x3
LAB_00174869:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1a8
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x40],RSI
MOV R13,qword ptr [RSI]
IMUL EDX,ECX
MOV qword ptr [RBP + -0x30],RDX
LAB_00174885:
MOV RDI,R14
MOV ESI,R15D
MOV RDX,RBX
MOV ECX,R12D
CALL 0x00174ce9
TEST EAX,EAX
JZ 0x00174885
MOV RDX,qword ptr [RBP + -0x30]
LEA EAX,[RDX + 0x2]
MOV RCX,qword ptr [R14 + 0x100]
MOV byte ptr [RCX + 0x1],AL
MOV RCX,qword ptr [R14 + 0x100]
MOV byte ptr [RCX],AH
MOV RDI,qword ptr [R14 + 0x100]
ADD RDI,0x2
MOV EDX,EDX
MOV RSI,R13
MOV qword ptr [RBP + -0x30],RDX
CALL 0x00129080
MOV word ptr [R14 + 0x33c],0x101
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x3
CALL 0x00183f0e
MOV RCX,RAX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,0xffffffff
CMP RCX,-0x1
JZ 0x001749d3
MOV R8,qword ptr [R14 + 0x100]
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RCX
MOV RDX,RCX
MOV ECX,0x3
CALL 0x00183d5c
TEST EAX,EAX
JZ 0x0017492b
LAB_00174921:
MOV EAX,0xffffffff
JMP 0x001749d3
LAB_0017492b:
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RCX + 0x8]
MOV ESI,dword ptr [RCX + 0x14]
IMUL ESI,EAX
ADD RSI,qword ptr [RCX]
ADD R13,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RSI
CMP R13,RSI
JNC 0x0017498a
LAB_0017494c:
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R13
XOR ECX,ECX
LEA R8,[RBP + -0x50]
MOV R9D,0x4
CALL 0x00188357
TEST EAX,EAX
JNZ 0x00174921
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x1ba]
ADD R13,RAX
CMP R13,qword ptr [RBP + -0x30]
JC 0x0017494c
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x50]
LAB_0017498a:
NEG EAX
MOV ECX,R12D
BSWAP EAX
LEA RSI,[RBX + RCX*0x1]
ADD RSI,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV RDI,R14
CALL 0x001853cf
MOV RAX,qword ptr [R14]
MOV R8D,R15D
IMUL RSI,R8,0x70
ADD RSI,qword ptr [RAX + 0x218]
SHL R8,0x3
ADD R8,qword ptr [RAX + 0x98]
MOV RDI,R14
MOV RDX,RBX
XOR ECX,ECX
MOV R9D,0x4
CALL 0x00188357
LAB_001749d3:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _mi_ft_convert_to_ft2(long *param_1,uint param_2,byte *param_3)
{
void *__src;
uint uVar1;
int iVar2;
uint uVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
ulong uVar7;
long local_58;
long local_50;
long *local_48;
long local_40;
ulong local_38;
local_50 = *param_1;
local_48 = (long *)param_1[0x11];
uVar1 = (int)(*(ushort *)(local_50 + 0x1b6) - 2) / (int)(uint)*(ushort *)(local_50 + 0x1ba);
uVar3 = *(uint *)(local_48 + 1);
if (uVar1 < *(uint *)(local_48 + 1)) {
uVar3 = uVar1;
}
if (*param_3 == 0xff) {
uVar1 = (ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) + 3;
}
else {
uVar1 = *param_3 + 1;
}
local_40 = local_50 + 0x1a8;
__src = (void *)*local_48;
local_38 = (ulong)(uVar3 * *(ushort *)(local_50 + 0x1ba));
do {
iVar2 = _mi_ck_delete(param_1,param_2,param_3,uVar1);
} while (iVar2 == 0);
iVar2 = (int)local_38 + 2;
*(char *)(param_1[0x20] + 1) = (char)iVar2;
*(char *)param_1[0x20] = (char)((uint)iVar2 >> 8);
local_38 = local_38 & 0xffffffff;
memcpy((void *)(param_1[0x20] + 2),__src,local_38);
*(int2 *)((long)param_1 + 0x33c) = 0x101;
lVar4 = _mi_new(param_1,local_40,3);
uVar5 = 0xffffffff;
if (lVar4 != -1) {
local_58 = lVar4;
iVar2 = _mi_write_keypage(param_1,local_40,lVar4,3,param_1[0x20]);
if (iVar2 == 0) {
iVar2 = (int)local_48[1];
uVar6 = (ulong)(uint)(*(int *)((long)local_48 + 0x14) * iVar2) + *local_48;
uVar7 = (long)__src + local_38;
local_38 = uVar6;
if (uVar7 < uVar6) {
do {
iVar2 = _mi_ck_real_write_btree(param_1,local_40,uVar7,0,&local_58,4);
if (iVar2 != 0) goto LAB_00174921;
uVar7 = uVar7 + *(ushort *)(local_50 + 0x1ba);
} while (uVar7 < local_38);
iVar2 = (int)local_48[1];
lVar4 = local_58;
}
uVar3 = -iVar2;
*(uint *)(param_3 + uVar1) =
uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | iVar2 * -0x1000000;
_mi_dpointer(param_1,(uint *)((long)(param_3 + uVar1) + 4),lVar4);
uVar5 = _mi_ck_real_write_btree
(param_1,(ulong)param_2 * 0x70 + *(long *)(*param_1 + 0x218),param_3,0,
(ulong)param_2 * 8 + *(long *)(*param_1 + 0x98),4);
}
else {
LAB_00174921:
uVar5 = 0xffffffff;
}
}
return uVar5;
}
|
|
2,409 | minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O3 | cpp | minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %r12
cmpq %r12, %r15
je 0xb3fff
movq (%rsi), %rbx
movq 0x8(%rsi), %r14
cmpq %r14, 0x8(%r15)
jne 0xb3ff6
movb $0x1, %bpl
testq %r14, %r14
je 0xb4001
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1a940
testl %eax, %eax
je 0xb4001
addq $0x70, %r15
cmpq %r12, %r15
jne 0xb3fd6
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
mov r15, [rdi+18h]
mov r12, [rdi+20h]
cmp r15, r12
jz short loc_B3FFF
mov rbx, [rsi]
mov r14, [rsi+8]
loc_B3FD6:
cmp [r15+8], r14
jnz short loc_B3FF6
mov bpl, 1
test r14, r14
jz short loc_B4001
mov rdi, [r15]
mov rsi, rbx
mov rdx, r14
call _bcmp
test eax, eax
jz short loc_B4001
loc_B3FF6:
add r15, 70h ; 'p'
cmp r15, r12
jnz short loc_B3FD6
loc_B3FFF:
xor ebp, ebp
loc_B4001:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long minja::ArgumentsValue::has_named(long long a1, long long *a2)
{
unsigned int v2; // ebp
_QWORD *v3; // r15
_QWORD *v4; // r12
long long v5; // rbx
long long v6; // r14
v3 = *(_QWORD **)(a1 + 24);
v4 = *(_QWORD **)(a1 + 32);
if ( v3 == v4 )
{
return 0;
}
else
{
v5 = *a2;
v6 = a2[1];
while ( 1 )
{
if ( v3[1] == v6 )
{
LOBYTE(v2) = 1;
if ( !v6 || !(unsigned int)bcmp(*v3, v5) )
break;
}
v3 += 14;
if ( v3 == v4 )
return 0;
}
}
return v2;
}
| has_named:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,qword ptr [RDI + 0x18]
MOV R12,qword ptr [RDI + 0x20]
CMP R15,R12
JZ 0x001b3fff
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
LAB_001b3fd6:
CMP qword ptr [R15 + 0x8],R14
JNZ 0x001b3ff6
MOV BPL,0x1
TEST R14,R14
JZ 0x001b4001
MOV RDI,qword ptr [R15]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011a940
TEST EAX,EAX
JZ 0x001b4001
LAB_001b3ff6:
ADD R15,0x70
CMP R15,R12
JNZ 0x001b3fd6
LAB_001b3fff:
XOR EBP,EBP
LAB_001b4001:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */
ulong __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
ulong unaff_RBP;
int8 *puVar3;
puVar3 = *(int8 **)(this + 0x18);
puVar1 = *(int8 **)(this + 0x20);
if (puVar3 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar3[1] == __n) {
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),1);
if (__n == 0) goto LAB_001b4001;
iVar2 = bcmp((void *)*puVar3,__s2,__n);
if (iVar2 == 0) goto LAB_001b4001;
}
puVar3 = puVar3 + 0xe;
} while (puVar3 != puVar1);
}
unaff_RBP = 0;
LAB_001b4001:
return unaff_RBP & 0xffffffff;
}
|
|
2,410 | js_free_module_def | bluesky950520[P]quickjs/quickjs.c | static void js_free_module_def(JSContext *ctx, JSModuleDef *m)
{
int i;
JS_FreeAtom(ctx, m->module_name);
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
JS_FreeAtom(ctx, rme->module_name);
}
js_free(ctx, m->req_module_entries);
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL)
free_var_ref(ctx->rt, me->u.local.var_ref);
JS_FreeAtom(ctx, me->export_name);
JS_FreeAtom(ctx, me->local_name);
}
js_free(ctx, m->export_entries);
js_free(ctx, m->star_export_entries);
for(i = 0; i < m->import_entries_count; i++) {
JSImportEntry *mi = &m->import_entries[i];
JS_FreeAtom(ctx, mi->import_name);
}
js_free(ctx, m->import_entries);
js_free(ctx, m->async_parent_modules);
JS_FreeValue(ctx, m->module_ns);
JS_FreeValue(ctx, m->func_obj);
JS_FreeValue(ctx, m->eval_exception);
JS_FreeValue(ctx, m->meta_obj);
JS_FreeValue(ctx, m->promise);
JS_FreeValue(ctx, m->resolving_funcs[0]);
JS_FreeValue(ctx, m->resolving_funcs[1]);
list_del(&m->link);
js_free(ctx, m);
} | O0 | c | js_free_module_def:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x2f330
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x6294e
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %esi
callq 0x2f330
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x62908
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x280a0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x629e4
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x24(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x629b3
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x3bd80
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x18(%rax), %esi
callq 0x2f330
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x14(%rax), %esi
callq 0x2f330
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x62969
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x280a0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x280a0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x62a59
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x24(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x2f330
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x62a12
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rsi
callq 0x280a0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rsi
callq 0x280a0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x68(%rax), %rsi
movq 0x70(%rax), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xf8(%rax), %rsi
movq 0x100(%rax), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x108(%rax), %rsi
movq 0x110(%rax), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xc0(%rax), %rsi
movq 0xc8(%rax), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xd0(%rax), %rsi
movq 0xd8(%rax), %rdx
callq 0x29f80
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xe0(%rax), %rsi
movq 0xe8(%rax), %rdx
callq 0x29f80
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
callq 0x29f20
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x280a0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| js_free_module_def:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov esi, [rax+4]
call JS_FreeAtom
mov [rsp+38h+var_14], 0
loc_62908:
mov eax, [rsp+38h+var_14]
mov rcx, [rsp+38h+var_10]
cmp eax, [rcx+20h]
jge short loc_6294E
mov rax, [rsp+38h+var_10]
mov rax, [rax+18h]
movsxd rcx, [rsp+38h+var_14]
shl rcx, 4
add rax, rcx
mov [rsp+38h+var_20], rax
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_20]
mov esi, [rax]
call JS_FreeAtom
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
jmp short loc_62908
loc_6294E:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+18h]
call js_free
mov [rsp+38h+var_14], 0
loc_62969:
mov eax, [rsp+38h+var_14]
mov rcx, [rsp+38h+var_10]
cmp eax, [rcx+30h]
jge short loc_629E4
mov rax, [rsp+38h+var_10]
mov rax, [rax+28h]
movsxd rcx, [rsp+38h+var_14]
shl rcx, 5
add rax, rcx
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
cmp dword ptr [rax+10h], 0
jnz short loc_629B3
mov rax, [rsp+38h+var_8]
mov rdi, [rax+18h]
mov rax, [rsp+38h+var_28]
mov rsi, [rax+8]
call free_var_ref
loc_629B3:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_28]
mov esi, [rax+18h]
call JS_FreeAtom
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_28]
mov esi, [rax+14h]
call JS_FreeAtom
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
jmp short loc_62969
loc_629E4:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+28h]
call js_free
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+38h]
call js_free
mov [rsp+38h+var_14], 0
loc_62A12:
mov eax, [rsp+38h+var_14]
mov rcx, [rsp+38h+var_10]
cmp eax, [rcx+50h]
jge short loc_62A59
mov rax, [rsp+38h+var_10]
mov rax, [rax+48h]
movsxd rcx, [rsp+38h+var_14]
imul rcx, 0Ch
add rax, rcx
mov [rsp+38h+var_30], rax
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_30]
mov esi, [rax+4]
call JS_FreeAtom
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
jmp short loc_62A12
loc_62A59:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+48h]
call js_free
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+98h]
call js_free
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+58h]
mov rdx, [rax+60h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+68h]
mov rdx, [rax+70h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0F8h]
mov rdx, [rax+100h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+108h]
mov rdx, [rax+110h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0C0h]
mov rdx, [rax+0C8h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0D0h]
mov rdx, [rax+0D8h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0E0h]
mov rdx, [rax+0E8h]
call JS_FreeValue
mov rdi, [rsp+38h+var_10]
add rdi, 8
call list_del_1
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call js_free
add rsp, 38h
retn
| void js_free_module_def(long long a1, long long a2)
{
long long v2; // [rsp+10h] [rbp-28h]
int i; // [rsp+24h] [rbp-14h]
int j; // [rsp+24h] [rbp-14h]
int k; // [rsp+24h] [rbp-14h]
JS_FreeAtom(a1, *(_DWORD *)(a2 + 4));
for ( i = 0; i < *(_DWORD *)(a2 + 32); ++i )
JS_FreeAtom(a1, *(_DWORD *)(16LL * i + *(_QWORD *)(a2 + 24)));
js_free(a1, *(_QWORD *)(a2 + 24));
for ( j = 0; j < *(_DWORD *)(a2 + 48); ++j )
{
v2 = 32LL * j + *(_QWORD *)(a2 + 40);
if ( !*(_DWORD *)(v2 + 16) )
free_var_ref(*(_QWORD *)(a1 + 24), *(_QWORD *)(v2 + 8));
JS_FreeAtom(a1, *(_DWORD *)(v2 + 24));
JS_FreeAtom(a1, *(_DWORD *)(v2 + 20));
}
js_free(a1, *(_QWORD *)(a2 + 40));
js_free(a1, *(_QWORD *)(a2 + 56));
for ( k = 0; k < *(_DWORD *)(a2 + 80); ++k )
JS_FreeAtom(a1, *(_DWORD *)(12LL * k + *(_QWORD *)(a2 + 72) + 4));
js_free(a1, *(_QWORD *)(a2 + 72));
js_free(a1, *(_QWORD *)(a2 + 152));
JS_FreeValue(a1, *(_QWORD *)(a2 + 88), *(_QWORD *)(a2 + 96));
JS_FreeValue(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112));
JS_FreeValue(a1, *(_QWORD *)(a2 + 248), *(_QWORD *)(a2 + 256));
JS_FreeValue(a1, *(_QWORD *)(a2 + 264), *(_QWORD *)(a2 + 272));
JS_FreeValue(a1, *(_QWORD *)(a2 + 192), *(_QWORD *)(a2 + 200));
JS_FreeValue(a1, *(_QWORD *)(a2 + 208), *(_QWORD *)(a2 + 216));
JS_FreeValue(a1, *(_QWORD *)(a2 + 224), *(_QWORD *)(a2 + 232));
list_del_1((_QWORD *)(a2 + 8));
js_free(a1, a2);
}
| js_free_module_def:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x0012f330
MOV dword ptr [RSP + 0x24],0x0
LAB_00162908:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
CMP EAX,dword ptr [RCX + 0x20]
JGE 0x0016294e
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX]
CALL 0x0012f330
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00162908
LAB_0016294e:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x001280a0
MOV dword ptr [RSP + 0x24],0x0
LAB_00162969:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
CMP EAX,dword ptr [RCX + 0x30]
JGE 0x001629e4
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x001629b3
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0013bd80
LAB_001629b3:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RAX + 0x18]
CALL 0x0012f330
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RAX + 0x14]
CALL 0x0012f330
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00162969
LAB_001629e4:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x28]
CALL 0x001280a0
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x001280a0
MOV dword ptr [RSP + 0x24],0x0
LAB_00162a12:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
CMP EAX,dword ptr [RCX + 0x50]
JGE 0x00162a59
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x48]
MOVSXD RCX,dword ptr [RSP + 0x24]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x0012f330
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00162a12
LAB_00162a59:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x48]
CALL 0x001280a0
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x98]
CALL 0x001280a0
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x58]
MOV RDX,qword ptr [RAX + 0x60]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x68]
MOV RDX,qword ptr [RAX + 0x70]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xf8]
MOV RDX,qword ptr [RAX + 0x100]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x108]
MOV RDX,qword ptr [RAX + 0x110]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xc0]
MOV RDX,qword ptr [RAX + 0xc8]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xd0]
MOV RDX,qword ptr [RAX + 0xd8]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xe0]
MOV RDX,qword ptr [RAX + 0xe8]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x8
CALL 0x00129f20
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001280a0
ADD RSP,0x38
RET
|
void js_free_module_def(long param_1,long param_2)
{
long lVar1;
int4 local_14;
JS_FreeAtom(param_1,*(int4 *)(param_2 + 4));
for (local_14 = 0; local_14 < *(int *)(param_2 + 0x20); local_14 = local_14 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x18) + (long)local_14 * 0x10));
}
js_free(param_1,*(int8 *)(param_2 + 0x18));
for (local_14 = 0; local_14 < *(int *)(param_2 + 0x30); local_14 = local_14 + 1) {
lVar1 = *(long *)(param_2 + 0x28) + (long)local_14 * 0x20;
if (*(int *)(lVar1 + 0x10) == 0) {
free_var_ref(*(int8 *)(param_1 + 0x18),*(int8 *)(lVar1 + 8));
}
JS_FreeAtom(param_1,*(int4 *)(lVar1 + 0x18));
JS_FreeAtom(param_1,*(int4 *)(lVar1 + 0x14));
}
js_free(param_1,*(int8 *)(param_2 + 0x28));
js_free(param_1,*(int8 *)(param_2 + 0x38));
for (local_14 = 0; local_14 < *(int *)(param_2 + 0x50); local_14 = local_14 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x48) + (long)local_14 * 0xc + 4));
}
js_free(param_1,*(int8 *)(param_2 + 0x48));
js_free(param_1,*(int8 *)(param_2 + 0x98));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xf8),*(int8 *)(param_2 + 0x100));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x108),*(int8 *)(param_2 + 0x110));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xc0),*(int8 *)(param_2 + 200));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xd0),*(int8 *)(param_2 + 0xd8));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xe0),*(int8 *)(param_2 + 0xe8));
list_del(param_2 + 8);
js_free(param_1,param_2);
return;
}
|
|
2,411 | js_free_module_def | bluesky950520[P]quickjs/quickjs.c | static void js_free_module_def(JSContext *ctx, JSModuleDef *m)
{
int i;
JS_FreeAtom(ctx, m->module_name);
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
JS_FreeAtom(ctx, rme->module_name);
}
js_free(ctx, m->req_module_entries);
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL)
free_var_ref(ctx->rt, me->u.local.var_ref);
JS_FreeAtom(ctx, me->export_name);
JS_FreeAtom(ctx, me->local_name);
}
js_free(ctx, m->export_entries);
js_free(ctx, m->star_export_entries);
for(i = 0; i < m->import_entries_count; i++) {
JSImportEntry *mi = &m->import_entries[i];
JS_FreeAtom(ctx, mi->import_name);
}
js_free(ctx, m->import_entries);
js_free(ctx, m->async_parent_modules);
JS_FreeValue(ctx, m->module_ns);
JS_FreeValue(ctx, m->func_obj);
JS_FreeValue(ctx, m->eval_exception);
JS_FreeValue(ctx, m->meta_obj);
JS_FreeValue(ctx, m->promise);
JS_FreeValue(ctx, m->resolving_funcs[0]);
JS_FreeValue(ctx, m->resolving_funcs[1]);
list_del(&m->link);
js_free(ctx, m);
} | O2 | c | js_free_module_def:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x1e545
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq 0x20(%rbx), %rax
movq 0x18(%rbx), %rsi
cmpq %rax, %r12
jge 0x37ff3
movl (%rsi,%r15), %esi
movq %r14, %rdi
callq 0x1e545
incq %r12
addq $0x10, %r15
jmp 0x37fd1
movq %r14, %rdi
callq 0x1ae1e
pushq $0x18
popq %r12
xorl %r13d, %r13d
movslq 0x30(%rbx), %rax
movq 0x28(%rbx), %r15
cmpq %rax, %r13
jge 0x38047
cmpl $0x0, -0x8(%r15,%r12)
jne 0x38025
movq 0x18(%r14), %rdi
movq -0x10(%r15,%r12), %rsi
callq 0x23a89
movl (%r15,%r12), %esi
movq %r14, %rdi
callq 0x1e545
movl -0x4(%r15,%r12), %esi
movq %r14, %rdi
callq 0x1e545
incq %r13
addq $0x20, %r12
jmp 0x38002
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ae1e
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x1ae1e
pushq $0x4
popq %r15
xorl %r12d, %r12d
movslq 0x50(%rbx), %rax
movq 0x48(%rbx), %rsi
cmpq %rax, %r12
jge 0x38087
movl (%rsi,%r15), %esi
movq %r14, %rdi
callq 0x1e545
incq %r12
addq $0xc, %r15
jmp 0x38065
movq %r14, %rdi
callq 0x1ae1e
movq 0x98(%rbx), %rsi
movq %r14, %rdi
callq 0x1ae1e
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq 0x68(%rbx), %rsi
movq 0x70(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq 0xf8(%rbx), %rsi
movq 0x100(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq 0x108(%rbx), %rsi
movq 0x110(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq 0xc0(%rbx), %rsi
movq 0xc8(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq 0xd0(%rbx), %rsi
movq 0xd8(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq 0xe0(%rbx), %rsi
movq 0xe8(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbce
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1ae1e
| js_free_module_def:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
mov esi, [rsi+4]
call JS_FreeAtom
xor r15d, r15d
xor r12d, r12d
loc_37FD1:
movsxd rax, dword ptr [rbx+20h]
mov rsi, [rbx+18h]
cmp r12, rax
jge short loc_37FF3
mov esi, [rsi+r15]
mov rdi, r14
call JS_FreeAtom
inc r12
add r15, 10h
jmp short loc_37FD1
loc_37FF3:
mov rdi, r14
call js_free
push 18h
pop r12
xor r13d, r13d
loc_38002:
movsxd rax, dword ptr [rbx+30h]
mov r15, [rbx+28h]
cmp r13, rax
jge short loc_38047
cmp dword ptr [r15+r12-8], 0
jnz short loc_38025
mov rdi, [r14+18h]
mov rsi, [r15+r12-10h]
call free_var_ref
loc_38025:
mov esi, [r15+r12]
mov rdi, r14
call JS_FreeAtom
mov esi, [r15+r12-4]
mov rdi, r14
call JS_FreeAtom
inc r13
add r12, 20h ; ' '
jmp short loc_38002
loc_38047:
mov rdi, r14
mov rsi, r15
call js_free
mov rsi, [rbx+38h]
mov rdi, r14
call js_free
push 4
pop r15
xor r12d, r12d
loc_38065:
movsxd rax, dword ptr [rbx+50h]
mov rsi, [rbx+48h]
cmp r12, rax
jge short loc_38087
mov esi, [rsi+r15]
mov rdi, r14
call JS_FreeAtom
inc r12
add r15, 0Ch
jmp short loc_38065
loc_38087:
mov rdi, r14
call js_free
mov rsi, [rbx+98h]
mov rdi, r14
call js_free
mov rsi, [rbx+58h]
mov rdx, [rbx+60h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+68h]
mov rdx, [rbx+70h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0F8h]
mov rdx, [rbx+100h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+108h]
mov rdx, [rbx+110h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0C0h]
mov rdx, [rbx+0C8h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0D0h]
mov rdx, [rbx+0D8h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0E0h]
mov rdx, [rbx+0E8h]
mov rdi, r14
call JS_FreeValue
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov rdi, r14
mov rsi, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp js_free
| long long js_free_module_def(long long a1, long long a2)
{
long long v3; // r15
long long i; // r12
long long v5; // rsi
long long v6; // r12
long long j; // r13
long long v8; // r15
long long v9; // r15
long long k; // r12
long long v11; // rsi
long long v12; // rax
_QWORD *v13; // rcx
JS_FreeAtom(a1, *(_DWORD *)(a2 + 4));
v3 = 0LL;
for ( i = 0LL; ; ++i )
{
v5 = *(_QWORD *)(a2 + 24);
if ( i >= *(int *)(a2 + 32) )
break;
JS_FreeAtom(a1, *(_DWORD *)(v5 + v3));
v3 += 16LL;
}
js_free(a1, v5);
v6 = 24LL;
for ( j = 0LL; ; ++j )
{
v8 = *(_QWORD *)(a2 + 40);
if ( j >= *(int *)(a2 + 48) )
break;
if ( !*(_DWORD *)(v8 + v6 - 8) )
free_var_ref(*(_QWORD *)(a1 + 24), *(_QWORD *)(v8 + v6 - 16));
JS_FreeAtom(a1, *(_DWORD *)(v8 + v6));
JS_FreeAtom(a1, *(_DWORD *)(v8 + v6 - 4));
v6 += 32LL;
}
js_free(a1, *(_QWORD *)(a2 + 40));
js_free(a1, *(_QWORD *)(a2 + 56));
v9 = 4LL;
for ( k = 0LL; ; ++k )
{
v11 = *(_QWORD *)(a2 + 72);
if ( k >= *(int *)(a2 + 80) )
break;
JS_FreeAtom(a1, *(_DWORD *)(v11 + v9));
v9 += 12LL;
}
js_free(a1, v11);
js_free(a1, *(_QWORD *)(a2 + 152));
JS_FreeValue(a1, *(_QWORD *)(a2 + 88), *(_QWORD *)(a2 + 96));
JS_FreeValue(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112));
JS_FreeValue(a1, *(_QWORD *)(a2 + 248), *(_QWORD *)(a2 + 256));
JS_FreeValue(a1, *(_QWORD *)(a2 + 264), *(_QWORD *)(a2 + 272));
JS_FreeValue(a1, *(_QWORD *)(a2 + 192), *(_QWORD *)(a2 + 200));
JS_FreeValue(a1, *(_QWORD *)(a2 + 208), *(_QWORD *)(a2 + 216));
JS_FreeValue(a1, *(_QWORD *)(a2 + 224), *(_QWORD *)(a2 + 232));
v12 = *(_QWORD *)(a2 + 8);
v13 = *(_QWORD **)(a2 + 16);
*(_QWORD *)(v12 + 8) = v13;
*v13 = v12;
*(_OWORD *)(a2 + 8) = 0LL;
return js_free(a1, a2);
}
| js_free_module_def:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV ESI,dword ptr [RSI + 0x4]
CALL 0x0011e545
XOR R15D,R15D
XOR R12D,R12D
LAB_00137fd1:
MOVSXD RAX,dword ptr [RBX + 0x20]
MOV RSI,qword ptr [RBX + 0x18]
CMP R12,RAX
JGE 0x00137ff3
MOV ESI,dword ptr [RSI + R15*0x1]
MOV RDI,R14
CALL 0x0011e545
INC R12
ADD R15,0x10
JMP 0x00137fd1
LAB_00137ff3:
MOV RDI,R14
CALL 0x0011ae1e
PUSH 0x18
POP R12
XOR R13D,R13D
LAB_00138002:
MOVSXD RAX,dword ptr [RBX + 0x30]
MOV R15,qword ptr [RBX + 0x28]
CMP R13,RAX
JGE 0x00138047
CMP dword ptr [R15 + R12*0x1 + -0x8],0x0
JNZ 0x00138025
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [R15 + R12*0x1 + -0x10]
CALL 0x00123a89
LAB_00138025:
MOV ESI,dword ptr [R15 + R12*0x1]
MOV RDI,R14
CALL 0x0011e545
MOV ESI,dword ptr [R15 + R12*0x1 + -0x4]
MOV RDI,R14
CALL 0x0011e545
INC R13
ADD R12,0x20
JMP 0x00138002
LAB_00138047:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011ae1e
MOV RSI,qword ptr [RBX + 0x38]
MOV RDI,R14
CALL 0x0011ae1e
PUSH 0x4
POP R15
XOR R12D,R12D
LAB_00138065:
MOVSXD RAX,dword ptr [RBX + 0x50]
MOV RSI,qword ptr [RBX + 0x48]
CMP R12,RAX
JGE 0x00138087
MOV ESI,dword ptr [RSI + R15*0x1]
MOV RDI,R14
CALL 0x0011e545
INC R12
ADD R15,0xc
JMP 0x00138065
LAB_00138087:
MOV RDI,R14
CALL 0x0011ae1e
MOV RSI,qword ptr [RBX + 0x98]
MOV RDI,R14
CALL 0x0011ae1e
MOV RSI,qword ptr [RBX + 0x58]
MOV RDX,qword ptr [RBX + 0x60]
MOV RDI,R14
CALL 0x0011bbce
MOV RSI,qword ptr [RBX + 0x68]
MOV RDX,qword ptr [RBX + 0x70]
MOV RDI,R14
CALL 0x0011bbce
MOV RSI,qword ptr [RBX + 0xf8]
MOV RDX,qword ptr [RBX + 0x100]
MOV RDI,R14
CALL 0x0011bbce
MOV RSI,qword ptr [RBX + 0x108]
MOV RDX,qword ptr [RBX + 0x110]
MOV RDI,R14
CALL 0x0011bbce
MOV RSI,qword ptr [RBX + 0xc0]
MOV RDX,qword ptr [RBX + 0xc8]
MOV RDI,R14
CALL 0x0011bbce
MOV RSI,qword ptr [RBX + 0xd0]
MOV RDX,qword ptr [RBX + 0xd8]
MOV RDI,R14
CALL 0x0011bbce
MOV RSI,qword ptr [RBX + 0xe0]
MOV RDX,qword ptr [RBX + 0xe8]
MOV RDI,R14
CALL 0x0011bbce
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV RDI,R14
MOV RSI,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x0011ae1e
|
void js_free_module_def(long param_1,long param_2)
{
long lVar1;
long *plVar2;
long lVar3;
long lVar4;
JS_FreeAtom(param_1,*(int4 *)(param_2 + 4));
lVar4 = 0;
for (lVar3 = 0; lVar3 < *(int *)(param_2 + 0x20); lVar3 = lVar3 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x18) + lVar4));
lVar4 = lVar4 + 0x10;
}
js_free(param_1);
lVar3 = 0x18;
for (lVar4 = 0; lVar1 = *(long *)(param_2 + 0x28), lVar4 < *(int *)(param_2 + 0x30);
lVar4 = lVar4 + 1) {
if (*(int *)(lVar1 + -8 + lVar3) == 0) {
free_var_ref(*(int8 *)(param_1 + 0x18),*(int8 *)(lVar1 + -0x10 + lVar3));
}
JS_FreeAtom(param_1,*(int4 *)(lVar1 + lVar3));
JS_FreeAtom(param_1,*(int4 *)(lVar1 + -4 + lVar3));
lVar3 = lVar3 + 0x20;
}
js_free(param_1,lVar1);
js_free(param_1,*(int8 *)(param_2 + 0x38));
lVar3 = 4;
for (lVar4 = 0; lVar4 < *(int *)(param_2 + 0x50); lVar4 = lVar4 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x48) + lVar3));
lVar3 = lVar3 + 0xc;
}
js_free(param_1);
js_free(param_1,*(int8 *)(param_2 + 0x98));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xf8),*(int8 *)(param_2 + 0x100));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x108),*(int8 *)(param_2 + 0x110));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xc0),*(int8 *)(param_2 + 200));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xd0),*(int8 *)(param_2 + 0xd8));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xe0),*(int8 *)(param_2 + 0xe8));
lVar3 = *(long *)(param_2 + 8);
plVar2 = *(long **)(param_2 + 0x10);
*(long **)(lVar3 + 8) = plVar2;
*plVar2 = lVar3;
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(param_2 + 0x10) = 0;
js_free(param_1,param_2);
return;
}
|
|
2,412 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::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<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::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 0x22a47
movb $0x0, 0x18(%rbx)
movl 0x14(%rbx), %eax
jmp 0x22a5c
movq (%rbx), %rcx
cmpq 0x8(%rbx), %rcx
je 0x22a8f
movzbl (%rcx), %eax
incq %rcx
movq %rcx, (%rbx)
movl %eax, 0x14(%rbx)
cmpl $-0x1, %eax
je 0x22a8b
leaq 0x38(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
callq 0x71918
movl 0x14(%rbx), %eax
cmpl $0xa, %eax
jne 0x22a85
incq 0x30(%rbx)
andq $0x0, 0x28(%rbx)
pushq $0xa
popq %rax
addq $0x10, %rsp
popq %rbx
retq
pushq $-0x1
jmp 0x22a84
pushq $-0x1
popq %rax
jmp 0x22a59
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv:
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_22A47
mov byte ptr [rbx+18h], 0
mov eax, [rbx+14h]
jmp short loc_22A5C
loc_22A47:
mov rcx, [rbx]
cmp rcx, [rbx+8]
jz short loc_22A8F
movzx eax, byte ptr [rcx]
inc rcx
mov [rbx], rcx
loc_22A59:
mov [rbx+14h], eax
loc_22A5C:
cmp eax, 0FFFFFFFFh
jz short loc_22A8B
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_22A85
inc qword ptr [rbx+30h]
and qword ptr [rbx+28h], 0
push 0Ah
loc_22A84:
pop rax
loc_22A85:
add rsp, 10h
pop rbx
retn
loc_22A8B:
push 0FFFFFFFFFFFFFFFFh
jmp short loc_22A84
loc_22A8F:
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_22A59
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(
__m128i *a1)
{
int v1; // eax
unsigned __int8 *v2; // rcx
long long result; // rax
a1[2] = _mm_sub_epi64(_mm_loadu_si128(a1 + 2), (__m128i)-1LL);
if ( a1[1].m128i_i8[8] == 1 )
{
a1[1].m128i_i8[8] = 0;
v1 = a1[1].m128i_i32[1];
}
else
{
v2 = (unsigned __int8 *)a1->m128i_i64[0];
if ( a1->m128i_i64[0] == a1->m128i_i64[1] )
{
v1 = -1;
}
else
{
v1 = *v2;
a1->m128i_i64[0] = (long long)(v2 + 1);
}
a1[1].m128i_i32[1] = v1;
}
if ( v1 == -1 )
return -1LL;
std::vector<char>::emplace_back<char>(&a1[3].m128i_u64[1]);
result = a1[1].m128i_u32[1];
if ( (_DWORD)result != 10 )
return result;
++a1[3].m128i_i64[0];
a1[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 0x00122a47
MOV byte ptr [RBX + 0x18],0x0
MOV EAX,dword ptr [RBX + 0x14]
JMP 0x00122a5c
LAB_00122a47:
MOV RCX,qword ptr [RBX]
CMP RCX,qword ptr [RBX + 0x8]
JZ 0x00122a8f
MOVZX EAX,byte ptr [RCX]
INC RCX
MOV qword ptr [RBX],RCX
LAB_00122a59:
MOV dword ptr [RBX + 0x14],EAX
LAB_00122a5c:
CMP EAX,-0x1
JZ 0x00122a8b
LEA RDI,[RBX + 0x38]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
CALL 0x00171918
MOV EAX,dword ptr [RBX + 0x14]
CMP EAX,0xa
JNZ 0x00122a85
INC qword ptr [RBX + 0x30]
AND qword ptr [RBX + 0x28],0x0
PUSH 0xa
LAB_00122a84:
POP RAX
LAB_00122a85:
ADD RSP,0x10
POP RBX
RET
LAB_00122a8b:
PUSH -0x1
JMP 0x00122a84
LAB_00122a8f:
PUSH -0x1
POP RAX
JMP 0x00122a59
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get() */
ulong __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
byte *pbVar1;
uint uVar2;
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<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1) {
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
uVar2 = *(uint *)(this + 0x14);
}
else {
pbVar1 = *(byte **)this;
if (pbVar1 == *(byte **)(this + 8)) {
uVar2 = 0xffffffff;
}
else {
uVar2 = (uint)*pbVar1;
*(byte **)this = pbVar1 + 1;
}
*(uint *)(this + 0x14) = uVar2;
}
if (uVar2 == 0xffffffff) {
uStack_20 = 0xffffffffffffffff;
}
else {
local_9 = (char)uVar2;
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;
}
|
|
2,413 | llama_state_get_data | monkey531[P]llama/src/llama-context.cpp | size_t llama_state_get_data(struct llama_context * ctx, uint8_t * dst, size_t size) {
llama_data_write_buffer data_ctx(dst, size);
try {
return llama_state_get_data_internal(ctx, data_ctx);
} catch (const std::exception & err) {
LLAMA_LOG_ERROR("%s: error saving state: %s\n", __func__, err.what());
return 0;
}
} | O3 | cpp | llama_state_get_data:
pushq %rbx
subq $0x20, %rsp
movq 0xbde38(%rip), %rcx # 0x15cd20
addq $0x10, %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movq %rsi, 0x8(%rax)
movq %rdx, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq %rax, %rsi
callq 0x9f34c
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x9ef57
movq %rbx, %rdi
callq 0x65780
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x75a31(%rip), %rsi # 0x114961
leaq 0x75a46(%rip), %rdx # 0x11497d
movl $0x4, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x67d20
callq 0x6ab40
xorl %eax, %eax
jmp 0x9ef0a
movq %rax, %rbx
callq 0x6ab40
movq %rbx, %rdi
callq 0x6b5d0
movq %rax, %rdi
callq 0x76683
| llama_state_get_data:
push rbx
sub rsp, 20h
mov rcx, cs:_ZTV23llama_data_write_buffer_ptr
add rcx, 10h
mov rax, rsp
mov [rax], rcx
mov [rax+8], rsi
mov [rax+10h], rdx
mov qword ptr [rax+18h], 0
mov rsi, rax; this
call _ZL29llama_state_get_data_internalP13llama_contextR16llama_data_write; llama_state_get_data_internal(llama_context *,llama_data_write &)
loc_9EF0A:
add rsp, 20h
pop rbx
retn
mov rbx, rax
cmp edx, 1
jnz short loc_9EF57
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rcx, [rax]
mov rdi, rax
call qword ptr [rcx+10h]
lea rsi, aSErrorSavingSt; "%s: error saving state: %s\n"
lea rdx, aLlamaStateGetD_0; "llama_state_get_data"
mov edi, 4
mov rcx, rax
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
call ___cxa_end_catch
xor eax, eax
jmp short loc_9EF0A
mov rbx, rax
call ___cxa_end_catch
loc_9EF57:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long llama_state_get_data(llama_context *a1, long long a2, long long a3)
{
_QWORD v4[5]; // [rsp+0h] [rbp-28h] BYREF
v4[0] = &`vtable for'llama_data_write_buffer + 2;
v4[1] = a2;
v4[2] = a3;
v4[3] = 0LL;
return llama_state_get_data_internal(a1, (llama_data_write *)v4);
}
| llama_state_get_data:
PUSH RBX
SUB RSP,0x20
MOV RCX,qword ptr [0x0025cd20]
ADD RCX,0x10
MOV RAX,RSP
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],RSI
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RAX + 0x18],0x0
LAB_0019ef02:
MOV RSI,RAX
CALL 0x0019f34c
LAB_0019ef0a:
ADD RSP,0x20
POP RBX
RET
|
void llama_state_get_data(llama_context *param_1,int8 param_2,int8 param_3)
{
int *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
local_28 = PTR_vtable_0025cd20 + 0x10;
local_10 = 0;
local_20 = param_2;
local_18 = param_3;
/* try { // try from 0019ef02 to 0019ef09 has its CatchHandler @ 0019ef10 */
llama_state_get_data_internal(param_1,(llama_data_write *)&local_28);
return;
}
|
|
2,414 | LefDefParser::lefiLayer::setCurrentPoint(double, double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiLayer::setCurrentPoint(double width,
double current)
{
if (numCurrentPoints_ == currentPointsAllocated_) {
int max = numCurrentPoints_;
int len;
int i;
double *nc;
double *nw;
if (currentPointsAllocated_ == 0)
len = currentPointsAllocated_ = 2;
else
len = currentPointsAllocated_ *= 2;
nc = (double*) lefMalloc(sizeof(double) * len);
nw = (double*) lefMalloc(sizeof(double) * len);
for (i = 0; i < max; i++) {
nc[i] = current_[i];
nw[i] = currentWidths_[i];
}
lefFree((char*) (current_));
lefFree((char*) (currentWidths_));
current_ = nc;
currentWidths_ = nw;
}
current_[numCurrentPoints_] = current;
currentWidths_[numCurrentPoints_] = width;
numCurrentPoints_ += 1;
} | O3 | cpp | LefDefParser::lefiLayer::setCurrentPoint(double, double):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x308(%rdi), %r12d
cmpl 0x30c(%rdi), %r12d
jne 0x263fd
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
leal (%r12,%r12), %eax
testl %r12d, %r12d
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x30c(%rbx)
movslq %ecx, %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x30c15
movq %rax, %r14
movq %r15, %rdi
callq 0x30c15
movq %rax, %r15
movq 0x318(%rbx), %rdi
testl %r12d, %r12d
jle 0x263c9
movq 0x310(%rbx), %rax
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm0
movsd %xmm0, (%r14,%rcx,8)
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x263ab
callq 0x322d0
movq 0x310(%rbx), %rdi
callq 0x322d0
movq %r14, 0x318(%rbx)
movq %r15, 0x310(%rbx)
movl 0x308(%rbx), %r12d
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
jmp 0x2640b
movq 0x310(%rbx), %r15
movq 0x318(%rbx), %r14
movslq %r12d, %rax
movsd %xmm1, (%r14,%rax,8)
movsd %xmm0, (%r15,%rax,8)
incl %eax
movl %eax, 0x308(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN12LefDefParser9lefiLayer15setCurrentPointEdd:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r12d, [rdi+308h]
cmp r12d, [rdi+30Ch]
jnz loc_263FD
movsd [rsp+38h+var_30], xmm1
movsd [rsp+38h+var_28], xmm0
lea eax, [r12+r12]
test r12d, r12d
mov ecx, 2
cmovnz ecx, eax
mov [rbx+30Ch], ecx
movsxd r15, ecx
shl r15, 3
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
mov rdi, [rbx+318h]; this
test r12d, r12d
jle short loc_263C9
mov rax, [rbx+310h]
xor ecx, ecx
loc_263AB:
movsd xmm0, qword ptr [rdi+rcx*8]
movsd qword ptr [r14+rcx*8], xmm0
movsd xmm0, qword ptr [rax+rcx*8]
movsd qword ptr [r15+rcx*8], xmm0
inc rcx
cmp r12, rcx
jnz short loc_263AB
loc_263C9:
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+310h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov [rbx+318h], r14
mov [rbx+310h], r15
mov r12d, [rbx+308h]
movsd xmm0, [rsp+38h+var_28]
movsd xmm1, [rsp+38h+var_30]
jmp short loc_2640B
loc_263FD:
mov r15, [rbx+310h]
mov r14, [rbx+318h]
loc_2640B:
movsxd rax, r12d
movsd qword ptr [r14+rax*8], xmm1
movsd qword ptr [r15+rax*8], xmm0
inc eax
mov [rbx+308h], eax
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
| long long LefDefParser::lefiLayer::setCurrentPoint(
LefDefParser::lefiLayer *this,
double a2,
double a3,
void *a4)
{
long long v5; // r12
int v6; // ecx
LefDefParser *v7; // r15
long long v8; // r14
long long v9; // r15
LefDefParser *v10; // rdi
long long v11; // rax
long long i; // rcx
long long result; // rax
v5 = *((unsigned int *)this + 194);
if ( (_DWORD)v5 == *((_DWORD *)this + 195) )
{
v6 = 2;
if ( (_DWORD)v5 )
v6 = 2 * v5;
*((_DWORD *)this + 195) = v6;
v7 = (LefDefParser *)(8LL * v6);
v8 = LefDefParser::lefMalloc(v7, (unsigned long long)a4);
v9 = LefDefParser::lefMalloc(v7, (unsigned long long)a4);
v10 = (LefDefParser *)*((_QWORD *)this + 99);
if ( (int)v5 > 0 )
{
v11 = *((_QWORD *)this + 98);
for ( i = 0LL; i != v5; ++i )
{
*(_QWORD *)(v8 + 8 * i) = *((_QWORD *)v10 + i);
*(_QWORD *)(v9 + 8 * i) = *(_QWORD *)(v11 + 8 * i);
}
}
LefDefParser::lefFree(v10, a4);
LefDefParser::lefFree(*((LefDefParser **)this + 98), a4);
*((_QWORD *)this + 99) = v8;
*((_QWORD *)this + 98) = v9;
LODWORD(v5) = *((_DWORD *)this + 194);
}
else
{
v9 = *((_QWORD *)this + 98);
v8 = *((_QWORD *)this + 99);
}
*(double *)(v8 + 8LL * (int)v5) = a3;
*(double *)(v9 + 8LL * (int)v5) = a2;
result = (unsigned int)(v5 + 1);
*((_DWORD *)this + 194) = result;
return result;
}
| setCurrentPoint:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R12D,dword ptr [RDI + 0x308]
CMP R12D,dword ptr [RDI + 0x30c]
JNZ 0x001263fd
MOVSD qword ptr [RSP + 0x8],XMM1
MOVSD qword ptr [RSP + 0x10],XMM0
LEA EAX,[R12 + R12*0x1]
TEST R12D,R12D
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [RBX + 0x30c],ECX
MOVSXD R15,ECX
SHL R15,0x3
MOV RDI,R15
CALL 0x00130c15
MOV R14,RAX
MOV RDI,R15
CALL 0x00130c15
MOV R15,RAX
MOV RDI,qword ptr [RBX + 0x318]
TEST R12D,R12D
JLE 0x001263c9
MOV RAX,qword ptr [RBX + 0x310]
XOR ECX,ECX
LAB_001263ab:
MOVSD XMM0,qword ptr [RDI + RCX*0x8]
MOVSD qword ptr [R14 + RCX*0x8],XMM0
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
MOVSD qword ptr [R15 + RCX*0x8],XMM0
INC RCX
CMP R12,RCX
JNZ 0x001263ab
LAB_001263c9:
CALL 0x001322d0
MOV RDI,qword ptr [RBX + 0x310]
CALL 0x001322d0
MOV qword ptr [RBX + 0x318],R14
MOV qword ptr [RBX + 0x310],R15
MOV R12D,dword ptr [RBX + 0x308]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
JMP 0x0012640b
LAB_001263fd:
MOV R15,qword ptr [RBX + 0x310]
MOV R14,qword ptr [RBX + 0x318]
LAB_0012640b:
MOVSXD RAX,R12D
MOVSD qword ptr [R14 + RAX*0x8],XMM1
MOVSD qword ptr [R15 + RAX*0x8],XMM0
INC EAX
MOV dword ptr [RBX + 0x308],EAX
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* LefDefParser::lefiLayer::setCurrentPoint(double, double) */
void LefDefParser::lefiLayer::setCurrentPoint(double param_1,double param_2)
{
void *pvVar1;
long lVar2;
long lVar3;
long lVar4;
int iVar5;
ulong uVar6;
ulong in_RSI;
long in_RDI;
uint uVar7;
uVar7 = *(uint *)(in_RDI + 0x308);
if (uVar7 == *(uint *)(in_RDI + 0x30c)) {
iVar5 = 2;
if (uVar7 != 0) {
iVar5 = uVar7 * 2;
}
*(int *)(in_RDI + 0x30c) = iVar5;
lVar3 = lefMalloc((LefDefParser *)((long)iVar5 << 3),in_RSI);
lVar4 = lefMalloc((LefDefParser *)((long)iVar5 << 3),in_RSI);
pvVar1 = *(void **)(in_RDI + 0x318);
if (0 < (int)uVar7) {
lVar2 = *(long *)(in_RDI + 0x310);
uVar6 = 0;
do {
*(int8 *)(lVar3 + uVar6 * 8) = *(int8 *)((long)pvVar1 + uVar6 * 8);
*(int8 *)(lVar4 + uVar6 * 8) = *(int8 *)(lVar2 + uVar6 * 8);
uVar6 = uVar6 + 1;
} while (uVar7 != uVar6);
}
lefFree(pvVar1);
lefFree(*(void **)(in_RDI + 0x310));
*(long *)(in_RDI + 0x318) = lVar3;
*(long *)(in_RDI + 0x310) = lVar4;
uVar7 = *(uint *)(in_RDI + 0x308);
}
else {
lVar4 = *(long *)(in_RDI + 0x310);
lVar3 = *(long *)(in_RDI + 0x318);
}
*(double *)(lVar3 + (long)(int)uVar7 * 8) = param_2;
*(double *)(lVar4 + (long)(int)uVar7 * 8) = param_1;
*(uint *)(in_RDI + 0x308) = uVar7 + 1;
return;
}
|
|
2,415 | LefDefParser::defiNonDefault::hasLayerSpacing(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::hasLayerSpacing(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return hasSpacing_[index];
} | O0 | cpp | LefDefParser::defiNonDefault::hasLayerSpacing(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x4834e
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0xc(%rcx), %eax
jl 0x4839a
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0xc(%rax), %ecx
leaq 0x2d816(%rip), %rsi # 0x75b7f
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0xb8(%rax), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
callq 0x2a600
movl $0x0, 0xc4(%rsp)
jmp 0x483b6
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0xb4(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK12LefDefParser14defiNonDefault15hasLayerSpacingEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_4834E
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+0Ch]
jl short loc_4839A
loc_4834E:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+0Ch]
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_B8]; int
mov rcx, [rax+0B8h]; char *
xor edi, edi; this
mov esi, 17CAh; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0C8h+var_4], 0
jmp short loc_483B6
loc_4839A:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+38h]
movsxd rcx, [rsp+0C8h+var_14]
movsx eax, byte ptr [rax+rcx]
mov [rsp+0C8h+var_4], eax
loc_483B6:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
| long long LefDefParser::defiNonDefault::hasLayerSpacing(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[164]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h]
v6 = (LefDefParser::defiNonDefault *)this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 3) )
{
return (unsigned int)*((char *)this[7] + v5);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 3));
LefDefParser::defiError(0LL, 6090, v4, this[23], v2);
return 0;
}
}
| hasLayerSpacing:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x0014834e
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x0014839a
LAB_0014834e:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0xc]
LEA RSI,[0x175b7f]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
CALL 0x0012a600
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x001483b6
LAB_0014839a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0xc4],EAX
LAB_001483b6:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::defiNonDefault::hasLayerSpacing(int) const */
int __thiscall LefDefParser::defiNonDefault::hasLayerSpacing(defiNonDefault *this,int param_1)
{
char local_b8 [164];
int local_14;
defiNonDefault *local_10;
int local_4;
if ((param_1 < 0) || (*(int *)(this + 0xc) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc));
defiError(0,0x17ca,local_b8,*(defrData **)(this + 0xb8));
local_4 = 0;
}
else {
local_4 = (int)*(char *)(*(long *)(this + 0x38) + (long)param_1);
}
return local_4;
}
|
|
2,416 | LefDefParser::defiNonDefault::hasLayerSpacing(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::hasLayerSpacing(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return hasSpacing_[index];
} | O3 | cpp | LefDefParser::defiNonDefault::hasLayerSpacing(int) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
setns %al
movl 0xc(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2bd9d
movq 0x38(%rbx), %rax
movl %edx, %ecx
movsbl (%rax,%rcx), %ebp
jmp 0x2bdc9
leaq 0x19c09(%rip), %rsi # 0x459ad
xorl %ebp, %ebp
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x7060
movq 0xb8(%rbx), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
movq %r14, %rdx
callq 0x1bb18
movl %ebp, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZNK12LefDefParser14defiNonDefault15hasLayerSpacingEi:
push rbp
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov rbx, rdi
test esi, esi
setns al
mov ecx, [rdi+0Ch]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2BD9D
mov rax, [rbx+38h]
mov ecx, edx
movsx ebp, byte ptr [rax+rcx]
jmp short loc_2BDC9
loc_2BD9D:
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
xor ebp, ebp
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
mov rcx, [rbx+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CAh; int
mov rdx, r14; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_2BDC9:
mov eax, ebp
add rsp, 0A0h
pop rbx
pop r14
pop rbp
retn
| long long LefDefParser::defiNonDefault::hasLayerSpacing(LefDefParser::defiNonDefault *this, signed int a2)
{
int v2; // ecx
unsigned int v3; // ebp
LefDefParser::defrData *v4; // r8
char v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 3);
if ( v2 > a2 && a2 >= 0 )
{
return (unsigned int)*(char *)(*((_QWORD *)this + 7) + (unsigned int)a2);
}
else
{
v3 = 0;
sprintf(
v6,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6090, v6, *((LefDefParser::defrData **)this + 23), v4);
}
return v3;
}
| hasLayerSpacing:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV RBX,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0xc]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012bd9d
MOV RAX,qword ptr [RBX + 0x38]
MOV ECX,EDX
MOVSX EBP,byte ptr [RAX + RCX*0x1]
JMP 0x0012bdc9
LAB_0012bd9d:
LEA RSI,[0x1459ad]
XOR EBP,EBP
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00107060
MOV RCX,qword ptr [RBX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
MOV RDX,R14
CALL 0x0011bb18
LAB_0012bdc9:
MOV EAX,EBP
ADD RSP,0xa0
POP RBX
POP R14
POP RBP
RET
|
/* LefDefParser::defiNonDefault::hasLayerSpacing(int) const */
int __thiscall LefDefParser::defiNonDefault::hasLayerSpacing(defiNonDefault *this,int param_1)
{
int iVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0xc) <= param_1) {
iVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17ca,acStack_b8,*(defrData **)(this + 0xb8));
}
else {
iVar1 = (int)*(char *)(*(long *)(this + 0x38) + (ulong)(uint)param_1);
}
return iVar1;
}
|
|
2,417 | mi_calc_bin_pack_key_length | eloqsql/storage/myisam/mi_search.c | int
_mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
uchar *org_key, uchar *prev_key, uchar *key,
MI_KEY_PARAM *s_temp)
{
uint length,key_length,ref_length;
s_temp->totlength=key_length=_mi_keylength(keyinfo,key)+nod_flag;
#ifdef HAVE_valgrind
s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */
#endif
s_temp->key=key;
s_temp->prev_key=org_key;
if (prev_key) /* If not first key in block */
{
/* pack key against previous key */
/*
As keys may be identical when running a sort in myisamchk, we
have to guard against the case where keys may be identical
*/
uchar *end;
end=key+key_length;
for ( ; *key == *prev_key && key < end; key++,prev_key++) ;
s_temp->ref_length= ref_length=(uint) (key-s_temp->key);
length=key_length - ref_length + get_pack_length(ref_length);
}
else
{
/* No previous key */
s_temp->ref_length=ref_length=0;
length=key_length+1;
}
if ((s_temp->next_key_pos=next_key)) /* If another key after */
{
/* pack key against next key */
uint next_length,next_length_pack;
get_key_pack_length(next_length,next_length_pack,next_key);
/* If first key and next key is packed (only on delete) */
if (!prev_key && org_key && next_length)
{
uchar *end;
for (key= s_temp->key, end=key+next_length ;
*key == *org_key && key < end;
key++,org_key++) ;
ref_length= (uint) (key - s_temp->key);
}
if (next_length > ref_length)
{
/* We put a key with different case between two keys with the same prefix
Extend next key to have same prefix as
this key */
s_temp->n_ref_length= ref_length;
s_temp->prev_length= next_length-ref_length;
s_temp->prev_key+= ref_length;
return (int) (length+ s_temp->prev_length - next_length_pack +
get_pack_length(ref_length));
}
/* Check how many characters are identical to next key */
key= s_temp->key+next_length;
s_temp->prev_length= 0;
while (*key++ == *next_key++) ;
if ((ref_length= (uint) (key - s_temp->key)-1) == next_length)
{
s_temp->next_key_pos=0;
return length; /* can't pack next key */
}
s_temp->n_ref_length=ref_length;
return (int) (length-(ref_length - next_length) - next_length_pack +
get_pack_length(ref_length));
}
return (int) length;
} | O3 | c | mi_calc_bin_pack_key_length:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %r13d
movq %r9, %rsi
callq 0x857f8
addl %r13d, %eax
movq 0x10(%rbp), %r13
movl %eax, 0x10(%r13)
movq %rbx, 0x20(%r13)
movq %r12, 0x28(%r13)
testq %r15, %r15
je 0x86557
movb (%rbx), %cl
cmpb (%r15), %cl
sete %cl
testl %eax, %eax
setne %sil
andb %cl, %sil
movq %rbx, %rdx
cmpb $0x1, %sil
jne 0x8653d
movl %eax, %ecx
addq %rbx, %rcx
leaq 0x1(%r15), %rsi
leaq 0x1(%rbx), %rdi
movb (%rdi), %r8b
leaq 0x1(%rdi), %rdx
cmpb (%rsi), %r8b
jne 0x8653a
incq %rsi
cmpq %rcx, %rdi
movq %rdx, %rdi
jb 0x86523
decq %rdx
subl %ebx, %edx
movl %edx, (%r13)
subl %edx, %eax
xorl %ecx, %ecx
cmpl $0xff, %edx
setae %cl
leal (%rax,%rcx,2), %eax
incl %eax
jmp 0x86563
movl $0x0, (%r13)
incl %eax
xorl %edx, %edx
movq %r14, 0x30(%r13)
testq %r14, %r14
je 0x86665
movzbl (%r14), %esi
cmpl $0xff, %esi
je 0x86588
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movl $0x1, %edi
jmp 0x8659e
movzwl 0x1(%r14), %ecx
rolw $0x8, %cx
movzwl %cx, %esi
movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD
movl $0x3, %edi
testq %r12, %r12
je 0x865e3
testq %r15, %r15
jne 0x865e3
testl %esi, %esi
je 0x865e3
movb (%rbx), %r8b
movq %rbx, %rdx
cmpb (%r12), %r8b
jne 0x865e1
movl %esi, %r8d
addq %rbx, %r8
leaq 0x1(%r12), %r9
leaq 0x1(%rbx), %r10
movb (%r10), %r11b
leaq 0x1(%r10), %rdx
cmpb (%r9), %r11b
jne 0x865de
incq %r9
cmpq %r8, %r10
movq %rdx, %r10
jb 0x865c7
decq %rdx
subl %ebx, %edx
movl %esi, %r8d
subl %edx, %r8d
jbe 0x86614
movl %edx, 0x8(%r13)
movl %r8d, 0x18(%r13)
movl %edx, %esi
addq %rsi, %r12
movq %r12, 0x28(%r13)
xorl %esi, %esi
cmpl $0xff, %edx
setae %sil
addl %eax, %ecx
addl %r8d, %ecx
leal (%rcx,%rsi,2), %eax
incl %eax
jmp 0x86665
addq %rdi, %r14
movl %esi, %esi
addq %rsi, %rbx
movl $0x0, 0x18(%r13)
xorl %edx, %edx
movq %rdx, %rdi
movb (%rbx,%rdx), %r8b
incq %rdx
cmpb (%r14,%rdi), %r8b
je 0x86626
cmpl $0x1, %edx
jne 0x86645
movq $0x0, 0x30(%r13)
jmp 0x86665
addq %rdx, %rsi
decq %rsi
movl %esi, 0x8(%r13)
xorl %edi, %edi
cmpl $0xff, %esi
setae %dil
addl %ecx, %eax
leal (%rax,%rdi,2), %eax
subl %edx, %eax
addl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_calc_bin_pack_key_length:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r9
mov r15, r8
mov r12, rcx
mov r14, rdx
mov r13d, esi
mov rsi, r9
call _mi_keylength
add eax, r13d
mov r13, [rbp+arg_0]
mov [r13+10h], eax
mov [r13+20h], rbx
mov [r13+28h], r12
test r15, r15
jz short loc_86557
mov cl, [rbx]
cmp cl, [r15]
setz cl
test eax, eax
setnz sil
and sil, cl
mov rdx, rbx
cmp sil, 1
jnz short loc_8653D
mov ecx, eax
add rcx, rbx
lea rsi, [r15+1]
lea rdi, [rbx+1]
loc_86523:
mov r8b, [rdi]
lea rdx, [rdi+1]
cmp r8b, [rsi]
jnz short loc_8653A
inc rsi
cmp rdi, rcx
mov rdi, rdx
jb short loc_86523
loc_8653A:
dec rdx
loc_8653D:
sub edx, ebx
mov [r13+0], edx
sub eax, edx
xor ecx, ecx
cmp edx, 0FFh
setnb cl
lea eax, [rax+rcx*2]
inc eax
jmp short loc_86563
loc_86557:
mov dword ptr [r13+0], 0
inc eax
xor edx, edx
loc_86563:
mov [r13+30h], r14
test r14, r14
jz loc_86665
movzx esi, byte ptr [r14]
cmp esi, 0FFh
jz short loc_86588
mov ecx, 0FFFFFFFFh
mov edi, 1
jmp short loc_8659E
loc_86588:
movzx ecx, word ptr [r14+1]
rol cx, 8
movzx esi, cx
mov ecx, 0FFFFFFFDh
mov edi, 3
loc_8659E:
test r12, r12
jz short loc_865E3
test r15, r15
jnz short loc_865E3
test esi, esi
jz short loc_865E3
mov r8b, [rbx]
mov rdx, rbx
cmp r8b, [r12]
jnz short loc_865E1
mov r8d, esi
add r8, rbx
lea r9, [r12+1]
lea r10, [rbx+1]
loc_865C7:
mov r11b, [r10]
lea rdx, [r10+1]
cmp r11b, [r9]
jnz short loc_865DE
inc r9
cmp r10, r8
mov r10, rdx
jb short loc_865C7
loc_865DE:
dec rdx
loc_865E1:
sub edx, ebx
loc_865E3:
mov r8d, esi
sub r8d, edx
jbe short loc_86614
mov [r13+8], edx
mov [r13+18h], r8d
mov esi, edx
add r12, rsi
mov [r13+28h], r12
xor esi, esi
cmp edx, 0FFh
setnb sil
add ecx, eax
add ecx, r8d
lea eax, [rcx+rsi*2]
inc eax
jmp short loc_86665
loc_86614:
add r14, rdi
mov esi, esi
add rbx, rsi
mov dword ptr [r13+18h], 0
xor edx, edx
loc_86626:
mov rdi, rdx
mov r8b, [rbx+rdx]
inc rdx
cmp r8b, [r14+rdi]
jz short loc_86626
cmp edx, 1
jnz short loc_86645
mov qword ptr [r13+30h], 0
jmp short loc_86665
loc_86645:
add rsi, rdx
dec rsi
mov [r13+8], esi
xor edi, edi
cmp esi, 0FFh
setnb dil
add eax, ecx
lea eax, [rax+rdi*2]
sub eax, edx
add eax, 2
loc_86665:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_calc_bin_pack_key_length(
long long a1,
int a2,
unsigned __int8 *a3,
_BYTE *a4,
_BYTE *a5,
unsigned __int8 *a6,
long long a7)
{
int v11; // eax
int v12; // edx
_BYTE *v13; // rsi
unsigned __int8 *v14; // rdi
int v15; // edx
bool v16; // cf
unsigned int v17; // edx
long long result; // rax
unsigned int v19; // esi
int v20; // ecx
long long v21; // rdi
int v22; // edx
_BYTE *v23; // r9
unsigned __int8 *v24; // r10
int v25; // edx
int v26; // r8d
unsigned __int8 *v27; // r14
unsigned __int8 *v28; // rbx
long long v29; // rdx
long long v30; // rdi
unsigned __int8 v31; // r8
unsigned int v32; // esi
v11 = a2 + mi_keylength(a1, a6);
*(_DWORD *)(a7 + 16) = v11;
*(_QWORD *)(a7 + 32) = a6;
*(_QWORD *)(a7 + 40) = a4;
if ( a5 )
{
v12 = (int)a6;
if ( *a6 == *a5 && v11 != 0 )
{
v13 = a5 + 1;
v14 = a6 + 1;
do
{
v15 = (_DWORD)v14 + 1;
if ( *v14 != *v13 )
break;
++v13;
v16 = v14++ < &a6[v11];
}
while ( v16 );
v12 = v15 - 1;
}
v17 = v12 - (_DWORD)a6;
*(_DWORD *)a7 = v17;
result = v11 - v17 + 2 * (v17 >= 0xFF) + 1;
}
else
{
*(_DWORD *)a7 = 0;
result = (unsigned int)(v11 + 1);
v17 = 0;
}
*(_QWORD *)(a7 + 48) = a3;
if ( a3 )
{
v19 = *a3;
if ( v19 == 255 )
{
v19 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8);
v20 = -3;
v21 = 3LL;
}
else
{
v20 = -1;
v21 = 1LL;
}
if ( a4 && !a5 && v19 )
{
v22 = (int)a6;
if ( *a6 == *a4 )
{
v23 = a4 + 1;
v24 = a6 + 1;
do
{
v25 = (_DWORD)v24 + 1;
if ( *v24 != *v23 )
break;
++v23;
v16 = v24++ < &a6[v19];
}
while ( v16 );
v22 = v25 - 1;
}
v17 = v22 - (_DWORD)a6;
}
v26 = v19 - v17;
if ( v19 <= v17 )
{
v27 = &a3[v21];
v28 = &a6[v19];
*(_DWORD *)(a7 + 24) = 0;
v29 = 0LL;
do
{
v30 = v29;
v31 = v28[v29++];
}
while ( v31 == v27[v30] );
if ( (_DWORD)v29 == 1 )
{
*(_QWORD *)(a7 + 48) = 0LL;
}
else
{
v32 = v29 + v19 - 1;
*(_DWORD *)(a7 + 8) = v32;
return v20 + (_DWORD)result + 2 * (v32 >= 0xFF) - (unsigned int)v29 + 2;
}
}
else
{
*(_DWORD *)(a7 + 8) = v17;
*(_DWORD *)(a7 + 24) = v26;
*(_QWORD *)(a7 + 40) = &a4[v17];
return v26 + (_DWORD)result + v20 + 2 * (unsigned int)(v17 >= 0xFF) + 1;
}
}
return result;
}
| _mi_calc_bin_pack_key_length:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R9
MOV R15,R8
MOV R12,RCX
MOV R14,RDX
MOV R13D,ESI
MOV RSI,R9
CALL 0x001857f8
ADD EAX,R13D
MOV R13,qword ptr [RBP + 0x10]
MOV dword ptr [R13 + 0x10],EAX
MOV qword ptr [R13 + 0x20],RBX
MOV qword ptr [R13 + 0x28],R12
TEST R15,R15
JZ 0x00186557
MOV CL,byte ptr [RBX]
CMP CL,byte ptr [R15]
SETZ CL
TEST EAX,EAX
SETNZ SIL
AND SIL,CL
MOV RDX,RBX
CMP SIL,0x1
JNZ 0x0018653d
MOV ECX,EAX
ADD RCX,RBX
LEA RSI,[R15 + 0x1]
LEA RDI,[RBX + 0x1]
LAB_00186523:
MOV R8B,byte ptr [RDI]
LEA RDX,[RDI + 0x1]
CMP R8B,byte ptr [RSI]
JNZ 0x0018653a
INC RSI
CMP RDI,RCX
MOV RDI,RDX
JC 0x00186523
LAB_0018653a:
DEC RDX
LAB_0018653d:
SUB EDX,EBX
MOV dword ptr [R13],EDX
SUB EAX,EDX
XOR ECX,ECX
CMP EDX,0xff
SETNC CL
LEA EAX,[RAX + RCX*0x2]
INC EAX
JMP 0x00186563
LAB_00186557:
MOV dword ptr [R13],0x0
INC EAX
XOR EDX,EDX
LAB_00186563:
MOV qword ptr [R13 + 0x30],R14
TEST R14,R14
JZ 0x00186665
MOVZX ESI,byte ptr [R14]
CMP ESI,0xff
JZ 0x00186588
MOV ECX,0xffffffff
MOV EDI,0x1
JMP 0x0018659e
LAB_00186588:
MOVZX ECX,word ptr [R14 + 0x1]
ROL CX,0x8
MOVZX ESI,CX
MOV ECX,0xfffffffd
MOV EDI,0x3
LAB_0018659e:
TEST R12,R12
JZ 0x001865e3
TEST R15,R15
JNZ 0x001865e3
TEST ESI,ESI
JZ 0x001865e3
MOV R8B,byte ptr [RBX]
MOV RDX,RBX
CMP R8B,byte ptr [R12]
JNZ 0x001865e1
MOV R8D,ESI
ADD R8,RBX
LEA R9,[R12 + 0x1]
LEA R10,[RBX + 0x1]
LAB_001865c7:
MOV R11B,byte ptr [R10]
LEA RDX,[R10 + 0x1]
CMP R11B,byte ptr [R9]
JNZ 0x001865de
INC R9
CMP R10,R8
MOV R10,RDX
JC 0x001865c7
LAB_001865de:
DEC RDX
LAB_001865e1:
SUB EDX,EBX
LAB_001865e3:
MOV R8D,ESI
SUB R8D,EDX
JBE 0x00186614
MOV dword ptr [R13 + 0x8],EDX
MOV dword ptr [R13 + 0x18],R8D
MOV ESI,EDX
ADD R12,RSI
MOV qword ptr [R13 + 0x28],R12
XOR ESI,ESI
CMP EDX,0xff
SETNC SIL
ADD ECX,EAX
ADD ECX,R8D
LEA EAX,[RCX + RSI*0x2]
INC EAX
JMP 0x00186665
LAB_00186614:
ADD R14,RDI
MOV ESI,ESI
ADD RBX,RSI
MOV dword ptr [R13 + 0x18],0x0
XOR EDX,EDX
LAB_00186626:
MOV RDI,RDX
MOV R8B,byte ptr [RBX + RDX*0x1]
INC RDX
CMP R8B,byte ptr [R14 + RDI*0x1]
JZ 0x00186626
CMP EDX,0x1
JNZ 0x00186645
MOV qword ptr [R13 + 0x30],0x0
JMP 0x00186665
LAB_00186645:
ADD RSI,RDX
DEC RSI
MOV dword ptr [R13 + 0x8],ESI
XOR EDI,EDI
CMP ESI,0xff
SETNC DIL
ADD EAX,ECX
LEA EAX,[RAX + RDI*0x2]
SUB EAX,EDX
ADD EAX,0x2
LAB_00186665:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int _mi_calc_bin_pack_key_length
(int8 param_1,int param_2,byte *param_3,char *param_4,char *param_5,
char *param_6,uint *param_7)
{
char *pcVar1;
long lVar2;
long lVar3;
int iVar4;
uint uVar5;
int iVar6;
int iVar7;
uint uVar8;
int iVar9;
long lVar10;
long lVar11;
char *pcVar12;
char *pcVar13;
long lVar14;
uint uVar15;
bool bVar16;
iVar4 = _mi_keylength(param_1,param_6);
uVar5 = iVar4 + param_2;
param_7[4] = uVar5;
*(char **)(param_7 + 8) = param_6;
*(char **)(param_7 + 10) = param_4;
iVar4 = (int)param_6;
if (param_5 == (char *)0x0) {
*param_7 = 0;
uVar8 = 0;
}
else {
iVar7 = iVar4;
if (uVar5 != 0 && *param_6 == *param_5) {
pcVar12 = param_5 + 1;
pcVar13 = param_6 + 1;
do {
pcVar1 = pcVar13 + 1;
if (*pcVar13 != *pcVar12) break;
pcVar12 = pcVar12 + 1;
bVar16 = pcVar13 < param_6 + uVar5;
pcVar13 = pcVar1;
} while (bVar16);
iVar7 = (int)pcVar1 + -1;
}
uVar8 = iVar7 - iVar4;
*param_7 = uVar8;
uVar5 = (uVar5 - uVar8) + (uint)(0xfe < uVar8) * 2;
}
iVar7 = uVar5 + 1;
*(byte **)(param_7 + 0xc) = param_3;
if (param_3 != (byte *)0x0) {
uVar5 = (uint)*param_3;
if (*param_3 == 0xff) {
uVar5 = (uint)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8);
iVar6 = -3;
lVar14 = 3;
}
else {
iVar6 = -1;
lVar14 = 1;
}
if (((param_4 != (char *)0x0) && (param_5 == (char *)0x0)) && (uVar5 != 0)) {
iVar9 = iVar4;
if (*param_6 == *param_4) {
pcVar12 = param_4 + 1;
pcVar13 = param_6 + 1;
do {
pcVar1 = pcVar13 + 1;
if (*pcVar13 != *pcVar12) break;
pcVar12 = pcVar12 + 1;
bVar16 = pcVar13 < param_6 + uVar5;
pcVar13 = pcVar1;
} while (bVar16);
iVar9 = (int)pcVar1 + -1;
}
uVar8 = iVar9 - iVar4;
}
uVar15 = uVar5 - uVar8;
if (uVar5 < uVar8 || uVar15 == 0) {
param_7[6] = 0;
lVar10 = 0;
do {
lVar3 = lVar10 + (ulong)uVar5;
lVar11 = lVar10 + 1;
lVar2 = lVar10 + lVar14;
lVar10 = lVar11;
} while (param_6[lVar3] == param_3[lVar2]);
iVar4 = (int)lVar11;
if (iVar4 == 1) {
param_7[0xc] = 0;
param_7[0xd] = 0;
}
else {
uVar5 = (uVar5 + iVar4) - 1;
param_7[2] = uVar5;
iVar7 = ((iVar7 + iVar6 + (uint)(0xfe < uVar5) * 2) - iVar4) + 2;
}
}
else {
param_7[2] = uVar8;
param_7[6] = uVar15;
*(char **)(param_7 + 10) = param_4 + uVar8;
iVar7 = iVar6 + iVar7 + uVar15 + (uint)(0xfe < uVar8) * 2 + 1;
}
}
return iVar7;
}
|
|
2,418 | my_rnd_ssl | eloqsql/mysys/my_rnd.c | double my_rnd_ssl(struct my_rnd_struct *rand_st)
{
#if defined(HAVE_OPENSSL)
rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int));
if (rc)
return (double)res / (double)UINT_MAX;
#endif /* defined(HAVE_OPENSSL) */
return my_rnd(rand_st);
} | O3 | c | my_rnd_ssl:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
leaq (%rax,%rax,2), %rax
addq %rsi, %rax
movq 0x10(%rdi), %r8
xorl %edx, %edx
divq %r8
movq %rdx, %rcx
leaq (%rsi,%rdx), %rax
addq $0x21, %rax
xorl %edx, %edx
divq %r8
movq %rdx, 0x8(%rdi)
movq %rcx, (%rdi)
movq %rcx, %xmm1
punpckldq 0x31d3d(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x31d45(%rip), %xmm1 # 0xb8dc0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
divsd 0x18(%rdi), %xmm0
popq %rbp
retq
nop
| my_rnd_ssl:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rsi, [rdi+8]
lea rax, [rax+rax*2]
add rax, rsi
mov r8, [rdi+10h]
xor edx, edx
div r8
mov rcx, rdx
lea rax, [rsi+rdx]
add rax, 21h ; '!'
xor edx, edx
div r8
mov [rdi+8], rdx
mov [rdi], rcx
movq xmm1, rcx
punpckldq xmm1, cs:xmmword_B8DB0
subpd xmm1, cs:xmmword_B8DC0
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
divsd xmm0, qword ptr [rdi+18h]
pop rbp
retn
| double my_rnd_ssl(long long a1)
{
long long v1; // rsi
unsigned long long v2; // r8
unsigned long long v3; // rcx
__m128d v4; // xmm1
v1 = *(_QWORD *)(a1 + 8);
v2 = *(_QWORD *)(a1 + 16);
v3 = (v1 + 3LL * *(_QWORD *)a1) % v2;
*(_QWORD *)(a1 + 8) = (v1 + v3 + 33) % v2;
*(_QWORD *)a1 = v3;
v4 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v3, (__m128i)xmmword_B8DB0), (__m128d)xmmword_B8DC0);
return (_mm_unpackhi_pd(v4, v4).m128d_f64[0] + v4.m128d_f64[0]) / *(double *)(a1 + 24);
}
| my_rnd_ssl:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
LEA RAX,[RAX + RAX*0x2]
ADD RAX,RSI
MOV R8,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV R8
MOV RCX,RDX
LEA RAX,[RSI + RDX*0x1]
ADD RAX,0x21
XOR EDX,EDX
DIV R8
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI],RCX
MOVQ XMM1,RCX
PUNPCKLDQ XMM1,xmmword ptr [0x001b8db0]
SUBPD XMM1,xmmword ptr [0x001b8dc0]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
DIVSD XMM0,qword ptr [RDI + 0x18]
POP RBP
RET
|
ulong my_rnd_ssl(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar1 = param_1[2];
uVar3 = (*param_1 * 3 + param_1[1]) % uVar1;
uVar2 = param_1[1] + uVar3 + 0x21;
param_1[1] = uVar2 % uVar1;
*param_1 = uVar3;
return uVar2 / uVar1;
}
|
|
2,419 | LefDefParser::defiSlot::yl(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp | int defiSlot::yl(int index) const {
char msg[160];
if (index < 0 || index >= numRectangles_) {
sprintf (msg, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again.",
index, numRectangles_);
defiError(0, 6160, msg, defData);
return 0;
}
return yl_[index];
} | O0 | cpp | LefDefParser::defiSlot::yl(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x4c74e
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0x14(%rcx), %eax
jl 0x4c797
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0x14(%rax), %ecx
leaq 0x2647f(%rip), %rsi # 0x72be8
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0x50(%rax), %rcx
xorl %edi, %edi
movl $0x1810, %esi # imm = 0x1810
callq 0x277e0
movl $0x0, 0xc4(%rsp)
jmp 0x4c7b2
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0xb4(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK12LefDefParser8defiSlot2ylEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_4C74E
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+14h]
jl short loc_4C797
loc_4C74E:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+14h]
lea rsi, aErrorDefpars61_9; "ERROR (DEFPARS-6160): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_B8]; int
mov rcx, [rax+50h]; char *
xor edi, edi; this
mov esi, 1810h; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0C8h+var_4], 0
jmp short loc_4C7B2
loc_4C797:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+28h]
movsxd rcx, [rsp+0C8h+var_14]
mov eax, [rax+rcx*4]
mov [rsp+0C8h+var_4], eax
loc_4C7B2:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
| long long LefDefParser::defiSlot::yl(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[164]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::defiSlot *v6; // [rsp+B8h] [rbp-10h]
v6 = (LefDefParser::defiSlot *)this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 5) )
{
return (unsigned int)*((_DWORD *)this[5] + v5);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\n"
"Valid index number is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 5));
LefDefParser::defiError(0LL, 6160, v4, this[10], v2);
return 0;
}
}
| yl:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x0014c74e
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0x14]
JL 0x0014c797
LAB_0014c74e:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0x14]
LEA RSI,[0x172be8]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x50]
XOR EDI,EDI
MOV ESI,0x1810
CALL 0x001277e0
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x0014c7b2
LAB_0014c797:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0xc4],EAX
LAB_0014c7b2:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::defiSlot::yl(int) const */
int4 __thiscall LefDefParser::defiSlot::yl(defiSlot *this,int param_1)
{
char local_b8 [164];
int local_14;
defiSlot *local_10;
int4 local_4;
if ((param_1 < 0) || (*(int *)(this + 0x14) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x14));
defiError(0,0x1810,local_b8,*(defrData **)(this + 0x50));
local_4 = 0;
}
else {
local_4 = *(int4 *)(*(long *)(this + 0x28) + (long)param_1 * 4);
}
return local_4;
}
|
|
2,420 | minja::Value::pop(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runtime_error("pop index must be an integer: " + index.dump());
} else {
auto i = index.get<int>();
if (i < 0 || i >= static_cast<int>(array_->size()))
throw std::runtime_error("pop index out of range: " + index.dump());
auto it = array_->begin() + (i < 0 ? array_->size() + i : i);
auto ret = *it;
array_->erase(it);
return ret;
}
} else if (is_object()) {
if (!index.is_hashable())
throw std::runtime_error("Unashable type: " + index.dump());
auto it = object_->find(index.primitive_);
if (it == object_->end())
throw std::runtime_error("Key not found: " + index.dump());
auto ret = it->second;
object_->erase(it);
return ret;
} else {
throw std::runtime_error("Value is not an array or object: " + dump());
}
} | O3 | cpp | minja::Value::pop(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rbp
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x932bd
movq 0x8(%rax), %rsi
cmpq %rsi, (%rax)
je 0x933cb
cmpq $0x0, 0x20(%rbx)
movb 0x40(%rbx), %al
jne 0x93322
cmpq $0x0, 0x10(%rbx)
jne 0x93322
testb %al, %al
jne 0x93322
cmpq $0x0, 0x30(%rbx)
jne 0x93322
addq $-0x50, %rsi
movq %rbp, %rdi
callq 0x8df9a
movq 0x10(%r15), %rdi
movq 0x8(%rdi), %rsi
addq $-0x50, %rsi
movq %rsi, 0x8(%rdi)
callq 0x8c508
jmp 0x933b9
movq 0x20(%r15), %r14
testq %r14, %r14
je 0x9345d
cmpq $0x0, 0x10(%rbx)
jne 0x934bd
cmpq $0x0, 0x20(%rbx)
jne 0x934bd
cmpq $0x0, 0x30(%rbx)
jne 0x934bd
movq (%r14), %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
je 0x93392
movq %rbp, 0x40(%rsp)
leaq 0x40(%rbx), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x8d8dc
testb %al, %al
jne 0x93382
addq $0x60, %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
jne 0x93304
jmp 0x93385
addb $-0x5, %al
cmpb $0x2, %al
jae 0x9357a
movq %rbx, %rdi
callq 0x90f94
testl %eax, %eax
js 0x933fd
movq 0x10(%r15), %rcx
movq (%rcx), %r12
movq 0x8(%rcx), %rcx
subq %r12, %rcx
shrq $0x4, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
cmpl %ecx, %eax
jge 0x933fd
movl %eax, %eax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq %rax, %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8df9a
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0x9494a
jmp 0x933b9
movq %r13, %r12
movq 0x20(%r15), %rax
movq 0x8(%rax), %r13
movq 0x40(%rsp), %rbp
cmpq %r13, %r12
je 0x9351d
leaq 0x10(%r12), %rsi
movq %rbp, %rdi
callq 0x8df9a
movq 0x20(%r15), %rdi
leaq 0x60(%r12), %rdx
movq %r12, %rsi
callq 0x949c6
movq %rbp, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a450
movq %rax, %r14
leaq 0x5d4fe(%rip), %rsi # 0xf08dd
movq %rax, %rdi
callq 0x1a330
movq 0x98c02(%rip), %rsi # 0x12bff0
movq 0x98b6b(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af10
movl $0x10, %edi
callq 0x1a450
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86c10
leaq 0x5d4ed(%rip), %rsi # 0xf0910
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x793a5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae20
xorl %ebp, %ebp
movq 0x98ba7(%rip), %rsi # 0x12bff0
movq 0x98b10(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af10
jmp 0x935d5
movl $0x10, %edi
callq 0x1a450
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86c10
leaq 0x5d152(%rip), %rsi # 0xf05d5
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x793a5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae20
xorl %ebp, %ebp
movq 0x98b47(%rip), %rsi # 0x12bff0
movq 0x98ab0(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af10
jmp 0x935d5
movl $0x10, %edi
callq 0x1a450
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86c10
leaq 0x5cfa6(%rip), %rsi # 0xf0489
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x793a5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae20
xorl %ebp, %ebp
movq 0x98ae7(%rip), %rsi # 0x12bff0
movq 0x98a50(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af10
jmp 0x935d5
movl $0x10, %edi
callq 0x1a450
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86c10
leaq 0x5d3e6(%rip), %rsi # 0xf0929
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x793a5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae20
xorl %ebp, %ebp
movq 0x98a87(%rip), %rsi # 0x12bff0
movq 0x989f0(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af10
jmp 0x935d5
movl $0x10, %edi
callq 0x1a450
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86c10
leaq 0x5d351(%rip), %rsi # 0xf08f1
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x793a5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae20
xorl %ebp, %ebp
movq 0x98a2a(%rip), %rsi # 0x12bff0
movq 0x98993(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af10
jmp 0x935e5
jmp 0x93625
jmp 0x935e5
jmp 0x93625
jmp 0x935e5
jmp 0x93625
jmp 0x935e5
jmp 0x93625
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93603
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9361e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x93654
jmp 0x93669
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93654
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x93654
jmp 0x93651
jmp 0x93651
jmp 0x93651
jmp 0x93651
jmp 0x9365e
jmp 0x93651
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
jmp 0x93669
movq %rax, %rbx
movq %rbp, %rdi
callq 0x868ee
movq %rbx, %rdi
callq 0x1af90
nop
| _ZN5minja5Value3popERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r15, rsi
mov rbp, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_932BD
mov rsi, [rax+8]
cmp [rax], rsi
jz loc_933CB
cmp qword ptr [rbx+20h], 0
mov al, [rbx+40h]
jnz loc_93322
cmp qword ptr [rbx+10h], 0
jnz loc_93322
test al, al
jnz loc_93322
cmp qword ptr [rbx+30h], 0
jnz loc_93322
add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, [rdi+8]
add rsi, 0FFFFFFFFFFFFFFB0h
mov [rdi+8], rsi
call _ZN9__gnu_cxx13new_allocatorIN5minja5ValueEE7destroyIS2_EEvPT_; __gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(minja::Value *)
jmp loc_933B9
loc_932BD:
mov r14, [r15+20h]
test r14, r14
jz loc_9345D
cmp qword ptr [rbx+10h], 0
jnz loc_934BD
cmp qword ptr [rbx+20h], 0
jnz loc_934BD
cmp qword ptr [rbx+30h], 0
jnz loc_934BD
mov r13, [r14]
mov r12, [r14+8]
cmp r13, r12
jz loc_93392
mov [rsp+78h+var_38], rbp
lea rbp, [rbx+40h]
loc_93304:
mov rdi, r13
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_93382
add r13, 60h ; '`'
mov r12, [r14+8]
cmp r13, r12
jnz short loc_93304
jmp short loc_93385
loc_93322:
add al, 0FBh
cmp al, 2
jnb loc_9357A
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
test eax, eax
js loc_933FD
mov rcx, [r15+10h]
mov r12, [rcx]
mov rcx, [rcx+8]
sub rcx, r12
shr rcx, 4
imul ecx, 0CCCCCCCDh
cmp eax, ecx
jge loc_933FD
mov eax, eax
lea rax, [rax+rax*4]
shl rax, 4
add r12, rax
mov rdi, rbp; this
mov rsi, r12; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EE; std::vector<minja::Value>::_M_erase(__gnu_cxx::__normal_iterator<minja::Value*,std::vector<minja::Value>>)
jmp short loc_933B9
loc_93382:
mov r12, r13
loc_93385:
mov rax, [r15+20h]
mov r13, [rax+8]
mov rbp, [rsp+78h+var_38]
loc_93392:
cmp r12, r13
jz loc_9351D
lea rsi, [r12+10h]; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+20h]
lea rdx, [r12+60h]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_; 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>>>::erase(__gnu_cxx::__normal_iterator<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>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,__gnu_cxx::__normal_iterator<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>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>)
loc_933B9:
mov rax, rbp
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_933CB:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aPopFromEmptyLi; "pop from empty list"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_933FD:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexOutOfR; "pop index out of range: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_935D5
loc_9345D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_935D5
loc_934BD:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_935D5
loc_9351D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aKeyNotFound_0; "Key not found: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_935D5
loc_9357A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexMustBe; "pop index must be an integer: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_935D5:
jmp short loc_935E5
jmp short loc_93625
jmp short loc_935E5
jmp short loc_93625
jmp short loc_935E5
jmp short loc_93625
jmp short loc_935E5
jmp short loc_93625
loc_935E5:
mov rbx, rax
lea rax, [rsp+78h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93603
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93603:
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9361E
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9361E:
test bpl, bpl
jnz short loc_93654
jmp short loc_93669
loc_93625:
mov rbx, rax
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93654
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_93654
jmp short loc_93651
jmp short loc_93651
jmp short loc_93651
jmp short loc_93651
jmp short loc_9365E
jmp short $+2
loc_93651:
mov rbx, rax
loc_93654:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_93669
loc_9365E:
mov rbx, rax
mov rdi, rbp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_93669:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4)
{
minja::Value *v6; // rbp
_QWORD *v7; // rax
long long v8; // rsi
char v9; // al
long long v10; // rdi
long long v11; // rsi
unsigned __int8 **v12; // r14
unsigned __int8 *v13; // r13
unsigned __int8 *v14; // r12
int v15; // eax
_QWORD *v16; // rcx
const minja::Value *v17; // r12
std::runtime_error *exception; // r14
void *v20; // r14
void *v21; // r14
void *v22; // r14
void *v23; // r14
void *v24; // r14
_BYTE v25[16]; // [rsp+0h] [rbp-78h] BYREF
_BYTE v26[16]; // [rsp+20h] [rbp-58h] BYREF
minja::Value *v27; // [rsp+40h] [rbp-38h]
v6 = this;
v7 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v7 )
{
v8 = v7[1];
if ( *v7 == v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "pop from empty list");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v9 = *(_BYTE *)(a3 + 64);
if ( *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 16) || v9 || *(_QWORD *)(a3 + 48) )
{
if ( (unsigned __int8)(v9 - 5) >= 2u )
{
v24 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"pop index must be an integer: ", (long long)v25);
std::runtime_error::runtime_error(v24, v26);
__cxa_throw(
v24,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15 = minja::Value::get<int>((_QWORD *)a3);
if ( v15 < 0 || (v16 = (_QWORD *)*((_QWORD *)a2 + 2), v15 >= (int)(-858993459 * ((v16[1] - *v16) >> 4))) )
{
v20 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"pop index out of range: ", (long long)v25);
std::runtime_error::runtime_error(v20, v26);
__cxa_throw(
v20,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v17 = (const minja::Value *)(80LL * (unsigned int)v15 + *v16);
minja::Value::Value(this, v17);
std::vector<minja::Value>::_M_erase(*((_QWORD *)a2 + 2), v17);
}
else
{
minja::Value::Value(this, (const minja::Value *)(v8 - 80));
v10 = *((_QWORD *)a2 + 2);
v11 = *(_QWORD *)(v10 + 8) - 80LL;
*(_QWORD *)(v10 + 8) = v11;
__gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(v10, v11);
}
}
else
{
v12 = (unsigned __int8 **)*((_QWORD *)a2 + 4);
if ( !v12 )
{
v21 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Value is not an array or object: ", (long long)v25);
std::runtime_error::runtime_error(v21, v26);
__cxa_throw(
v21,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) )
{
v22 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Unashable type: ", (long long)v25);
std::runtime_error::runtime_error(v22, v26);
__cxa_throw(
v22,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = *v12;
v14 = v12[1];
if ( *v12 != v14 )
{
v27 = this;
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v13, (unsigned __int8 *)(a3 + 64), a4) )
{
v13 += 96;
v14 = v12[1];
if ( v13 == v14 )
goto LABEL_22;
}
v14 = v13;
LABEL_22:
v13 = *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL);
v6 = v27;
}
if ( v14 == v13 )
{
v23 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Key not found: ", (long long)v25);
std::runtime_error::runtime_error(v23, v26);
__cxa_throw(
v23,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::Value(v6, (const minja::Value *)(v14 + 16));
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>>>::erase(
*((_QWORD *)a2 + 4),
v14,
v14 + 96);
}
return v6;
}
| pop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R15,RSI
MOV RBP,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x001932bd
MOV RSI,qword ptr [RAX + 0x8]
CMP qword ptr [RAX],RSI
JZ 0x001933cb
CMP qword ptr [RBX + 0x20],0x0
MOV AL,byte ptr [RBX + 0x40]
JNZ 0x00193322
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x00193322
TEST AL,AL
JNZ 0x00193322
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x00193322
ADD RSI,-0x50
MOV RDI,RBP
CALL 0x0018df9a
MOV RDI,qword ptr [R15 + 0x10]
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,-0x50
MOV qword ptr [RDI + 0x8],RSI
CALL 0x0018c508
JMP 0x001933b9
LAB_001932bd:
MOV R14,qword ptr [R15 + 0x20]
TEST R14,R14
JZ 0x0019345d
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001934bd
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x001934bd
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001934bd
MOV R13,qword ptr [R14]
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JZ 0x00193392
MOV qword ptr [RSP + 0x40],RBP
LEA RBP,[RBX + 0x40]
LAB_00193304:
MOV RDI,R13
MOV RSI,RBP
CALL 0x0018d8dc
TEST AL,AL
JNZ 0x00193382
ADD R13,0x60
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JNZ 0x00193304
JMP 0x00193385
LAB_00193322:
ADD AL,0xfb
CMP AL,0x2
JNC 0x0019357a
MOV RDI,RBX
CALL 0x00190f94
TEST EAX,EAX
JS 0x001933fd
MOV RCX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,R12
SHR RCX,0x4
IMUL ECX,ECX,-0x33333333
CMP EAX,ECX
JGE 0x001933fd
MOV EAX,EAX
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
ADD R12,RAX
MOV RDI,RBP
MOV RSI,R12
CALL 0x0018df9a
MOV RDI,qword ptr [R15 + 0x10]
LAB_00193378:
MOV RSI,R12
CALL 0x0019494a
LAB_00193380:
JMP 0x001933b9
LAB_00193382:
MOV R12,R13
LAB_00193385:
MOV RAX,qword ptr [R15 + 0x20]
MOV R13,qword ptr [RAX + 0x8]
MOV RBP,qword ptr [RSP + 0x40]
LAB_00193392:
CMP R12,R13
JZ 0x0019351d
LEA RSI,[R12 + 0x10]
MOV RDI,RBP
CALL 0x0018df9a
MOV RDI,qword ptr [R15 + 0x20]
LEA RDX,[R12 + 0x60]
LAB_001933b1:
MOV RSI,R12
CALL 0x001949c6
LAB_001933b9:
MOV RAX,RBP
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001933cb:
MOV EDI,0x10
CALL 0x0011a450
MOV R14,RAX
LAB_001933d8:
LEA RSI,[0x1f08dd]
MOV RDI,RAX
CALL 0x0011a330
LAB_001933e7:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af10
LAB_001933fd:
MOV EDI,0x10
CALL 0x0011a450
MOV R14,RAX
LAB_0019340a:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186c10
LAB_0019341c:
LEA RSI,[0x1f0910]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001793a5
MOV BPL,0x1
LAB_00193433:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae20
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af10
LAB_0019345d:
MOV EDI,0x10
CALL 0x0011a450
MOV R14,RAX
LAB_0019346a:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186c10
LAB_0019347c:
LEA RSI,[0x1f05d5]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001793a5
MOV BPL,0x1
LAB_00193493:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae20
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af10
LAB_001934bd:
MOV EDI,0x10
CALL 0x0011a450
MOV R14,RAX
LAB_001934ca:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186c10
LAB_001934dc:
LEA RSI,[0x1f0489]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001793a5
MOV BPL,0x1
LAB_001934f3:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae20
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af10
LAB_0019351d:
MOV EDI,0x10
CALL 0x0011a450
MOV R14,RAX
LAB_0019352a:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186c10
LAB_0019353c:
LEA RSI,[0x1f0929]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001793a5
MOV BPL,0x1
LAB_00193553:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae20
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af10
LAB_0019357a:
MOV EDI,0x10
CALL 0x0011a450
MOV R14,RAX
LAB_00193587:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186c10
LAB_00193599:
LEA RSI,[0x1f08f1]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001793a5
MOV BPL,0x1
LAB_001935b0:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae20
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af10
|
/* minja::Value::pop(minja::Value const&) */
Value * minja::Value::pop(Value *param_1)
{
long *plVar1;
new_allocator<minja::Value> *this;
long lVar2;
char cVar3;
uint uVar4;
runtime_error *prVar5;
int iVar6;
Value *in_RDX;
bool bVar7;
long in_RSI;
int iVar8;
Value *pVVar9;
basic_json *pbVar10;
basic_json *pbVar11;
int1 auStack_78 [32];
string local_58 [32];
Value *local_38;
plVar1 = *(long **)(in_RSI + 0x10);
bVar7 = SUB81(in_RDX,0);
iVar8 = (int)auStack_78;
if (plVar1 == (long *)0x0) {
plVar1 = *(long **)(in_RSI + 0x20);
if (plVar1 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019346a to 0019347b has its CatchHandler @ 0019364b */
dump_abi_cxx11_(iVar8,SUB81(in_RSI,0));
/* try { // try from 0019347c to 0019348f has its CatchHandler @ 001935e3 */
std::operator+((char *)local_58,(string *)"Value is not an array or object: ");
/* try { // try from 00193493 to 001934b7 has its CatchHandler @ 001935e1 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) ||
(*(long *)(in_RDX + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001934ca to 001934db has its CatchHandler @ 00193649 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001934dc to 001934ef has its CatchHandler @ 001935df */
std::operator+((char *)local_58,(string *)"Unashable type: ");
/* try { // try from 001934f3 to 00193517 has its CatchHandler @ 001935dd */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
pbVar11 = (basic_json *)*plVar1;
pbVar10 = (basic_json *)plVar1[1];
if (pbVar11 != pbVar10) {
local_38 = param_1;
do {
pbVar10 = pbVar11;
cVar3 = nlohmann::json_abi_v3_11_3::operator==(pbVar10,(basic_json *)(in_RDX + 0x40));
if (cVar3 != '\0') break;
pbVar11 = pbVar10 + 0x60;
pbVar10 = (basic_json *)plVar1[1];
} while (pbVar11 != pbVar10);
pbVar11 = *(basic_json **)(*(long *)(in_RSI + 0x20) + 8);
param_1 = local_38;
}
if (pbVar10 == pbVar11) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019352a to 0019353b has its CatchHandler @ 00193647 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 0019353c to 0019354f has its CatchHandler @ 001935db */
std::operator+((char *)local_58,(string *)"Key not found: ");
/* try { // try from 00193553 to 00193577 has its CatchHandler @ 001935d9 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
Value(param_1,(Value *)(pbVar10 + 0x10));
/* try { // try from 001933b1 to 001933b8 has its CatchHandler @ 0019365e */
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>>>
::erase(*(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>>>
**)(in_RSI + 0x20),pbVar10,pbVar10 + 0x60);
}
else {
if (*plVar1 == plVar1[1]) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001933d8 to 001933e6 has its CatchHandler @ 00193651 */
std::runtime_error::runtime_error(prVar5,"pop from empty list");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
if (((*(long *)(in_RDX + 0x20) == 0) && (*(long *)(in_RDX + 0x10) == 0)) &&
((in_RDX[0x40] == (Value)0x0 && (*(long *)(in_RDX + 0x30) == 0)))) {
Value(param_1,(Value *)(plVar1[1] + -0x50));
this = *(new_allocator<minja::Value> **)(in_RSI + 0x10);
lVar2 = *(long *)(this + 8);
*(Value **)(this + 8) = (Value *)(lVar2 + -0x50);
__gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(this,(Value *)(lVar2 + -0x50));
}
else {
if (1 < (byte)((char)in_RDX[0x40] - 5U)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00193587 to 00193598 has its CatchHandler @ 00193645 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00193599 to 001935ac has its CatchHandler @ 001935d7 */
std::operator+((char *)local_58,(string *)"pop index must be an integer: ");
/* try { // try from 001935b0 to 001935d4 has its CatchHandler @ 001935d5 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
uVar4 = get<int>(in_RDX);
if (((int)uVar4 < 0) ||
(lVar2 = **(long **)(in_RSI + 0x10),
iVar6 = (int)((ulong)((*(long **)(in_RSI + 0x10))[1] - lVar2) >> 4),
SBORROW4(uVar4,iVar6 * -0x33333333) == (int)(uVar4 + iVar6 * 0x33333333) < 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019340a to 0019341b has its CatchHandler @ 0019364f */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 0019341c to 0019342f has its CatchHandler @ 00193625 */
std::operator+((char *)local_58,(string *)"pop index out of range: ");
/* try { // try from 00193433 to 00193457 has its CatchHandler @ 001935e5 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
pVVar9 = (Value *)(lVar2 + (ulong)uVar4 * 0x50);
Value(param_1,pVVar9);
/* try { // try from 00193378 to 0019337f has its CatchHandler @ 0019364d */
std::vector<minja::Value,std::allocator<minja::Value>>::_M_erase
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar9);
}
}
return param_1;
}
|
|
2,421 | std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*) | ng-log[P]ng-log/src/ng-log/logging.h | std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2,
const char* exprtext) {
CheckOpMessageBuilder comb(exprtext);
MakeCheckOpValueString(comb.ForVar1(), v1);
MakeCheckOpValueString(comb.ForVar2(), v2);
return comb.NewString();
} | O0 | c | std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x12c80
movq -0x48(%rbp), %rdi
callq 0x1c7b0
movq %rax, -0x40(%rbp)
jmp 0x1c713
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c780
jmp 0x1c722
leaq -0x28(%rbp), %rdi
callq 0x12d40
movq %rax, -0x60(%rbp)
jmp 0x1c731
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1c7d0
jmp 0x1c740
movq -0x58(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x12d70
jmp 0x1c74f
leaq -0x28(%rbp), %rdi
callq 0x12d10
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x12d10
movq -0x30(%rbp), %rdi
callq 0x9d00
| _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov rax, rdi
mov [rbp+var_50], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rsi, [rbp+var_20]; char *
lea rdi, [rbp+var_28]; this
mov [rbp+var_48], rdi
call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
mov rdi, [rbp+var_48]; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar1Ev; nglog::internal::CheckOpMessageBuilder::ForVar1(void)
mov [rbp+var_40], rax
jmp short $+2
loc_1C713:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
call _ZN5nglog8internal22MakeCheckOpValueStringINS_11LogSeverityEEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<nglog::LogSeverity>(std::ostream *,nglog::LogSeverity const&)
jmp short $+2
loc_1C722:
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar2Ev; nglog::internal::CheckOpMessageBuilder::ForVar2(void)
mov [rbp+var_60], rax
jmp short $+2
loc_1C731:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_18]
call _ZN5nglog8internal22MakeCheckOpValueStringIiEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<int>(std::ostream *,int const&)
jmp short $+2
loc_1C740:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_28]
call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void)
jmp short $+2
loc_1C74F:
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rax, [rbp+var_50]
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rdi, [rbp+var_30]
call __Unwind_Resume
| long long nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(
long long a1,
long long a2,
long long a3,
char *a4)
{
long long v5; // [rsp+0h] [rbp-60h]
long long v6; // [rsp+20h] [rbp-40h]
char *v7[2]; // [rsp+38h] [rbp-28h] BYREF
long long v8; // [rsp+48h] [rbp-18h]
long long v9; // [rsp+50h] [rbp-10h]
long long v10; // [rsp+58h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
v7[1] = a4;
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7, a4);
v6 = nglog::internal::CheckOpMessageBuilder::ForVar1((nglog::internal::CheckOpMessageBuilder *)v7);
nglog::internal::MakeCheckOpValueString<nglog::LogSeverity>(v6, v9);
v5 = nglog::internal::CheckOpMessageBuilder::ForVar2((nglog::internal::CheckOpMessageBuilder *)v7);
nglog::internal::MakeCheckOpValueString<int>(v5, v8);
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, v7);
nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7);
return a1;
}
| MakeCheckOpString<nglog::LogSeverity,int>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x50],RAX
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 RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0x48],RDI
CALL 0x00112c80
MOV RDI,qword ptr [RBP + -0x48]
LAB_0011c708:
CALL 0x0011c7b0
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0011c713
LAB_0011c713:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0011c780
JMP 0x0011c722
LAB_0011c722:
LEA RDI,[RBP + -0x28]
CALL 0x00112d40
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0011c731
LAB_0011c731:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0011c7d0
JMP 0x0011c740
LAB_0011c740:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x28]
CALL 0x00112d70
LAB_0011c74d:
JMP 0x0011c74f
LAB_0011c74f:
LEA RDI,[RBP + -0x28]
CALL 0x00112d10
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x60
POP RBP
RET
|
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > >
nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int
const&, char const*) */
internal * __thiscall
nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>
(internal *this,LogSeverity *param_1,int *param_2,char *param_3)
{
ostream *poVar1;
CheckOpMessageBuilder local_30 [8];
char *local_28;
int *local_20;
LogSeverity *local_18;
internal *local_10;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
CheckOpMessageBuilder::CheckOpMessageBuilder(local_30,param_3);
/* try { // try from 0011c708 to 0011c74c has its CatchHandler @ 0011c762 */
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar1(local_30);
MakeCheckOpValueString<nglog::LogSeverity>(poVar1,local_18);
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar2(local_30);
MakeCheckOpValueString<int>(poVar1,local_20);
CheckOpMessageBuilder::NewString_abi_cxx11_();
CheckOpMessageBuilder::~CheckOpMessageBuilder(local_30);
return this;
}
|
|
2,422 | type_equals | tsotchke[P]eshkol/src/core/utils/type_comparison.c | bool type_equals(Type* a, Type* b) {
if (a == b) return true;
if (a == NULL || b == NULL) return false;
if (a->kind != b->kind) return false;
switch (a->kind) {
case TYPE_VOID:
case TYPE_BOOLEAN:
case TYPE_CHAR:
case TYPE_STRING:
case TYPE_SYMBOL:
case TYPE_ANY:
case TYPE_UNKNOWN:
return true;
case TYPE_INTEGER:
return a->int_size == b->int_size;
case TYPE_FLOAT:
return a->float_size == b->float_size;
case TYPE_PAIR:
return type_equals(a->function.params[0], b->function.params[0]) &&
type_equals(a->function.params[1], b->function.params[1]);
case TYPE_VECTOR:
return type_equals(a->vector.element_type, b->vector.element_type) &&
a->vector.size == b->vector.size;
case TYPE_FUNCTION:
if (a->function.param_count != b->function.param_count ||
a->function.variadic != b->function.variadic ||
!type_equals(a->function.return_type, b->function.return_type)) {
return false;
}
for (size_t i = 0; i < a->function.param_count; i++) {
if (!type_equals(a->function.params[i], b->function.params[i])) {
return false;
}
}
return true;
case TYPE_STRUCT:
if (a->structure.field_count != b->structure.field_count) {
return false;
}
for (size_t i = 0; i < a->structure.field_count; i++) {
if (strcmp(a->structure.fields[i].name, b->structure.fields[i].name) != 0 ||
!type_equals(a->structure.fields[i].type, b->structure.fields[i].type)) {
return false;
}
}
return true;
case TYPE_UNION:
if (a->union_type.variant_count != b->union_type.variant_count) {
return false;
}
// Check if all variants in a are in b
for (size_t i = 0; i < a->union_type.variant_count; i++) {
bool found = false;
for (size_t j = 0; j < b->union_type.variant_count; j++) {
if (type_equals(a->union_type.variants[i], b->union_type.variants[j])) {
found = true;
break;
}
}
if (!found) {
return false;
}
}
return true;
}
return false;
} | O0 | c | type_equals:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x15113
movb $0x1, -0x1(%rbp)
jmp 0x15472
cmpq $0x0, -0x10(%rbp)
je 0x15121
cmpq $0x0, -0x18(%rbp)
jne 0x1512a
movb $0x0, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x15141
movb $0x0, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x48(%rbp)
subq $0xd, %rax
ja 0x1546e
movq -0x48(%rbp), %rax
leaq 0x7148(%rip), %rcx # 0x1c2a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
callq 0x150f0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x49(%rbp)
jne 0x151d1
jmp 0x151f1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x150f0
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x150f0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x4a(%rbp)
jne 0x15221
jmp 0x15237
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
sete %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1528c
movq -0x10(%rbp), %rax
movb 0x20(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movq -0x18(%rbp), %rcx
movb 0x20(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x1528c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x150f0
testb $0x1, %al
jne 0x15295
movb $0x0, -0x1(%rbp)
jmp 0x15472
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x152ed
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x150f0
testb $0x1, %al
jne 0x152dd
movb $0x0, -0x1(%rbp)
jmp 0x15472
jmp 0x152df
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1529d
movb $0x1, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x15311
movb $0x0, -0x1(%rbp)
jmp 0x15472
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x153b4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x1160
cmpl $0x0, %eax
jne 0x15398
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x150f0
testb $0x1, %al
jne 0x153a1
movb $0x0, -0x1(%rbp)
jmp 0x15472
jmp 0x153a3
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x15319
movb $0x1, -0x1(%rbp)
jmp 0x15472
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x153d8
movb $0x0, -0x1(%rbp)
jmp 0x15472
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x15468
movb $0x0, -0x31(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x15449
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x150f0
testb $0x1, %al
jne 0x15433
jmp 0x15439
movb $0x1, -0x31(%rbp)
jmp 0x15449
jmp 0x1543b
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x153fa
testb $0x1, -0x31(%rbp)
jne 0x15455
movb $0x0, -0x1(%rbp)
jmp 0x15472
jmp 0x15457
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x153e0
movb $0x1, -0x1(%rbp)
jmp 0x15472
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| type_equals:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnz short loc_15113
mov [rbp+var_1], 1
jmp loc_15472
loc_15113:
cmp [rbp+var_10], 0
jz short loc_15121
cmp [rbp+var_18], 0
jnz short loc_1512A
loc_15121:
mov [rbp+var_1], 0
jmp loc_15472
loc_1512A:
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_18]
cmp eax, [rcx]
jz short loc_15141
mov [rbp+var_1], 0
jmp loc_15472
loc_15141:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_48], rax
sub rax, 0Dh; switch 14 cases
ja def_15167; jumptable 0000000000015167 default case
mov rax, [rbp+var_48]
lea rcx, jpt_15167
movsxd rax, ds:(jpt_15167 - 1C2A8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_15169:
mov [rbp+var_1], 1; jumptable 0000000000015167 cases 0,1,4-6,12,13
jmp loc_15472
loc_15172:
mov rax, [rbp+var_10]; jumptable 0000000000015167 case 2
mov eax, [rax+8]
mov rcx, [rbp+var_18]
cmp eax, [rcx+8]
setz al
and al, 1
mov [rbp+var_1], al
jmp loc_15472
loc_1518D:
mov rax, [rbp+var_10]; jumptable 0000000000015167 case 3
mov eax, [rax+8]
mov rcx, [rbp+var_18]
cmp eax, [rcx+8]
setz al
and al, 1
mov [rbp+var_1], al
jmp loc_15472
loc_151A8:
mov rax, [rbp+var_10]; jumptable 0000000000015167 case 7
mov rax, [rax+10h]
mov rdi, [rax]
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rsi, [rax]
call type_equals
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_49], al
jnz short loc_151D1
jmp short loc_151F1
loc_151D1:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rdi, [rax+8]
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rsi, [rax+8]
call type_equals
mov [rbp+var_49], al
loc_151F1:
mov al, [rbp+var_49]
and al, 1
mov [rbp+var_1], al
jmp loc_15472
loc_151FE:
mov rax, [rbp+var_10]; jumptable 0000000000015167 case 8
mov rdi, [rax+8]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
call type_equals
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_4A], al
jnz short loc_15221
jmp short loc_15237
loc_15221:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
setz al
mov [rbp+var_4A], al
loc_15237:
mov al, [rbp+var_4A]
and al, 1
mov [rbp+var_1], al
jmp loc_15472
loc_15244:
mov rax, [rbp+var_10]; jumptable 0000000000015167 case 9
mov rax, [rax+8]
mov rcx, [rbp+var_18]
cmp rax, [rcx+8]
jnz short loc_1528C
mov rax, [rbp+var_10]
mov al, [rax+20h]
and al, 1
movzx eax, al
mov rcx, [rbp+var_18]
mov cl, [rcx+20h]
and cl, 1
movzx ecx, cl
cmp eax, ecx
jnz short loc_1528C
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
mov rax, [rbp+var_18]
mov rsi, [rax+18h]
call type_equals
test al, 1
jnz short loc_15295
loc_1528C:
mov [rbp+var_1], 0
jmp loc_15472
loc_15295:
mov [rbp+var_20], 0
loc_1529D:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jnb short loc_152ED
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov rdi, [rax+rcx*8]
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov rsi, [rax+rcx*8]
call type_equals
test al, 1
jnz short loc_152DD
mov [rbp+var_1], 0
jmp loc_15472
loc_152DD:
jmp short $+2
loc_152DF:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_1529D
loc_152ED:
mov [rbp+var_1], 1
jmp loc_15472
loc_152F6:
mov rax, [rbp+var_10]; jumptable 0000000000015167 case 10
mov rax, [rax+8]
mov rcx, [rbp+var_18]
cmp rax, [rcx+8]
jz short loc_15311
mov [rbp+var_1], 0
jmp loc_15472
loc_15311:
mov [rbp+var_28], 0
loc_15319:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jnb loc_153B4
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
call _strcmp
cmp eax, 0
jnz short loc_15398
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
shl rcx, 4
add rax, rcx
mov rdi, [rax+8]
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
shl rcx, 4
add rax, rcx
mov rsi, [rax+8]
call type_equals
test al, 1
jnz short loc_153A1
loc_15398:
mov [rbp+var_1], 0
jmp loc_15472
loc_153A1:
jmp short $+2
loc_153A3:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp loc_15319
loc_153B4:
mov [rbp+var_1], 1
jmp loc_15472
loc_153BD:
mov rax, [rbp+var_10]; jumptable 0000000000015167 case 11
mov rax, [rax+8]
mov rcx, [rbp+var_18]
cmp rax, [rcx+8]
jz short loc_153D8
mov [rbp+var_1], 0
jmp loc_15472
loc_153D8:
mov [rbp+var_30], 0
loc_153E0:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jnb short loc_15468
mov [rbp+var_31], 0
mov [rbp+var_40], 0
loc_153FA:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
cmp rax, [rcx+8]
jnb short loc_15449
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_30]
mov rdi, [rax+rcx*8]
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_40]
mov rsi, [rax+rcx*8]
call type_equals
test al, 1
jnz short loc_15433
jmp short loc_15439
loc_15433:
mov [rbp+var_31], 1
jmp short loc_15449
loc_15439:
jmp short $+2
loc_1543B:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_153FA
loc_15449:
test [rbp+var_31], 1
jnz short loc_15455
mov [rbp+var_1], 0
jmp short loc_15472
loc_15455:
jmp short $+2
loc_15457:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp loc_153E0
loc_15468:
mov [rbp+var_1], 1
jmp short loc_15472
def_15167:
mov [rbp+var_1], 0; jumptable 0000000000015167 default case
loc_15472:
mov al, [rbp+var_1]
and al, 1
add rsp, 50h
pop rbp
retn
| char type_equals(long long a1, long long a2)
{
bool v3; // [rsp+6h] [rbp-4Ah]
char v4; // [rsp+7h] [rbp-49h]
unsigned long long m; // [rsp+10h] [rbp-40h]
char v6; // [rsp+1Fh] [rbp-31h]
unsigned long long k; // [rsp+20h] [rbp-30h]
unsigned long long j; // [rsp+28h] [rbp-28h]
unsigned long long i; // [rsp+30h] [rbp-20h]
char v10; // [rsp+4Fh] [rbp-1h]
if ( a1 == a2 )
{
v10 = 1;
}
else if ( a1 && a2 )
{
if ( *(_DWORD *)a1 == *(_DWORD *)a2 )
{
switch ( *(_DWORD *)a1 )
{
case 0:
case 1:
case 4:
case 5:
case 6:
case 0xC:
case 0xD:
v10 = 1;
break;
case 2:
v10 = *(_DWORD *)(a1 + 8) == *(_DWORD *)(a2 + 8);
break;
case 3:
v10 = *(_DWORD *)(a1 + 8) == *(_DWORD *)(a2 + 8);
break;
case 7:
v4 = 0;
if ( (type_equals(**(_QWORD **)(a1 + 16), **(_QWORD **)(a2 + 16)) & 1) != 0 )
v4 = type_equals(*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL), *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL));
v10 = v4 & 1;
break;
case 8:
v3 = 0;
if ( (type_equals(*(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8)) & 1) != 0 )
v3 = *(_QWORD *)(a1 + 16) == *(_QWORD *)(a2 + 16);
v10 = v3;
break;
case 9:
if ( *(_QWORD *)(a1 + 8) == *(_QWORD *)(a2 + 8)
&& (*(_BYTE *)(a1 + 32) & 1) == (*(_BYTE *)(a2 + 32) & 1)
&& (type_equals(*(_QWORD *)(a1 + 24), *(_QWORD *)(a2 + 24)) & 1) != 0 )
{
for ( i = 0LL; i < *(_QWORD *)(a1 + 8); ++i )
{
if ( (type_equals(*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * i), *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * i)) & 1) == 0 )
{
v10 = 0;
return v10 & 1;
}
}
v10 = 1;
}
else
{
v10 = 0;
}
break;
case 0xA:
if ( *(_QWORD *)(a1 + 8) == *(_QWORD *)(a2 + 8) )
{
for ( j = 0LL; j < *(_QWORD *)(a1 + 8); ++j )
{
if ( (unsigned int)strcmp(
*(_QWORD *)(16 * j + *(_QWORD *)(a1 + 16)),
*(_QWORD *)(16 * j + *(_QWORD *)(a2 + 16)))
|| (type_equals(
*(_QWORD *)(16 * j + *(_QWORD *)(a1 + 16) + 8),
*(_QWORD *)(16 * j + *(_QWORD *)(a2 + 16) + 8)) & 1) == 0 )
{
v10 = 0;
return v10 & 1;
}
}
v10 = 1;
}
else
{
v10 = 0;
}
break;
case 0xB:
if ( *(_QWORD *)(a1 + 8) == *(_QWORD *)(a2 + 8) )
{
for ( k = 0LL; k < *(_QWORD *)(a1 + 8); ++k )
{
v6 = 0;
for ( m = 0LL; m < *(_QWORD *)(a2 + 8); ++m )
{
if ( (type_equals(*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * k), *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * m)) & 1) != 0 )
{
v6 = 1;
break;
}
}
if ( (v6 & 1) == 0 )
{
v10 = 0;
return v10 & 1;
}
}
v10 = 1;
}
else
{
v10 = 0;
}
break;
default:
v10 = 0;
break;
}
}
else
{
v10 = 0;
}
}
else
{
v10 = 0;
}
return v10 & 1;
}
| type_equals:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x00115113
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00115472
LAB_00115113:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00115121
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0011512a
LAB_00115121:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_0011512a:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX]
JZ 0x00115141
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_00115141:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
SUB RAX,0xd
JA 0x0011546e
MOV RAX,qword ptr [RBP + -0x48]
LEA RCX,[0x11c2a8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00115472
caseD_2:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX + 0x8]
SETZ AL
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x00115472
caseD_3:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX + 0x8]
SETZ AL
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x00115472
caseD_7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RAX]
CALL 0x001150f0
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x49],AL
JNZ 0x001151d1
JMP 0x001151f1
LAB_001151d1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001150f0
MOV byte ptr [RBP + -0x49],AL
LAB_001151f1:
MOV AL,byte ptr [RBP + -0x49]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x00115472
caseD_8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001150f0
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x4a],AL
JNZ 0x00115221
JMP 0x00115237
LAB_00115221:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
SETZ AL
MOV byte ptr [RBP + -0x4a],AL
LAB_00115237:
MOV AL,byte ptr [RBP + -0x4a]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x00115472
caseD_9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
JNZ 0x0011528c
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x20]
AND AL,0x1
MOVZX EAX,AL
MOV RCX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RCX + 0x20]
AND CL,0x1
MOVZX ECX,CL
CMP EAX,ECX
JNZ 0x0011528c
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x001150f0
TEST AL,0x1
JNZ 0x00115295
LAB_0011528c:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_00115295:
MOV qword ptr [RBP + -0x20],0x0
LAB_0011529d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JNC 0x001152ed
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x001150f0
TEST AL,0x1
JNZ 0x001152dd
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_001152dd:
JMP 0x001152df
LAB_001152df:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0011529d
LAB_001152ed:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00115472
caseD_a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x00115311
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_00115311:
MOV qword ptr [RBP + -0x28],0x0
LAB_00115319:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JNC 0x001153b4
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
CALL 0x00101160
CMP EAX,0x0
JNZ 0x00115398
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001150f0
TEST AL,0x1
JNZ 0x001153a1
LAB_00115398:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_001153a1:
JMP 0x001153a3
LAB_001153a3:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00115319
LAB_001153b4:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00115472
caseD_b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001153d8
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_001153d8:
MOV qword ptr [RBP + -0x30],0x0
LAB_001153e0:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JNC 0x00115468
MOV byte ptr [RBP + -0x31],0x0
MOV qword ptr [RBP + -0x40],0x0
LAB_001153fa:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
JNC 0x00115449
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x001150f0
TEST AL,0x1
JNZ 0x00115433
JMP 0x00115439
LAB_00115433:
MOV byte ptr [RBP + -0x31],0x1
JMP 0x00115449
LAB_00115439:
JMP 0x0011543b
LAB_0011543b:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001153fa
LAB_00115449:
TEST byte ptr [RBP + -0x31],0x1
JNZ 0x00115455
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00115472
LAB_00115455:
JMP 0x00115457
LAB_00115457:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001153e0
LAB_00115468:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00115472
default:
MOV byte ptr [RBP + -0x1],0x0
LAB_00115472:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
bool type_equals(int *param_1,int *param_2)
{
bool bVar1;
uint uVar2;
int iVar3;
ulong uVar4;
bool local_52;
byte local_51;
ulong local_48;
ulong local_38;
ulong local_30;
ulong local_28;
bool local_9;
if (param_1 == param_2) {
local_9 = true;
}
else if ((param_1 == (int *)0x0) || (param_2 == (int *)0x0)) {
local_9 = false;
}
else if (*param_1 == *param_2) {
switch(*param_1) {
case 0:
case 1:
case 4:
case 5:
case 6:
case 0xc:
case 0xd:
local_9 = true;
break;
case 2:
local_9 = param_1[2] == param_2[2];
break;
case 3:
local_9 = param_1[2] == param_2[2];
break;
case 7:
uVar2 = type_equals(**(int8 **)(param_1 + 4),**(int8 **)(param_2 + 4));
local_51 = 0;
if ((uVar2 & 1) != 0) {
local_51 = type_equals(*(int8 *)(*(long *)(param_1 + 4) + 8),
*(int8 *)(*(long *)(param_2 + 4) + 8));
}
local_9 = (bool)(local_51 & 1);
break;
case 8:
uVar2 = type_equals(*(int8 *)(param_1 + 2),*(int8 *)(param_2 + 2));
local_52 = false;
if ((uVar2 & 1) != 0) {
local_52 = *(long *)(param_1 + 4) == *(long *)(param_2 + 4);
}
local_9 = local_52;
break;
case 9:
if (((*(long *)(param_1 + 2) == *(long *)(param_2 + 2)) &&
((*(byte *)(param_1 + 8) & 1) == (*(byte *)(param_2 + 8) & 1))) &&
(uVar4 = type_equals(*(int8 *)(param_1 + 6),*(int8 *)(param_2 + 6)),
(uVar4 & 1) != 0)) {
for (local_28 = 0; local_28 < *(ulong *)(param_1 + 2); local_28 = local_28 + 1) {
uVar4 = type_equals(*(int8 *)(*(long *)(param_1 + 4) + local_28 * 8),
*(int8 *)(*(long *)(param_2 + 4) + local_28 * 8));
if ((uVar4 & 1) == 0) {
return false;
}
}
local_9 = true;
}
else {
local_9 = false;
}
break;
case 10:
if (*(long *)(param_1 + 2) == *(long *)(param_2 + 2)) {
for (local_30 = 0; local_30 < *(ulong *)(param_1 + 2); local_30 = local_30 + 1) {
iVar3 = strcmp(*(char **)(*(long *)(param_1 + 4) + local_30 * 0x10),
*(char **)(*(long *)(param_2 + 4) + local_30 * 0x10));
if ((iVar3 != 0) ||
(uVar4 = type_equals(*(int8 *)(*(long *)(param_1 + 4) + local_30 * 0x10 + 8),
*(int8 *)(*(long *)(param_2 + 4) + local_30 * 0x10 + 8)),
(uVar4 & 1) == 0)) {
return false;
}
}
local_9 = true;
}
else {
local_9 = false;
}
break;
case 0xb:
if (*(long *)(param_1 + 2) == *(long *)(param_2 + 2)) {
for (local_38 = 0; local_38 < *(ulong *)(param_1 + 2); local_38 = local_38 + 1) {
bVar1 = false;
for (local_48 = 0; local_48 < *(ulong *)(param_2 + 2); local_48 = local_48 + 1) {
uVar4 = type_equals(*(int8 *)(*(long *)(param_1 + 4) + local_38 * 8),
*(int8 *)(*(long *)(param_2 + 4) + local_48 * 8));
if ((uVar4 & 1) != 0) {
bVar1 = true;
break;
}
}
if (!bVar1) {
return false;
}
}
local_9 = true;
}
else {
local_9 = false;
}
break;
default:
local_9 = false;
}
}
else {
local_9 = false;
}
return local_9;
}
|
|
2,423 | minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::object();
for (const auto& [key, value] : elements) {
if (!key) throw std::runtime_error("Dict key is null");
if (!value) throw std::runtime_error("Dict value is null");
result.set(key->evaluate(context), value->evaluate(context));
}
return result;
} | O2 | cpp | minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x68250
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6a580
leaq 0x10(%rsp), %rdi
callq 0x501d8
movq 0x20(%r15), %r13
movq 0x28(%r15), %rbp
leaq 0x68(%rsp), %r15
leaq 0x18(%rsp), %r12
cmpq %rbp, %r13
je 0x6a35d
movq (%r13), %rsi
testq %rsi, %rsi
je 0x6a372
cmpq $0x0, 0x10(%r13)
je 0x6a38e
movq %r15, %rdi
movq %r14, %rdx
callq 0x63582
movq 0x10(%r13), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x63582
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6a43a
movq %r12, %rdi
callq 0x63812
movq %r15, %rdi
callq 0x63812
addq $0x20, %r13
jmp 0x6a30a
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r15
leaq 0x4a6ad(%rip), %rsi # 0xb4a31
movq %rax, %rdi
callq 0x23320
jmp 0x6a3a8
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r15
leaq 0x4a6a2(%rip), %rsi # 0xb4a42
movq %rax, %rdi
callq 0x23320
movq 0x93c41(%rip), %rsi # 0xfdff0
movq 0x93ba2(%rip), %rdx # 0xfdf58
movq %r15, %rdi
callq 0x23f30
jmp 0x6a3c0
movq %rax, %r14
movq %r15, %rdi
callq 0x236a0
jmp 0x6a3f0
movq %rax, %r14
jmp 0x6a3df
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x63812
leaq 0x68(%rsp), %rdi
callq 0x63812
jmp 0x6a3f0
jmp 0x6a3ed
movq %rax, %r14
movq %rbx, %rdi
callq 0x63812
movq %r14, %rdi
callq 0x23fc0
| _ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rsp+0E8h+var_E0]
mov rdi, r12
call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<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>>>>()
mov rdi, rbx
mov rsi, r12
call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<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>>>> const&)
lea rdi, [rsp+0E8h+var_D8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov r13, [r15+20h]
mov rbp, [r15+28h]
lea r15, [rsp+0E8h+var_80]
lea r12, [rsp+0E8h+var_D0]
loc_6A30A:
cmp r13, rbp
jz short loc_6A35D
mov rsi, [r13+0]
test rsi, rsi
jz short loc_6A372
cmp qword ptr [r13+10h], 0
jz short loc_6A38E
mov rdi, r15
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rsi, [r13+10h]
mov rdi, r12
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbx; this
mov rsi, r15; minja::Value *
mov rdx, r12; minja::Value *
call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&)
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r15; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add r13, 20h ; ' '
jmp short loc_6A30A
loc_6A35D:
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6A372:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aDictKeyIsNull; "Dict key is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_6A3A8
loc_6A38E:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aDictValueIsNul; "Dict value is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_6A3A8:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short $+2
loc_6A3C0:
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_6A3F0
mov r14, rax
jmp short loc_6A3DF
mov r14, rax
lea rdi, [rsp+0E8h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6A3DF:
lea rdi, [rsp+0E8h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6A3F0
jmp short $+2
loc_6A3ED:
mov r14, rax
loc_6A3F0:
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r14
call __Unwind_Resume
| minja::Value * minja::DictExpr::do_evaluate(minja::Value *this, long long a2)
{
void (****v2)(void); // r13
void (****v3)(void); // rbp
std::runtime_error *exception; // r15
_BYTE v6[8]; // [rsp+8h] [rbp-E0h] BYREF
long long v7; // [rsp+10h] [rbp-D8h] BYREF
_BYTE v8[80]; // [rsp+18h] [rbp-D0h] BYREF
_BYTE v9[128]; // [rsp+68h] [rbp-80h] BYREF
std::make_shared<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>>>>((long long)v6);
minja::Value::Value(this, v6);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
v2 = *(void (*****)(void))(a2 + 32);
v3 = *(void (*****)(void))(a2 + 40);
while ( v2 != v3 )
{
if ( !*v2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Dict key is null");
goto LABEL_9;
}
if ( !v2[2] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Dict value is null");
LABEL_9:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v9, *v2);
minja::Expression::evaluate((long long)v8, v2[2]);
minja::Value::set(this, (const minja::Value *)v9, (const minja::Value *)v8);
minja::Value::~Value((minja::Value *)v8);
minja::Value::~Value((minja::Value *)v9);
v2 += 4;
}
return this;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00168250
MOV RDI,RBX
MOV RSI,R12
CALL 0x0016a580
LEA RDI,[RSP + 0x10]
CALL 0x001501d8
MOV R13,qword ptr [R15 + 0x20]
MOV RBP,qword ptr [R15 + 0x28]
LEA R15,[RSP + 0x68]
LEA R12,[RSP + 0x18]
LAB_0016a30a:
CMP R13,RBP
JZ 0x0016a35d
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x0016a372
CMP qword ptr [R13 + 0x10],0x0
JZ 0x0016a38e
LAB_0016a31f:
MOV RDI,R15
MOV RDX,R14
CALL 0x00163582
MOV RSI,qword ptr [R13 + 0x10]
LAB_0016a32e:
MOV RDI,R12
MOV RDX,R14
CALL 0x00163582
LAB_0016a339:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0016a43a
LAB_0016a347:
MOV RDI,R12
CALL 0x00163812
MOV RDI,R15
CALL 0x00163812
ADD R13,0x20
JMP 0x0016a30a
LAB_0016a35d:
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016a372:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R15,RAX
LAB_0016a37d:
LEA RSI,[0x1b4a31]
MOV RDI,RAX
CALL 0x00123320
LAB_0016a38c:
JMP 0x0016a3a8
LAB_0016a38e:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R15,RAX
LAB_0016a399:
LEA RSI,[0x1b4a42]
MOV RDI,RAX
CALL 0x00123320
LAB_0016a3a8:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R15
CALL 0x00123f30
|
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1)
{
int8 *puVar1;
runtime_error *this_00;
int8 *puVar2;
shared_ptr local_e0 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_d8 [8];
Expression local_d0 [80];
Expression local_80 [80];
std::
make_shared<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>>>>
();
Value::Value((Value *)this,local_e0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_d8);
puVar2 = *(int8 **)(param_1 + 0x20);
puVar1 = *(int8 **)(param_1 + 0x28);
while( true ) {
if (puVar2 == puVar1) {
return this;
}
if ((shared_ptr *)*puVar2 == (shared_ptr *)0x0) break;
if (puVar2[2] == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016a399 to 0016a3a7 has its CatchHandler @ 0016a3be */
std::runtime_error::runtime_error(this_00,"Dict value is null");
goto LAB_0016a3a8;
}
/* try { // try from 0016a31f to 0016a329 has its CatchHandler @ 0016a3ed */
Expression::evaluate(local_80,(shared_ptr *)*puVar2);
/* try { // try from 0016a32e to 0016a338 has its CatchHandler @ 0016a3cd */
Expression::evaluate(local_d0,(shared_ptr *)puVar2[2]);
/* try { // try from 0016a339 to 0016a346 has its CatchHandler @ 0016a3d2 */
Value::set((Value *)this,(Value *)local_80,(Value *)local_d0);
Value::~Value((Value *)local_d0);
Value::~Value((Value *)local_80);
puVar2 = puVar2 + 4;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016a37d to 0016a38b has its CatchHandler @ 0016a3c0 */
std::runtime_error::runtime_error(this_00,"Dict key is null");
LAB_0016a3a8:
/* try { // try from 0016a3a8 to 0016a3bd has its CatchHandler @ 0016a3eb */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
|
|
2,424 | my_wc_mb_latin1 | eloqsql/strings/ctype-latin1.c | static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
} | O0 | c | my_wc_mb_latin1:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x115b9a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x115c21
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x115bad
movl $0x0, -0x4(%rbp)
jmp 0x115c21
movq -0x18(%rbp), %rcx
shrq $0x8, %rcx
leaq 0x19f4e4(%rip), %rax # 0x2b50a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x115be3
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
andq $0xff, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
jmp 0x115bea
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x115bea
movl -0x34(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x35(%rbp)
jne 0x115c0e
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_wc_mb_latin1:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_115B9A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_115C21
loc_115B9A:
cmp [rbp+var_18], 0FFFFh
jbe short loc_115BAD
mov [rbp+var_4], 0
jmp short loc_115C21
loc_115BAD:
mov rcx, [rbp+var_18]
shr rcx, 8
lea rax, uni_to_cs
mov rax, [rax+rcx*8]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_115BE3
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
and rcx, 0FFh
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
jmp short loc_115BEA
loc_115BE3:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_115BEA:
mov eax, [rbp+var_34]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rcx, [rbp+var_20]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_35], al
jnz short loc_115C0E
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_35], al
loc_115C0E:
mov dl, [rbp+var_35]
mov eax, 1
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_115C21:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
bool v5; // [rsp+1h] [rbp-35h]
char v6; // [rsp+2h] [rbp-34h]
long long v7; // [rsp+6h] [rbp-30h]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 <= 0xFFFF )
{
v7 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v7 )
v6 = *(_BYTE *)(v7 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
v5 = 0;
if ( !*a3 )
v5 = a2 != 0;
return !v5;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-101;
}
}
| |||
2,425 | my_wc_mb_latin1 | eloqsql/strings/ctype-latin1.c | static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
} | O3 | c | my_wc_mb_latin1:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb2844
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0xb2844
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
shrq $0x8, %rax
leaq 0x2ca7a3(%rip), %rcx # 0x37cfc0
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0xb282f
movzbl %sil, %ecx
movb (%rax,%rcx), %al
jmp 0xb2831
xorl %eax, %eax
movb %al, (%rdx)
testb %al, %al
setne %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbp
retq
| my_wc_mb_latin1:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_B2844
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_B2844
push rbp
mov rbp, rsp
mov rax, rsi
shr rax, 8
lea rcx, uni_to_cs
mov rax, [rcx+rax*8]
test rax, rax
jz short loc_B282F
movzx ecx, sil
mov al, [rax+rcx]
jmp short loc_B2831
loc_B282F:
xor eax, eax
loc_B2831:
mov [rdx], al
test al, al
setnz al
test rsi, rsi
setz cl
or cl, al
movzx eax, cl
pop rbp
locret_B2844:
retn
| long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
char v6; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v5 )
v6 = *(_BYTE *)(v5 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
return (v6 != 0) | (unsigned __int8)(a2 == 0);
}
}
return result;
}
| my_wc_mb_latin1:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b2844
XOR EAX,EAX
CMP RSI,0xffff
JA 0x001b2844
PUSH RBP
MOV RBP,RSP
MOV RAX,RSI
SHR RAX,0x8
LEA RCX,[0x47cfc0]
MOV RAX,qword ptr [RCX + RAX*0x8]
TEST RAX,RAX
JZ 0x001b282f
MOVZX ECX,SIL
MOV AL,byte ptr [RAX + RCX*0x1]
JMP 0x001b2831
LAB_001b282f:
XOR EAX,EAX
LAB_001b2831:
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
MOVZX EAX,CL
POP RBP
LAB_001b2844:
RET
|
ulong my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
uVar2 = 0xffffff9b;
if ((param_3 < param_4) && (uVar2 = 0, param_2 < 0x10000)) {
if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0');
}
return uVar2;
}
|
|
2,426 | minja::Value::at(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value& at(const Value & index) {
if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
if (is_array()) return array_->at(index.get<int>());
if (is_object()) return object_->at(index.primitive_);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O2 | cpp | minja::Value::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x6ec70
testb %al, %al
je 0x78e71
movq 0x10(%r14), %r15
testq %r15, %r15
je 0x78e52
movq %rbx, %rdi
callq 0x76e7a
movslq %eax, %rsi
movq %r15, %rdi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x76d7c
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x78ece
addq $0x40, %rbx
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x79e1e
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x6ec80
leaq 0x4755b(%rip), %rsi # 0xc03f0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x64496
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e90
xorl %ebp, %ebp
movq 0x93133(%rip), %rsi # 0x10bff0
movq 0x93094(%rip), %rdx # 0x10bf58
movq %rbx, %rdi
callq 0x24f80
jmp 0x78f29
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x6ec80
leaq 0x4764a(%rip), %rsi # 0xc053c
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x64496
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e90
xorl %ebp, %ebp
movq 0x930d6(%rip), %rsi # 0x10bff0
movq 0x93037(%rip), %rdx # 0x10bf58
movq %rbx, %rdi
callq 0x24f80
jmp 0x78f2f
jmp 0x78f3e
jmp 0x78f55
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x25298
jmp 0x78f44
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x25298
testb %bpl, %bpl
jne 0x78f58
jmp 0x78f60
movq %rax, %r14
movq %rbx, %rdi
callq 0x246a0
movq %r14, %rdi
callq 0x25010
| _ZN5minja5Value2atERKS0_:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
mov r14, rdi
mov rdi, rsi; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz short loc_78E71
mov r15, [r14+10h]
test r15, r15
jz short loc_78E52
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
movsxd rsi, eax
mov rdi, r15
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong)
loc_78E52:
mov rdi, [r14+20h]
test rdi, rdi
jz short loc_78ECE
add rbx, 40h ; '@'
mov rsi, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_; 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>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_78E71:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
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, rbx; void *
call ___cxa_throw
jmp short loc_78F29
loc_78ECE:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
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, rbx; void *
call ___cxa_throw
loc_78F29:
jmp short loc_78F2F
jmp short loc_78F3E
jmp short loc_78F55
loc_78F2F:
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_78F44
loc_78F3E:
mov r14, rax
mov bpl, 1
loc_78F44:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_78F58
jmp short loc_78F60
loc_78F55:
mov r14, rax
loc_78F58:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_78F60:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::at(minja::Value *this, const minja::Value *a2)
{
_QWORD *v3; // r15
int v4; // eax
long long v6; // rdi
void *exception; // rbx
void *v8; // rbx
_BYTE v9[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v10[64]; // [rsp+28h] [rbp-40h] BYREF
if ( !minja::Value::is_primitive(a2) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Unashable type: ", (long long)v9);
std::runtime_error::runtime_error(exception, v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = (_QWORD *)*((_QWORD *)this + 2);
if ( v3 )
{
v4 = minja::Value::get<int>(a2);
return std::vector<minja::Value>::at(v3, v4);
}
else
{
v6 = *((_QWORD *)this + 4);
if ( !v6 )
{
v8 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9);
std::runtime_error::runtime_error(v8, v10);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return 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>>>::at(
v6,
(char *)a2 + 64);
}
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x0016ec70
TEST AL,AL
JZ 0x00178e71
MOV R15,qword ptr [R14 + 0x10]
TEST R15,R15
JZ 0x00178e52
MOV RDI,RBX
CALL 0x00176e7a
MOVSXD RSI,EAX
MOV RDI,R15
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00176d7c
LAB_00178e52:
MOV RDI,qword ptr [R14 + 0x20]
TEST RDI,RDI
JZ 0x00178ece
ADD RBX,0x40
MOV RSI,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00179e1e
LAB_00178e71:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_00178e7c:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0016ec80
LAB_00178e8e:
LEA RSI,[0x1c03f0]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00164496
MOV BPL,0x1
LAB_00178ea7:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00124e90
XOR EBP,EBP
MOV RSI,qword ptr [0x0020bff0]
MOV RDX,qword ptr [0x0020bf58]
MOV RDI,RBX
CALL 0x00124f80
LAB_00178ece:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_00178ed9:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0016ec80
LAB_00178eeb:
LEA RSI,[0x1c053c]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00164496
MOV BPL,0x1
LAB_00178f04:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00124e90
XOR EBP,EBP
MOV RSI,qword ptr [0x0020bff0]
MOV RDX,qword ptr [0x0020bf58]
MOV RDI,RBX
CALL 0x00124f80
|
/* minja::Value::at(minja::Value const&) */
void __thiscall minja::Value::at(Value *this,Value *param_1)
{
vector<minja::Value,std::allocator<minja::Value>> *this_00;
runtime_error *prVar1;
char cVar2;
int iVar3;
int1 local_60 [32];
string local_40 [32];
cVar2 = is_primitive(param_1);
if (cVar2 == '\0') {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00178e7c to 00178e8d has its CatchHandler @ 00178f55 */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 00178e8e to 00178ea3 has its CatchHandler @ 00178f3e */
std::operator+((char *)local_40,(string *)"Unashable type: ");
/* try { // try from 00178ea7 to 00178ecb has its CatchHandler @ 00178f2f */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58);
}
this_00 = *(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10);
if (this_00 != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
iVar3 = get<int>(param_1);
std::vector<minja::Value,std::allocator<minja::Value>>::at(this_00,(long)iVar3);
return;
}
if (*(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 + 0x20) !=
(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>>>
*)0x0) {
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>>>
::at(*(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 + 0x20),param_1 + 0x40);
return;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00178ed9 to 00178eea has its CatchHandler @ 00178f2d */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 00178eeb to 00178f00 has its CatchHandler @ 00178f2b */
std::operator+((char *)local_40,(string *)"Value is not an array or object: ");
/* try { // try from 00178f04 to 00178f28 has its CatchHandler @ 00178f29 */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58);
}
|
|
2,427 | trnman_init_tmp_trn_for_logging_trid | eloqsql/storage/maria/trnman.c | void trnman_init_tmp_trn_for_logging_trid(TRN *trn)
{
*trn= dummy_transaction_object;
/* Avoid logging short_id */
trn->short_id= 1;
/* Trid gets logged in translog_write_record */
trn->first_undo_lsn= 0;
/* Get next free trid */
trn->trid= trnman_get_min_safe_trid();
} | O3 | c | trnman_init_tmp_trn_for_logging_trid:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x39bfdf(%rip), %rsi # 0x3fcb00
movl $0xb0, %edx
callq 0x29080
movw $0x1, 0xac(%rbx)
movq $0x0, 0xa0(%rbx)
callq 0x6102b
movq %rax, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| trnman_init_tmp_trn_for_logging_trid:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rsi, dummy_transaction_object
mov edx, 0B0h
call _memcpy
mov word ptr [rbx+0ACh], 1
mov qword ptr [rbx+0A0h], 0
call trnman_get_min_safe_trid
mov [rbx+78h], rax
add rsp, 8
pop rbx
pop rbp
retn
| long long trnman_init_tmp_trn_for_logging_trid(long long a1)
{
long long result; // rax
memcpy(a1, dummy_transaction_object, 176LL);
*(_WORD *)(a1 + 172) = 1;
*(_QWORD *)(a1 + 160) = 0LL;
result = trnman_get_min_safe_trid(a1);
*(_QWORD *)(a1 + 120) = result;
return result;
}
| trnman_init_tmp_trn_for_logging_trid:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RSI,[0x4fcb00]
MOV EDX,0xb0
CALL 0x00129080
MOV word ptr [RBX + 0xac],0x1
MOV qword ptr [RBX + 0xa0],0x0
CALL 0x0016102b
MOV qword ptr [RBX + 0x78],RAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void trnman_init_tmp_trn_for_logging_trid(void *param_1)
{
int8 uVar1;
memcpy(param_1,dummy_transaction_object,0xb0);
*(int2 *)((long)param_1 + 0xac) = 1;
*(int8 *)((long)param_1 + 0xa0) = 0;
uVar1 = trnman_get_min_safe_trid();
*(int8 *)((long)param_1 + 0x78) = uVar1;
return;
}
|
|
2,428 | my_bitmap_init_memroot(st_bitmap*, unsigned int, st_mem_root*) | eloqsql/sql/item_subselect.cc | static my_bool
my_bitmap_init_memroot(MY_BITMAP *map, uint n_bits, MEM_ROOT *mem_root)
{
my_bitmap_map *bitmap_buf;
if (!(bitmap_buf= (my_bitmap_map*) alloc_root(mem_root,
bitmap_buffer_size(n_bits))) ||
my_bitmap_init(map, bitmap_buf, n_bits, FALSE))
return TRUE;
bitmap_clear_all(map);
return FALSE;
} | O0 | cpp | my_bitmap_init_memroot(st_bitmap*, unsigned int, st_mem_root*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
addl $0x1f, %eax
shrl $0x5, %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x1319160
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xde80fc
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x14(%rbp), %edx
xorl %ecx, %ecx
callq 0x1319c30
cmpb $0x0, %al
je 0xde8102
movb $0x1, -0x1(%rbp)
jmp 0xde8128
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
addl $0x1f, %eax
shrl $0x5, %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x7754f0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL22my_bitmap_init_memrootP9st_bitmapjP11st_mem_root:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_20]
mov eax, [rbp+var_14]
add eax, 1Fh
shr eax, 5
shl eax, 2
mov eax, eax
mov esi, eax
call alloc_root
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_DE80FC
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov edx, [rbp+var_14]
xor ecx, ecx
call my_bitmap_init
cmp al, 0
jz short loc_DE8102
loc_DE80FC:
mov [rbp+var_1], 1
jmp short loc_DE8128
loc_DE8102:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
add eax, 1Fh
shr eax, 5
shl eax, 2
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_1], 0
loc_DE8128:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_bitmap_init_memroot(_QWORD *a1, unsigned int a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-28h]
v4 = alloc_root(a3, 4 * ((a2 + 31) >> 5));
if ( !v4 || (unsigned __int8)my_bitmap_init(a1, v4, a2, 0LL) )
return 1;
memset(*a1, 0LL);
return 0;
}
| val_real:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00de80c2
LAB_00de80c2:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
CVTSI2SD XMM0,RAX
POP RBP
RET
|
/* Field_date::val_real() */
double __thiscall Field_date::val_real(Field_date *this)
{
return (double)**(uint **)(this + 8);
}
|
|
2,429 | ma_find_writepos | eloqsql/storage/maria/ma_dynrec.c | static int _ma_find_writepos(MARIA_HA *info,
ulong reclength, /* record length */
my_off_t *filepos, /* Return file pos */
ulong *length) /* length of block at filepos */
{
MARIA_BLOCK_INFO block_info;
ulong tmp;
DBUG_ENTER("_ma_find_writepos");
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
/* Deleted blocks exists; Get last used block */
*filepos=info->s->state.dellink;
block_info.second_read=0;
info->rec_cache.seek_not_done=1;
if (!(_ma_get_block_info(info, &block_info, info->dfile.file,
info->s->state.dellink) &
BLOCK_DELETED))
{
DBUG_PRINT("error",("Delete link crashed"));
_ma_set_fatal_error_with_share(info->s, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(-1);
}
info->s->state.dellink=block_info.next_filepos;
info->state->del--;
info->state->empty-= block_info.block_len;
*length= block_info.block_len;
}
else
{
/* No deleted blocks; Allocate a new block */
*filepos=info->state->data_file_length;
if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) <
info->s->base.min_block_length)
tmp= info->s->base.min_block_length;
else
tmp= ((tmp+MARIA_DYN_ALIGN_SIZE-1) &
(~ (ulong) (MARIA_DYN_ALIGN_SIZE-1)));
if (info->state->data_file_length >
(info->s->base.max_data_file_length - tmp))
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(-1);
}
if (tmp > MARIA_MAX_BLOCK_LENGTH)
tmp=MARIA_MAX_BLOCK_LENGTH;
*length= tmp;
info->state->data_file_length+= tmp;
info->s->state.split++;
info->update|=HA_STATE_WRITE_AT_END;
}
DBUG_RETURN(0);
} | O3 | c | ma_find_writepos:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rcx, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movq (%rdi), %rax
movq 0xc8(%rax), %rax
cmpq $-0x1, %rax
je 0x4881c
cmpb $0x0, 0x681(%rbx)
je 0x4889a
movq 0x20(%rbx), %rax
movq 0x28(%rax), %rax
movq %rax, (%rdx)
cmpq $0xffed, %rsi # imm = 0xFFED
sbbq $-0x1, %rsi
leaq 0x3(%rsi), %rax
movq (%rbx), %rcx
movq 0x20(%rbx), %rdx
movq 0x3b8(%rcx), %rdi
addq $0x6, %rsi
andq $-0x4, %rsi
cmpq %rdi, %rax
cmovbq %rdi, %rsi
movq 0x368(%rcx), %rax
subq %rsi, %rax
cmpq %rax, 0x28(%rdx)
jbe 0x48870
callq 0xa8dda
movl $0x87, (%rax)
jmp 0x488db
movl $0xfffffc, %eax # imm = 0xFFFFFC
cmpq %rax, %rsi
cmovbq %rsi, %rax
movq %rax, (%r14)
movq 0x20(%rbx), %rcx
addq %rax, 0x28(%rcx)
movq (%rbx), %rax
incq 0xc0(%rax)
orb $0x1, 0x625(%rbx)
jmp 0x4890b
movq %rax, (%rdx)
leaq -0x70(%rbp), %rsi
movl $0x0, 0x50(%rsi)
movl $0x1, 0x598(%rbx)
movl 0x480(%rbx), %edx
movq (%rbx), %rax
movq 0xc8(%rax), %rcx
movq %rbx, %rdi
callq 0x46c4c
testb $0x4, %al
jne 0x488e2
movq (%rbx), %rdi
movl $0x7f, %esi
callq 0x39d32
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x4890d
movq -0x30(%rbp), %rax
movq (%rbx), %rcx
movq %rax, 0xc8(%rcx)
movq 0x20(%rbx), %rax
decq 0x8(%rax)
movq -0x48(%rbp), %rax
movq 0x20(%rbx), %rcx
subq %rax, 0x10(%rcx)
movq -0x48(%rbp), %rax
movq %rax, (%r14)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x48925
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2a240
nop
| _ma_find_writepos:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov r14, rcx
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
mov rax, [rdi]
mov rax, [rax+0C8h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_4881C
cmp byte ptr [rbx+681h], 0
jz short loc_4889A
loc_4881C:
mov rax, [rbx+20h]
mov rax, [rax+28h]
mov [rdx], rax
cmp rsi, 0FFEDh
sbb rsi, 0FFFFFFFFFFFFFFFFh
lea rax, [rsi+3]
mov rcx, [rbx]
mov rdx, [rbx+20h]
mov rdi, [rcx+3B8h]
add rsi, 6
and rsi, 0FFFFFFFFFFFFFFFCh
cmp rax, rdi
cmovb rsi, rdi
mov rax, [rcx+368h]
sub rax, rsi
cmp [rdx+28h], rax
jbe short loc_48870
call _my_thread_var
mov dword ptr [rax], 87h
jmp short loc_488DB
loc_48870:
mov eax, 0FFFFFCh
cmp rsi, rax
cmovb rax, rsi
mov [r14], rax
mov rcx, [rbx+20h]
add [rcx+28h], rax
mov rax, [rbx]
inc qword ptr [rax+0C0h]
or byte ptr [rbx+625h], 1
jmp short loc_4890B
loc_4889A:
mov [rdx], rax
lea rsi, [rbp+var_70]
mov dword ptr [rsi+50h], 0
mov dword ptr [rbx+598h], 1
mov edx, [rbx+480h]
mov rax, [rbx]
mov rcx, [rax+0C8h]
mov rdi, rbx
call _ma_get_block_info
test al, 4
jnz short loc_488E2
mov rdi, [rbx]
mov esi, 7Fh
call _ma_set_fatal_error_with_share
loc_488DB:
mov eax, 0FFFFFFFFh
jmp short loc_4890D
loc_488E2:
mov rax, [rbp+var_30]
mov rcx, [rbx]
mov [rcx+0C8h], rax
mov rax, [rbx+20h]
dec qword ptr [rax+8]
mov rax, [rbp+var_48]
mov rcx, [rbx+20h]
sub [rcx+10h], rax
mov rax, [rbp+var_48]
mov [r14], rax
loc_4890B:
xor eax, eax
loc_4890D:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_48925
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_48925:
call ___stack_chk_fail
| long long ma_find_writepos(_QWORD *a1, unsigned long long a2, _QWORD *a3, long long *a4, long long a5, int a6)
{
long long v8; // rax
unsigned long long v9; // rsi
unsigned long long v10; // rax
long long v11; // rcx
long long v12; // rdx
unsigned long long v13; // rdi
const char *v14; // rsi
long long v15; // rax
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
int v19; // r9d
char v21[40]; // [rsp+0h] [rbp-70h] BYREF
long long v22; // [rsp+28h] [rbp-48h]
long long v23; // [rsp+40h] [rbp-30h]
int v24; // [rsp+50h] [rbp-20h]
unsigned long long v25; // [rsp+58h] [rbp-18h]
v25 = __readfsqword(0x28u);
v8 = *(_QWORD *)(*a1 + 200LL);
if ( v8 == -1 || *((_BYTE *)a1 + 1665) )
{
*a3 = *(_QWORD *)(a1[4] + 40LL);
v9 = a2 - ((a2 < 0xFFED) - 1LL);
v10 = v9 + 3;
v11 = *a1;
v12 = a1[4];
v13 = *(_QWORD *)(*a1 + 952LL);
v14 = (const char *)((v9 + 6) & 0xFFFFFFFFFFFFFFFCLL);
if ( v10 < v13 )
v14 = *(const char **)(*a1 + 952LL);
if ( *(_QWORD *)(v12 + 40) > *(_QWORD *)(v11 + 872) - (_QWORD)v14 )
{
*(_DWORD *)my_thread_var(v13, v14) = 135;
return 0xFFFFFFFFLL;
}
v15 = 16777212LL;
if ( (unsigned long long)v14 < 0xFFFFFC )
v15 = (long long)v14;
*a4 = v15;
*(_QWORD *)(a1[4] + 40LL) += v15;
++*(_QWORD *)(*a1 + 192LL);
*((_BYTE *)a1 + 1573) |= 1u;
}
else
{
*a3 = v8;
v24 = 0;
*((_DWORD *)a1 + 358) = 1;
if ( (ma_get_block_info((long long)a1, v21, *((unsigned int *)a1 + 288), *(_QWORD *)(*a1 + 200LL), a5, a6) & 4) == 0 )
{
ma_set_fatal_error_with_share(*a1, 127, v16, v17, v18, v19);
return 0xFFFFFFFFLL;
}
*(_QWORD *)(*a1 + 200LL) = v23;
--*(_QWORD *)(a1[4] + 8LL);
*(_QWORD *)(a1[4] + 16LL) -= v22;
*a4 = v22;
}
return 0LL;
}
| _ma_find_writepos:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV R14,RCX
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0xc8]
CMP RAX,-0x1
JZ 0x0014881c
CMP byte ptr [RBX + 0x681],0x0
JZ 0x0014889a
LAB_0014881c:
MOV RAX,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RDX],RAX
CMP RSI,0xffed
SBB RSI,-0x1
LEA RAX,[RSI + 0x3]
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RCX + 0x3b8]
ADD RSI,0x6
AND RSI,-0x4
CMP RAX,RDI
CMOVC RSI,RDI
MOV RAX,qword ptr [RCX + 0x368]
SUB RAX,RSI
CMP qword ptr [RDX + 0x28],RAX
JBE 0x00148870
CALL 0x001a8dda
MOV dword ptr [RAX],0x87
JMP 0x001488db
LAB_00148870:
MOV EAX,0xfffffc
CMP RSI,RAX
CMOVC RAX,RSI
MOV qword ptr [R14],RAX
MOV RCX,qword ptr [RBX + 0x20]
ADD qword ptr [RCX + 0x28],RAX
MOV RAX,qword ptr [RBX]
INC qword ptr [RAX + 0xc0]
OR byte ptr [RBX + 0x625],0x1
JMP 0x0014890b
LAB_0014889a:
MOV qword ptr [RDX],RAX
LEA RSI,[RBP + -0x70]
MOV dword ptr [RSI + 0x50],0x0
MOV dword ptr [RBX + 0x598],0x1
MOV EDX,dword ptr [RBX + 0x480]
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0xc8]
MOV RDI,RBX
CALL 0x00146c4c
TEST AL,0x4
JNZ 0x001488e2
MOV RDI,qword ptr [RBX]
MOV ESI,0x7f
CALL 0x00139d32
LAB_001488db:
MOV EAX,0xffffffff
JMP 0x0014890d
LAB_001488e2:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0xc8],RAX
MOV RAX,qword ptr [RBX + 0x20]
DEC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBX + 0x20]
SUB qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [R14],RAX
LAB_0014890b:
XOR EAX,EAX
LAB_0014890d:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x00148925
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_00148925:
CALL 0x0012a240
|
int8 _ma_find_writepos(long *param_1,ulong param_2,long *param_3,ulong *param_4)
{
int4 *puVar1;
ulong uVar2;
int8 uVar3;
long lVar4;
ulong uVar5;
long in_FS_OFFSET;
int1 local_78 [40];
ulong local_50;
int8 local_38;
int4 local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) {
*param_3 = *(long *)(param_1[4] + 0x28);
lVar4 = (param_2 + 1) - (ulong)(param_2 < 0xffed);
uVar2 = *(ulong *)(*param_1 + 0x3b8);
uVar5 = lVar4 + 6U & 0xfffffffffffffffc;
if (lVar4 + 3U < uVar2) {
uVar5 = uVar2;
}
if (*(ulong *)(param_1[4] + 0x28) <= *(long *)(*param_1 + 0x368) - uVar5) {
uVar2 = 0xfffffc;
if (uVar5 < 0xfffffc) {
uVar2 = uVar5;
}
*param_4 = uVar2;
*(long *)(param_1[4] + 0x28) = *(long *)(param_1[4] + 0x28) + uVar2;
*(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1;
*(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) | 1;
LAB_0014890b:
uVar3 = 0;
goto LAB_0014890d;
}
puVar1 = (int4 *)_my_thread_var();
*puVar1 = 0x87;
}
else {
*param_3 = *(long *)(*param_1 + 200);
local_28 = 0;
*(int4 *)(param_1 + 0xb3) = 1;
uVar2 = _ma_get_block_info(param_1,local_78,(int)param_1[0x90],*(int8 *)(*param_1 + 200));
if ((uVar2 & 4) != 0) {
*(int8 *)(*param_1 + 200) = local_38;
*(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1;
*(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - local_50;
*param_4 = local_50;
goto LAB_0014890b;
}
_ma_set_fatal_error_with_share(*param_1,0x7f);
}
uVar3 = 0xffffffff;
LAB_0014890d:
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
2,430 | nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogSymlink(LogSeverity severity,
const char* symlink_basename) {
CHECK_GE(severity, 0);
CHECK_LT(severity, NUM_SEVERITIES);
std::lock_guard<std::mutex> l{log_mutex};
log_destination(severity)->fileobject_.SetSymlinkBasename(symlink_basename);
} | O0 | cpp | nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x4(%rbp), %rdi
callq 0x21e30
movq %rax, -0x130(%rbp)
xorl %edi, %edi
callq 0xcd50
movq -0x130(%rbp), %rsi
movl %eax, -0x1c(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x1c(%rbp), %rdx
leaq 0x33b96(%rip), %rcx # 0x51f38
callq 0x21dc0
leaq -0x18(%rbp), %rdi
callq 0xcd60
testb $0x1, %al
jne 0x1e3c2
leaq -0x18(%rbp), %rdi
callq 0xce00
jmp 0x1e476
leaq -0x90(%rbp), %rdi
movq %rdi, -0x138(%rbp)
leaq -0x18(%rbp), %rsi
callq 0xcd90
movq -0x138(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0xcdc0
jmp 0x1e3ee
leaq 0x335c5(%rip), %rsi # 0x519ba
leaq -0x80(%rbp), %rdi
movl $0x291, %edx # imm = 0x291
leaq -0x88(%rbp), %rcx
callq 0x18e90
jmp 0x1e40c
leaq -0x80(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x14990
movq -0x140(%rbp), %rdi
callq 0x18ed0
jmp 0x1e42a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x1e45c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xcde0
leaq -0x90(%rbp), %rdi
callq 0xce00
leaq -0x18(%rbp), %rdi
callq 0xce00
jmp 0x1e600
jmp 0x1e478
leaq -0x4(%rbp), %rdi
callq 0x21e30
movq %rax, -0x148(%rbp)
movl $0x4, %edi
callq 0xcd50
movq -0x148(%rbp), %rsi
movl %eax, -0xac(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xac(%rbp), %rdx
leaq 0x33a92(%rip), %rcx # 0x51f46
callq 0x21e40
leaq -0xa8(%rbp), %rdi
callq 0xcd60
testb $0x1, %al
jne 0x1e4da
leaq -0xa8(%rbp), %rdi
callq 0xce00
jmp 0x1e597
leaq -0x120(%rbp), %rdi
movq %rdi, -0x150(%rbp)
leaq -0xa8(%rbp), %rsi
callq 0xcd90
movq -0x150(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0xcdc0
jmp 0x1e509
leaq 0x334aa(%rip), %rsi # 0x519ba
leaq -0x110(%rbp), %rdi
movl $0x292, %edx # imm = 0x292
leaq -0x118(%rbp), %rcx
callq 0x18e90
jmp 0x1e52a
leaq -0x110(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x14990
movq -0x158(%rbp), %rdi
callq 0x18ed0
jmp 0x1e54b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x1e57d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xcde0
leaq -0x120(%rbp), %rdi
callq 0xce00
leaq -0xa8(%rbp), %rdi
callq 0xce00
jmp 0x1e600
leaq 0x689ba(%rip), %rsi # 0x86f58
leaq -0x128(%rbp), %rdi
callq 0x1d740
movl -0x4(%rbp), %edi
callq 0x1e100
movq %rax, -0x160(%rbp)
jmp 0x1e5bb
movq -0x160(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c420
jmp 0x1e5cd
leaq -0x128(%rbp), %rdi
callq 0x1d770
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x1d770
movq -0x98(%rbp), %rdi
callq 0x9d40
nopl (%rax)
| _ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc:
push rbp
mov rbp, rsp
sub rsp, 160h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_4]
call _ZN5nglog8internal21GetReferenceableValueINS_11LogSeverityEEERKT_S5_; nglog::internal::GetReferenceableValue<nglog::LogSeverity>(nglog::LogSeverity const&)
mov qword ptr [rbp+var_130], rax
xor edi, edi; this
call _ZN5nglog8internal21GetReferenceableValueEi; nglog::internal::GetReferenceableValue(int)
mov rsi, qword ptr [rbp+var_130]; int
mov [rbp+var_1C], eax
lea rdi, [rbp+var_18]
lea rdx, [rbp+var_1C]
lea rcx, aSeverity0; "severity >= 0"
call _ZN5nglog8internal12Check_GEImplINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::Check_GEImpl<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*)
lea rdi, [rbp+var_18]
call _ZNKSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEcvbEv; std::unique_ptr<std::string>::operator bool(void)
test al, 1
jnz short loc_1E3C2
lea rdi, [rbp+var_18]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp loc_1E476
loc_1E3C2:
lea rdi, [rbp+var_90]
mov [rbp+var_138], rdi
lea rsi, [rbp+var_18]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEC2EOS8_; std::unique_ptr<std::string>::unique_ptr(std::unique_ptr<std::string>&&)
mov rsi, [rbp+var_138]
lea rdi, [rbp+var_88]
call _ZN5nglog8internal13CheckOpStringC2ESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS8_EE; nglog::internal::CheckOpString::CheckOpString(std::unique_ptr<std::string>)
jmp short $+2
loc_1E3EE:
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_80]; this
mov edx, 291h; int
lea rcx, [rbp+var_88]; nglog::internal::CheckOpString *
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
jmp short $+2
loc_1E40C:
lea rdi, [rbp+var_80]; this
mov [rbp+var_140], rdi
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov rdi, [rbp+var_140]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_1E42A:
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
jmp short loc_1E45C
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
lea rdi, [rbp+var_88]; this
call _ZN5nglog8internal13CheckOpStringD2Ev; nglog::internal::CheckOpString::~CheckOpString()
loc_1E45C:
lea rdi, [rbp+var_90]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
lea rdi, [rbp+var_18]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp loc_1E600
loc_1E476:
jmp short $+2
loc_1E478:
lea rdi, [rbp+var_4]
call _ZN5nglog8internal21GetReferenceableValueINS_11LogSeverityEEERKT_S5_; nglog::internal::GetReferenceableValue<nglog::LogSeverity>(nglog::LogSeverity const&)
mov [rbp+var_148], rax
mov edi, offset byte_4; this
call _ZN5nglog8internal21GetReferenceableValueEi; nglog::internal::GetReferenceableValue(int)
mov rsi, [rbp+var_148]
mov [rbp+var_AC], eax
lea rdi, [rbp+var_A8]
lea rdx, [rbp+var_AC]
lea rcx, aSeverityNumSev; "severity < NUM_SEVERITIES"
call _ZN5nglog8internal12Check_LTImplINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::Check_LTImpl<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*)
lea rdi, [rbp+var_A8]
call _ZNKSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEcvbEv; std::unique_ptr<std::string>::operator bool(void)
test al, 1
jnz short loc_1E4DA
lea rdi, [rbp+var_A8]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp loc_1E597
loc_1E4DA:
lea rdi, [rbp+var_120]
mov [rbp+var_150], rdi
lea rsi, [rbp+var_A8]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEC2EOS8_; std::unique_ptr<std::string>::unique_ptr(std::unique_ptr<std::string>&&)
mov rsi, [rbp+var_150]
lea rdi, [rbp+var_118]
call _ZN5nglog8internal13CheckOpStringC2ESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS8_EE; nglog::internal::CheckOpString::CheckOpString(std::unique_ptr<std::string>)
jmp short $+2
loc_1E509:
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_110]; this
mov edx, 292h; int
lea rcx, [rbp+var_118]; nglog::internal::CheckOpString *
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
jmp short $+2
loc_1E52A:
lea rdi, [rbp+var_110]; this
mov [rbp+var_158], rdi
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov rdi, [rbp+var_158]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_1E54B:
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
jmp short loc_1E57D
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
lea rdi, [rbp+var_118]; this
call _ZN5nglog8internal13CheckOpStringD2Ev; nglog::internal::CheckOpString::~CheckOpString()
loc_1E57D:
lea rdi, [rbp+var_120]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
lea rdi, [rbp+var_A8]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp short loc_1E600
loc_1E597:
lea rsi, _ZN5nglogL9log_mutexE; nglog::log_mutex
lea rdi, [rbp+var_128]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov edi, [rbp+var_4]
call _ZN5nglog14LogDestination15log_destinationENS_11LogSeverityE; nglog::LogDestination::log_destination(nglog::LogSeverity)
mov [rbp+var_160], rax
jmp short $+2
loc_1E5BB:
mov rdi, [rbp+var_160]; this
mov rsi, [rbp+var_10]; char *
call _ZN5nglog12_GLOBAL__N_113LogFileObject18SetSymlinkBasenameEPKc; nglog::`anonymous namespace'::LogFileObject::SetSymlinkBasename(char const*)
jmp short $+2
loc_1E5CD:
lea rdi, [rbp+var_128]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
add rsp, 160h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
lea rdi, [rbp+var_128]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
loc_1E600:
mov rdi, [rbp+var_98]
call __Unwind_Resume
| long long nglog::LogDestination::SetLogSymlink(unsigned int a1, char *a2)
{
nglog::_anonymous_namespace_::LogFileObject *v3; // [rsp+0h] [rbp-160h]
long long v4; // [rsp+18h] [rbp-148h]
int v5[2]; // [rsp+30h] [rbp-130h]
std::mutex *v6; // [rsp+38h] [rbp-128h] BYREF
_BYTE v7[8]; // [rsp+40h] [rbp-120h] BYREF
_BYTE v8[8]; // [rsp+48h] [rbp-118h] BYREF
nglog::LogDestination *v9[12]; // [rsp+50h] [rbp-110h] BYREF
int v10; // [rsp+B4h] [rbp-ACh] BYREF
_BYTE v11[12]; // [rsp+B8h] [rbp-A8h] BYREF
_BYTE v12[8]; // [rsp+D0h] [rbp-90h] BYREF
_BYTE v13[8]; // [rsp+D8h] [rbp-88h] BYREF
nglog::LogDestination *v14[12]; // [rsp+E0h] [rbp-80h] BYREF
int ReferenceableValue; // [rsp+144h] [rbp-1Ch] BYREF
_BYTE v16[8]; // [rsp+148h] [rbp-18h] BYREF
char *v17; // [rsp+150h] [rbp-10h]
unsigned int v18; // [rsp+15Ch] [rbp-4h] BYREF
v18 = a1;
v17 = a2;
*(_QWORD *)v5 = nglog::internal::GetReferenceableValue<nglog::LogSeverity>(&v18);
ReferenceableValue = nglog::internal::GetReferenceableValue(0LL);
nglog::internal::Check_GEImpl<nglog::LogSeverity,int>(v16, *(_QWORD *)v5, &ReferenceableValue, "severity >= 0");
if ( std::unique_ptr<std::string>::operator bool((long long)v16) )
{
std::unique_ptr<std::string>::unique_ptr((long long)v12, (long long)v16);
nglog::internal::CheckOpString::CheckOpString((long long)v13, (long long)v12);
nglog::LogMessageFatal::LogMessageFatal(
v14,
(std::this_thread *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
0x291u,
(const nglog::internal::CheckOpString *)v13);
nglog::LogMessage::stream((nglog::LogMessage *)v14);
nglog::LogMessageFatal::~LogMessageFatal(v14);
}
std::unique_ptr<std::string>::~unique_ptr((long long)v16);
v4 = nglog::internal::GetReferenceableValue<nglog::LogSeverity>(&v18);
v10 = nglog::internal::GetReferenceableValue((nglog::internal *)&byte_4);
nglog::internal::Check_LTImpl<nglog::LogSeverity,int>(v11, v4, &v10, "severity < NUM_SEVERITIES");
if ( std::unique_ptr<std::string>::operator bool((long long)v11) )
{
std::unique_ptr<std::string>::unique_ptr((long long)v7, (long long)v11);
nglog::internal::CheckOpString::CheckOpString((long long)v8, (long long)v7);
nglog::LogMessageFatal::LogMessageFatal(
v9,
(std::this_thread *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
0x292u,
(const nglog::internal::CheckOpString *)v8);
nglog::LogMessage::stream((nglog::LogMessage *)v9);
nglog::LogMessageFatal::~LogMessageFatal(v9);
}
std::unique_ptr<std::string>::~unique_ptr((long long)v11);
std::lock_guard<std::mutex>::lock_guard(&v6, (std::mutex *)&nglog::log_mutex);
v3 = (nglog::_anonymous_namespace_::LogFileObject *)nglog::LogDestination::log_destination(v18);
nglog::`anonymous namespace'::LogFileObject::SetSymlinkBasename(v3, v17);
return std::lock_guard<std::mutex>::~lock_guard(&v6);
}
| SetLogSymlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x4]
CALL 0x00121e30
MOV qword ptr [RBP + -0x130],RAX
XOR EDI,EDI
CALL 0x0010cd50
MOV RSI,qword ptr [RBP + -0x130]
MOV dword ptr [RBP + -0x1c],EAX
LEA RDI,[RBP + -0x18]
LEA RDX,[RBP + -0x1c]
LEA RCX,[0x151f38]
CALL 0x00121dc0
LEA RDI,[RBP + -0x18]
CALL 0x0010cd60
TEST AL,0x1
JNZ 0x0011e3c2
LEA RDI,[RBP + -0x18]
CALL 0x0010ce00
JMP 0x0011e476
LAB_0011e3c2:
LEA RDI,[RBP + -0x90]
MOV qword ptr [RBP + -0x138],RDI
LEA RSI,[RBP + -0x18]
CALL 0x0010cd90
MOV RSI,qword ptr [RBP + -0x138]
LAB_0011e3e0:
LEA RDI,[RBP + -0x88]
CALL 0x0010cdc0
JMP 0x0011e3ee
LAB_0011e3ee:
LEA RSI,[0x1519ba]
LEA RDI,[RBP + -0x80]
MOV EDX,0x291
LEA RCX,[RBP + -0x88]
CALL 0x00118e90
JMP 0x0011e40c
LAB_0011e40c:
LEA RDI,[RBP + -0x80]
MOV qword ptr [RBP + -0x140],RDI
CALL 0x00114990
MOV RDI,qword ptr [RBP + -0x140]
CALL 0x00118ed0
LAB_0011e428:
JMP 0x0011e42a
LAB_0011e42a:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RBP + -0x98],RCX
MOV dword ptr [RBP + -0x9c],EAX
JMP 0x0011e45c
LAB_0011e45c:
LEA RDI,[RBP + -0x90]
CALL 0x0010ce00
LEA RDI,[RBP + -0x18]
CALL 0x0010ce00
JMP 0x0011e600
LAB_0011e476:
JMP 0x0011e478
LAB_0011e478:
LEA RDI,[RBP + -0x4]
CALL 0x00121e30
MOV qword ptr [RBP + -0x148],RAX
MOV EDI,0x4
CALL 0x0010cd50
MOV RSI,qword ptr [RBP + -0x148]
MOV dword ptr [RBP + -0xac],EAX
LEA RDI,[RBP + -0xa8]
LEA RDX,[RBP + -0xac]
LEA RCX,[0x151f46]
CALL 0x00121e40
LEA RDI,[RBP + -0xa8]
CALL 0x0010cd60
TEST AL,0x1
JNZ 0x0011e4da
LEA RDI,[RBP + -0xa8]
CALL 0x0010ce00
JMP 0x0011e597
LAB_0011e4da:
LEA RDI,[RBP + -0x120]
MOV qword ptr [RBP + -0x150],RDI
LEA RSI,[RBP + -0xa8]
CALL 0x0010cd90
MOV RSI,qword ptr [RBP + -0x150]
LAB_0011e4fb:
LEA RDI,[RBP + -0x118]
CALL 0x0010cdc0
JMP 0x0011e509
LAB_0011e509:
LEA RSI,[0x1519ba]
LEA RDI,[RBP + -0x110]
MOV EDX,0x292
LEA RCX,[RBP + -0x118]
CALL 0x00118e90
JMP 0x0011e52a
LAB_0011e52a:
LEA RDI,[RBP + -0x110]
MOV qword ptr [RBP + -0x158],RDI
CALL 0x00114990
MOV RDI,qword ptr [RBP + -0x158]
CALL 0x00118ed0
LAB_0011e549:
JMP 0x0011e54b
LAB_0011e54b:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RBP + -0x98],RCX
MOV dword ptr [RBP + -0x9c],EAX
JMP 0x0011e57d
LAB_0011e57d:
LEA RDI,[RBP + -0x120]
CALL 0x0010ce00
LEA RDI,[RBP + -0xa8]
CALL 0x0010ce00
JMP 0x0011e600
LAB_0011e597:
LEA RSI,[0x186f58]
LEA RDI,[RBP + -0x128]
CALL 0x0011d740
MOV EDI,dword ptr [RBP + -0x4]
LAB_0011e5ad:
CALL 0x0011e100
MOV qword ptr [RBP + -0x160],RAX
JMP 0x0011e5bb
LAB_0011e5bb:
MOV RDI,qword ptr [RBP + -0x160]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0011c420
LAB_0011e5cb:
JMP 0x0011e5cd
LAB_0011e5cd:
LEA RDI,[RBP + -0x128]
CALL 0x0011d770
ADD RSP,0x160
POP RBP
RET
LAB_0011e600:
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x00109d40
|
/* nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) */
void nglog::LogDestination::SetLogSymlink(int4 param_1,char *param_2)
{
bool bVar1;
LogSeverity *pLVar2;
LogFileObject *this;
int1 auVar3 [12];
lock_guard<std::mutex> local_130 [8];
unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> local_128 [8];
CheckOpString local_120 [8];
LogMessageFatal local_118 [100];
int local_b4;
internal local_b0 [12];
int4 local_a4;
int8 local_a0;
unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> local_98 [8];
CheckOpString local_90 [8];
LogMessageFatal local_88 [100];
int local_24;
internal local_20 [8];
char *local_18;
int4 local_c;
local_18 = param_2;
local_c = param_1;
pLVar2 = internal::GetReferenceableValue<nglog::LogSeverity>((LogSeverity *)&local_c);
local_24 = internal::GetReferenceableValue(0);
internal::Check_GEImpl<nglog::LogSeverity,int>(local_20,pLVar2,&local_24,"severity >= 0");
bVar1 = std::unique_ptr::operator_cast_to_bool((unique_ptr *)local_20);
if (bVar1) {
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::unique_ptr
(local_98,(unique_ptr *)local_20);
/* try { // try from 0011e3e0 to 0011e3eb has its CatchHandler @ 0011e42a */
internal::CheckOpString::CheckOpString(local_90,local_98);
/* try { // try from 0011e3ee to 0011e427 has its CatchHandler @ 0011e43e */
LogMessageFatal::LogMessageFatal
(local_88,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
0x291,local_90);
LogMessage::stream((LogMessage *)local_88);
auVar3 = LogMessageFatal::~LogMessageFatal(local_88);
local_a4 = auVar3._8_4_;
local_a0 = auVar3._0_8_;
/* catch() { ... } // from try @ 0011e3e0 with catch @ 0011e42a */
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
(local_98);
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
local_20);
}
else {
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
local_20);
pLVar2 = internal::GetReferenceableValue<nglog::LogSeverity>((LogSeverity *)&local_c);
local_b4 = internal::GetReferenceableValue(4);
internal::Check_LTImpl<nglog::LogSeverity,int>
(local_b0,pLVar2,&local_b4,"severity < NUM_SEVERITIES");
bVar1 = std::unique_ptr::operator_cast_to_bool((unique_ptr *)local_b0);
if (!bVar1) {
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
local_b0);
std::lock_guard<std::mutex>::lock_guard(local_130,(mutex *)log_mutex);
/* try { // try from 0011e5ad to 0011e5ca has its CatchHandler @ 0011e5e2 */
this = (LogFileObject *)log_destination(local_c);
(anonymous_namespace)::LogFileObject::SetSymlinkBasename(this,local_18);
std::lock_guard<std::mutex>::~lock_guard(local_130);
return;
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::unique_ptr
(local_128,(unique_ptr *)local_b0);
/* try { // try from 0011e4fb to 0011e506 has its CatchHandler @ 0011e54b */
internal::CheckOpString::CheckOpString(local_120,local_128);
/* try { // try from 0011e509 to 0011e548 has its CatchHandler @ 0011e55f */
LogMessageFatal::LogMessageFatal
(local_118,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
0x292,local_120);
LogMessage::stream((LogMessage *)local_118);
auVar3 = LogMessageFatal::~LogMessageFatal(local_118);
local_a4 = auVar3._8_4_;
local_a0 = auVar3._0_8_;
/* catch() { ... } // from try @ 0011e4fb with catch @ 0011e54b */
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
(local_128);
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
local_b0);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(local_a0);
}
|
|
2,431 | nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogSymlink(LogSeverity severity,
const char* symlink_basename) {
CHECK_GE(severity, 0);
CHECK_LT(severity, NUM_SEVERITIES);
std::lock_guard<std::mutex> l{log_mutex};
log_destination(severity)->fileobject_.SetSymlinkBasename(symlink_basename);
} | O1 | cpp | nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movl %edi, 0xc(%rsp)
movl $0x0, 0x28(%rsp)
testl %edi, %edi
js 0x1217d
movq $0x0, (%rsp)
cmpq $0x0, (%rsp)
jne 0x121b9
movl $0x4, 0x28(%rsp)
cmpl $0x3, 0xc(%rsp)
jg 0x1219b
movq $0x0, (%rsp)
cmpq $0x0, (%rsp)
jne 0x121f0
leaq 0x2ec85(%rip), %rdi # 0x40d48
callq 0x7840
testl %eax, %eax
jne 0x12227
movl 0xc(%rsp), %r12d
leaq 0x1fbb4(%rip), %rax # 0x31c90
leaq (%rax,%r12,8), %r14
cmpq $0x0, (%r14)
jne 0x12120
movl $0xd0, %edi
callq 0x9020
movq %rax, %r15
movq %rax, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0xa8c0
leaq 0x28(%rsp), %r12
movq $0x0, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x12cc4
movq %r12, %rdi
callq 0x118f0
movq (%r14), %r15
leaq 0x8(%r15), %r14
movq %r14, %rdi
callq 0x7840
testl %eax, %eax
jne 0x1222e
movq 0x60(%r15), %r12
addq $0x58, %r15
movq %rbx, %rdi
callq 0x71f0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x78b0
movq %r14, %rdi
callq 0x73e0
leaq 0x2ebdf(%rip), %rdi # 0x40d48
callq 0x73e0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x11ce3(%rip), %rcx # 0x23e67
movq %rsp, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x12d55
jmp 0x1208b
leaq 0x11cd3(%rip), %rcx # 0x23e75
movq %rsp, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x12d55
jmp 0x120b1
movq (%rsp), %rax
xorl %edx, %edx
movq %rdx, (%rsp)
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x20(%rsp)
leaq 0x1171b(%rip), %rsi # 0x238f2
leaq 0x28(%rsp), %rdi
movl $0x291, %edx # imm = 0x291
callq 0xf09a
leaq 0x28(%rsp), %rdi
callq 0xf0a0
movq (%rsp), %rax
xorl %edx, %edx
movq %rdx, (%rsp)
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x18(%rsp)
leaq 0x116e4(%rip), %rsi # 0x238f2
leaq 0x28(%rsp), %rdi
movl $0x292, %edx # imm = 0x292
callq 0xf09a
leaq 0x28(%rsp), %rdi
callq 0xf0a0
movl %eax, %edi
callq 0x7350
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x906c
jmp 0x122b7
movq %rax, %rbx
movq %r14, %rdi
callq 0x73e0
jmp 0x122b7
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x1226b
leaq 0x10(%rsp), %rdi
callq 0x12dd6
leaq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rsp, %rcx
callq 0x7cb7
jmp 0x122c3
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x1229b
leaq 0x10(%rsp), %rdi
callq 0x12dd6
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rsp, %rcx
callq 0x7c79
jmp 0x122c3
movq %rax, %rbx
leaq 0x2ea8a(%rip), %rdi # 0x40d48
callq 0x73e0
movq %rbx, %rdi
callq 0x79b0
nop
| _ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov rbx, rsi
mov [rsp+0A8h+var_9C], edi
mov [rsp+0A8h+var_80], 0
test edi, edi
js loc_1217D
mov [rsp+0A8h+var_A8], 0
loc_1208B:
cmp [rsp+0A8h+var_A8], 0
jnz loc_121B9
mov [rsp+0A8h+var_80], 4
cmp [rsp+0A8h+var_9C], 3
jg loc_1219B
mov [rsp+0A8h+var_A8], 0
loc_120B1:
cmp [rsp+0A8h+var_A8], 0
jnz loc_121F0
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_12227
mov r12d, [rsp+0A8h+var_9C]
lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea r14, [rax+r12*8]
cmp qword ptr [r14], 0
jnz short loc_12120
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax
mov esi, r12d
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
lea r12, [rsp+0A8h+var_80]
mov qword ptr [r12], 0
mov rdi, r14
mov rsi, r15
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r12
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
loc_12120:
mov r15, [r14]
lea r14, [r15+8]
mov rdi, r14
call _pthread_mutex_lock
test eax, eax
jnz loc_1222E
mov r12, [r15+60h]
add r15, 58h ; 'X'
mov rdi, rbx
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, rbx
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rdi, r14
call _pthread_mutex_unlock
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
loc_1217D:
lea rcx, aSeverity0; "severity >= 0"
mov rdi, rsp
lea rsi, [rsp+0A8h+var_9C]
lea rdx, [rsp+0A8h+var_80]
call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*)
jmp loc_1208B
loc_1219B:
lea rcx, aSeverityNumSev; "severity < NUM_SEVERITIES"
mov rdi, rsp
lea rsi, [rsp+0A8h+var_9C]
lea rdx, [rsp+0A8h+var_80]
call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*)
jmp loc_120B1
loc_121B9:
mov rax, [rsp+0A8h+var_A8]
xor edx, edx
mov [rsp+0A8h+var_A8], rdx
lea rcx, [rsp+0A8h+var_98]
mov [rcx], rax
mov [rsp+0A8h+var_88], rdx
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+0A8h+var_80]
mov edx, 291h
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
lea rdi, [rsp+0A8h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_121F0:
mov rax, [rsp+0A8h+var_A8]
xor edx, edx
mov [rsp+0A8h+var_A8], rdx
lea rcx, [rsp+0A8h+var_98]
mov [rcx], rax
mov [rsp+0A8h+var_90], rdx
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+0A8h+var_80]
mov edx, 292h
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
lea rdi, [rsp+0A8h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_12227:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_1222E:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r15; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_122B7
mov rbx, rax
mov rdi, r14
call _pthread_mutex_unlock
jmp short loc_122B7
mov rbx, rax
mov rsi, [rsp+0A8h+var_98]
test rsi, rsi
jz short loc_1226B
lea rdi, [rsp+0A8h+var_98]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_1226B:
lea rdi, [rsp+0A8h+var_98]
lea rsi, [rsp+0A8h+var_90]
lea rdx, [rsp+0A8h+var_80]
mov rcx, rsp
call _ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc_cold_2; nglog::LogDestination::SetLogSymlink(nglog::LogSeverity,char const*) [clone]
jmp short loc_122C3
mov rbx, rax
mov rsi, [rsp+0A8h+var_98]
test rsi, rsi
jz short loc_1229B
lea rdi, [rsp+0A8h+var_98]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_1229B:
lea rdi, [rsp+0A8h+var_98]
lea rsi, [rsp+0A8h+var_88]
lea rdx, [rsp+0A8h+var_80]
mov rcx, rsp
call _ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc_cold_1; nglog::LogDestination::SetLogSymlink(nglog::LogSeverity,char const*) [clone]
jmp short loc_122C3
mov rbx, rax
loc_122B7:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
loc_122C3:
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::SetLogSymlink(int a1, long long a2)
{
int v2; // eax
int v3; // r12d
long long *v4; // r14
long long v5; // r15
long long v6; // r15
long long v7; // r14
int v8; // eax
long long v9; // r12
long long v10; // rax
_QWORD *v12; // rax
_QWORD *v13; // rax
_QWORD *v14; // [rsp+0h] [rbp-A8h] BYREF
int v15; // [rsp+Ch] [rbp-9Ch] BYREF
_QWORD *v16[3]; // [rsp+10h] [rbp-98h] BYREF
nglog::LogDestination *v17[16]; // [rsp+28h] [rbp-80h] BYREF
v15 = a1;
LODWORD(v17[0]) = 0;
if ( a1 < 0 )
nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v15, v17, "severity >= 0");
else
v14 = 0LL;
if ( v14 )
{
v12 = v14;
v14 = 0LL;
v16[0] = v12;
v16[2] = 0LL;
nglog::LogMessageFatal::LogMessageFatal(
v17,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
657,
v16);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v17);
}
LODWORD(v17[0]) = 4;
if ( v15 > 3 )
nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v15, v17, "severity < NUM_SEVERITIES");
else
v14 = 0LL;
if ( v14 )
{
v13 = v14;
v14 = 0LL;
v16[0] = v13;
v16[1] = 0LL;
nglog::LogMessageFatal::LogMessageFatal(
v17,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
658,
v16);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v17);
}
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
v3 = v15;
v4 = (long long *)((char *)&nglog::LogDestination::log_destinations_ + 8 * (unsigned int)v15);
if ( !*v4 )
{
v5 = operator new(208LL);
nglog::LogDestination::LogDestination(v5, v3, 0LL);
v17[0] = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v4, v5);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(v17);
}
v6 = *v4;
v7 = *v4 + 8;
v8 = pthread_mutex_lock(v7);
if ( v8 )
std::__throw_system_error(v8);
v9 = *(_QWORD *)(v6 + 96);
v10 = strlen(a2);
std::string::_M_replace(v6 + 88, 0LL, v9, a2, v10);
pthread_mutex_unlock(v7);
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogSymlink:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RSI
MOV dword ptr [RSP + 0xc],EDI
MOV dword ptr [RSP + 0x28],0x0
TEST EDI,EDI
JS 0x0011217d
MOV qword ptr [RSP],0x0
LAB_0011208b:
CMP qword ptr [RSP],0x0
JNZ 0x001121b9
MOV dword ptr [RSP + 0x28],0x4
CMP dword ptr [RSP + 0xc],0x3
JG 0x0011219b
MOV qword ptr [RSP],0x0
LAB_001120b1:
CMP qword ptr [RSP],0x0
JNZ 0x001121f0
LEA RDI,[0x140d48]
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00112227
MOV R12D,dword ptr [RSP + 0xc]
LEA RAX,[0x131c90]
LEA R14,[RAX + R12*0x8]
CMP qword ptr [R14],0x0
JNZ 0x00112120
LAB_001120e6:
MOV EDI,0xd0
CALL 0x00109020
LAB_001120f0:
MOV R15,RAX
MOV RDI,RAX
MOV ESI,R12D
XOR EDX,EDX
CALL 0x0010a8c0
LEA R12,[RSP + 0x28]
MOV qword ptr [R12],0x0
MOV RDI,R14
MOV RSI,R15
CALL 0x00112cc4
MOV RDI,R12
CALL 0x001118f0
LAB_00112120:
MOV R15,qword ptr [R14]
LEA R14,[R15 + 0x8]
MOV RDI,R14
CALL 0x00107840
TEST EAX,EAX
JNZ 0x0011222e
MOV R12,qword ptr [R15 + 0x60]
ADD R15,0x58
MOV RDI,RBX
CALL 0x001071f0
LAB_00112147:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,RBX
MOV R8,RAX
CALL 0x001078b0
LAB_0011215a:
MOV RDI,R14
CALL 0x001073e0
LEA RDI,[0x140d48]
CALL 0x001073e0
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0011217d:
LEA RCX,[0x123e67]
MOV RDI,RSP
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x28]
CALL 0x00112d55
JMP 0x0011208b
LAB_0011219b:
LEA RCX,[0x123e75]
MOV RDI,RSP
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x28]
CALL 0x00112d55
JMP 0x001120b1
LAB_001121b9:
MOV RAX,qword ptr [RSP]
XOR EDX,EDX
MOV qword ptr [RSP],RDX
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
MOV qword ptr [RSP + 0x20],RDX
LAB_001121d0:
LEA RSI,[0x1238f2]
LEA RDI,[RSP + 0x28]
MOV EDX,0x291
CALL 0x0010f09a
LEA RDI,[RSP + 0x28]
CALL 0x0010f0a0
LAB_001121f0:
MOV RAX,qword ptr [RSP]
XOR EDX,EDX
MOV qword ptr [RSP],RDX
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
MOV qword ptr [RSP + 0x18],RDX
LAB_00112207:
LEA RSI,[0x1238f2]
LEA RDI,[RSP + 0x28]
MOV EDX,0x292
CALL 0x0010f09a
LEA RDI,[RSP + 0x28]
CALL 0x0010f0a0
LAB_00112227:
MOV EDI,EAX
CALL 0x00107350
LAB_0011222e:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) */
void nglog::LogDestination::SetLogSymlink(uint param_1,char *param_2)
{
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
long lVar1;
char *pcVar2;
int iVar3;
LogDestination *pLVar4;
ulong uVar5;
long local_a8;
uint local_9c;
long local_98 [3];
ulong local_80 [12];
local_80[0] = local_80[0] & 0xffffffff00000000;
local_9c = param_1;
if ((int)param_1 < 0) {
internal::MakeCheckOpString<nglog::LogSeverity,int>
((internal *)&local_a8,(LogSeverity *)&local_9c,(int *)local_80,"severity >= 0");
}
else {
local_a8 = 0;
}
lVar1 = local_a8;
if (local_a8 == 0) {
local_80[0] = CONCAT44(local_80[0]._4_4_,4);
if ((int)local_9c < 4) {
local_a8 = 0;
}
else {
internal::MakeCheckOpString<nglog::LogSeverity,int>
((internal *)&local_a8,(LogSeverity *)&local_9c,(int *)local_80,
"severity < NUM_SEVERITIES");
}
if (local_a8 == 0) {
iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar3 == 0) {
uVar5 = (ulong)local_9c;
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&log_destinations_ + uVar5);
if (*(long *)this == 0) {
/* try { // try from 001120e6 to 001120ef has its CatchHandler @ 001122b4 */
pLVar4 = (LogDestination *)operator_new(0xd0);
/* try { // try from 001120f0 to 001120ff has its CatchHandler @ 00112235 */
LogDestination(pLVar4,uVar5,0);
local_80[0] = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
reset(this,pLVar4);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>
*)local_80);
}
lVar1 = *(long *)this;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 8));
if (iVar3 == 0) {
pcVar2 = *(char **)(lVar1 + 0x60);
strlen(param_2);
/* try { // try from 00112147 to 00112159 has its CatchHandler @ 00112247 */
std::__cxx11::string::_M_replace(lVar1 + 0x58,0,pcVar2,(ulong)param_2);
pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 8));
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
/* try { // try from 0011222e to 00112234 has its CatchHandler @ 001122b4 */
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
goto LAB_00112227;
}
}
else {
local_a8 = 0;
local_98[0] = lVar1;
local_98[2] = 0;
/* try { // try from 001121d0 to 001121ef has its CatchHandler @ 00112284 */
LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_80,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x291,
(CheckOpString *)local_98);
LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80);
}
local_98[0] = local_a8;
local_a8 = 0;
local_98[1] = 0;
/* try { // try from 00112207 to 00112226 has its CatchHandler @ 00112254 */
LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_80,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x292,
(CheckOpString *)local_98);
iVar3 = LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80);
LAB_00112227:
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
|
|
2,432 | nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::SetLogSymlink(LogSeverity severity,
const char* symlink_basename) {
CHECK_GE(severity, 0);
CHECK_LT(severity, NUM_SEVERITIES);
std::lock_guard<std::mutex> l{log_mutex};
log_destination(severity)->fileobject_.SetSymlinkBasename(symlink_basename);
} | O3 | cpp | nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movl %edi, 0x4(%rsp)
movl $0x0, 0x18(%rsp)
testl %edi, %edi
js 0x11e4c
movl $0x4, 0x18(%rsp)
cmpl $0x3, %edi
jg 0x11e7b
leaq 0x2efb6(%rip), %rdi # 0x40d48
callq 0x7840
testl %eax, %eax
jne 0x11ed6
movl 0x4(%rsp), %r14d
leaq 0x1fee5(%rip), %r12 # 0x31c90
movq (%r12,%r14,8), %r15
testq %r15, %r15
jne 0x11df5
movl $0xd0, %edi
callq 0x8eb0
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xa6c4
leaq (%r12,%r14,8), %r14
leaq 0x18(%rsp), %r12
movq $0x0, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x129ba
movq %r12, %rdi
callq 0x115d4
movq (%r14), %r15
leaq 0x8(%r15), %r14
movq %r14, %rdi
callq 0x7840
testl %eax, %eax
jne 0x11edd
movq 0x60(%r15), %r12
addq $0x58, %r15
movq %rbx, %rdi
callq 0x71f0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x78b0
movq %r14, %rdi
callq 0x73e0
leaq 0x2ef0d(%rip), %rdi # 0x40d48
callq 0x73e0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x11ff9(%rip), %rcx # 0x23e4c
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x12a4b
movq (%r14), %rax
testq %rax, %rax
jne 0x11ee4
movl 0x4(%rsp), %edi
jmp 0x11d7a
leaq 0x11fd8(%rip), %rcx # 0x23e5a
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x12a4b
movq (%r14), %rax
testq %rax, %rax
je 0x11d8b
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x11a1d(%rip), %rsi # 0x238da
leaq 0x18(%rsp), %rdi
movl $0x292, %edx # imm = 0x292
callq 0xee78
leaq 0x18(%rsp), %rdi
callq 0xee7e
movl %eax, %edi
callq 0x7350
movl %eax, %edi
callq 0x7350
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x119de(%rip), %rsi # 0x238da
leaq 0x18(%rsp), %rdi
movl $0x291, %edx # imm = 0x291
callq 0xee78
leaq 0x18(%rsp), %rdi
callq 0xee7e
jmp 0x11f17
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x11f2e
leaq 0x10(%rsp), %rdi
callq 0x12acc
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x11f72
leaq 0x8(%rsp), %rdi
callq 0x12acc
jmp 0x11f72
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x8efc
jmp 0x11f66
movq %rax, %rbx
movq %r14, %rdi
callq 0x73e0
jmp 0x11f66
movq %rax, %rbx
leaq 0x2eddb(%rip), %rdi # 0x40d48
callq 0x73e0
movq %rbx, %rdi
callq 0x79b0
| _ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc:
push r15
push r14
push r12
push rbx
sub rsp, 78h
mov rbx, rsi
mov [rsp+98h+var_94], edi
mov [rsp+98h+var_80], 0
test edi, edi
js loc_11E4C
loc_11D7A:
mov [rsp+98h+var_80], 4
cmp edi, 3
jg loc_11E7B
loc_11D8B:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_11ED6
mov r14d, [rsp+98h+var_94]
lea r12, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
mov r15, [r12+r14*8]
test r15, r15
jnz short loc_11DF5
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax
mov esi, r14d
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
lea r14, [r12+r14*8]
lea r12, [rsp+98h+var_80]
mov qword ptr [r12], 0
mov rdi, r14
mov rsi, r15
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r12
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
mov r15, [r14]
loc_11DF5:
lea r14, [r15+8]
mov rdi, r14
call _pthread_mutex_lock
test eax, eax
jnz loc_11EDD
mov r12, [r15+60h]
add r15, 58h ; 'X'
mov rdi, rbx
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, rbx
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rdi, r14
call _pthread_mutex_unlock
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 78h
pop rbx
pop r12
pop r14
pop r15
retn
loc_11E4C:
lea rcx, aSeverity0; "severity >= 0"
lea r14, [rsp+98h+var_90]
lea rsi, [rsp+98h+var_94]
lea rdx, [rsp+98h+var_80]
mov rdi, r14
call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*)
mov rax, [r14]
test rax, rax
jnz short loc_11EE4
mov edi, [rsp+98h+var_94]
jmp loc_11D7A
loc_11E7B:
lea rcx, aSeverityNumSev; "severity < NUM_SEVERITIES"
lea r14, [rsp+98h+var_90]
lea rsi, [rsp+98h+var_94]
lea rdx, [rsp+98h+var_80]
mov rdi, r14
call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*)
mov rax, [r14]
test rax, rax
jz loc_11D8B
mov [rsp+98h+var_90], 0
lea rcx, [rsp+98h+var_88]
mov [rcx], rax
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+98h+var_80]
mov edx, 292h
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
lea rdi, [rsp+98h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
loc_11ED6:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_11EDD:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_11EE4:
mov [rsp+98h+var_90], 0
lea rcx, [rsp+98h+var_88]
mov [rcx], rax
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+98h+var_80]
mov edx, 291h
call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&)
lea rdi, [rsp+98h+var_80]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
jmp short $+2
loc_11F17:
mov rbx, rax
mov rsi, [rsp+98h+var_88]
test rsi, rsi
jz short loc_11F2E
lea rdi, [rsp+98h+var_88]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_11F2E:
mov rsi, [rsp+98h+var_90]
test rsi, rsi
jz short loc_11F72
lea rdi, [rsp+98h+var_90]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp short loc_11F72
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r15; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_11F66
mov rbx, rax
mov rdi, r14
call _pthread_mutex_unlock
jmp short loc_11F66
mov rbx, rax
loc_11F66:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
loc_11F72:
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::SetLogSymlink(int a1, long long a2)
{
int v2; // eax
long long v3; // r14
long long v4; // r15
long long v5; // r15
long long *v6; // r14
int v7; // eax
long long v8; // r12
long long v9; // rax
_QWORD *v11; // rax
_QWORD *v12; // rax
unsigned int v13; // [rsp+4h] [rbp-94h] BYREF
_QWORD *v14; // [rsp+8h] [rbp-90h] BYREF
_QWORD *v15; // [rsp+10h] [rbp-88h] BYREF
nglog::LogDestination *v16[16]; // [rsp+18h] [rbp-80h] BYREF
v13 = a1;
LODWORD(v16[0]) = 0;
if ( a1 < 0 )
{
nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v13, v16, "severity >= 0");
v11 = v14;
if ( v14 )
{
v14 = 0LL;
v15 = v11;
nglog::LogMessageFatal::LogMessageFatal(
v16,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
657,
&v15);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v16);
}
a1 = v13;
}
LODWORD(v16[0]) = 4;
if ( a1 > 3 )
{
nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v13, v16, "severity < NUM_SEVERITIES");
v12 = v14;
if ( v14 )
{
v14 = 0LL;
v15 = v12;
nglog::LogMessageFatal::LogMessageFatal(
v16,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
658,
&v15);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v16);
}
}
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
v3 = v13;
v4 = nglog::LogDestination::log_destinations_[v13];
if ( !v4 )
{
v5 = operator new(208LL);
nglog::LogDestination::LogDestination(v5, v3, 0LL);
v6 = &nglog::LogDestination::log_destinations_[v3];
v16[0] = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v6, v5);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(v16);
v4 = *v6;
}
v7 = pthread_mutex_lock(v4 + 8);
if ( v7 )
std::__throw_system_error(v7);
v8 = *(_QWORD *)(v4 + 96);
v9 = strlen(a2);
std::string::_M_replace(v4 + 88, 0LL, v8, a2, v9);
pthread_mutex_unlock(v4 + 8);
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetLogSymlink:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RSI
MOV dword ptr [RSP + 0x4],EDI
MOV dword ptr [RSP + 0x18],0x0
TEST EDI,EDI
JS 0x00111e4c
LAB_00111d7a:
MOV dword ptr [RSP + 0x18],0x4
CMP EDI,0x3
JG 0x00111e7b
LAB_00111d8b:
LEA RDI,[0x140d48]
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00111ed6
MOV R14D,dword ptr [RSP + 0x4]
LEA R12,[0x131c90]
MOV R15,qword ptr [R12 + R14*0x8]
TEST R15,R15
JNZ 0x00111df5
LAB_00111db4:
MOV EDI,0xd0
CALL 0x00108eb0
LAB_00111dbe:
MOV R15,RAX
MOV RDI,RAX
MOV ESI,R14D
XOR EDX,EDX
CALL 0x0010a6c4
LEA R14,[R12 + R14*0x8]
LEA R12,[RSP + 0x18]
MOV qword ptr [R12],0x0
MOV RDI,R14
MOV RSI,R15
CALL 0x001129ba
MOV RDI,R12
CALL 0x001115d4
MOV R15,qword ptr [R14]
LAB_00111df5:
LEA R14,[R15 + 0x8]
MOV RDI,R14
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00111edd
MOV R12,qword ptr [R15 + 0x60]
ADD R15,0x58
MOV RDI,RBX
CALL 0x001071f0
LAB_00111e19:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,RBX
MOV R8,RAX
CALL 0x001078b0
LAB_00111e2c:
MOV RDI,R14
CALL 0x001073e0
LEA RDI,[0x140d48]
CALL 0x001073e0
ADD RSP,0x78
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00111e4c:
LEA RCX,[0x123e4c]
LEA R14,[RSP + 0x8]
LEA RSI,[RSP + 0x4]
LEA RDX,[RSP + 0x18]
MOV RDI,R14
CALL 0x00112a4b
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JNZ 0x00111ee4
MOV EDI,dword ptr [RSP + 0x4]
JMP 0x00111d7a
LAB_00111e7b:
LEA RCX,[0x123e5a]
LEA R14,[RSP + 0x8]
LEA RSI,[RSP + 0x4]
LEA RDX,[RSP + 0x18]
MOV RDI,R14
CALL 0x00112a4b
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JZ 0x00111d8b
MOV qword ptr [RSP + 0x8],0x0
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
LAB_00111eb6:
LEA RSI,[0x1238da]
LEA RDI,[RSP + 0x18]
MOV EDX,0x292
CALL 0x0010ee78
LEA RDI,[RSP + 0x18]
CALL 0x0010ee7e
LAB_00111ed6:
MOV EDI,EAX
CALL 0x00107350
LAB_00111edd:
MOV EDI,EAX
CALL 0x00107350
LAB_00111ee4:
MOV qword ptr [RSP + 0x8],0x0
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
LAB_00111ef5:
LEA RSI,[0x1238da]
LEA RDI,[RSP + 0x18]
MOV EDX,0x291
CALL 0x0010ee78
LEA RDI,[RSP + 0x18]
CALL 0x0010ee7e
LAB_00111f15:
JMP 0x00111f17
LAB_00111f17:
MOV RBX,RAX
MOV RSI,qword ptr [RSP + 0x10]
TEST RSI,RSI
JZ 0x00111f2e
LEA RDI,[RSP + 0x10]
CALL 0x00112acc
LAB_00111f2e:
MOV RSI,qword ptr [RSP + 0x8]
TEST RSI,RSI
JZ 0x00111f72
LEA RDI,[RSP + 0x8]
CALL 0x00112acc
JMP 0x00111f72
LAB_00111f72:
MOV RDI,RBX
CALL 0x001079b0
|
/* nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) */
void nglog::LogDestination::SetLogSymlink(uint param_1,char *param_2)
{
char *pcVar1;
string *psVar2;
int iVar3;
LogDestination *pLVar4;
int8 uVar5;
ulong uVar6;
long lVar7;
uint local_94;
string *local_90;
string *local_88;
ulong local_80 [12];
local_80[0] = local_80[0] & 0xffffffff00000000;
local_94 = param_1;
if (((int)param_1 < 0) &&
(internal::MakeCheckOpString<nglog::LogSeverity,int>
((internal *)&local_90,(LogSeverity *)&local_94,(int *)local_80,"severity >= 0"),
psVar2 = local_90, local_90 != (string *)0x0)) {
local_90 = (string *)0x0;
local_88 = psVar2;
/* try { // try from 00111ef5 to 00111f14 has its CatchHandler @ 00111f15 */
LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_80,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x291,
(CheckOpString *)&local_88);
uVar5 = LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80);
/* catch() { ... } // from try @ 00111ef5 with catch @ 00111f15 */
/* catch() { ... } // from try @ 00111eb6 with catch @ 00111f17 */
if (local_88 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_88,local_88);
}
if (local_90 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_90,local_90);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
local_80[0] = CONCAT44(local_80[0]._4_4_,4);
if (((int)local_94 < 4) ||
(internal::MakeCheckOpString<nglog::LogSeverity,int>
((internal *)&local_90,(LogSeverity *)&local_94,(int *)local_80,
"severity < NUM_SEVERITIES"), psVar2 = local_90, local_90 == (string *)0x0)) {
iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar3 == 0) {
uVar6 = (ulong)local_94;
lVar7 = (&log_destinations_)[uVar6];
if (lVar7 == 0) {
/* try { // try from 00111db4 to 00111dbd has its CatchHandler @ 00111f63 */
pLVar4 = (LogDestination *)operator_new(0xd0);
/* try { // try from 00111dbe to 00111dcd has its CatchHandler @ 00111f44 */
LogDestination(pLVar4,uVar6,0);
local_80[0] = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
reset((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&log_destinations_ + uVar6),pLVar4);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
local_80);
lVar7 = *(long *)(&log_destinations_ + uVar6);
}
iVar3 = pthread_mutex_lock((pthread_mutex_t *)(lVar7 + 8));
if (iVar3 != 0) {
/* try { // try from 00111edd to 00111ee3 has its CatchHandler @ 00111f63 */
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
pcVar1 = *(char **)(lVar7 + 0x60);
strlen(param_2);
/* try { // try from 00111e19 to 00111e2b has its CatchHandler @ 00111f56 */
std::__cxx11::string::_M_replace(lVar7 + 0x58,0,pcVar1,(ulong)param_2);
pthread_mutex_unlock((pthread_mutex_t *)(lVar7 + 8));
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
}
else {
local_90 = (string *)0x0;
local_88 = psVar2;
/* try { // try from 00111eb6 to 00111ed5 has its CatchHandler @ 00111f17 */
LogMessageFatal::LogMessageFatal
((LogMessageFatal *)local_80,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x292,
(CheckOpString *)&local_88);
iVar3 = LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80);
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
|
|
2,433 | minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, 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&) const | llama.cpp/common/minja/chat-template.hpp | std::string try_raw_render(
const nlohmann::ordered_json & messages,
const nlohmann::ordered_json & tools,
bool add_generation_prompt,
const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const
{
try {
chat_template_inputs inputs;
inputs.messages = messages;
inputs.tools = tools;
inputs.add_generation_prompt = add_generation_prompt;
inputs.extra_context = extra_context;
// Use fixed date for tests
inputs.now = std::chrono::system_clock::from_time_t(0);
chat_template_options opts;
opts.apply_polyfills = false;
auto prompt = apply(inputs, opts);
// fprintf(stderr, "try_raw_render: %s\n", prompt.c_str());
return prompt;
} catch (const std::exception & e) {
// fprintf(stderr, "try_raw_render error: %s\n", e.what());
return "";
}
} | O3 | cpp | minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, 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&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
xorl %r13d, %r13d
leaq 0x48(%rsp), %r14
movb %r13b, (%r14)
movq %r13, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x84be0
movq %r14, %rdi
movl $0x1, %esi
callq 0x84be0
leaq 0x58(%rsp), %r14
movb %r13b, (%r14)
movq %r13, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x84be0
movq %r14, %rdi
movl $0x1, %esi
callq 0x84be0
movb $0x1, 0x10(%r14)
leaq 0x70(%rsp), %r12
movb %r13b, (%r12)
movq %r13, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x84be0
movq %r12, %rdi
movl $0x1, %esi
callq 0x84be0
callq 0x20c60
movq %rax, 0x10(%r12)
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x88e2e
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %r15
movq %r15, %rsi
callq 0x86d4c
movq %r15, %rdi
xorl %esi, %esi
callq 0x84be0
movq %r15, %rdi
callq 0x892fa
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x88e2e
leaq 0x28(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x86d4c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x84be0
movq %rbx, %rdi
callq 0x892fa
movb %bpl, 0x68(%rsp)
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x88e2e
leaq 0x18(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x86d4c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x84be0
movq %rbx, %rdi
callq 0x892fa
leaq 0x48(%rsp), %rdx
movq $0x0, 0x38(%rdx)
movabsq $0x101010101010101, %rax # imm = 0x101010101010101
leaq 0x8d(%rsp), %rcx
movq %rax, 0x1(%rcx)
movw $0x101, 0x9(%rcx) # imm = 0x101
movb $0x0, (%rcx)
movq (%rsp), %r15
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0xb205e
movq %r12, %rdi
xorl %esi, %esi
callq 0x84be0
movq %r12, %rdi
callq 0x892fa
movq %r14, %rdi
xorl %esi, %esi
callq 0x84be0
movq %r14, %rdi
callq 0x892fa
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x84be0
movq %rbx, %rdi
callq 0x892fa
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd9d65
movq %rdx, %r14
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb4bae
cmpl $0x1, %r14d
jne 0xd9db0
movq %rbx, %rdi
callq 0x200b0
movq (%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x4608c(%rip), %rdx # 0x11fe21
movq %rdx, %rsi
callq 0x287ce
callq 0x20d60
movq (%rsp), %r15
jmp 0xd9d4e
movq %rax, %rbx
callq 0x20d60
movq %rbx, %rdi
callq 0x20b00
movq %rax, %rdi
callq 0x27eb7
| _ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov [rsp+0C8h+var_B8], r9
mov ebp, r8d
mov rbx, rcx
mov r15, rdx
mov [rsp+0C8h+var_C0], rsi
mov [rsp+0C8h+var_C8], rdi
xor r13d, r13d
lea r14, [rsp+0C8h+var_80]
mov [r14], r13b
mov [r14+8], r13
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)
lea r14, [rsp+0C8h+var_70]
mov [r14], r13b
mov [r14+8], r13
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 byte ptr [r14+10h], 1
lea r12, [rsp+0C8h+var_58]
mov [r12], r13b
mov [r12+8], r13
mov rdi, r12
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, r12; this
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)
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [r12+10h], rax
lea rdi, [rsp+0C8h+var_90]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rdi, [rsp+0C8h+var_80]
lea r15, [rsp+0C8h+var_90]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0C8h+var_A0]
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rbx, [rsp+0C8h+var_A0]
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov [rsp+0C8h+var_60], bpl
lea rdi, [rsp+0C8h+var_B0]
mov rsi, [rsp+0C8h+var_B8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
lea rbx, [rsp+0C8h+var_B0]
mov rdi, r12
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdx, [rsp+0C8h+var_80]
mov qword ptr [rdx+38h], 0
mov rax, 101010101010101h
lea rcx, [rsp+0C8h+var_3B]
mov [rcx+1], rax
mov word ptr [rcx+9], 101h
mov byte ptr [rcx], 0
mov r15, [rsp+0C8h+var_C8]
mov rdi, r15
mov rsi, [rsp+0C8h+var_C0]
call _ZNK5minja13chat_template5applyB5cxx11ERKNS_20chat_template_inputsERKNS_21chat_template_optionsE; minja::chat_template::apply(minja::chat_template_inputs const&,minja::chat_template_options const&)
mov rdi, r12
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, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r14
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()
lea rbx, [rsp+0C8h+var_80]
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_D9D4E:
mov rax, r15
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_D9D65:
mov r14, rdx
mov rbx, rax
lea rdi, [rsp+0C8h+var_80]; this
call _ZN5minja20chat_template_inputsD2Ev; minja::chat_template_inputs::~chat_template_inputs()
cmp r14d, 1
jnz short loc_D9DB0
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rdi, [rsp+0C8h+var_C8]
lea rax, [rdi+10h]
mov [rdi], rax
lea rdx, aExampleToolCal+1Dh; ""
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
call ___cxa_end_catch
mov r15, [rsp+0C8h+var_C8]
jmp short loc_D9D4E
mov rbx, rax
call ___cxa_end_catch
loc_D9DB0:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long minja::chat_template::try_raw_render(
long long a1,
long long a2,
unsigned __int8 *a3,
unsigned __int8 *a4,
char a5,
unsigned __int8 *a6)
{
unsigned __int8 v11[16]; // [rsp+18h] [rbp-B0h] BYREF
unsigned __int8 v12[16]; // [rsp+28h] [rbp-A0h] BYREF
unsigned __int8 v13[16]; // [rsp+38h] [rbp-90h] BYREF
char v14[8]; // [rsp+48h] [rbp-80h] BYREF
long long v15; // [rsp+50h] [rbp-78h]
char v16[8]; // [rsp+58h] [rbp-70h] BYREF
long long v17; // [rsp+60h] [rbp-68h]
char v18; // [rsp+68h] [rbp-60h]
char v19[8]; // [rsp+70h] [rbp-58h] BYREF
long long v20; // [rsp+78h] [rbp-50h]
long long v21; // [rsp+80h] [rbp-48h]
char v22; // [rsp+8Dh] [rbp-3Bh] BYREF
long long v23; // [rsp+8Eh] [rbp-3Ah]
__int16 v24; // [rsp+96h] [rbp-32h]
v14[0] = 0;
v15 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v14);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v14);
v16[0] = 0;
v17 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16);
v18 = 1;
v19[0] = 0;
v20 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19);
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(v19);
v21 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v13,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
(long long)v14,
(long long)v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v12,
a4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
(long long)v16,
(long long)v12);
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 *)v12);
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(v12);
v18 = a5;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v11,
a6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
(long long)v19,
(long long)v11);
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 *)v11);
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(v11);
v21 = 0LL;
v23 = 0x101010101010101LL;
v24 = 257;
v22 = 0;
minja::chat_template::apply[abi:cxx11](a1, a2, (long long)v14, (long long)&v22);
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(v19);
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(v19);
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(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v14);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v14);
return a1;
}
| try_raw_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV qword ptr [RSP + 0x10],R9
MOV EBP,R8D
MOV RBX,RCX
MOV R15,RDX
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP],RDI
XOR R13D,R13D
LEA R14,[RSP + 0x48]
MOV byte ptr [R14],R13B
MOV qword ptr [R14 + 0x8],R13
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184be0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184be0
LEA R14,[RSP + 0x58]
MOV byte ptr [R14],R13B
MOV qword ptr [R14 + 0x8],R13
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184be0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184be0
MOV byte ptr [R14 + 0x10],0x1
LEA R12,[RSP + 0x70]
MOV byte ptr [R12],R13B
MOV qword ptr [R12 + 0x8],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x00184be0
MOV RDI,R12
MOV ESI,0x1
CALL 0x00184be0
CALL 0x00120c60
MOV qword ptr [R12 + 0x10],RAX
LAB_001d9c40:
LEA RDI,[RSP + 0x38]
MOV RSI,R15
CALL 0x00188e2e
LEA RDI,[RSP + 0x48]
LEA R15,[RSP + 0x38]
MOV RSI,R15
CALL 0x00186d4c
MOV RDI,R15
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,R15
CALL 0x001892fa
LEA RDI,[RSP + 0x28]
MOV RSI,RBX
CALL 0x00188e2e
LEA RBX,[RSP + 0x28]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00186d4c
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,RBX
CALL 0x001892fa
MOV byte ptr [RSP + 0x68],BPL
LEA RDI,[RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00188e2e
LEA RBX,[RSP + 0x18]
MOV RDI,R12
MOV RSI,RBX
CALL 0x00186d4c
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,RBX
CALL 0x001892fa
LEA RDX,[RSP + 0x48]
MOV qword ptr [RDX + 0x38],0x0
MOV RAX,0x101010101010101
LEA RCX,[RSP + 0x8d]
MOV qword ptr [RCX + 0x1],RAX
MOV word ptr [RCX + 0x9],0x101
MOV byte ptr [RCX],0x0
LAB_001d9d02:
MOV R15,qword ptr [RSP]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001b205e
LAB_001d9d13:
MOV RDI,R12
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,R12
CALL 0x001892fa
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,R14
CALL 0x001892fa
LEA RBX,[RSP + 0x48]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,RBX
CALL 0x001892fa
LAB_001d9d4e:
MOV RAX,R15
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, bool,
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&) const */
basic_json *
minja::chat_template::try_raw_render
(basic_json *param_1,basic_json *param_2,bool param_3,basic_json *param_4)
{
int7 in_register_00000011;
bool bVar1;
bool bVar2;
basic_json *in_R9;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_b0 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_a0 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_90 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_80 [8];
int8 local_78;
data local_70 [8];
int8 local_68;
int1 local_60;
data local_58 [8];
int8 local_50;
int8 local_48;
int1 local_3b;
int8 local_3a;
int2 local_32;
local_80[0] = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
local_78 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_80,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_80,0));
local_70[0] = (data)0x0;
local_68 = 0;
bVar1 = SUB81(local_70,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar1);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar1);
local_60 = 1;
local_58[0] = (data)0x0;
local_50 = 0;
bVar2 = SUB81(local_58,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar2);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar2);
local_48 = std::chrono::_V2::system_clock::now();
/* try { // try from 001d9c40 to 001d9cb3 has its CatchHandler @ 001d9d65 */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_90,(basic_json *)CONCAT71(in_register_00000011,param_3));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(local_80,(data *)local_90);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_90);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_a0,param_4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_70,(data *)local_a0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_a0,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_a0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_b0,in_R9);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_58,(data *)local_b0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_b0,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_b0);
local_48 = 0;
local_3a = 0x101010101010101;
local_32 = 0x101;
local_3b = 0;
/* try { // try from 001d9d02 to 001d9d12 has its CatchHandler @ 001d9d63 */
apply_abi_cxx11_((chat_template_inputs *)param_1,(chat_template_options *)param_2);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar2);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_58);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar1);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_70);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_80,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_80);
return param_1;
}
|
|
2,434 | ft_simple_get_word | eloqsql/storage/myisam/ft_parser.c | uchar ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end,
FT_WORD *word, my_bool skip_stopwords)
{
uchar *doc= *start;
uint mwc, length;
int mbl;
int ctype;
DBUG_ENTER("ft_simple_get_word");
do
{
for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
if (doc >= end)
DBUG_RETURN(0);
mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
break;
}
mwc= length= 0;
for (word->pos= doc; doc < end; length++,
doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
mwc= 0;
else if (!misc_word_char(*doc) || mwc)
break;
else
mwc++;
}
word->len= (uint)(doc-word->pos) - mwc;
if (skip_stopwords == FALSE ||
(length >= ft_min_word_len && length < ft_max_word_len &&
!is_stopword((char*) word->pos, word->len)))
{
*start= doc;
DBUG_RETURN(1);
}
} while (doc < end);
DBUG_RETURN(0);
} | O0 | c | ft_simple_get_word:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xa40db
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0xa40f0
jmp 0xa40e7
movb $0x0, -0x1(%rbp)
jmp 0xa42b3
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
movl -0x48(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0xa412b
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5f, %eax
jne 0xa412d
jmp 0xa4173
jmp 0xa412f
cmpl $0x0, -0x44(%rbp)
jle 0xa413d
movl -0x44(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0xa415d
cmpl $0x0, -0x44(%rbp)
jge 0xa414d
xorl %eax, %eax
subl -0x44(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0xa4157
movl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0xa4157
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0xa40db
movl $0x0, -0x40(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xa422f
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
movl -0x48(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0xa41d5
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5f, %eax
jne 0xa41de
movl $0x0, -0x3c(%rbp)
jmp 0xa41e0
jmp 0xa422f
jmp 0xa41e2
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x44(%rbp)
jle 0xa41f9
movl -0x44(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0xa4219
cmpl $0x0, -0x44(%rbp)
jge 0xa4209
xorl %eax, %eax
subl -0x44(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xa4213
movl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0xa4213
movl -0x58(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0xa418c
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
subl -0x3c(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0xa428c
movl -0x40(%rbp), %eax
leaq 0x225151(%rip), %rcx # 0x2c93b0
cmpq (%rcx), %rax
jb 0xa429d
movl -0x40(%rbp), %eax
leaq 0x22514a(%rip), %rcx # 0x2c93b8
cmpq (%rcx), %rax
jae 0xa429d
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x9fdb0
cmpl $0x0, %eax
jne 0xa429d
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xa42b3
jmp 0xa429f
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0xa40d9
jmp 0xa42af
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| ft_simple_get_word:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r8b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_29], al
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_38], rax
loc_A40D9:
jmp short $+2
loc_A40DB:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jb short loc_A40F0
jmp short $+2
loc_A40E7:
mov [rbp+var_1], 0
jmp loc_A42B3
loc_A40F0:
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+38h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_44], eax
mov eax, [rbp+var_48]
and eax, 7
cmp eax, 0
jnz short loc_A412B
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 5Fh ; '_'
jnz short loc_A412D
loc_A412B:
jmp short loc_A4173
loc_A412D:
jmp short $+2
loc_A412F:
cmp [rbp+var_44], 0
jle short loc_A413D
mov eax, [rbp+var_44]
mov [rbp+var_4C], eax
jmp short loc_A415D
loc_A413D:
cmp [rbp+var_44], 0
jge short loc_A414D
xor eax, eax
sub eax, [rbp+var_44]
mov [rbp+var_50], eax
jmp short loc_A4157
loc_A414D:
mov eax, 1
mov [rbp+var_50], eax
jmp short $+2
loc_A4157:
mov eax, [rbp+var_50]
mov [rbp+var_4C], eax
loc_A415D:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_A40DB
loc_A4173:
mov [rbp+var_40], 0
mov [rbp+var_3C], 0
mov rcx, [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_A418C:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jnb loc_A422F
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+38h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_44], eax
mov eax, [rbp+var_48]
and eax, 7
cmp eax, 0
jnz short loc_A41D5
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 5Fh ; '_'
jnz short loc_A41DE
loc_A41D5:
mov [rbp+var_3C], 0
jmp short loc_A41E0
loc_A41DE:
jmp short loc_A422F
loc_A41E0:
jmp short $+2
loc_A41E2:
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
cmp [rbp+var_44], 0
jle short loc_A41F9
mov eax, [rbp+var_44]
mov [rbp+var_54], eax
jmp short loc_A4219
loc_A41F9:
cmp [rbp+var_44], 0
jge short loc_A4209
xor eax, eax
sub eax, [rbp+var_44]
mov [rbp+var_58], eax
jmp short loc_A4213
loc_A4209:
mov eax, 1
mov [rbp+var_58], eax
jmp short $+2
loc_A4213:
mov eax, [rbp+var_58]
mov [rbp+var_54], eax
loc_A4219:
mov ecx, [rbp+var_54]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_A418C
loc_A422F:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rcx, [rcx]
sub rax, rcx
sub eax, [rbp+var_3C]
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+10h], rcx
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_A428C
mov eax, [rbp+var_40]
lea rcx, ft_min_word_len
cmp rax, [rcx]
jb short loc_A429D
mov eax, [rbp+var_40]
lea rcx, ft_max_word_len
cmp rax, [rcx]
jnb short loc_A429D
mov rax, [rbp+var_28]
mov rdi, [rax]
mov rax, [rbp+var_28]
mov rsi, [rax+10h]
call is_stopword
cmp eax, 0
jnz short loc_A429D
loc_A428C:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_1], 1
jmp short loc_A42B3
loc_A429D:
jmp short $+2
loc_A429F:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jb loc_A40D9
jmp short $+2
loc_A42AF:
mov [rbp+var_1], 0
loc_A42B3:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long *a4, char a5)
{
int v6; // [rsp+8h] [rbp-58h]
int v7; // [rsp+Ch] [rbp-54h]
int v8; // [rsp+10h] [rbp-50h]
int v9; // [rsp+14h] [rbp-4Ch]
int v10; // [rsp+18h] [rbp-48h] BYREF
int v11; // [rsp+1Ch] [rbp-44h]
unsigned int v12; // [rsp+20h] [rbp-40h]
int v13; // [rsp+24h] [rbp-3Ch]
_BYTE *v14; // [rsp+28h] [rbp-38h]
char v15; // [rsp+37h] [rbp-29h]
long long *v16; // [rsp+38h] [rbp-28h]
unsigned long long v17; // [rsp+40h] [rbp-20h]
_QWORD *v18; // [rsp+48h] [rbp-18h]
long long v19; // [rsp+50h] [rbp-10h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v14 = *a2;
do
{
while ( 1 )
{
if ( (unsigned long long)v14 >= v17 )
return 0;
v11 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v19 + 184) + 56LL))(
v19,
&v10,
v14,
v17);
if ( (v10 & 7) != 0 || *v14 == 95 )
break;
if ( v11 <= 0 )
{
if ( v11 >= 0 )
v8 = 1;
else
v8 = -v11;
v9 = v8;
}
else
{
v9 = v11;
}
v14 += v9;
}
v12 = 0;
v13 = 0;
*v16 = (long long)v14;
while ( (unsigned long long)v14 < v17 )
{
v11 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v19 + 184) + 56LL))(
v19,
&v10,
v14,
v17);
if ( (v10 & 7) == 0 && *v14 != 95 )
break;
v13 = 0;
++v12;
if ( v11 <= 0 )
{
if ( v11 >= 0 )
v6 = 1;
else
v6 = -v11;
v7 = v6;
}
else
{
v7 = v11;
}
v14 += v7;
}
v16[2] = (unsigned int)v14 - (unsigned int)*v16 - v13;
if ( !v15
|| (unsigned long long)v12 >= ft_min_word_len
&& (unsigned long long)v12 < ft_max_word_len
&& !is_stopword(*v16, v16[2]) )
{
*v18 = v14;
return 1;
}
}
while ( (unsigned long long)v14 < v17 );
return 0;
}
| ft_simple_get_word:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R8B
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
LAB_001a40d9:
JMP 0x001a40db
LAB_001a40db:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x001a40f0
JMP 0x001a40e7
LAB_001a40e7:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001a42b3
LAB_001a40f0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x48]
AND EAX,0x7
CMP EAX,0x0
JNZ 0x001a412b
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5f
JNZ 0x001a412d
LAB_001a412b:
JMP 0x001a4173
LAB_001a412d:
JMP 0x001a412f
LAB_001a412f:
CMP dword ptr [RBP + -0x44],0x0
JLE 0x001a413d
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001a415d
LAB_001a413d:
CMP dword ptr [RBP + -0x44],0x0
JGE 0x001a414d
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x50],EAX
JMP 0x001a4157
LAB_001a414d:
MOV EAX,0x1
MOV dword ptr [RBP + -0x50],EAX
JMP 0x001a4157
LAB_001a4157:
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x4c],EAX
LAB_001a415d:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001a40db
LAB_001a4173:
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x3c],0x0
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_001a418c:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001a422f
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x48]
AND EAX,0x7
CMP EAX,0x0
JNZ 0x001a41d5
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5f
JNZ 0x001a41de
LAB_001a41d5:
MOV dword ptr [RBP + -0x3c],0x0
JMP 0x001a41e0
LAB_001a41de:
JMP 0x001a422f
LAB_001a41e0:
JMP 0x001a41e2
LAB_001a41e2:
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x44],0x0
JLE 0x001a41f9
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001a4219
LAB_001a41f9:
CMP dword ptr [RBP + -0x44],0x0
JGE 0x001a4209
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x58],EAX
JMP 0x001a4213
LAB_001a4209:
MOV EAX,0x1
MOV dword ptr [RBP + -0x58],EAX
JMP 0x001a4213
LAB_001a4213:
MOV EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x54],EAX
LAB_001a4219:
MOV ECX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001a418c
LAB_001a422f:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
SUB EAX,dword ptr [RBP + -0x3c]
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x001a428c
MOV EAX,dword ptr [RBP + -0x40]
LEA RCX,[0x3c93b0]
CMP RAX,qword ptr [RCX]
JC 0x001a429d
MOV EAX,dword ptr [RBP + -0x40]
LEA RCX,[0x3c93b8]
CMP RAX,qword ptr [RCX]
JNC 0x001a429d
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x0019fdb0
CMP EAX,0x0
JNZ 0x001a429d
LAB_001a428c:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a42b3
LAB_001a429d:
JMP 0x001a429f
LAB_001a429f:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x001a40d9
JMP 0x001a42af
LAB_001a42af:
MOV byte ptr [RBP + -0x1],0x0
LAB_001a42b3:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1
ft_simple_get_word(long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5)
{
int iVar1;
int local_60;
int local_5c;
int local_58;
int local_54;
uint local_50;
int local_4c;
uint local_48;
int local_44;
char *local_40;
char local_31;
int8 *local_30;
char *local_28;
int8 *local_20;
long local_18;
local_40 = (char *)*param_2;
local_31 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
while( true ) {
while( true ) {
if (local_28 <= local_40) {
return 0;
}
local_4c = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38))
(local_18,&local_50,local_40,local_28);
if (((local_50 & 7) != 0) || (*local_40 == '_')) break;
local_54 = local_4c;
if (local_4c < 1) {
if (local_4c < 0) {
local_58 = -local_4c;
}
else {
local_58 = 1;
}
local_54 = local_58;
}
local_40 = local_40 + local_54;
}
local_48 = 0;
*local_30 = local_40;
while ((local_44 = 0, local_40 < local_28 &&
((local_4c = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38))
(local_18,&local_50,local_40,local_28), (local_50 & 7) != 0 ||
(*local_40 == '_'))))) {
local_48 = local_48 + 1;
local_5c = local_4c;
if (local_4c < 1) {
if (local_4c < 0) {
local_60 = -local_4c;
}
else {
local_60 = 1;
}
local_5c = local_60;
}
local_40 = local_40 + local_5c;
}
local_30[2] = (ulong)(uint)(((int)local_40 - (int)*local_30) - local_44);
if ((local_31 == '\0') ||
(((ft_min_word_len <= local_48 && (local_48 < ft_max_word_len)) &&
(iVar1 = is_stopword(*local_30,local_30[2]), iVar1 == 0)))) break;
if (local_28 <= local_40) {
return 0;
}
}
*local_20 = local_40;
return 1;
}
|
|
2,435 | js_parse_expr_binary | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_expr_binary(JSParseState *s, int level,
int parse_flags)
{
int op, opcode;
if (level == 0) {
return js_parse_unary(s, PF_POW_ALLOWED);
} else if (s->token.val == TOK_PRIVATE_NAME &&
(parse_flags & PF_IN_ACCEPTED) && level == 4 &&
peek_token(s, FALSE) == TOK_IN) {
JSAtom atom;
atom = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail_private_in;
if (s->token.val != TOK_IN)
goto fail_private_in;
if (next_token(s))
goto fail_private_in;
if (js_parse_expr_binary(s, level - 1, parse_flags)) {
fail_private_in:
JS_FreeAtom(s->ctx, atom);
return -1;
}
emit_op(s, OP_scope_in_private_field);
emit_atom(s, atom);
emit_u16(s, s->cur_func->scope_level);
JS_FreeAtom(s->ctx, atom);
return 0;
} else {
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
}
for(;;) {
op = s->token.val;
switch(level) {
case 1:
switch(op) {
case '*':
opcode = OP_mul;
break;
case '/':
opcode = OP_div;
break;
case '%':
opcode = OP_mod;
break;
default:
return 0;
}
break;
case 2:
switch(op) {
case '+':
opcode = OP_add;
break;
case '-':
opcode = OP_sub;
break;
default:
return 0;
}
break;
case 3:
switch(op) {
case TOK_SHL:
opcode = OP_shl;
break;
case TOK_SAR:
opcode = OP_sar;
break;
case TOK_SHR:
opcode = OP_shr;
break;
default:
return 0;
}
break;
case 4:
switch(op) {
case '<':
opcode = OP_lt;
break;
case '>':
opcode = OP_gt;
break;
case TOK_LTE:
opcode = OP_lte;
break;
case TOK_GTE:
opcode = OP_gte;
break;
case TOK_INSTANCEOF:
opcode = OP_instanceof;
break;
case TOK_IN:
if (parse_flags & PF_IN_ACCEPTED) {
opcode = OP_in;
} else {
return 0;
}
break;
default:
return 0;
}
break;
case 5:
switch(op) {
case TOK_EQ:
opcode = OP_eq;
break;
case TOK_NEQ:
opcode = OP_neq;
break;
case TOK_STRICT_EQ:
opcode = OP_strict_eq;
break;
case TOK_STRICT_NEQ:
opcode = OP_strict_neq;
break;
default:
return 0;
}
break;
case 6:
switch(op) {
case '&':
opcode = OP_and;
break;
default:
return 0;
}
break;
case 7:
switch(op) {
case '^':
opcode = OP_xor;
break;
default:
return 0;
}
break;
case 8:
switch(op) {
case '|':
opcode = OP_or;
break;
default:
return 0;
}
break;
default:
abort();
}
if (next_token(s))
return -1;
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
emit_op(s, opcode);
}
return 0;
} | O0 | c | js_parse_expr_binary:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movl %edx, 0x30(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0xaef40
movq 0x38(%rsp), %rdi
movl $0x4, %esi
callq 0xaf380
movl %eax, 0x44(%rsp)
jmp 0xaf373
movq 0x38(%rsp), %rax
cmpl $-0x57, 0x20(%rax)
jne 0xaf05b
movl 0x30(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xaf05b
cmpl $0x4, 0x34(%rsp)
jne 0xaf05b
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x9e690
cmpl $-0x49, %eax
jne 0xaf05b
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movl 0x38(%rax), %esi
callq 0x26ce0
movl %eax, 0x24(%rsp)
movq 0x38(%rsp), %rdi
callq 0x9bd00
cmpl $0x0, %eax
je 0xaefa9
jmp 0xaefe3
movq 0x38(%rsp), %rax
cmpl $-0x49, 0x20(%rax)
je 0xaefb6
jmp 0xaefe3
movq 0x38(%rsp), %rdi
callq 0x9bd00
cmpl $0x0, %eax
je 0xaefc7
jmp 0xaefe3
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
subl $0x1, %esi
movl 0x30(%rsp), %edx
callq 0xaef10
cmpl $0x0, %eax
je 0xaf001
jmp 0xaefe3
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x27d80
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xaf373
movq 0x38(%rsp), %rdi
movl $0xc0, %esi
callq 0x9bc60
movq 0x38(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x9d1d0
movq 0x38(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rax
movl 0xe8(%rax), %eax
movzwl %ax, %esi
callq 0x9bcc0
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x27d80
movl $0x0, 0x44(%rsp)
jmp 0xaf373
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
subl $0x1, %esi
movl 0x30(%rsp), %edx
callq 0xaef10
cmpl $0x0, %eax
je 0xaf082
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xaf373
jmp 0xaf084
jmp 0xaf086
jmp 0xaf088
movq 0x38(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0x2c(%rsp)
movl 0x34(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x7, %eax
ja 0xaf31b
movq 0x18(%rsp), %rax
leaq 0x5b30a(%rip), %rcx # 0x10a3c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
subl $0x25, %eax
je 0xaf0f8
jmp 0xaf0ce
movl 0x14(%rsp), %eax
subl $0x2a, %eax
je 0xaf0e4
jmp 0xaf0d9
movl 0x14(%rsp), %eax
subl $0x2f, %eax
je 0xaf0ee
jmp 0xaf102
movl $0x9a, 0x28(%rsp)
jmp 0xaf10f
movl $0x9b, 0x28(%rsp)
jmp 0xaf10f
movl $0x9c, 0x28(%rsp)
jmp 0xaf10f
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
movl 0x2c(%rsp), %eax
movl %eax, 0x10(%rsp)
subl $0x2b, %eax
je 0xaf12e
jmp 0xaf123
movl 0x10(%rsp), %eax
subl $0x2d, %eax
je 0xaf138
jmp 0xaf142
movl $0x9d, 0x28(%rsp)
jmp 0xaf14f
movl $0x9e, 0x28(%rsp)
jmp 0xaf14f
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $-0x6a, %eax
je 0xaf179
jmp 0xaf163
movl 0xc(%rsp), %eax
subl $-0x69, %eax
je 0xaf183
jmp 0xaf16e
movl 0xc(%rsp), %eax
subl $-0x68, %eax
je 0xaf18d
jmp 0xaf197
movl $0x9f, 0x28(%rsp)
jmp 0xaf1a4
movl $0xa0, 0x28(%rsp)
jmp 0xaf1a4
movl $0xa1, 0x28(%rsp)
jmp 0xaf1a4
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
movl 0x2c(%rsp), %eax
movl %eax, 0x8(%rsp)
subl $-0x66, %eax
je 0xaf203
jmp 0xaf1b8
movl 0x8(%rsp), %eax
subl $-0x64, %eax
je 0xaf20d
jmp 0xaf1c3
movl 0x8(%rsp), %eax
subl $-0x49, %eax
je 0xaf221
jmp 0xaf1ce
movl 0x8(%rsp), %eax
subl $-0x48, %eax
je 0xaf217
jmp 0xaf1d9
movl 0x8(%rsp), %eax
subl $0x3c, %eax
je 0xaf1ef
jmp 0xaf1e4
movl 0x8(%rsp), %eax
subl $0x3e, %eax
je 0xaf1f9
jmp 0xaf246
movl $0xa6, 0x28(%rsp)
jmp 0xaf253
movl $0xa8, 0x28(%rsp)
jmp 0xaf253
movl $0xa7, 0x28(%rsp)
jmp 0xaf253
movl $0xa9, 0x28(%rsp)
jmp 0xaf253
movl $0xaa, 0x28(%rsp)
jmp 0xaf253
movl 0x30(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xaf237
movl $0xab, 0x28(%rsp)
jmp 0xaf244
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf253
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
movl 0x2c(%rsp), %eax
addl $0x63, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x3, %eax
ja 0xaf2a6
movq (%rsp), %rax
leaq 0x5b16b(%rip), %rcx # 0x10a3e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xac, 0x28(%rsp)
jmp 0xaf2b3
movl $0xad, 0x28(%rsp)
jmp 0xaf2b3
movl $0xae, 0x28(%rsp)
jmp 0xaf2b3
movl $0xaf, 0x28(%rsp)
jmp 0xaf2b3
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
movl 0x2c(%rsp), %eax
subl $0x26, %eax
jne 0xaf2ca
jmp 0xaf2c0
movl $0xa2, 0x28(%rsp)
jmp 0xaf2d7
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
movl 0x2c(%rsp), %eax
subl $0x5e, %eax
jne 0xaf2ee
jmp 0xaf2e4
movl $0xa3, 0x28(%rsp)
jmp 0xaf2f8
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
movl 0x2c(%rsp), %eax
subl $0x7c, %eax
jne 0xaf30f
jmp 0xaf305
movl $0xa4, 0x28(%rsp)
jmp 0xaf319
movl $0x0, 0x44(%rsp)
jmp 0xaf373
jmp 0xaf320
callq 0xe090
movq 0x38(%rsp), %rdi
callq 0x9bd00
cmpl $0x0, %eax
je 0xaf339
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xaf373
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
subl $0x1, %esi
movl 0x30(%rsp), %edx
callq 0xaef10
cmpl $0x0, %eax
je 0xaf35d
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xaf373
movq 0x38(%rsp), %rdi
movl 0x28(%rsp), %eax
movzbl %al, %esi
callq 0x9bc60
jmp 0xaf088
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
| js_parse_expr_binary:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov [rsp+48h+var_18], edx
cmp [rsp+48h+var_14], 0
jnz short loc_AEF40
mov rdi, [rsp+48h+var_10]
mov esi, 4
call js_parse_unary
mov [rsp+48h+var_4], eax
jmp loc_AF373
loc_AEF40:
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+20h], 0FFFFFFA9h
jnz loc_AF05B
mov eax, [rsp+48h+var_18]
and eax, 1
cmp eax, 0
jz loc_AF05B
cmp [rsp+48h+var_14], 4
jnz loc_AF05B
mov rdi, [rsp+48h+var_10]
xor esi, esi
call peek_token
cmp eax, 0FFFFFFB7h
jnz loc_AF05B
mov rax, [rsp+48h+var_10]
mov rdi, [rax]
mov rax, [rsp+48h+var_10]
mov esi, [rax+38h]
call JS_DupAtom
mov [rsp+48h+var_24], eax
mov rdi, [rsp+48h+var_10]
call next_token
cmp eax, 0
jz short loc_AEFA9
jmp short loc_AEFE3
loc_AEFA9:
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+20h], 0FFFFFFB7h
jz short loc_AEFB6
jmp short loc_AEFE3
loc_AEFB6:
mov rdi, [rsp+48h+var_10]
call next_token
cmp eax, 0
jz short loc_AEFC7
jmp short loc_AEFE3
loc_AEFC7:
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_14]
sub esi, 1
mov edx, [rsp+48h+var_18]
call js_parse_expr_binary
cmp eax, 0
jz short loc_AF001
jmp short $+2
loc_AEFE3:
mov rax, [rsp+48h+var_10]
mov rdi, [rax]
mov esi, [rsp+48h+var_24]
call JS_FreeAtom
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp loc_AF373
loc_AF001:
mov rdi, [rsp+48h+var_10]
mov esi, 0C0h
call emit_op
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_24]
call emit_atom
mov rdi, [rsp+48h+var_10]
mov rax, [rsp+48h+var_10]
mov rax, [rax+90h]
mov eax, [rax+0E8h]
movzx esi, ax
call emit_u16
mov rax, [rsp+48h+var_10]
mov rdi, [rax]
mov esi, [rsp+48h+var_24]
call JS_FreeAtom
mov [rsp+48h+var_4], 0
jmp loc_AF373
loc_AF05B:
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_14]
sub esi, 1
mov edx, [rsp+48h+var_18]
call js_parse_expr_binary
cmp eax, 0
jz short loc_AF082
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp loc_AF373
loc_AF082:
jmp short $+2
loc_AF084:
jmp short $+2
loc_AF086:
jmp short $+2
loc_AF088:
mov rax, [rsp+48h+var_10]
mov eax, [rax+20h]
mov [rsp+48h+var_1C], eax
mov eax, [rsp+48h+var_14]
dec eax; switch 8 cases
mov ecx, eax
mov [rsp+48h+var_30], rcx
sub eax, 7
ja def_AF0BD; jumptable 00000000000AF0BD default case
mov rax, [rsp+48h+var_30]
lea rcx, jpt_AF0BD
movsxd rax, ds:(jpt_AF0BD - 10A3C0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_AF0BF:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 1
mov [rsp+48h+var_34], eax
sub eax, 25h ; '%'
jz short loc_AF0F8
jmp short $+2
loc_AF0CE:
mov eax, [rsp+48h+var_34]
sub eax, 2Ah ; '*'
jz short loc_AF0E4
jmp short $+2
loc_AF0D9:
mov eax, [rsp+48h+var_34]
sub eax, 2Fh ; '/'
jz short loc_AF0EE
jmp short loc_AF102
loc_AF0E4:
mov [rsp+48h+var_20], 9Ah
jmp short loc_AF10F
loc_AF0EE:
mov [rsp+48h+var_20], 9Bh
jmp short loc_AF10F
loc_AF0F8:
mov [rsp+48h+var_20], 9Ch
jmp short loc_AF10F
loc_AF102:
mov [rsp+48h+var_4], 0
jmp loc_AF373
loc_AF10F:
jmp loc_AF320
loc_AF114:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 2
mov [rsp+48h+var_38], eax
sub eax, 2Bh ; '+'
jz short loc_AF12E
jmp short $+2
loc_AF123:
mov eax, [rsp+48h+var_38]
sub eax, 2Dh ; '-'
jz short loc_AF138
jmp short loc_AF142
loc_AF12E:
mov [rsp+48h+var_20], 9Dh
jmp short loc_AF14F
loc_AF138:
mov [rsp+48h+var_20], 9Eh
jmp short loc_AF14F
loc_AF142:
mov [rsp+48h+var_4], 0
jmp loc_AF373
loc_AF14F:
jmp loc_AF320
loc_AF154:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 3
mov [rsp+48h+var_3C], eax
sub eax, 0FFFFFF96h
jz short loc_AF179
jmp short $+2
loc_AF163:
mov eax, [rsp+48h+var_3C]
sub eax, 0FFFFFF97h
jz short loc_AF183
jmp short $+2
loc_AF16E:
mov eax, [rsp+48h+var_3C]
sub eax, 0FFFFFF98h
jz short loc_AF18D
jmp short loc_AF197
loc_AF179:
mov [rsp+48h+var_20], 9Fh
jmp short loc_AF1A4
loc_AF183:
mov [rsp+48h+var_20], 0A0h
jmp short loc_AF1A4
loc_AF18D:
mov [rsp+48h+var_20], 0A1h
jmp short loc_AF1A4
loc_AF197:
mov [rsp+48h+var_4], 0
jmp loc_AF373
loc_AF1A4:
jmp loc_AF320
loc_AF1A9:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 4
mov [rsp+48h+var_40], eax
sub eax, 0FFFFFF9Ah
jz short loc_AF203
jmp short $+2
loc_AF1B8:
mov eax, [rsp+48h+var_40]
sub eax, 0FFFFFF9Ch
jz short loc_AF20D
jmp short $+2
loc_AF1C3:
mov eax, [rsp+48h+var_40]
sub eax, 0FFFFFFB7h
jz short loc_AF221
jmp short $+2
loc_AF1CE:
mov eax, [rsp+48h+var_40]
sub eax, 0FFFFFFB8h
jz short loc_AF217
jmp short $+2
loc_AF1D9:
mov eax, [rsp+48h+var_40]
sub eax, 3Ch ; '<'
jz short loc_AF1EF
jmp short $+2
loc_AF1E4:
mov eax, [rsp+48h+var_40]
sub eax, 3Eh ; '>'
jz short loc_AF1F9
jmp short loc_AF246
loc_AF1EF:
mov [rsp+48h+var_20], 0A6h
jmp short loc_AF253
loc_AF1F9:
mov [rsp+48h+var_20], 0A8h
jmp short loc_AF253
loc_AF203:
mov [rsp+48h+var_20], 0A7h
jmp short loc_AF253
loc_AF20D:
mov [rsp+48h+var_20], 0A9h
jmp short loc_AF253
loc_AF217:
mov [rsp+48h+var_20], 0AAh
jmp short loc_AF253
loc_AF221:
mov eax, [rsp+48h+var_18]
and eax, 1
cmp eax, 0
jz short loc_AF237
mov [rsp+48h+var_20], 0ABh
jmp short loc_AF244
loc_AF237:
mov [rsp+48h+var_4], 0
jmp loc_AF373
loc_AF244:
jmp short loc_AF253
loc_AF246:
mov [rsp+48h+var_4], 0
jmp loc_AF373
loc_AF253:
jmp loc_AF320
loc_AF258:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 5
add eax, 63h ; 'c'; switch 4 cases
mov ecx, eax
mov [rsp+48h+var_48], rcx
sub eax, 3
ja short def_AF27C; jumptable 00000000000AF27C default case
mov rax, [rsp+48h+var_48]
lea rcx, jpt_AF27C
movsxd rax, ds:(jpt_AF27C - 10A3E0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_AF27E:
mov [rsp+48h+var_20], 0ACh; jumptable 00000000000AF27C case -99
jmp short loc_AF2B3
loc_AF288:
mov [rsp+48h+var_20], 0ADh; jumptable 00000000000AF27C case -97
jmp short loc_AF2B3
loc_AF292:
mov [rsp+48h+var_20], 0AEh; jumptable 00000000000AF27C case -98
jmp short loc_AF2B3
loc_AF29C:
mov [rsp+48h+var_20], 0AFh; jumptable 00000000000AF27C case -96
jmp short loc_AF2B3
def_AF27C:
mov [rsp+48h+var_4], 0; jumptable 00000000000AF27C default case
jmp loc_AF373
loc_AF2B3:
jmp short loc_AF320
loc_AF2B5:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 6
sub eax, 26h ; '&'
jnz short loc_AF2CA
jmp short $+2
loc_AF2C0:
mov [rsp+48h+var_20], 0A2h
jmp short loc_AF2D7
loc_AF2CA:
mov [rsp+48h+var_4], 0
jmp loc_AF373
loc_AF2D7:
jmp short loc_AF320
loc_AF2D9:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 7
sub eax, 5Eh ; '^'
jnz short loc_AF2EE
jmp short $+2
loc_AF2E4:
mov [rsp+48h+var_20], 0A3h
jmp short loc_AF2F8
loc_AF2EE:
mov [rsp+48h+var_4], 0
jmp short loc_AF373
loc_AF2F8:
jmp short loc_AF320
loc_AF2FA:
mov eax, [rsp+48h+var_1C]; jumptable 00000000000AF0BD case 8
sub eax, 7Ch ; '|'
jnz short loc_AF30F
jmp short $+2
loc_AF305:
mov [rsp+48h+var_20], 0A4h
jmp short loc_AF319
loc_AF30F:
mov [rsp+48h+var_4], 0
jmp short loc_AF373
loc_AF319:
jmp short loc_AF320
def_AF0BD:
call _abort; jumptable 00000000000AF0BD default case
loc_AF320:
mov rdi, [rsp+48h+var_10]
call next_token
cmp eax, 0
jz short loc_AF339
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp short loc_AF373
loc_AF339:
mov rdi, [rsp+48h+var_10]
mov esi, [rsp+48h+var_14]
sub esi, 1
mov edx, [rsp+48h+var_18]
call js_parse_expr_binary
cmp eax, 0
jz short loc_AF35D
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp short loc_AF373
loc_AF35D:
mov rdi, [rsp+48h+var_10]
mov eax, [rsp+48h+var_20]
movzx esi, al
call emit_op
jmp loc_AF088
loc_AF373:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long js_parse_expr_binary(
long long a1,
int a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
double v11; // xmm4_8
double v12; // xmm5_8
double v13; // xmm4_8
double v14; // xmm5_8
double v15; // xmm4_8
double v16; // xmm5_8
unsigned int v18; // [rsp+24h] [rbp-24h]
char v19; // [rsp+28h] [rbp-20h]
int v20; // [rsp+2Ch] [rbp-1Ch]
long long v22; // [rsp+38h] [rbp-10h]
v22 = a1;
if ( a2 )
{
if ( *(_DWORD *)(a1 + 32) == -87 && (a3 & 1) != 0 && a2 == 4 && (unsigned int)peek_token(a1, 0) == -73 )
{
v18 = JS_DupAtom(*(_QWORD *)a1, *(_DWORD *)(a1 + 56));
if ( (unsigned int)next_token((long long *)a1, a4, a5, a6, a7, v11, v12, a10, a11)
|| *(_DWORD *)(a1 + 32) != -73
|| (unsigned int)next_token((long long *)a1, a4, a5, a6, a7, v13, v14, a10, a11)
|| (unsigned int)js_parse_expr_binary(a1, 3LL, a3) )
{
JS_FreeAtom(*(_QWORD *)a1, v18);
return (unsigned int)-1;
}
else
{
emit_op(a1, 192);
emit_atom((long long *)a1, v18);
emit_u16(a1, *(_DWORD *)(*(_QWORD *)(a1 + 144) + 232LL));
JS_FreeAtom(*(_QWORD *)a1, v18);
return 0;
}
}
else
{
if ( !(unsigned int)js_parse_expr_binary(a1, (unsigned int)(a2 - 1), a3) )
{
while ( 1 )
{
v20 = *(_DWORD *)(v22 + 32);
switch ( a2 )
{
case 1:
switch ( v20 )
{
case '%':
v19 = -100;
break;
case '*':
v19 = -102;
break;
case '/':
v19 = -101;
break;
default:
return 0;
}
LABEL_67:
if ( (unsigned int)next_token((long long *)v22, a4, a5, a6, a7, v15, v16, a10, a11) )
return (unsigned int)-1;
if ( (unsigned int)js_parse_expr_binary(v22, (unsigned int)(a2 - 1), a3) )
return (unsigned int)-1;
a1 = v22;
emit_op(v22, v19);
break;
case 2:
if ( v20 == 43 )
{
v19 = -99;
}
else
{
if ( v20 != 45 )
return 0;
v19 = -98;
}
goto LABEL_67;
case 3:
switch ( v20 )
{
case -106:
v19 = -97;
break;
case -105:
v19 = -96;
break;
case -104:
v19 = -95;
break;
default:
return 0;
}
goto LABEL_67;
case 4:
switch ( v20 )
{
case -102:
v19 = -89;
break;
case -100:
v19 = -87;
break;
case -73:
if ( (a3 & 1) == 0 )
return 0;
v19 = -85;
break;
case -72:
v19 = -86;
break;
case 60:
v19 = -90;
break;
case 62:
v19 = -88;
break;
default:
return 0;
}
goto LABEL_67;
case 5:
switch ( v20 )
{
case -99:
v19 = -84;
goto LABEL_67;
case -98:
v19 = -82;
goto LABEL_67;
case -97:
v19 = -83;
goto LABEL_67;
case -96:
v19 = -81;
goto LABEL_67;
default:
return 0;
}
case 6:
if ( v20 != 38 )
return 0;
v19 = -94;
goto LABEL_67;
case 7:
if ( v20 != 94 )
return 0;
v19 = -93;
goto LABEL_67;
case 8:
if ( v20 != 124 )
return 0;
v19 = -92;
goto LABEL_67;
default:
abort((const char *)a1);
}
}
}
return (unsigned int)-1;
}
}
else
{
return (unsigned int)js_parse_unary(a1, 4LL);
}
}
| js_parse_expr_binary:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],EDX
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x001aef40
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x4
CALL 0x001af380
MOV dword ptr [RSP + 0x44],EAX
JMP 0x001af373
LAB_001aef40:
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x20],-0x57
JNZ 0x001af05b
MOV EAX,dword ptr [RSP + 0x30]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001af05b
CMP dword ptr [RSP + 0x34],0x4
JNZ 0x001af05b
MOV RDI,qword ptr [RSP + 0x38]
XOR ESI,ESI
CALL 0x0019e690
CMP EAX,-0x49
JNZ 0x001af05b
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RAX + 0x38]
CALL 0x00126ce0
MOV dword ptr [RSP + 0x24],EAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0019bd00
CMP EAX,0x0
JZ 0x001aefa9
JMP 0x001aefe3
LAB_001aefa9:
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x20],-0x49
JZ 0x001aefb6
JMP 0x001aefe3
LAB_001aefb6:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0019bd00
CMP EAX,0x0
JZ 0x001aefc7
JMP 0x001aefe3
LAB_001aefc7:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
SUB ESI,0x1
MOV EDX,dword ptr [RSP + 0x30]
CALL 0x001aef10
CMP EAX,0x0
JZ 0x001af001
JMP 0x001aefe3
LAB_001aefe3:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x00127d80
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x001af373
LAB_001af001:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0xc0
CALL 0x0019bc60
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x0019d1d0
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x90]
MOV EAX,dword ptr [RAX + 0xe8]
MOVZX ESI,AX
CALL 0x0019bcc0
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x00127d80
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af05b:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
SUB ESI,0x1
MOV EDX,dword ptr [RSP + 0x30]
CALL 0x001aef10
CMP EAX,0x0
JZ 0x001af082
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x001af373
LAB_001af082:
JMP 0x001af084
LAB_001af084:
JMP 0x001af086
LAB_001af086:
JMP 0x001af088
LAB_001af088:
MOV RAX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RSP + 0x2c],EAX
MOV EAX,dword ptr [RSP + 0x34]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RSP + 0x18],RCX
SUB EAX,0x7
JA 0x001af31b
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x20a3c0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x14],EAX
SUB EAX,0x25
JZ 0x001af0f8
JMP 0x001af0ce
LAB_001af0ce:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x2a
JZ 0x001af0e4
JMP 0x001af0d9
LAB_001af0d9:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x2f
JZ 0x001af0ee
JMP 0x001af102
LAB_001af0e4:
MOV dword ptr [RSP + 0x28],0x9a
JMP 0x001af10f
LAB_001af0ee:
MOV dword ptr [RSP + 0x28],0x9b
JMP 0x001af10f
LAB_001af0f8:
MOV dword ptr [RSP + 0x28],0x9c
JMP 0x001af10f
LAB_001af102:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af10f:
JMP 0x001af320
caseD_2:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x10],EAX
SUB EAX,0x2b
JZ 0x001af12e
JMP 0x001af123
LAB_001af123:
MOV EAX,dword ptr [RSP + 0x10]
SUB EAX,0x2d
JZ 0x001af138
JMP 0x001af142
LAB_001af12e:
MOV dword ptr [RSP + 0x28],0x9d
JMP 0x001af14f
LAB_001af138:
MOV dword ptr [RSP + 0x28],0x9e
JMP 0x001af14f
LAB_001af142:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af14f:
JMP 0x001af320
caseD_3:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,-0x6a
JZ 0x001af179
JMP 0x001af163
LAB_001af163:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,-0x69
JZ 0x001af183
JMP 0x001af16e
LAB_001af16e:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,-0x68
JZ 0x001af18d
JMP 0x001af197
LAB_001af179:
MOV dword ptr [RSP + 0x28],0x9f
JMP 0x001af1a4
LAB_001af183:
MOV dword ptr [RSP + 0x28],0xa0
JMP 0x001af1a4
LAB_001af18d:
MOV dword ptr [RSP + 0x28],0xa1
JMP 0x001af1a4
LAB_001af197:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af1a4:
JMP 0x001af320
caseD_4:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x8],EAX
SUB EAX,-0x66
JZ 0x001af203
JMP 0x001af1b8
LAB_001af1b8:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,-0x64
JZ 0x001af20d
JMP 0x001af1c3
LAB_001af1c3:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,-0x49
JZ 0x001af221
JMP 0x001af1ce
LAB_001af1ce:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,-0x48
JZ 0x001af217
JMP 0x001af1d9
LAB_001af1d9:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0x3c
JZ 0x001af1ef
JMP 0x001af1e4
LAB_001af1e4:
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0x3e
JZ 0x001af1f9
JMP 0x001af246
LAB_001af1ef:
MOV dword ptr [RSP + 0x28],0xa6
JMP 0x001af253
LAB_001af1f9:
MOV dword ptr [RSP + 0x28],0xa8
JMP 0x001af253
LAB_001af203:
MOV dword ptr [RSP + 0x28],0xa7
JMP 0x001af253
LAB_001af20d:
MOV dword ptr [RSP + 0x28],0xa9
JMP 0x001af253
LAB_001af217:
MOV dword ptr [RSP + 0x28],0xaa
JMP 0x001af253
LAB_001af221:
MOV EAX,dword ptr [RSP + 0x30]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001af237
MOV dword ptr [RSP + 0x28],0xab
JMP 0x001af244
LAB_001af237:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af244:
JMP 0x001af253
LAB_001af246:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af253:
JMP 0x001af320
caseD_5:
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x63
MOV ECX,EAX
MOV qword ptr [RSP],RCX
SUB EAX,0x3
JA 0x001af2a6
MOV RAX,qword ptr [RSP]
LEA RCX,[0x20a3e0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_ffffff9d:
MOV dword ptr [RSP + 0x28],0xac
JMP 0x001af2b3
caseD_ffffff9f:
MOV dword ptr [RSP + 0x28],0xad
JMP 0x001af2b3
caseD_ffffff9e:
MOV dword ptr [RSP + 0x28],0xae
JMP 0x001af2b3
caseD_ffffffa0:
MOV dword ptr [RSP + 0x28],0xaf
JMP 0x001af2b3
default:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af2b3:
JMP 0x001af320
caseD_6:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x26
JNZ 0x001af2ca
JMP 0x001af2c0
LAB_001af2c0:
MOV dword ptr [RSP + 0x28],0xa2
JMP 0x001af2d7
LAB_001af2ca:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af2d7:
JMP 0x001af320
caseD_7:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x5e
JNZ 0x001af2ee
JMP 0x001af2e4
LAB_001af2e4:
MOV dword ptr [RSP + 0x28],0xa3
JMP 0x001af2f8
LAB_001af2ee:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af2f8:
JMP 0x001af320
caseD_8:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x7c
JNZ 0x001af30f
JMP 0x001af305
LAB_001af305:
MOV dword ptr [RSP + 0x28],0xa4
JMP 0x001af319
LAB_001af30f:
MOV dword ptr [RSP + 0x44],0x0
JMP 0x001af373
LAB_001af319:
JMP 0x001af320
default:
CALL 0x0010e090
LAB_001af320:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0019bd00
CMP EAX,0x0
JZ 0x001af339
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x001af373
LAB_001af339:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
SUB ESI,0x1
MOV EDX,dword ptr [RSP + 0x30]
CALL 0x001aef10
CMP EAX,0x0
JZ 0x001af35d
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x001af373
LAB_001af35d:
MOV RDI,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RSP + 0x28]
MOVZX ESI,AL
CALL 0x0019bc60
JMP 0x001af088
LAB_001af373:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4 js_parse_expr_binary(int8 *param_1,int param_2,uint param_3)
{
int iVar1;
int4 uVar2;
int4 local_20;
int4 local_4;
if (param_2 == 0) {
local_4 = js_parse_unary(param_1,4);
}
else if ((((*(int *)(param_1 + 4) == -0x57) && ((param_3 & 1) != 0)) && (param_2 == 4)) &&
(iVar1 = peek_token(param_1,0), iVar1 == -0x49)) {
uVar2 = JS_DupAtom(*param_1,*(int4 *)(param_1 + 7));
iVar1 = next_token(param_1);
if (((iVar1 == 0) && (*(int *)(param_1 + 4) == -0x49)) &&
((iVar1 = next_token(param_1), iVar1 == 0 &&
(iVar1 = js_parse_expr_binary(param_1,3,param_3), iVar1 == 0)))) {
emit_op(param_1,0xc0);
emit_atom(param_1,uVar2);
emit_u16(param_1,*(uint *)(param_1[0x12] + 0xe8) & 0xffff);
JS_FreeAtom(*param_1,uVar2);
local_4 = 0;
}
else {
JS_FreeAtom(*param_1,uVar2);
local_4 = 0xffffffff;
}
}
else {
iVar1 = js_parse_expr_binary(param_1,param_2 + -1,param_3);
if (iVar1 == 0) {
while( true ) {
iVar1 = *(int *)(param_1 + 4);
switch(param_2) {
case 1:
if (iVar1 == 0x25) {
local_20 = 0x9c;
}
else if (iVar1 == 0x2a) {
local_20 = 0x9a;
}
else {
if (iVar1 != 0x2f) {
return 0;
}
local_20 = 0x9b;
}
break;
case 2:
if (iVar1 == 0x2b) {
local_20 = 0x9d;
}
else {
if (iVar1 != 0x2d) {
return 0;
}
local_20 = 0x9e;
}
break;
case 3:
if (iVar1 == -0x6a) {
local_20 = 0x9f;
}
else if (iVar1 == -0x69) {
local_20 = 0xa0;
}
else {
if (iVar1 != -0x68) {
return 0;
}
local_20 = 0xa1;
}
break;
case 4:
if (iVar1 == -0x66) {
local_20 = 0xa7;
}
else if (iVar1 == -100) {
local_20 = 0xa9;
}
else if (iVar1 == -0x49) {
if ((param_3 & 1) == 0) {
return 0;
}
local_20 = 0xab;
}
else if (iVar1 == -0x48) {
local_20 = 0xaa;
}
else if (iVar1 == 0x3c) {
local_20 = 0xa6;
}
else {
if (iVar1 != 0x3e) {
return 0;
}
local_20 = 0xa8;
}
break;
case 5:
switch(iVar1) {
case -99:
local_20 = 0xac;
break;
case -0x62:
local_20 = 0xae;
break;
case -0x61:
local_20 = 0xad;
break;
case -0x60:
local_20 = 0xaf;
break;
default:
return 0;
}
break;
case 6:
if (iVar1 != 0x26) {
return 0;
}
local_20 = 0xa2;
break;
case 7:
if (iVar1 != 0x5e) {
return 0;
}
local_20 = 0xa3;
break;
case 8:
if (iVar1 != 0x7c) {
return 0;
}
local_20 = 0xa4;
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = next_token(param_1);
if (iVar1 != 0) break;
iVar1 = js_parse_expr_binary(param_1,param_2 + -1,param_3);
if (iVar1 != 0) {
return 0xffffffff;
}
emit_op(param_1,local_20);
}
return 0xffffffff;
}
local_4 = 0xffffffff;
}
return local_4;
}
|
|
2,436 | js_parse_expr_binary | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_expr_binary(JSParseState *s, int level,
int parse_flags)
{
int op, opcode;
if (level == 0) {
return js_parse_unary(s, PF_POW_ALLOWED);
} else if (s->token.val == TOK_PRIVATE_NAME &&
(parse_flags & PF_IN_ACCEPTED) && level == 4 &&
peek_token(s, FALSE) == TOK_IN) {
JSAtom atom;
atom = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail_private_in;
if (s->token.val != TOK_IN)
goto fail_private_in;
if (next_token(s))
goto fail_private_in;
if (js_parse_expr_binary(s, level - 1, parse_flags)) {
fail_private_in:
JS_FreeAtom(s->ctx, atom);
return -1;
}
emit_op(s, OP_scope_in_private_field);
emit_atom(s, atom);
emit_u16(s, s->cur_func->scope_level);
JS_FreeAtom(s->ctx, atom);
return 0;
} else {
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
}
for(;;) {
op = s->token.val;
switch(level) {
case 1:
switch(op) {
case '*':
opcode = OP_mul;
break;
case '/':
opcode = OP_div;
break;
case '%':
opcode = OP_mod;
break;
default:
return 0;
}
break;
case 2:
switch(op) {
case '+':
opcode = OP_add;
break;
case '-':
opcode = OP_sub;
break;
default:
return 0;
}
break;
case 3:
switch(op) {
case TOK_SHL:
opcode = OP_shl;
break;
case TOK_SAR:
opcode = OP_sar;
break;
case TOK_SHR:
opcode = OP_shr;
break;
default:
return 0;
}
break;
case 4:
switch(op) {
case '<':
opcode = OP_lt;
break;
case '>':
opcode = OP_gt;
break;
case TOK_LTE:
opcode = OP_lte;
break;
case TOK_GTE:
opcode = OP_gte;
break;
case TOK_INSTANCEOF:
opcode = OP_instanceof;
break;
case TOK_IN:
if (parse_flags & PF_IN_ACCEPTED) {
opcode = OP_in;
} else {
return 0;
}
break;
default:
return 0;
}
break;
case 5:
switch(op) {
case TOK_EQ:
opcode = OP_eq;
break;
case TOK_NEQ:
opcode = OP_neq;
break;
case TOK_STRICT_EQ:
opcode = OP_strict_eq;
break;
case TOK_STRICT_NEQ:
opcode = OP_strict_neq;
break;
default:
return 0;
}
break;
case 6:
switch(op) {
case '&':
opcode = OP_and;
break;
default:
return 0;
}
break;
case 7:
switch(op) {
case '^':
opcode = OP_xor;
break;
default:
return 0;
}
break;
case 8:
switch(op) {
case '|':
opcode = OP_or;
break;
default:
return 0;
}
break;
default:
abort();
}
if (next_token(s))
return -1;
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
emit_op(s, opcode);
}
return 0;
} | O1 | c | js_parse_expr_binary:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x6b164
movl %edx, %ebp
movl %esi, %r14d
cmpl $-0x57, 0x20(%rbx)
jne 0x6b139
testb $0x1, %bpl
sete %al
cmpl $0x4, %r14d
setne %cl
orb %al, %cl
jne 0x6b139
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5ec81
cmpl $-0x49, %eax
jne 0x6b139
movslq 0x38(%rbx), %r14
cmpq $0xe0, %r14
jl 0x6b0f8
movq (%rbx), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r14,8), %rax
incl (%rax)
movq %rbx, %rdi
callq 0x5c5bb
testl %eax, %eax
jne 0x6b129
cmpl $-0x49, 0x20(%rbx)
jne 0x6b129
movq %rbx, %rdi
callq 0x5c5bb
testl %eax, %eax
jne 0x6b129
movq %rbx, %rdi
movl $0x3, %esi
movl %ebp, %edx
callq 0x6b093
testl %eax, %eax
je 0x6b17d
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x1fbc4
jmp 0x6b1df
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6b093
testl %eax, %eax
jne 0x6b1df
movl 0x20(%rbx), %ecx
leaq 0x30c5d(%rip), %r15 # 0x9bdb8
movslq (%r15,%r14,4), %rax
addq %r15, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x4, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6b313
movq 0x90(%rbx), %rax
movl $0x138, %r15d # imm = 0x138
leaq (%rax,%r15), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0xc0, %esi
callq 0x1a8bc
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5dfe6
movq 0x90(%rbx), %rdi
movzwl 0xe8(%rdi), %eax
addq %r15, %rdi
leaq 0xe(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
callq 0x1a80e
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x1fbc4
jmp 0x6b20c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x6b20e
cmpl $0x25, %ecx
je 0x6b204
movb $-0x66, %r12b
cmpl $0x2a, %ecx
je 0x6b298
cmpl $0x2f, %ecx
jne 0x6b20c
movb $-0x65, %r12b
jmp 0x6b298
movb $-0x64, %r12b
jmp 0x6b298
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $-0x63, %r12b
cmpl $0x2b, %ecx
je 0x6b298
cmpl $0x2d, %ecx
jne 0x6b20c
movb $-0x62, %r12b
jmp 0x6b298
addl $0x6a, %ecx
cmpl $0x3, %ecx
jae 0x6b20c
addb $-0x61, %cl
movl %ecx, %r12d
jmp 0x6b298
xorl %eax, %eax
cmpl $-0x49, %ecx
jg 0x6b25e
cmpl $-0x66, %ecx
je 0x6b275
cmpl $-0x64, %ecx
je 0x6b27f
cmpl $-0x49, %ecx
jne 0x6b20e
movb $-0x55, %r12b
testb $0x1, %bpl
jne 0x6b298
jmp 0x6b20e
cmpl $-0x48, %ecx
je 0x6b27a
movb $-0x5a, %r12b
cmpl $0x3c, %ecx
je 0x6b298
cmpl $0x3e, %ecx
jne 0x6b20e
movb $-0x58, %r12b
jmp 0x6b298
movb $-0x59, %r12b
jmp 0x6b298
movb $-0x56, %r12b
jmp 0x6b298
movb $-0x57, %r12b
jmp 0x6b298
addl $0x63, %ecx
cmpl $0x4, %ecx
jae 0x6b20c
shll $0x3, %ecx
movl $0xafadaeac, %r12d # imm = 0xAFADAEAC
shrl %cl, %r12d
movq %rbx, %rdi
callq 0x5c5bb
testl %eax, %eax
jne 0x6b1df
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6b093
testl %eax, %eax
jne 0x6b1df
movq 0x90(%rbx), %rax
leaq 0x138(%rax), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movzbl %r12b, %esi
callq 0x1a8bc
movl 0x20(%rbx), %ecx
movslq (%r15,%r14,4), %rax
addq %r15, %rax
jmpq *%rax
movb $-0x5e, %r12b
cmpl $0x26, %ecx
je 0x6b298
jmp 0x6b20c
movb $-0x5d, %r12b
cmpl $0x5e, %ecx
je 0x6b298
jmp 0x6b20c
movb $-0x5c, %r12b
cmpl $0x7c, %ecx
je 0x6b298
jmp 0x6b20c
| js_parse_expr_binary:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdi
test esi, esi
jz loc_6B164
mov ebp, edx
mov r14d, esi
cmp dword ptr [rbx+20h], 0FFFFFFA9h
jnz loc_6B139
test bpl, 1
setz al
cmp r14d, 4
setnz cl
or cl, al
jnz short loc_6B139
mov rdi, rbx
xor esi, esi
call peek_token
cmp eax, 0FFFFFFB7h
jnz short loc_6B139
movsxd r14, dword ptr [rbx+38h]
cmp r14, 0E0h
jl short loc_6B0F8
mov rax, [rbx]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r14*8]
inc dword ptr [rax]
loc_6B0F8:
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_6B129
cmp dword ptr [rbx+20h], 0FFFFFFB7h
jnz short loc_6B129
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_6B129
mov rdi, rbx
mov esi, 3
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jz short loc_6B17D
loc_6B129:
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
jmp loc_6B1DF
loc_6B139:
dec r14d
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jnz loc_6B1DF
mov ecx, [rbx+20h]
lea r15, jpt_6B162
movsxd rax, ds:(jpt_6B162 - 9BDB8h)[r15+r14*4]; switch 8 cases
add rax, r15
jmp rax; switch jump
loc_6B164:
mov rdi, rbx
mov esi, 4
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp js_parse_unary
loc_6B17D:
mov rax, [rbx+90h]
mov r15d, 138h
lea rdi, [rax+r15]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 0C0h
call dbuf_putc
mov rdi, rbx
mov esi, r14d
call emit_atom
mov rdi, [rbx+90h]
movzx eax, word ptr [rdi+0E8h]
add rdi, r15
lea rsi, [rsp+38h+var_2A]
mov [rsi], ax
mov edx, 2
call dbuf_put
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
jmp short loc_6B20C
loc_6B1DF:
mov eax, 0FFFFFFFFh
jmp short loc_6B20E
loc_6B1E6:
cmp ecx, 25h ; '%'; jumptable 000000000006B162 case 0
jz short loc_6B204
mov r12b, 9Ah
cmp ecx, 2Ah ; '*'
jz loc_6B298
cmp ecx, 2Fh ; '/'
jnz short loc_6B20C
mov r12b, 9Bh
jmp loc_6B298
loc_6B204:
mov r12b, 9Ch
jmp loc_6B298
loc_6B20C:
xor eax, eax
loc_6B20E:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6B21B:
mov r12b, 9Dh; jumptable 000000000006B162 case 1
cmp ecx, 2Bh ; '+'
jz short loc_6B298
cmp ecx, 2Dh ; '-'
jnz short loc_6B20C
mov r12b, 9Eh
jmp short loc_6B298
loc_6B22D:
add ecx, 6Ah ; 'j'; jumptable 000000000006B162 case 2
cmp ecx, 3
jnb short loc_6B20C
add cl, 9Fh
mov r12d, ecx
jmp short loc_6B298
loc_6B23D:
xor eax, eax; jumptable 000000000006B162 case 3
cmp ecx, 0FFFFFFB7h
jg short loc_6B25E
cmp ecx, 0FFFFFF9Ah
jz short loc_6B275
cmp ecx, 0FFFFFF9Ch
jz short loc_6B27F
cmp ecx, 0FFFFFFB7h
jnz short loc_6B20E
mov r12b, 0ABh
test bpl, 1
jnz short loc_6B298
jmp short loc_6B20E
loc_6B25E:
cmp ecx, 0FFFFFFB8h
jz short loc_6B27A
mov r12b, 0A6h
cmp ecx, 3Ch ; '<'
jz short loc_6B298
cmp ecx, 3Eh ; '>'
jnz short loc_6B20E
mov r12b, 0A8h
jmp short loc_6B298
loc_6B275:
mov r12b, 0A7h
jmp short loc_6B298
loc_6B27A:
mov r12b, 0AAh
jmp short loc_6B298
loc_6B27F:
mov r12b, 0A9h
jmp short loc_6B298
loc_6B284:
add ecx, 63h ; 'c'; jumptable 000000000006B162 case 4
cmp ecx, 4
jnb short loc_6B20C
shl ecx, 3
mov r12d, 0AFADAEACh
shr r12d, cl
loc_6B298:
mov rdi, rbx
call next_token
test eax, eax
jnz loc_6B1DF
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jnz loc_6B1DF
mov rax, [rbx+90h]
lea rdi, [rax+138h]
mov ecx, [rax+140h]
mov [rax+168h], ecx
movzx esi, r12b
call dbuf_putc
mov ecx, [rbx+20h]
movsxd rax, ds:(jpt_6B162 - 9BDB8h)[r15+r14*4]; switch 8 cases
add rax, r15
jmp rax; switch jump
loc_6B2EC:
mov r12b, 0A2h; jumptable 000000000006B162 case 5
cmp ecx, 26h ; '&'
jz short loc_6B298
jmp loc_6B20C
loc_6B2F9:
mov r12b, 0A3h; jumptable 000000000006B162 case 6
cmp ecx, 5Eh ; '^'
jz short loc_6B298
jmp loc_6B20C
loc_6B306:
mov r12b, 0A4h; jumptable 000000000006B162 case 7
cmp ecx, 7Ch ; '|'
jz short loc_6B298
jmp loc_6B20C
| long long js_parse_expr_binary(
long long a1,
int a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // r14
_DWORD *v20; // rax
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
unsigned int v27; // r14d
long long v28; // rsi
long long v29; // rdx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rcx
long long result; // rax
long long v36; // rax
long long v37; // rdi
unsigned int v38; // r12d
unsigned int v39; // ecx
long long v40; // rax
_WORD v41[21]; // [rsp+Eh] [rbp-2Ah] BYREF
if ( !a2 )
return js_parse_unary(a1, 4LL);
if ( *(_DWORD *)(a1 + 32) != -87 || (a3 & 1) == 0 || a2 != 4 || (unsigned int)peek_token(a1, 0) != -73 )
{
v27 = a2 - 1;
v28 = v27;
if ( !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v34 = *(unsigned int *)(a1 + 32);
switch ( v27 )
{
case 0u:
LABEL_17:
if ( (_DWORD)v34 == 37 )
{
LOBYTE(v38) = -100;
goto LABEL_44;
}
LOBYTE(v38) = -102;
if ( (_DWORD)v34 == 42 )
goto LABEL_44;
if ( (_DWORD)v34 == 47 )
{
LOBYTE(v38) = -101;
goto LABEL_44;
}
return 0LL;
case 1u:
LABEL_24:
LOBYTE(v38) = -99;
if ( (_DWORD)v34 == 43 )
goto LABEL_44;
if ( (_DWORD)v34 != 45 )
return 0LL;
LOBYTE(v38) = -98;
goto LABEL_44;
case 2u:
LABEL_27:
v34 = (unsigned int)(v34 + 106);
if ( (unsigned int)v34 >= 3 )
return 0LL;
LOBYTE(v34) = v34 - 97;
LOBYTE(v38) = v34;
goto LABEL_44;
case 3u:
while ( 2 )
{
result = 0LL;
if ( (int)v34 > -73 )
{
if ( (_DWORD)v34 == -72 )
{
LOBYTE(v38) = -86;
}
else
{
LOBYTE(v38) = -90;
if ( (_DWORD)v34 != 60 )
{
if ( (_DWORD)v34 != 62 )
return result;
LOBYTE(v38) = -88;
}
}
}
else
{
switch ( (_DWORD)v34 )
{
case 0xFFFFFF9A:
LOBYTE(v38) = -89;
break;
case 0xFFFFFF9C:
LOBYTE(v38) = -87;
break;
case 0xFFFFFFB7:
LOBYTE(v38) = -85;
if ( (a3 & 1) == 0 )
return result;
break;
default:
return result;
}
}
LABEL_44:
if ( !(unsigned int)next_token(a1, a4, a5, a6, a7, v32, v33, a10, a11, v28, v29, v34, v30, v31)
&& !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v40 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v40 + 360) = *(_DWORD *)(v40 + 320);
v28 = (unsigned __int8)v38;
dbuf_putc((_QWORD *)(v40 + 312), v38);
v34 = *(unsigned int *)(a1 + 32);
switch ( v27 )
{
case 0u:
goto LABEL_17;
case 1u:
goto LABEL_24;
case 2u:
goto LABEL_27;
case 3u:
continue;
case 4u:
goto LABEL_42;
case 5u:
goto LABEL_47;
case 6u:
goto LABEL_49;
case 7u:
goto LABEL_51;
}
}
break;
}
break;
case 4u:
LABEL_42:
v39 = v34 + 99;
if ( v39 >= 4 )
return 0LL;
v34 = 8 * v39;
v38 = 0xAFADAEAC >> v34;
goto LABEL_44;
case 5u:
LABEL_47:
LOBYTE(v38) = -94;
if ( (_DWORD)v34 != 38 )
return 0LL;
goto LABEL_44;
case 6u:
LABEL_49:
LOBYTE(v38) = -93;
if ( (_DWORD)v34 != 94 )
return 0LL;
goto LABEL_44;
case 7u:
LABEL_51:
LOBYTE(v38) = -92;
if ( (_DWORD)v34 != 124 )
return 0LL;
goto LABEL_44;
}
}
return 0xFFFFFFFFLL;
}
v19 = *(int *)(a1 + 56);
if ( v19 >= 224 )
{
v20 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v19);
++*v20;
}
if ( (unsigned int)next_token(a1, a4, a5, a6, a7, v17, v18, a10, a11, 0LL, v13, v14, v15, v16)
|| *(_DWORD *)(a1 + 32) != -73
|| (unsigned int)next_token(a1, a4, a5, a6, a7, v25, v26, a10, a11, 0LL, v21, v22, v23, v24)
|| (unsigned int)js_parse_expr_binary(a1, 3LL, a3) )
{
JS_FreeAtom(*(_QWORD *)a1, v19);
return 0xFFFFFFFFLL;
}
v36 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v36 + 360) = *(_DWORD *)(v36 + 320);
dbuf_putc((_QWORD *)(v36 + 312), 192);
emit_atom((_QWORD *)a1, v19);
v37 = *(_QWORD *)(a1 + 144);
v41[0] = *(_WORD *)(v37 + 232);
dbuf_put((_QWORD *)(v37 + 312), (long long)v41, 2LL);
JS_FreeAtom(*(_QWORD *)a1, v19);
return 0LL;
}
| js_parse_expr_binary:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
TEST ESI,ESI
JZ 0x0016b164
MOV EBP,EDX
MOV R14D,ESI
CMP dword ptr [RBX + 0x20],-0x57
JNZ 0x0016b139
TEST BPL,0x1
SETZ AL
CMP R14D,0x4
SETNZ CL
OR CL,AL
JNZ 0x0016b139
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015ec81
CMP EAX,-0x49
JNZ 0x0016b139
MOVSXD R14,dword ptr [RBX + 0x38]
CMP R14,0xe0
JL 0x0016b0f8
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R14*0x8]
INC dword ptr [RAX]
LAB_0016b0f8:
MOV RDI,RBX
CALL 0x0015c5bb
TEST EAX,EAX
JNZ 0x0016b129
CMP dword ptr [RBX + 0x20],-0x49
JNZ 0x0016b129
MOV RDI,RBX
CALL 0x0015c5bb
TEST EAX,EAX
JNZ 0x0016b129
MOV RDI,RBX
MOV ESI,0x3
MOV EDX,EBP
CALL 0x0016b093
TEST EAX,EAX
JZ 0x0016b17d
LAB_0016b129:
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x0011fbc4
JMP 0x0016b1df
LAB_0016b139:
DEC R14D
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,EBP
CALL 0x0016b093
TEST EAX,EAX
JNZ 0x0016b1df
MOV ECX,dword ptr [RBX + 0x20]
LEA R15,[0x19bdb8]
MOVSXD RAX,dword ptr [R15 + R14*0x4]
ADD RAX,R15
JMP RAX
LAB_0016b164:
MOV RDI,RBX
MOV ESI,0x4
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0016b313
LAB_0016b17d:
MOV RAX,qword ptr [RBX + 0x90]
MOV R15D,0x138
LEA RDI,[RAX + R15*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0xc0
CALL 0x0011a8bc
MOV RDI,RBX
MOV ESI,R14D
CALL 0x0015dfe6
MOV RDI,qword ptr [RBX + 0x90]
MOVZX EAX,word ptr [RDI + 0xe8]
ADD RDI,R15
LEA RSI,[RSP + 0xe]
MOV word ptr [RSI],AX
MOV EDX,0x2
CALL 0x0011a80e
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x0011fbc4
JMP 0x0016b20c
LAB_0016b1df:
MOV EAX,0xffffffff
JMP 0x0016b20e
LAB_0016b20c:
XOR EAX,EAX
LAB_0016b20e:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 js_parse_expr_binary(long *param_1,int param_2,uint param_3)
{
int *piVar1;
long lVar2;
int iVar3;
int iVar4;
int8 uVar5;
int2 local_2a;
if (param_2 == 0) {
uVar5 = js_parse_unary(param_1,4);
return uVar5;
}
if ((((int)param_1[4] == -0x57) && (param_2 == 4 && (param_3 & 1) != 0)) &&
(iVar3 = peek_token(param_1,0), iVar3 == -0x49)) {
iVar3 = (int)param_1[7];
if (0xdf < (long)iVar3) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (long)iVar3 * 8);
*piVar1 = *piVar1 + 1;
}
iVar4 = next_token(param_1);
if (((iVar4 == 0) && ((int)param_1[4] == -0x49)) &&
((iVar4 = next_token(param_1), iVar4 == 0 &&
(iVar4 = js_parse_expr_binary(param_1,3,param_3), iVar4 == 0)))) {
lVar2 = param_1[0x12];
*(int4 *)(lVar2 + 0x168) = *(int4 *)(lVar2 + 0x140);
dbuf_putc(lVar2 + 0x138,0xc0);
emit_atom(param_1,iVar3);
local_2a = *(int2 *)(param_1[0x12] + 0xe8);
dbuf_put(param_1[0x12] + 0x138,&local_2a,2);
JS_FreeAtom(*param_1,iVar3);
return 0;
}
JS_FreeAtom(*param_1,iVar3);
}
else {
iVar3 = js_parse_expr_binary(param_1,(ulong)(param_2 - 1),param_3);
if (iVar3 == 0) {
/* WARNING: Could not recover jumptable at 0x0016b162. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar5 = (*(code *)(&DAT_0019bdb8 + *(int *)(&DAT_0019bdb8 + (ulong)(param_2 - 1) * 4)))();
return uVar5;
}
}
return 0xffffffff;
}
|
|
2,437 | js_parse_expr_binary | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_expr_binary(JSParseState *s, int level,
int parse_flags)
{
int op, opcode;
if (level == 0) {
return js_parse_unary(s, PF_POW_ALLOWED);
} else if (s->token.val == TOK_PRIVATE_NAME &&
(parse_flags & PF_IN_ACCEPTED) && level == 4 &&
peek_token(s, FALSE) == TOK_IN) {
JSAtom atom;
atom = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail_private_in;
if (s->token.val != TOK_IN)
goto fail_private_in;
if (next_token(s))
goto fail_private_in;
if (js_parse_expr_binary(s, level - 1, parse_flags)) {
fail_private_in:
JS_FreeAtom(s->ctx, atom);
return -1;
}
emit_op(s, OP_scope_in_private_field);
emit_atom(s, atom);
emit_u16(s, s->cur_func->scope_level);
JS_FreeAtom(s->ctx, atom);
return 0;
} else {
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
}
for(;;) {
op = s->token.val;
switch(level) {
case 1:
switch(op) {
case '*':
opcode = OP_mul;
break;
case '/':
opcode = OP_div;
break;
case '%':
opcode = OP_mod;
break;
default:
return 0;
}
break;
case 2:
switch(op) {
case '+':
opcode = OP_add;
break;
case '-':
opcode = OP_sub;
break;
default:
return 0;
}
break;
case 3:
switch(op) {
case TOK_SHL:
opcode = OP_shl;
break;
case TOK_SAR:
opcode = OP_sar;
break;
case TOK_SHR:
opcode = OP_shr;
break;
default:
return 0;
}
break;
case 4:
switch(op) {
case '<':
opcode = OP_lt;
break;
case '>':
opcode = OP_gt;
break;
case TOK_LTE:
opcode = OP_lte;
break;
case TOK_GTE:
opcode = OP_gte;
break;
case TOK_INSTANCEOF:
opcode = OP_instanceof;
break;
case TOK_IN:
if (parse_flags & PF_IN_ACCEPTED) {
opcode = OP_in;
} else {
return 0;
}
break;
default:
return 0;
}
break;
case 5:
switch(op) {
case TOK_EQ:
opcode = OP_eq;
break;
case TOK_NEQ:
opcode = OP_neq;
break;
case TOK_STRICT_EQ:
opcode = OP_strict_eq;
break;
case TOK_STRICT_NEQ:
opcode = OP_strict_neq;
break;
default:
return 0;
}
break;
case 6:
switch(op) {
case '&':
opcode = OP_and;
break;
default:
return 0;
}
break;
case 7:
switch(op) {
case '^':
opcode = OP_xor;
break;
default:
return 0;
}
break;
case 8:
switch(op) {
case '|':
opcode = OP_or;
break;
default:
return 0;
}
break;
default:
abort();
}
if (next_token(s))
return -1;
if (js_parse_expr_binary(s, level - 1, parse_flags))
return -1;
emit_op(s, opcode);
}
return 0;
} | O2 | c | js_parse_expr_binary:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x5a5db
movl %edx, %ebp
movl %esi, %r14d
cmpl $-0x57, 0x20(%rbx)
jne 0x5a5b0
testb $0x1, %bpl
sete %al
cmpl $0x4, %r14d
setne %cl
orb %al, %cl
jne 0x5a5b0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x50fc5
cmpl $-0x49, %eax
jne 0x5a5b0
movslq 0x38(%rbx), %r14
cmpq $0xe0, %r14
jl 0x5a56e
movq (%rbx), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r14,8), %rax
incl (%rax)
movq %rbx, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x5a59d
cmpl $-0x49, 0x20(%rbx)
jne 0x5a59d
movq %rbx, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x5a59d
pushq $0x3
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5a50a
testl %eax, %eax
je 0x5a5f4
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x19e19
pushq $-0x1
popq %rax
jmp 0x5a65c
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x5a50a
pushq $-0x1
popq %r15
testl %eax, %eax
jne 0x5a62f
movl 0x20(%rbx), %ecx
leaq 0x287de(%rip), %r12 # 0x82db0
movslq (%r12,%r14,4), %rax
addq %r12, %rax
jmpq *%rax
pushq $0x4
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5a747
movq %rbx, %rdi
movl $0xc0, %esi
callq 0x4ee9f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x50580
movq 0x90(%rbx), %rax
movzwl 0xe8(%rax), %esi
movq %rbx, %rdi
callq 0x4eebe
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x19e19
jmp 0x5a65a
movl %r15d, %eax
jmp 0x5a65c
cmpl $0x25, %ecx
je 0x5a652
movb $-0x66, %r13b
cmpl $0x2a, %ecx
je 0x5a6e3
cmpl $0x2f, %ecx
jne 0x5a65a
movb $-0x65, %r13b
jmp 0x5a6e3
movb $-0x64, %r13b
jmp 0x5a6e3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $-0x63, %r13b
cmpl $0x2b, %ecx
je 0x5a6e3
cmpl $0x2d, %ecx
jne 0x5a65a
movb $-0x62, %r13b
jmp 0x5a6e3
addl $0x6a, %ecx
cmpl $0x3, %ecx
jae 0x5a65a
addb $-0x61, %cl
movl %ecx, %r13d
jmp 0x5a6e3
cmpl $-0x66, %ecx
je 0x5a6c0
cmpl $-0x64, %ecx
je 0x5a6ca
xorl %eax, %eax
cmpl $-0x49, %ecx
je 0x5a6b5
cmpl $-0x48, %ecx
je 0x5a6c5
movb $-0x5a, %r13b
cmpl $0x3c, %ecx
je 0x5a6e3
cmpl $0x3e, %ecx
jne 0x5a65c
movb $-0x58, %r13b
jmp 0x5a6e3
movb $-0x55, %r13b
testb $0x1, %bpl
jne 0x5a6e3
jmp 0x5a65c
movb $-0x59, %r13b
jmp 0x5a6e3
movb $-0x56, %r13b
jmp 0x5a6e3
movb $-0x57, %r13b
jmp 0x5a6e3
addl $0x63, %ecx
cmpl $0x4, %ecx
jae 0x5a65a
shll $0x3, %ecx
movl $0xafadaeac, %r13d # imm = 0xAFADAEAC
shrl %cl, %r13d
movq %rbx, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x5a62f
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x5a50a
testl %eax, %eax
jne 0x5a62f
movzbl %r13b, %esi
movq %rbx, %rdi
callq 0x4ee9f
movl 0x20(%rbx), %ecx
movslq (%r12,%r14,4), %rax
addq %r12, %rax
jmpq *%rax
movb $-0x5e, %r13b
cmpl $0x26, %ecx
je 0x5a6e3
jmp 0x5a65a
movb $-0x5d, %r13b
cmpl $0x5e, %ecx
je 0x5a6e3
jmp 0x5a65a
movb $-0x5c, %r13b
cmpl $0x7c, %ecx
je 0x5a6e3
jmp 0x5a65a
| js_parse_expr_binary:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
test esi, esi
jz loc_5A5DB
mov ebp, edx
mov r14d, esi
cmp dword ptr [rbx+20h], 0FFFFFFA9h
jnz loc_5A5B0
test bpl, 1
setz al
cmp r14d, 4
setnz cl
or cl, al
jnz short loc_5A5B0
mov rdi, rbx
xor esi, esi
call peek_token
cmp eax, 0FFFFFFB7h
jnz short loc_5A5B0
movsxd r14, dword ptr [rbx+38h]
cmp r14, 0E0h
jl short loc_5A56E
mov rax, [rbx]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r14*8]
inc dword ptr [rax]
loc_5A56E:
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_5A59D
cmp dword ptr [rbx+20h], 0FFFFFFB7h
jnz short loc_5A59D
mov rdi, rbx
call next_token
test eax, eax
jnz short loc_5A59D
push 3
pop rsi
mov rdi, rbx
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jz short loc_5A5F4
loc_5A59D:
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp loc_5A65C
loc_5A5B0:
dec r14d
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
push 0FFFFFFFFFFFFFFFFh
pop r15
test eax, eax
jnz short loc_5A62F
mov ecx, [rbx+20h]
lea r12, jpt_5A5D9
movsxd rax, ds:(jpt_5A5D9 - 82DB0h)[r12+r14*4]; switch 8 cases
add rax, r12
jmp rax; switch jump
loc_5A5DB:
push 4
pop rsi
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp js_parse_unary
loc_5A5F4:
mov rdi, rbx
mov esi, 0C0h
call emit_op
mov rdi, rbx
mov esi, r14d
call emit_atom
mov rax, [rbx+90h]
movzx esi, word ptr [rax+0E8h]
mov rdi, rbx
call emit_u16
mov rdi, [rbx]
mov esi, r14d
call JS_FreeAtom
jmp short loc_5A65A
loc_5A62F:
mov eax, r15d
jmp short loc_5A65C
loc_5A634:
cmp ecx, 25h ; '%'; jumptable 000000000005A5D9 case 0
jz short loc_5A652
mov r13b, 9Ah
cmp ecx, 2Ah ; '*'
jz loc_5A6E3
cmp ecx, 2Fh ; '/'
jnz short loc_5A65A
mov r13b, 9Bh
jmp loc_5A6E3
loc_5A652:
mov r13b, 9Ch
jmp loc_5A6E3
loc_5A65A:
xor eax, eax
loc_5A65C:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5A66B:
mov r13b, 9Dh; jumptable 000000000005A5D9 case 1
cmp ecx, 2Bh ; '+'
jz short loc_5A6E3
cmp ecx, 2Dh ; '-'
jnz short loc_5A65A
mov r13b, 9Eh
jmp short loc_5A6E3
loc_5A67D:
add ecx, 6Ah ; 'j'; jumptable 000000000005A5D9 case 2
cmp ecx, 3
jnb short loc_5A65A
add cl, 9Fh
mov r13d, ecx
jmp short loc_5A6E3
loc_5A68D:
cmp ecx, 0FFFFFF9Ah; jumptable 000000000005A5D9 case 3
jz short loc_5A6C0
cmp ecx, 0FFFFFF9Ch
jz short loc_5A6CA
xor eax, eax
cmp ecx, 0FFFFFFB7h
jz short loc_5A6B5
cmp ecx, 0FFFFFFB8h
jz short loc_5A6C5
mov r13b, 0A6h
cmp ecx, 3Ch ; '<'
jz short loc_5A6E3
cmp ecx, 3Eh ; '>'
jnz short loc_5A65C
mov r13b, 0A8h
jmp short loc_5A6E3
loc_5A6B5:
mov r13b, 0ABh
test bpl, 1
jnz short loc_5A6E3
jmp short loc_5A65C
loc_5A6C0:
mov r13b, 0A7h
jmp short loc_5A6E3
loc_5A6C5:
mov r13b, 0AAh
jmp short loc_5A6E3
loc_5A6CA:
mov r13b, 0A9h
jmp short loc_5A6E3
loc_5A6CF:
add ecx, 63h ; 'c'; jumptable 000000000005A5D9 case 4
cmp ecx, 4
jnb short loc_5A65A
shl ecx, 3
mov r13d, 0AFADAEACh
shr r13d, cl
loc_5A6E3:
mov rdi, rbx
call next_token
test eax, eax
jnz loc_5A62F
mov rdi, rbx
mov esi, r14d
mov edx, ebp
call js_parse_expr_binary
test eax, eax
jnz loc_5A62F
movzx esi, r13b
mov rdi, rbx
call emit_op
mov ecx, [rbx+20h]
movsxd rax, ds:(jpt_5A5D9 - 82DB0h)[r12+r14*4]; switch 8 cases
add rax, r12
jmp rax; switch jump
loc_5A720:
mov r13b, 0A2h; jumptable 000000000005A5D9 case 5
cmp ecx, 26h ; '&'
jz short loc_5A6E3
jmp loc_5A65A
loc_5A72D:
mov r13b, 0A3h; jumptable 000000000005A5D9 case 6
cmp ecx, 5Eh ; '^'
jz short loc_5A6E3
jmp loc_5A65A
loc_5A73A:
mov r13b, 0A4h; jumptable 000000000005A5D9 case 7
cmp ecx, 7Ch ; '|'
jz short loc_5A6E3
jmp loc_5A65A
| long long js_parse_expr_binary(
int *a1,
int a2,
unsigned int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
long long v18; // r14
_DWORD *v19; // rax
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long result; // rax
unsigned int v27; // r14d
long long v28; // rsi
long long v29; // rdx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rcx
unsigned int v35; // r13d
unsigned int v36; // ecx
if ( !a2 )
return js_parse_unary(a1, 4LL);
if ( a1[8] == -87 && (a3 & 1) != 0 && a2 == 4 && (unsigned int)peek_token((long long)a1, 0) == -73 )
{
v18 = a1[14];
if ( v18 >= 224 )
{
v19 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v18);
++*v19;
}
if ( (unsigned int)next_token((long long)a1, 0LL, v12, a4, a5, a6, a7, v16, v17, a10, a11, v13, v14, v15)
|| a1[8] != -73
|| (unsigned int)next_token((long long)a1, 0LL, v20, a4, a5, a6, a7, v24, v25, a10, a11, v21, v22, v23)
|| (unsigned int)js_parse_expr_binary(a1, 3LL, a3) )
{
JS_FreeAtom(*(_QWORD *)a1, v18);
return -1LL;
}
else
{
emit_op((long long)a1, 192);
emit_atom((long long)a1, (unsigned int)v18);
emit_u16((long long)a1, *(_WORD *)(*((_QWORD *)a1 + 18) + 232LL));
JS_FreeAtom(*(_QWORD *)a1, v18);
return 0LL;
}
}
else
{
v27 = a2 - 1;
v28 = v27;
if ( !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v34 = (unsigned int)a1[8];
switch ( v27 )
{
case 0u:
LABEL_17:
if ( (_DWORD)v34 == 37 )
{
LOBYTE(v35) = -100;
goto LABEL_43;
}
LOBYTE(v35) = -102;
if ( (_DWORD)v34 == 42 )
goto LABEL_43;
if ( (_DWORD)v34 == 47 )
{
LOBYTE(v35) = -101;
goto LABEL_43;
}
return 0LL;
case 1u:
LABEL_24:
LOBYTE(v35) = -99;
if ( (_DWORD)v34 == 43 )
goto LABEL_43;
if ( (_DWORD)v34 != 45 )
return 0LL;
LOBYTE(v35) = -98;
goto LABEL_43;
case 2u:
LABEL_27:
v34 = (unsigned int)(v34 + 106);
if ( (unsigned int)v34 >= 3 )
return 0LL;
LOBYTE(v34) = v34 - 97;
LOBYTE(v35) = v34;
goto LABEL_43;
case 3u:
while ( 2 )
{
if ( (_DWORD)v34 == -102 )
{
LOBYTE(v35) = -89;
}
else if ( (_DWORD)v34 == -100 )
{
LOBYTE(v35) = -87;
}
else
{
result = 0LL;
if ( (_DWORD)v34 == -73 )
{
LOBYTE(v35) = -85;
if ( (a3 & 1) == 0 )
return result;
}
else if ( (_DWORD)v34 == -72 )
{
LOBYTE(v35) = -86;
}
else
{
LOBYTE(v35) = -90;
if ( (_DWORD)v34 != 60 )
{
if ( (_DWORD)v34 != 62 )
return result;
LOBYTE(v35) = -88;
}
}
}
LABEL_43:
if ( !(unsigned int)next_token((long long)a1, v28, v29, a4, a5, a6, a7, v32, v33, a10, a11, v34, v30, v31)
&& !(unsigned int)js_parse_expr_binary(a1, v27, a3) )
{
v28 = (unsigned __int8)v35;
emit_op((long long)a1, v35);
v34 = (unsigned int)a1[8];
switch ( v27 )
{
case 0u:
goto LABEL_17;
case 1u:
goto LABEL_24;
case 2u:
goto LABEL_27;
case 3u:
continue;
case 4u:
goto LABEL_41;
case 5u:
goto LABEL_46;
case 6u:
goto LABEL_48;
case 7u:
goto LABEL_50;
}
}
break;
}
break;
case 4u:
LABEL_41:
v36 = v34 + 99;
if ( v36 >= 4 )
return 0LL;
v34 = 8 * v36;
v35 = 0xAFADAEAC >> v34;
goto LABEL_43;
case 5u:
LABEL_46:
LOBYTE(v35) = -94;
if ( (_DWORD)v34 != 38 )
return 0LL;
goto LABEL_43;
case 6u:
LABEL_48:
LOBYTE(v35) = -93;
if ( (_DWORD)v34 != 94 )
return 0LL;
goto LABEL_43;
case 7u:
LABEL_50:
LOBYTE(v35) = -92;
if ( (_DWORD)v34 != 124 )
return 0LL;
goto LABEL_43;
}
}
return 0xFFFFFFFFLL;
}
}
| js_parse_expr_binary:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
TEST ESI,ESI
JZ 0x0015a5db
MOV EBP,EDX
MOV R14D,ESI
CMP dword ptr [RBX + 0x20],-0x57
JNZ 0x0015a5b0
TEST BPL,0x1
SETZ AL
CMP R14D,0x4
SETNZ CL
OR CL,AL
JNZ 0x0015a5b0
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00150fc5
CMP EAX,-0x49
JNZ 0x0015a5b0
MOVSXD R14,dword ptr [RBX + 0x38]
CMP R14,0xe0
JL 0x0015a56e
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R14*0x8]
INC dword ptr [RAX]
LAB_0015a56e:
MOV RDI,RBX
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x0015a59d
CMP dword ptr [RBX + 0x20],-0x49
JNZ 0x0015a59d
MOV RDI,RBX
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x0015a59d
PUSH 0x3
POP RSI
MOV RDI,RBX
MOV EDX,EBP
CALL 0x0015a50a
TEST EAX,EAX
JZ 0x0015a5f4
LAB_0015a59d:
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x00119e19
PUSH -0x1
POP RAX
JMP 0x0015a65c
LAB_0015a5b0:
DEC R14D
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,EBP
CALL 0x0015a50a
PUSH -0x1
POP R15
TEST EAX,EAX
JNZ 0x0015a62f
MOV ECX,dword ptr [RBX + 0x20]
LEA R12,[0x182db0]
MOVSXD RAX,dword ptr [R12 + R14*0x4]
ADD RAX,R12
JMP RAX
LAB_0015a5db:
PUSH 0x4
POP RSI
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015a747
LAB_0015a5f4:
MOV RDI,RBX
MOV ESI,0xc0
CALL 0x0014ee9f
MOV RDI,RBX
MOV ESI,R14D
CALL 0x00150580
MOV RAX,qword ptr [RBX + 0x90]
MOVZX ESI,word ptr [RAX + 0xe8]
MOV RDI,RBX
CALL 0x0014eebe
MOV RDI,qword ptr [RBX]
MOV ESI,R14D
CALL 0x00119e19
JMP 0x0015a65a
LAB_0015a62f:
MOV EAX,R15D
JMP 0x0015a65c
LAB_0015a65a:
XOR EAX,EAX
LAB_0015a65c:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 js_parse_expr_binary(long *param_1,int param_2,uint param_3)
{
int *piVar1;
int iVar2;
int iVar3;
int8 uVar4;
if (param_2 == 0) {
uVar4 = js_parse_unary(param_1,4);
return uVar4;
}
if ((((int)param_1[4] == -0x57) && (param_2 == 4 && (param_3 & 1) != 0)) &&
(iVar2 = peek_token(param_1,0), iVar2 == -0x49)) {
iVar2 = (int)param_1[7];
if (0xdf < (long)iVar2) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (long)iVar2 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (((iVar3 == 0) && ((int)param_1[4] == -0x49)) &&
((iVar3 = next_token(param_1), iVar3 == 0 &&
(iVar3 = js_parse_expr_binary(param_1,3,param_3), iVar3 == 0)))) {
emit_op(param_1,0xc0);
emit_atom(param_1,iVar2);
emit_u16(param_1,*(int2 *)(param_1[0x12] + 0xe8));
JS_FreeAtom(*param_1,iVar2);
return 0;
}
JS_FreeAtom(*param_1,iVar2);
return 0xffffffffffffffff;
}
iVar2 = js_parse_expr_binary(param_1,(ulong)(param_2 - 1),param_3);
if (iVar2 != 0) {
return 0xffffffff;
}
/* WARNING: Could not recover jumptable at 0x0015a5d9. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (*(code *)(&DAT_00182db0 + *(int *)(&DAT_00182db0 + (ulong)(param_2 - 1) * 4)))();
return uVar4;
}
|
|
2,438 | ft_simple_get_word | eloqsql/storage/myisam/ft_parser.c | uchar ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end,
FT_WORD *word, my_bool skip_stopwords)
{
uchar *doc= *start;
uint mwc, length;
int mbl;
int ctype;
DBUG_ENTER("ft_simple_get_word");
do
{
for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
if (doc >= end)
DBUG_RETURN(0);
mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
break;
}
mwc= length= 0;
for (word->pos= doc; doc < end; length++,
doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1)))
{
mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
mwc= 0;
else if (!misc_word_char(*doc) || mwc)
break;
else
mwc++;
}
word->len= (uint)(doc-word->pos) - mwc;
if (skip_stopwords == FALSE ||
(length >= ft_min_word_len && length < ft_max_word_len &&
!is_stopword((char*) word->pos, word->len)))
{
*start= doc;
DBUG_RETURN(1);
}
} while (doc < end);
DBUG_RETURN(0);
} | O3 | c | ft_simple_get_word:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %rdx, %r12
movq %rdi, %r13
movq %rsi, -0x40(%rbp)
movq (%rsi), %r15
leaq -0x2c(%rbp), %rbx
movl $0x1, %r14d
cmpq %r12, %r15
jae 0x78fb6
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq *0x38(%rax)
testb $0x7, -0x2c(%rbp)
jne 0x78f0e
cmpb $0x5f, (%r15)
je 0x78f0e
movl %eax, %ecx
negl %ecx
testl %eax, %eax
cmovel %r14d, %ecx
cmovgl %eax, %ecx
addq %rcx, %r15
jmp 0x78ed1
movq -0x38(%rbp), %rax
movq %r15, (%rax)
xorl %r14d, %r14d
cmpq %r12, %r15
jae 0x78f5f
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq *0x38(%rax)
testb $0x7, -0x2c(%rbp)
jne 0x78f3f
cmpb $0x5f, (%r15)
jne 0x78f66
incl %r14d
movl %eax, %ecx
negl %ecx
testl %eax, %eax
movl $0x1, %edx
cmovel %edx, %ecx
cmovgl %eax, %ecx
addq %rcx, %r15
cmpq %r12, %r15
jb 0x78f1d
xorl %ecx, %ecx
jmp 0x78f68
movq %r15, %rdi
xorl %ecx, %ecx
jmp 0x78f72
movb $0x1, %cl
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movl %r14d, %r14d
movl %r15d, %esi
subl %edi, %esi
movq %rsi, 0x10(%rax)
cmpb $0x0, -0x30(%rbp)
je 0x78fc7
leaq 0x315cc8(%rip), %rax # 0x38ec50
cmpq %r14, (%rax)
ja 0x78fa8
leaq 0x315cc4(%rip), %rax # 0x38ec58
cmpq %r14, (%rax)
jbe 0x78fa8
movq %rcx, %r14
callq 0x76b05
movq %r14, %rcx
testl %eax, %eax
je 0x78fc7
testb %cl, %cl
movl $0x1, %r14d
jne 0x78ed1
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rax
movq %r15, (%rax)
movb $0x1, %al
jmp 0x78fb8
| ft_simple_get_word:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], r8d
mov [rbp+var_38], rcx
mov r12, rdx
mov r13, rdi
mov [rbp+var_40], rsi
mov r15, [rsi]
lea rbx, [rbp+var_2C]
mov r14d, 1
loc_78ED1:
cmp r15, r12
jnb loc_78FB6
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, rbx
mov rdx, r15
mov rcx, r12
call qword ptr [rax+38h]
test [rbp+var_2C], 7
jnz short loc_78F0E
cmp byte ptr [r15], 5Fh ; '_'
jz short loc_78F0E
mov ecx, eax
neg ecx
test eax, eax
cmovz ecx, r14d
cmovg ecx, eax
add r15, rcx
jmp short loc_78ED1
loc_78F0E:
mov rax, [rbp+var_38]
mov [rax], r15
xor r14d, r14d
cmp r15, r12
jnb short loc_78F5F
loc_78F1D:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, rbx
mov rdx, r15
mov rcx, r12
call qword ptr [rax+38h]
test [rbp+var_2C], 7
jnz short loc_78F3F
cmp byte ptr [r15], 5Fh ; '_'
jnz short loc_78F66
loc_78F3F:
inc r14d
mov ecx, eax
neg ecx
test eax, eax
mov edx, 1
cmovz ecx, edx
cmovg ecx, eax
add r15, rcx
cmp r15, r12
jb short loc_78F1D
xor ecx, ecx
jmp short loc_78F68
loc_78F5F:
mov rdi, r15
xor ecx, ecx
jmp short loc_78F72
loc_78F66:
mov cl, 1
loc_78F68:
mov rax, [rbp+var_38]
mov rdi, [rax]
mov r14d, r14d
loc_78F72:
mov esi, r15d
sub esi, edi
mov [rax+10h], rsi
cmp byte ptr [rbp+var_30], 0
jz short loc_78FC7
lea rax, ft_min_word_len
cmp [rax], r14
ja short loc_78FA8
lea rax, ft_max_word_len
cmp [rax], r14
jbe short loc_78FA8
mov r14, rcx
call is_stopword
mov rcx, r14
test eax, eax
jz short loc_78FC7
loc_78FA8:
test cl, cl
mov r14d, 1
jnz loc_78ED1
loc_78FB6:
xor eax, eax
loc_78FB8:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_78FC7:
mov rax, [rbp+var_40]
mov [rax], r15
mov al, 1
jmp short loc_78FB8
| char ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long *a4, char a5)
{
_BYTE *v7; // r15
int v8; // eax
long long v9; // rcx
long long *v10; // rax
unsigned long long v11; // r14
int v12; // eax
long long v13; // rcx
char v14; // cl
long long v15; // rdi
long long v16; // rsi
char v17; // r14
BOOL v18; // eax
_BYTE v23[44]; // [rsp+14h] [rbp-2Ch] BYREF
v7 = *a2;
while ( 1 )
{
while ( 1 )
{
if ( (unsigned long long)v7 >= a3 )
return 0;
v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))(
a1,
v23,
v7,
a3);
if ( (v23[0] & 7) != 0 || *v7 == 95 )
break;
v9 = (unsigned int)-v8;
if ( !v8 )
v9 = 1LL;
if ( v8 > 0 )
v9 = (unsigned int)v8;
v7 += v9;
}
v10 = a4;
*a4 = (long long)v7;
v11 = 0LL;
if ( (unsigned long long)v7 >= a3 )
{
v15 = (long long)v7;
v14 = 0;
}
else
{
while ( 1 )
{
v12 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))(
a1,
v23,
v7,
a3);
if ( (v23[0] & 7) == 0 && *v7 != 95 )
break;
LODWORD(v11) = v11 + 1;
v13 = (unsigned int)-v12;
if ( !v12 )
v13 = 1LL;
if ( v12 > 0 )
v13 = (unsigned int)v12;
v7 += v13;
if ( (unsigned long long)v7 >= a3 )
{
v14 = 0;
goto LABEL_21;
}
}
v14 = 1;
LABEL_21:
v10 = a4;
v15 = *a4;
v11 = (unsigned int)v11;
}
v16 = (unsigned int)((_DWORD)v7 - v15);
v10[2] = v16;
if ( !a5 )
break;
if ( ft_min_word_len <= v11 && ft_max_word_len > v11 )
{
v17 = v14;
v18 = is_stopword(v15, v16);
v14 = v17;
if ( !v18 )
break;
}
if ( !v14 )
return 0;
}
*a2 = v7;
return 1;
}
| ft_simple_get_word:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x38],RCX
MOV R12,RDX
MOV R13,RDI
MOV qword ptr [RBP + -0x40],RSI
MOV R15,qword ptr [RSI]
LEA RBX,[RBP + -0x2c]
MOV R14D,0x1
LAB_00178ed1:
CMP R15,R12
JNC 0x00178fb6
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R12
CALL qword ptr [RAX + 0x38]
TEST byte ptr [RBP + -0x2c],0x7
JNZ 0x00178f0e
CMP byte ptr [R15],0x5f
JZ 0x00178f0e
MOV ECX,EAX
NEG ECX
TEST EAX,EAX
CMOVZ ECX,R14D
CMOVG ECX,EAX
ADD R15,RCX
JMP 0x00178ed1
LAB_00178f0e:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],R15
XOR R14D,R14D
CMP R15,R12
JNC 0x00178f5f
LAB_00178f1d:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R12
CALL qword ptr [RAX + 0x38]
TEST byte ptr [RBP + -0x2c],0x7
JNZ 0x00178f3f
CMP byte ptr [R15],0x5f
JNZ 0x00178f66
LAB_00178f3f:
INC R14D
MOV ECX,EAX
NEG ECX
TEST EAX,EAX
MOV EDX,0x1
CMOVZ ECX,EDX
CMOVG ECX,EAX
ADD R15,RCX
CMP R15,R12
JC 0x00178f1d
XOR ECX,ECX
JMP 0x00178f68
LAB_00178f5f:
MOV RDI,R15
XOR ECX,ECX
JMP 0x00178f72
LAB_00178f66:
MOV CL,0x1
LAB_00178f68:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX]
MOV R14D,R14D
LAB_00178f72:
MOV ESI,R15D
SUB ESI,EDI
MOV qword ptr [RAX + 0x10],RSI
CMP byte ptr [RBP + -0x30],0x0
JZ 0x00178fc7
LEA RAX,[0x48ec50]
CMP qword ptr [RAX],R14
JA 0x00178fa8
LEA RAX,[0x48ec58]
CMP qword ptr [RAX],R14
JBE 0x00178fa8
MOV R14,RCX
CALL 0x00176b05
MOV RCX,R14
TEST EAX,EAX
JZ 0x00178fc7
LAB_00178fa8:
TEST CL,CL
MOV R14D,0x1
JNZ 0x00178ed1
LAB_00178fb6:
XOR EAX,EAX
LAB_00178fb8:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00178fc7:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R15
MOV AL,0x1
JMP 0x00178fb8
|
int8
ft_simple_get_word(long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5)
{
bool bVar1;
uint uVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
char *pcVar7;
char *pcVar8;
byte local_34 [4];
pcVar7 = (char *)*param_2;
do {
while( true ) {
if (param_3 <= pcVar7) {
return 0;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7);
if (((local_34[0] & 7) != 0) || (*pcVar7 == '_')) break;
uVar4 = (ulong)-uVar2;
if (uVar2 == 0) {
uVar4 = 1;
}
if (0 < (int)uVar2) {
uVar4 = (ulong)uVar2;
}
pcVar7 = pcVar7 + uVar4;
}
*param_4 = pcVar7;
uVar4 = 0;
if (pcVar7 < param_3) {
do {
uVar6 = (uint)uVar4;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7,param_3);
if (((local_34[0] & 7) == 0) && (*pcVar7 != '_')) {
bVar1 = true;
pcVar8 = pcVar7;
goto LAB_00178f68;
}
uVar6 = uVar6 + 1;
uVar4 = (ulong)uVar6;
uVar5 = (ulong)-uVar2;
if (uVar2 == 0) {
uVar5 = 1;
}
if (0 < (int)uVar2) {
uVar5 = (ulong)uVar2;
}
pcVar7 = pcVar7 + uVar5;
} while (pcVar7 < param_3);
bVar1 = false;
pcVar8 = pcVar7;
LAB_00178f68:
pcVar7 = (char *)*param_4;
uVar4 = (ulong)uVar6;
}
else {
bVar1 = false;
pcVar8 = pcVar7;
}
param_4[2] = (ulong)(uint)((int)pcVar8 - (int)pcVar7);
if ((param_5 == '\0') ||
(((ft_min_word_len <= uVar4 && (uVar4 < ft_max_word_len)) &&
(iVar3 = is_stopword(), iVar3 == 0)))) {
*param_2 = pcVar8;
return 1;
}
pcVar7 = pcVar8;
if (!bVar1) {
return 0;
}
} while( true );
}
|
|
2,439 | JS_NewCustomContext | bluesky950520[P]quickjs/run-test262.c | JSContext *JS_NewCustomContext(JSRuntime *rt)
{
JSContext *ctx;
ctx = JS_NewContext(rt);
if (ctx && local) {
js_init_module_std(ctx, "qjs:std");
js_init_module_os(ctx, "qjs:os");
js_init_module_bjson(ctx, "qjs:bjson");
}
return ctx;
} | O0 | c | JS_NewCustomContext:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2a850
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1118c
cmpl $0x0, 0x12c4f5(%rip) # 0x13d64c
je 0x1118c
movq 0x8(%rsp), %rdi
leaq 0xfe0b3(%rip), %rsi # 0x10f218
callq 0x16a30
movq 0x8(%rsp), %rdi
leaq 0xfe0aa(%rip), %rsi # 0x10f220
callq 0x16d40
movq 0x8(%rsp), %rdi
leaq 0xfe0a0(%rip), %rsi # 0x10f227
callq 0x18910
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_NewCustomContext:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]
call JS_NewContext
mov [rsp+18h+var_10], rax
cmp [rsp+18h+var_10], 0
jz short loc_1118C
cmp cs:local, 0
jz short loc_1118C
mov rdi, [rsp+18h+var_10]
lea rsi, aQjsStd; "qjs:std"
call js_init_module_std
mov rdi, [rsp+18h+var_10]
lea rsi, aQjsOs; "qjs:os"
call js_init_module_os
mov rdi, [rsp+18h+var_10]
lea rsi, aQjsBjson; "qjs:bjson"
call js_init_module_bjson
loc_1118C:
mov rax, [rsp+18h+var_10]
add rsp, 18h
retn
| long long JS_NewCustomContext(long long a1)
{
long long v2; // [rsp+8h] [rbp-10h]
v2 = JS_NewContext(a1);
if ( v2 && local )
{
js_init_module_std(v2, "qjs:std");
js_init_module_os(v2, "qjs:os");
js_init_module_bjson(v2, "qjs:bjson");
}
return v2;
}
| JS_NewCustomContext:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0012a850
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0011118c
CMP dword ptr [0x0023d64c],0x0
JZ 0x0011118c
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x20f218]
CALL 0x00116a30
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x20f220]
CALL 0x00116d40
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x20f227]
CALL 0x00118910
LAB_0011118c:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x18
RET
|
long JS_NewCustomContext(int8 param_1)
{
long lVar1;
lVar1 = JS_NewContext(param_1);
if ((lVar1 != 0) && (local != 0)) {
js_init_module_std(lVar1,"qjs:std");
js_init_module_os(lVar1,"qjs:os");
js_init_module_bjson(lVar1,"qjs:bjson");
}
return lVar1;
}
|
|
2,440 | JS_NewCustomContext | bluesky950520[P]quickjs/run-test262.c | JSContext *JS_NewCustomContext(JSRuntime *rt)
{
JSContext *ctx;
ctx = JS_NewContext(rt);
if (ctx && local) {
js_init_module_std(ctx, "qjs:std");
js_init_module_os(ctx, "qjs:os");
js_init_module_bjson(ctx, "qjs:bjson");
}
return ctx;
} | O2 | c | JS_NewCustomContext:
pushq %rbx
callq 0x1c172
movq %rax, %rbx
testq %rax, %rax
je 0x10430
cmpl $0x0, 0xaf20b(%rip) # 0xbf60c
je 0x10430
leaq 0x74e04(%rip), %rsi # 0x8520e
movq %rbx, %rdi
callq 0x136ff
leaq 0x74dfd(%rip), %rsi # 0x85216
movq %rbx, %rdi
callq 0x13894
leaq 0x74df5(%rip), %rsi # 0x8521d
movq %rbx, %rdi
callq 0x14790
movq %rbx, %rax
popq %rbx
retq
| JS_NewCustomContext:
push rbx
call JS_NewContext
mov rbx, rax
test rax, rax
jz short loc_10430
cmp cs:local, 0
jz short loc_10430
lea rsi, aQjsStd; "qjs:std"
mov rdi, rbx
call js_init_module_std
lea rsi, aQjsOs; "qjs:os"
mov rdi, rbx
call js_init_module_os
lea rsi, aQjsBjson; "qjs:bjson"
mov rdi, rbx
call js_init_module_bjson
loc_10430:
mov rax, rbx
pop rbx
retn
| long long JS_NewCustomContext()
{
long long v0; // rax
long long v1; // rbx
v0 = JS_NewContext();
v1 = v0;
if ( v0 && local )
{
js_init_module_std(v0, "qjs:std");
js_init_module_os(v1, "qjs:os");
js_init_module_bjson(v1, "qjs:bjson");
}
return v1;
}
| JS_NewCustomContext:
PUSH RBX
CALL 0x0011c172
MOV RBX,RAX
TEST RAX,RAX
JZ 0x00110430
CMP dword ptr [0x001bf60c],0x0
JZ 0x00110430
LEA RSI,[0x18520e]
MOV RDI,RBX
CALL 0x001136ff
LEA RSI,[0x185216]
MOV RDI,RBX
CALL 0x00113894
LEA RSI,[0x18521d]
MOV RDI,RBX
CALL 0x00114790
LAB_00110430:
MOV RAX,RBX
POP RBX
RET
|
long JS_NewCustomContext(void)
{
long lVar1;
lVar1 = JS_NewContext();
if ((lVar1 != 0) && (local != 0)) {
js_init_module_std(lVar1,"qjs:std");
js_init_module_os(lVar1,"qjs:os");
js_init_module_bjson(lVar1,"qjs:bjson");
}
return lVar1;
}
|
|
2,441 | JS_NewCustomContext | bluesky950520[P]quickjs/run-test262.c | JSContext *JS_NewCustomContext(JSRuntime *rt)
{
JSContext *ctx;
ctx = JS_NewContext(rt);
if (ctx && local) {
js_init_module_std(ctx, "qjs:std");
js_init_module_os(ctx, "qjs:os");
js_init_module_bjson(ctx, "qjs:bjson");
}
return ctx;
} | O3 | c | JS_NewCustomContext:
pushq %rbx
callq 0xf6e4
movq %rax, %rbx
testq %rax, %rax
je 0x16212
cmpl $0x0, 0xbf419(%rip) # 0xd55fc
je 0x16212
leaq 0x8c022(%rip), %rsi # 0xa220e
movq %rbx, %rdi
callq 0x19611
leaq 0x8c01b(%rip), %rsi # 0xa2216
movq %rbx, %rdi
callq 0x197b2
leaq 0x8c013(%rip), %rsi # 0xa221d
movq %rbx, %rdi
callq 0x1a73f
movq %rbx, %rax
popq %rbx
retq
| JS_NewCustomContext:
push rbx
call JS_NewContext
mov rbx, rax
test rax, rax
jz short loc_16212
cmp cs:local, 0
jz short loc_16212
lea rsi, aQjsStd; "qjs:std"
mov rdi, rbx
call js_init_module_std
lea rsi, aQjsOs; "qjs:os"
mov rdi, rbx
call js_init_module_os
lea rsi, aQjsBjson; "qjs:bjson"
mov rdi, rbx
call js_init_module_bjson
loc_16212:
mov rax, rbx
pop rbx
retn
| _QWORD * JS_NewCustomContext(long long a1)
{
_QWORD *v1; // rax
_QWORD *v2; // rbx
v1 = JS_NewContext(a1);
v2 = v1;
if ( v1 && local )
{
js_init_module_std(v1, "qjs:std");
js_init_module_os(v2, "qjs:os");
js_init_module_bjson(v2, "qjs:bjson");
}
return v2;
}
| JS_NewCustomContext:
PUSH RBX
CALL 0x0010f6e4
MOV RBX,RAX
TEST RAX,RAX
JZ 0x00116212
CMP dword ptr [0x001d55fc],0x0
JZ 0x00116212
LEA RSI,[0x1a220e]
MOV RDI,RBX
CALL 0x00119611
LEA RSI,[0x1a2216]
MOV RDI,RBX
CALL 0x001197b2
LEA RSI,[0x1a221d]
MOV RDI,RBX
CALL 0x0011a73f
LAB_00116212:
MOV RAX,RBX
POP RBX
RET
|
long JS_NewCustomContext(void)
{
long lVar1;
lVar1 = JS_NewContext();
if ((lVar1 != 0) && (local != 0)) {
js_init_module_std(lVar1,"qjs:std");
js_init_module_os(lVar1,"qjs:os");
js_init_module_bjson(lVar1,"qjs:bjson");
}
return lVar1;
}
|
|
2,442 | minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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>>>> const&, std::shared_ptr<minja::Expression>&&) | llama.cpp/common/minja/minja.hpp | SetNode(const Location & loc, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v)
: TemplateNode(loc), ns(ns), var_names(vns), value(std::move(v)) {} | O3 | cpp | minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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>>>> const&, std::shared_ptr<minja::Expression>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
leaq 0x7180f(%rip), %r13 # 0x164500
addq $0x10, %r13
movq %r13, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xf2d21
movq 0x72285(%rip), %rcx # 0x164f98
cmpb $0x0, (%rcx)
je 0xf2d1d
incl 0x8(%rax)
jmp 0xf2d21
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x71a38(%rip), %rax # 0x164768
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %rbp
movq %rbp, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x288e8
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0x65064
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0xf2da2
movq (%rbp), %rsi
incq %rsi
callq 0x21170
jmp 0xf2da2
movq %rax, %r14
movq %r13, (%rbx)
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x70882
movq %r14, %rdi
callq 0x21af0
nop
| _ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov rbx, rdi
lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r13, 10h
mov [rdi], r13
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_F2D21
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_F2D1D
inc dword ptr [rax+8]
jmp short loc_F2D21
loc_F2D1D:
lock inc dword ptr [rax+8]
loc_F2D21:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode
add rax, 10h
mov [rbx], rax
lea r12, [rbx+20h]
lea rbp, [rbx+30h]
mov [rbx+20h], rbp
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+40h]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
xor eax, eax
mov [rbx+60h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+58h], xmm0
mov [r14], rax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r12]; void *
cmp rdi, rbp
jz short loc_F2DA2
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F2DA2
mov r14, rax
loc_F2DA2:
mov [rbx], r13
add rbx, 10h
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5)
{
long long v7; // rax
long long result; // rax
__int128 v9; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v7 = a2[1];
*(_QWORD *)(a1 + 16) = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v7 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v7 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetNode + 2;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
std::vector<std::string>::vector(a1 + 64, a4);
result = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v9 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v9;
*(_QWORD *)a5 = 0LL;
return result;
}
| SetNode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV RBX,RDI
LEA R13,[0x264500]
ADD R13,0x10
MOV qword ptr [RDI],R13
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001f2d21
MOV RCX,qword ptr [0x00264f98]
CMP byte ptr [RCX],0x0
JZ 0x001f2d1d
INC dword ptr [RAX + 0x8]
JMP 0x001f2d21
LAB_001f2d1d:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001f2d21:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x264768]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA R12,[RBX + 0x20]
LEA RBP,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RBP
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_001f2d4d:
MOV RDI,R12
CALL 0x001288e8
LEA RDI,[RBX + 0x40]
LAB_001f2d59:
MOV RSI,R15
CALL 0x00165064
LAB_001f2d61:
XOR EAX,EAX
MOV qword ptr [RBX + 0x60],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [R14],RAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SetNode::SetNode
(SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_00264510;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_00264778;
*(SetNode **)(this + 0x20) = this + 0x30;
/* try { // try from 001f2d4d to 001f2d54 has its CatchHandler @ 001f2d9f */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
/* try { // try from 001f2d59 to 001f2d60 has its CatchHandler @ 001f2d85 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40),
param_3);
*(int8 *)(this + 0x60) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_4;
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)param_4 = 0;
return;
}
|
|
2,443 | minja::Value::get(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value get(const Value& key) {
if (array_) {
if (!key.is_number_integer()) {
return Value();
}
auto index = key.get<int>();
return array_->at(index < 0 ? array_->size() + index : index);
} else if (object_) {
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
auto it = object_->find(key.primitive_);
if (it == object_->end()) return Value();
return it->second;
}
return Value();
} | O3 | cpp | minja::Value::get(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
je 0x8fc26
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x2, %al
jae 0x8fcd4
movq %r15, %rdi
callq 0x8fed8
movq 0x10(%r14), %rcx
testl %eax, %eax
js 0x8fc83
movl %eax, %eax
movq (%rcx), %rsi
movq 0x8(%rcx), %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
jmp 0x8fca4
movq 0x20(%r14), %r13
testq %r13, %r13
je 0x8fcd4
cmpq $0x0, 0x10(%r15)
jne 0x8fd33
cmpq $0x0, 0x20(%r15)
jne 0x8fd33
cmpq $0x0, 0x30(%r15)
jne 0x8fd33
movq (%r13), %r12
movq 0x8(%r13), %rsi
cmpq %rsi, %r12
je 0x8fcc1
addq $0x40, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x8c820
testb %al, %al
jne 0x8fcb6
addq $0x60, %r12
movq 0x8(%r13), %rsi
cmpq %rsi, %r12
jne 0x8fc65
jmp 0x8fcb9
movq (%rcx), %rsi
movq 0x8(%rcx), %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cltq
addq %rdx, %rax
cmpq %rax, %rdx
jbe 0x8fd22
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq %rax, %rsi
jmp 0x8fcca
movq %r12, %rsi
movq 0x20(%r14), %rax
movq 0x8(%rax), %r12
cmpq %r12, %rsi
je 0x8fcd4
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x8cede
jmp 0x8fd10
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x57ee4
movq %r14, %rdi
movl $0x1, %esi
callq 0x57ee4
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f693(%rip), %rdi # 0xef3bc
movq %rax, %rsi
xorl %eax, %eax
callq 0x1ad00
movl $0x10, %edi
callq 0x1a440
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x85b54
leaq 0x5f4f3(%rip), %rsi # 0xef24e
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x782e9
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ae30
xorl %ebp, %ebp
movq 0x9b26d(%rip), %rsi # 0x12aff0
movq 0x9b1d6(%rip), %rdx # 0x12af60
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8fdb0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8fdcb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x8fdf5
jmp 0x8fdfd
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8fdf5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x8fdf5
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afa0
nop
| _ZN5minja5Value3getERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rsi+10h], 0
jz short loc_8FC26
mov al, [r15+40h]
add al, 0FBh
cmp al, 2
jnb loc_8FCD4
mov rdi, r15
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
mov rcx, [r14+10h]
test eax, eax
js short loc_8FC83
mov eax, eax
mov rsi, [rcx]
mov rcx, [rcx+8]
sub rcx, rsi
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
jmp short loc_8FCA4
loc_8FC26:
mov r13, [r14+20h]
test r13, r13
jz loc_8FCD4
cmp qword ptr [r15+10h], 0
jnz loc_8FD33
cmp qword ptr [r15+20h], 0
jnz loc_8FD33
cmp qword ptr [r15+30h], 0
jnz loc_8FD33
mov r12, [r13+0]
mov rsi, [r13+8]
cmp r12, rsi
jz short loc_8FCC1
add r15, 40h ; '@'
loc_8FC65:
mov rdi, r12
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_8FCB6
add r12, 60h ; '`'
mov rsi, [r13+8]
cmp r12, rsi
jnz short loc_8FC65
jmp short loc_8FCB9
loc_8FC83:
mov rsi, [rcx]
mov rcx, [rcx+8]
sub rcx, rsi
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cdqe
add rax, rdx
loc_8FCA4:
cmp rdx, rax
jbe short loc_8FD22
lea rax, [rax+rax*4]
shl rax, 4
add rsi, rax
jmp short loc_8FCCA
loc_8FCB6:
mov rsi, r12
loc_8FCB9:
mov rax, [r14+20h]
mov r12, [rax+8]
loc_8FCC1:
cmp rsi, r12
jz short loc_8FCD4
add rsi, 10h; minja::Value *
loc_8FCCA:
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
jmp short loc_8FD10
loc_8FCD4:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 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)
loc_8FD10:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8FD22:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
mov rsi, rax
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_8FD33:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+78h+var_70]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8FDB0
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8FDB0:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8FDCB
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8FDCB:
test bpl, bpl
jnz short loc_8FDF5
jmp short loc_8FDFD
mov r14, rax
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8FDF5
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8FDF5
mov r14, rax
loc_8FDF5:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8FDFD:
mov rdi, r14
call __Unwind_Resume
| minja::Value * minja::Value::get(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4)
{
unsigned long long v5; // rax
long long *v6; // rcx
long long v7; // rsi
unsigned long long v8; // rdx
unsigned __int8 **v9; // r13
unsigned __int8 *v10; // r12
unsigned __int8 *v11; // rsi
unsigned __int8 *v12; // r15
const minja::Value *v13; // rsi
void *exception; // rbx
_BYTE v16[16]; // [rsp+8h] [rbp-70h] BYREF
_BYTE v17[16]; // [rsp+28h] [rbp-50h] BYREF
if ( *((_QWORD *)a2 + 2) )
{
if ( (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) < 2u )
{
LODWORD(v5) = minja::Value::get<int>(a3);
v6 = (long long *)*((_QWORD *)a2 + 2);
if ( (v5 & 0x80000000) != 0LL )
{
v7 = *v6;
v8 = 0xCCCCCCCCCCCCCCCDLL * ((v6[1] - *v6) >> 4);
v5 = v8 + (int)v5;
}
else
{
v5 = (unsigned int)v5;
v7 = *v6;
v8 = 0xCCCCCCCCCCCCCCCDLL * ((v6[1] - *v6) >> 4);
}
if ( v8 <= v5 )
std::__throw_out_of_range_fmt(
"vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
v5,
v8);
v13 = (const minja::Value *)(80 * v5 + v7);
goto LABEL_21;
}
LABEL_22:
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 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((char *)this + 64);
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 *)this + 64);
return this;
}
v9 = (unsigned __int8 **)*((_QWORD *)a2 + 4);
if ( !v9 )
goto LABEL_22;
if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v16, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v17, (long long)"Unashable type: ", (long long)v16);
std::runtime_error::runtime_error(exception, v17);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v10 = *v9;
v11 = v9[1];
if ( *v9 != v11 )
{
v12 = (unsigned __int8 *)(a3 + 64);
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v10, v12, a4) )
{
v10 += 96;
v11 = v9[1];
if ( v10 == v11 )
goto LABEL_18;
}
v11 = v10;
LABEL_18:
v10 = *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL);
}
if ( v11 == v10 )
goto LABEL_22;
v13 = (const minja::Value *)(v11 + 16);
LABEL_21:
minja::Value::Value(this, v13);
return this;
}
| get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RSI + 0x10],0x0
JZ 0x0018fc26
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x2
JNC 0x0018fcd4
MOV RDI,R15
CALL 0x0018fed8
MOV RCX,qword ptr [R14 + 0x10]
TEST EAX,EAX
JS 0x0018fc83
MOV EAX,EAX
MOV RSI,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RSI
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
JMP 0x0018fca4
LAB_0018fc26:
MOV R13,qword ptr [R14 + 0x20]
TEST R13,R13
JZ 0x0018fcd4
CMP qword ptr [R15 + 0x10],0x0
JNZ 0x0018fd33
CMP qword ptr [R15 + 0x20],0x0
JNZ 0x0018fd33
CMP qword ptr [R15 + 0x30],0x0
JNZ 0x0018fd33
MOV R12,qword ptr [R13]
MOV RSI,qword ptr [R13 + 0x8]
CMP R12,RSI
JZ 0x0018fcc1
ADD R15,0x40
LAB_0018fc65:
MOV RDI,R12
MOV RSI,R15
CALL 0x0018c820
TEST AL,AL
JNZ 0x0018fcb6
ADD R12,0x60
MOV RSI,qword ptr [R13 + 0x8]
CMP R12,RSI
JNZ 0x0018fc65
JMP 0x0018fcb9
LAB_0018fc83:
MOV RSI,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RSI
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CDQE
ADD RAX,RDX
LAB_0018fca4:
CMP RDX,RAX
JBE 0x0018fd22
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
ADD RSI,RAX
JMP 0x0018fcca
LAB_0018fcb6:
MOV RSI,R12
LAB_0018fcb9:
MOV RAX,qword ptr [R14 + 0x20]
MOV R12,qword ptr [RAX + 0x8]
LAB_0018fcc1:
CMP RSI,R12
JZ 0x0018fcd4
ADD RSI,0x10
LAB_0018fcca:
MOV RDI,RBX
CALL 0x0018cede
JMP 0x0018fd10
LAB_0018fcd4:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157ee4
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157ee4
LAB_0018fd10:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018fd22:
LEA RDI,[0x1ef3bc]
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0011ad00
LAB_0018fd33:
MOV EDI,0x10
CALL 0x0011a440
MOV RBX,RAX
LAB_0018fd40:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00185b54
LAB_0018fd54:
LEA RSI,[0x1ef24e]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001782e9
MOV BPL,0x1
LAB_0018fd6d:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0011ae30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022aff0]
MOV RDX,qword ptr [0x0022af60]
MOV RDI,RBX
CALL 0x0011af20
|
/* minja::Value::get(minja::Value const&) */
Value * minja::Value::get(Value *param_1)
{
long *plVar1;
char cVar2;
uint uVar3;
ulong uVar4;
runtime_error *this;
Value *in_RDX;
ulong uVar5;
long in_RSI;
long lVar6;
Value *pVVar7;
basic_json *pbVar8;
bool bVar9;
basic_json *pbVar10;
int1 local_70 [32];
string local_50 [32];
if (*(long *)(in_RSI + 0x10) == 0) {
plVar1 = *(long **)(in_RSI + 0x20);
if (plVar1 != (long *)0x0) {
if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) ||
(*(long *)(in_RDX + 0x30) != 0)) goto LAB_0018fd33;
pbVar10 = (basic_json *)*plVar1;
pbVar8 = (basic_json *)plVar1[1];
if (pbVar10 != pbVar8) {
do {
pbVar8 = pbVar10;
cVar2 = nlohmann::json_abi_v3_11_3::operator==(pbVar8,(basic_json *)(in_RDX + 0x40));
if (cVar2 != '\0') break;
pbVar10 = pbVar8 + 0x60;
pbVar8 = (basic_json *)plVar1[1];
} while (pbVar10 != pbVar8);
pbVar10 = *(basic_json **)(*(long *)(in_RSI + 0x20) + 8);
}
if (pbVar8 != pbVar10) {
pVVar7 = (Value *)(pbVar8 + 0x10);
goto LAB_0018fcca;
}
}
}
else if ((byte)((char)in_RDX[0x40] - 5U) < 2) {
uVar3 = get<int>(in_RDX);
plVar1 = *(long **)(in_RSI + 0x10);
if ((int)uVar3 < 0) {
lVar6 = *plVar1;
uVar5 = (plVar1[1] - lVar6 >> 4) * -0x3333333333333333;
uVar4 = (long)(int)uVar3 + uVar5;
}
else {
uVar4 = (ulong)uVar3;
lVar6 = *plVar1;
uVar5 = (plVar1[1] - lVar6 >> 4) * -0x3333333333333333;
}
if (uVar4 < uVar5) {
pVVar7 = (Value *)(lVar6 + uVar4 * 0x50);
LAB_0018fcca:
Value(param_1,pVVar7);
return param_1;
}
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",uVar4);
LAB_0018fd33:
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018fd40 to 0018fd53 has its CatchHandler @ 0018fdf2 */
dump_abi_cxx11_((int)local_70,SUB81(in_RSI,0));
/* try { // try from 0018fd54 to 0018fd69 has its CatchHandler @ 0018fdd2 */
std::operator+((char *)local_50,(string *)"Unashable type: ");
/* try { // try from 0018fd6d to 0018fd91 has its CatchHandler @ 0018fd92 */
std::runtime_error::runtime_error(this,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60);
}
bVar9 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (Value)0x0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar9);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar9);
return param_1;
}
|
|
2,444 | spdlog::details::os::now() | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/os-inl.h | SPDLOG_INLINE spdlog::log_clock::time_point now() SPDLOG_NOEXCEPT {
#if defined __linux__ && defined SPDLOG_CLOCK_COARSE
timespec ts;
::clock_gettime(CLOCK_REALTIME_COARSE, &ts);
return std::chrono::time_point<log_clock, typename log_clock::duration>(
std::chrono::duration_cast<typename log_clock::duration>(
std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec)));
#else
return log_clock::now();
#endif
} | O0 | c | spdlog::details::os::now():
pushq %rax
callq 0x14070
movq %rax, (%rsp)
movq (%rsp), %rax
popq %rcx
retq
| _ZN6spdlog7details2os3nowEv:
push rax
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [rsp+8+var_8], rax
mov rax, [rsp+8+var_8]
pop rcx
retn
| long long spdlog::details::os::now(spdlog::details::os *this)
{
return std::chrono::_V2::system_clock::now(this);
}
| now:
PUSH RAX
CALL 0x00114070
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
POP RCX
RET
|
/* spdlog::details::os::now() */
int8 spdlog::details::os::now(void)
{
int8 uVar1;
uVar1 = std::chrono::_V2::system_clock::now();
return uVar1;
}
|
|
2,445 | OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
Level::createFVarChannel(int fvarValueCount, Sdc::Options const& fvarOptions) {
FVarLevel* fvarLevel = new FVarLevel(*this);
fvarLevel->setOptions(fvarOptions);
fvarLevel->resizeValues(fvarValueCount);
fvarLevel->resizeComponents();
_fvarChannels.push_back(fvarLevel);
return (int)_fvarChannels.size() - 1;
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options const&):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0xd8, %edi
callq 0xcd100
movq -0x40(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0xca550
jmp 0xf1bda
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc4ea0
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xcfc10
movq -0x20(%rbp), %rdi
callq 0xd4480
movq -0x40(%rbp), %rdi
addq $0x1c8, %rdi # imm = 0x1C8
leaq -0x20(%rbp), %rsi
callq 0xd4600
movq -0x40(%rbp), %rdi
addq $0x1c8, %rdi # imm = 0x1C8
callq 0xc5550
subl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0xd8, %esi
callq 0xcd3e0
movq -0x28(%rbp), %rdi
callq 0xd58b0
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Vtr8internal5Level17createFVarChannelEiRKNS0_3Sdc7OptionsE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov edi, 0D8h; unsigned __int64
call __Znwm; operator new(ulong)
mov rsi, [rbp+var_40]; OpenSubdiv::v3_6_0::Vtr::internal::Level *
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_38], rax
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevelC2ERKNS2_5LevelE; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::FVarLevel(OpenSubdiv::v3_6_0::Vtr::internal::Level const&)
jmp short $+2
loc_F1BDA:
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_18]; OpenSubdiv::v3_6_0::Sdc::Options *
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel10setOptionsERKNS0_3Sdc7OptionsE; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::setOptions(OpenSubdiv::v3_6_0::Sdc::Options const&)
mov rdi, [rbp+var_20]; this
mov esi, [rbp+var_C]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel12resizeValuesEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeValues(int)
mov rdi, [rbp+var_20]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel16resizeComponentsEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(void)
mov rdi, [rbp+var_40]
add rdi, 1C8h
lea rsi, [rbp+var_20]
call __ZNSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevelESaIS5_EE9push_backERKS5_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::push_back(OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel * const&)
mov rdi, [rbp+var_40]
add rdi, 1C8h
call __ZNKSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevelESaIS5_EE4sizeEv; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::size(void)
sub eax, 1
add rsp, 40h
pop rbp
retn
mov rdi, [rbp+var_38]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
mov esi, 0D8h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rbp+var_28]
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this,
int a2,
const OpenSubdiv::v3_6_0::Sdc::Options *a3)
{
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v4; // [rsp+8h] [rbp-38h]
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v5; // [rsp+20h] [rbp-20h] BYREF
OpenSubdiv::v3_6_0::Sdc::Options *v6; // [rsp+28h] [rbp-18h]
int v7; // [rsp+34h] [rbp-Ch]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v8; // [rsp+38h] [rbp-8h]
v8 = this;
v7 = a2;
v6 = a3;
v4 = (OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *)operator new(0xD8uLL);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::FVarLevel(v4, this);
v5 = v4;
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::setOptions(v4, v6);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeValues(v4, a2);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(v4);
std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::push_back((char *)this + 456, &v5);
return (unsigned int)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::size((char *)this + 456) - 1;
}
| createFVarChannel:
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 RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV EDI,0xd8
CALL 0x001cd100
MOV RSI,qword ptr [RBP + -0x40]
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x38],RAX
LAB_001f1bd3:
CALL 0x001ca550
LAB_001f1bd8:
JMP 0x001f1bda
LAB_001f1bda:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001c4ea0
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001cfc10
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001d4480
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x1c8
LEA RSI,[RBP + -0x20]
CALL 0x001d4600
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x1c8
CALL 0x001c5550
SUB EAX,0x1
ADD RSP,0x40
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options
const&) */
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel
(Level *this,int param_1,Options *param_2)
{
int iVar1;
FVarLevel *this_00;
FVarLevel *local_28;
Options *local_20;
int local_14;
Level *local_10;
local_20 = param_2;
local_14 = param_1;
local_10 = this;
this_00 = (FVarLevel *)operator_new(0xd8);
/* try { // try from 001f1bd3 to 001f1bd7 has its CatchHandler @ 001f1c31 */
FVarLevel::FVarLevel(this_00,this);
local_28 = this_00;
FVarLevel::setOptions(this_00,local_20);
FVarLevel::resizeValues(local_28,local_14);
FVarLevel::resizeComponents(local_28);
std::
vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
::push_back((vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
*)(this + 0x1c8),&local_28);
iVar1 = std::
vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
::size((vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
*)(this + 0x1c8));
return iVar1 + -1;
}
|
|
2,446 | OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
Level::createFVarChannel(int fvarValueCount, Sdc::Options const& fvarOptions) {
FVarLevel* fvarLevel = new FVarLevel(*this);
fvarLevel->setOptions(fvarOptions);
fvarLevel->resizeValues(fvarValueCount);
fvarLevel->resizeComponents();
_fvarChannels.push_back(fvarLevel);
return (int)_fvarChannels.size() - 1;
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl $0xd8, %edi
callq 0x3a230
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x39860
movq %r15, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x38570
movq (%rsp), %rdi
movl %ebp, %esi
callq 0x3aa10
movq (%rsp), %rdi
callq 0x3b850
movq 0x1d0(%rbx), %rsi
cmpq 0x1d8(%rbx), %rsi
je 0x45d23
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x1d0(%rbx)
jmp 0x45d32
leaq 0x1c8(%rbx), %rdi
movq %rsp, %rdx
callq 0x39780
movq 0x1d0(%rbx), %rax
subq 0x1c8(%rbx), %rax
shrq $0x3, %rax
decl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xd8, %esi
movq %r15, %rdi
callq 0x3a2d0
movq %rbx, %rdi
callq 0x3bd70
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal5Level17createFVarChannelEiRKNS0_3Sdc7OptionsE:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov ebp, esi
mov rbx, rdi
mov edi, 0D8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax; this
mov rsi, rbx; OpenSubdiv::v3_6_0::Vtr::internal::Level *
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevelC2ERKNS2_5LevelE; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::FVarLevel(OpenSubdiv::v3_6_0::Vtr::internal::Level const&)
mov [rsp+28h+var_28], r15
mov rdi, r15
mov rsi, r14
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel10setOptionsERKNS0_3Sdc7OptionsE; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::setOptions(OpenSubdiv::v3_6_0::Sdc::Options const&)
mov rdi, [rsp+28h+var_28]; this
mov esi, ebp; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel12resizeValuesEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeValues(int)
mov rdi, [rsp+28h+var_28]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel16resizeComponentsEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(void)
mov rsi, [rbx+1D0h]
cmp rsi, [rbx+1D8h]
jz short loc_45D23
mov rax, [rsp+28h+var_28]
mov [rsi], rax
add qword ptr [rbx+1D0h], 8
jmp short loc_45D32
loc_45D23:
lea rdi, [rbx+1C8h]
mov rdx, rsp
call __ZNSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevelESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::_M_realloc_insert<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel * const&>(__gnu_cxx::__normal_iterator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel **,std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>>,OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel * const&)
loc_45D32:
mov rax, [rbx+1D0h]
sub rax, [rbx+1C8h]
shr rax, 3
dec eax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 0D8h; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel ***a1,
int a2,
unsigned int *a3)
{
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v4; // r15
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel **v5; // rsi
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v7; // [rsp+0h] [rbp-28h] BYREF
v4 = (OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *)operator new(0xD8uLL);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::FVarLevel(v4, (const OpenSubdiv::v3_6_0::Vtr::internal::Level *)a1);
v7 = v4;
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::setOptions((long long)v4, a3);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeValues(v4, a2);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(v4);
v5 = a1[58];
if ( v5 == a1[59] )
{
std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::_M_realloc_insert<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel * const&>(
a1 + 57,
v5,
&v7);
}
else
{
*v5 = v7;
++a1[58];
}
return (unsigned int)((unsigned long long)((char *)a1[58] - (char *)a1[57]) >> 3) - 1;
}
| createFVarChannel:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV EDI,0xd8
CALL 0x0013a230
MOV R15,RAX
LAB_00145cd4:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00139860
LAB_00145cdf:
MOV qword ptr [RSP],R15
MOV RDI,R15
MOV RSI,R14
CALL 0x00138570
MOV RDI,qword ptr [RSP]
MOV ESI,EBP
CALL 0x0013aa10
MOV RDI,qword ptr [RSP]
CALL 0x0013b850
MOV RSI,qword ptr [RBX + 0x1d0]
CMP RSI,qword ptr [RBX + 0x1d8]
JZ 0x00145d23
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSI],RAX
ADD qword ptr [RBX + 0x1d0],0x8
JMP 0x00145d32
LAB_00145d23:
LEA RDI,[RBX + 0x1c8]
MOV RDX,RSP
CALL 0x00139780
LAB_00145d32:
MOV RAX,qword ptr [RBX + 0x1d0]
SUB RAX,qword ptr [RBX + 0x1c8]
SHR RAX,0x3
DEC EAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options
const&) */
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel
(Level *this,int param_1,Options *param_2)
{
int8 *puVar1;
FVarLevel *this_00;
FVarLevel *local_28;
this_00 = (FVarLevel *)operator_new(0xd8);
/* try { // try from 00145cd4 to 00145cde has its CatchHandler @ 00145d51 */
FVarLevel::FVarLevel(this_00,this);
local_28 = this_00;
FVarLevel::setOptions(this_00,param_2);
FVarLevel::resizeValues(local_28,param_1);
FVarLevel::resizeComponents(local_28);
puVar1 = *(int8 **)(this + 0x1d0);
if (puVar1 == *(int8 **)(this + 0x1d8)) {
std::
vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
::_M_realloc_insert<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*const&>
((vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
*)(this + 0x1c8),puVar1,&local_28);
}
else {
*puVar1 = local_28;
*(long *)(this + 0x1d0) = *(long *)(this + 0x1d0) + 8;
}
return (int)((ulong)(*(long *)(this + 0x1d0) - *(long *)(this + 0x1c8)) >> 3) + -1;
}
|
|
2,447 | OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
Level::createFVarChannel(int fvarValueCount, Sdc::Options const& fvarOptions) {
FVarLevel* fvarLevel = new FVarLevel(*this);
fvarLevel->setOptions(fvarOptions);
fvarLevel->resizeValues(fvarValueCount);
fvarLevel->resizeComponents();
_fvarChannels.push_back(fvarLevel);
return (int)_fvarChannels.size() - 1;
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movl $0xd8, %edi
callq 0x52790
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x51800
leaq 0x8(%rsp), %r12
movq %r14, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4fa00
movq %r14, %rdi
movl %ebp, %esi
callq 0x534d0
movq %r14, %rdi
callq 0x54ba0
leaq 0x1c8(%rbx), %rdi
movq %r12, %rsi
callq 0x54c30
movq 0x1d0(%rbx), %rax
subq 0x1c8(%rbx), %rax
shrq $0x3, %rax
decl %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xd8, %esi
movq %r14, %rdi
callq 0x528b0
movq %rbx, %rdi
callq 0x55300
| _ZN10OpenSubdiv6v3_6_03Vtr8internal5Level17createFVarChannelEiRKNS0_3Sdc7OptionsE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
mov edi, 0D8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; OpenSubdiv::v3_6_0::Vtr::internal::Level *
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevelC2ERKNS2_5LevelE; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::FVarLevel(OpenSubdiv::v3_6_0::Vtr::internal::Level const&)
lea r12, [rsp+38h+var_30]
mov [r12], r14
mov rdi, r14
mov rsi, r15
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel10setOptionsERKNS0_3Sdc7OptionsE; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::setOptions(OpenSubdiv::v3_6_0::Sdc::Options const&)
mov rdi, r14; this
mov esi, ebp; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel12resizeValuesEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeValues(int)
mov rdi, r14; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel16resizeComponentsEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(void)
lea rdi, [rbx+1C8h]
mov rsi, r12
call __ZNSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevelESaIS5_EE9push_backERKS5_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::push_back(OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel * const&)
mov rax, [rbx+1D0h]
sub rax, [rbx+1C8h]
shr rax, 3
dec eax
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 0D8h; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(
OpenSubdiv::v3_6_0::Vtr::internal::Level *a1,
int a2,
unsigned int *a3)
{
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v4; // r14
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v6; // [rsp+8h] [rbp-30h] BYREF
v4 = (OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *)operator new(0xD8uLL);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::FVarLevel(v4, a1);
v6 = v4;
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::setOptions((long long)v4, a3);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeValues(v4, a2);
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(v4);
std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *>::push_back((char *)a1 + 456, &v6);
return (unsigned int)((*((_QWORD *)a1 + 58) - *((_QWORD *)a1 + 57)) >> 3) - 1;
}
| createFVarChannel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV EDI,0xd8
CALL 0x00152790
MOV R14,RAX
LAB_0015db01:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00151800
LAB_0015db0c:
LEA R12,[RSP + 0x8]
MOV qword ptr [R12],R14
MOV RDI,R14
MOV RSI,R15
CALL 0x0014fa00
MOV RDI,R14
MOV ESI,EBP
CALL 0x001534d0
MOV RDI,R14
CALL 0x00154ba0
LEA RDI,[RBX + 0x1c8]
MOV RSI,R12
CALL 0x00154c30
MOV RAX,qword ptr [RBX + 0x1d0]
SUB RAX,qword ptr [RBX + 0x1c8]
SHR RAX,0x3
DEC EAX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel(int, OpenSubdiv::v3_6_0::Sdc::Options
const&) */
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::createFVarChannel
(Level *this,int param_1,Options *param_2)
{
FVarLevel *this_00;
FVarLevel *local_30;
this_00 = (FVarLevel *)operator_new(0xd8);
/* try { // try from 0015db01 to 0015db0b has its CatchHandler @ 0015db62 */
FVarLevel::FVarLevel(this_00,this);
local_30 = this_00;
FVarLevel::setOptions(this_00,param_2);
FVarLevel::resizeValues(this_00,param_1);
FVarLevel::resizeComponents(this_00);
std::
vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
::push_back((vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel*>>
*)(this + 0x1c8),&local_30);
return (int)((ulong)(*(long *)(this + 0x1d0) - *(long *)(this + 0x1c8)) >> 3) + -1;
}
|
|
2,448 | thr_multi_lock | eloqsql/mysys/thr_lock.c | enum enum_thr_lock_result
thr_multi_lock(THR_LOCK_DATA **data, uint count, THR_LOCK_INFO *owner,
ulong lock_wait_timeout)
{
THR_LOCK_DATA **pos, **end, **first_lock;
DBUG_ENTER("thr_multi_lock");
DBUG_PRINT("lock",("data: %p count: %d", data, count));
if (count > 1)
sort_locks(data,count);
else if (count == 0)
DBUG_RETURN(THR_LOCK_SUCCESS);
/* lock everything */
DEBUG_SYNC_C("thr_multi_lock_before_thr_lock");
for (pos=data,end=data+count; pos < end ; pos++)
{
enum enum_thr_lock_result result= thr_lock(*pos, owner, lock_wait_timeout);
if (result != THR_LOCK_SUCCESS)
{ /* Aborted */
thr_multi_unlock(data,(uint) (pos-data), 0);
/* Mark all requested locks as TL_UNLOCK (to simplify lock checking) */
for ( ; pos < end ; pos++)
(*pos)->type= TL_UNLOCK;
DBUG_RETURN(result);
}
#ifdef MAIN
printf("Thread: %s Got lock:%p type: %d\n",my_thread_name(),
pos[0]->lock, pos[0]->type); fflush(stdout);
#endif
}
DEBUG_SYNC_C("thr_multi_lock_after_thr_lock");
/*
Call start_trans for all locks.
If we lock the same table multiple times, we must use the same
status_param; We ensure this by calling copy_status() for all
copies of the same tables.
*/
if ((*data)->lock->start_trans)
((*data)->lock->start_trans)((*data)->status_param);
for (first_lock=data, pos= data+1 ; pos < end ; pos++)
{
/* Get the current status (row count, checksum, trid etc) */
if ((*pos)->lock->start_trans)
(*(*pos)->lock->start_trans)((*pos)->status_param);
/*
If same table as previous table use pointer to previous status
information to ensure that all read/write tables shares same
state.
*/
if (pos[0]->lock == pos[-1]->lock && pos[0]->lock->copy_status)
(pos[0]->lock->copy_status)((*pos)->status_param,
(*first_lock)->status_param);
else
{
/* Different lock, use this as base for next lock */
first_lock= pos;
}
}
DBUG_RETURN(THR_LOCK_SUCCESS);
} | O0 | c | thr_multi_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
jmp 0x329b9
cmpl $0x1, -0x14(%rbp)
jbe 0x329cd
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x32ba0
jmp 0x329e3
cmpl $0x0, -0x14(%rbp)
jne 0x329e1
jmp 0x329d5
movl $0x0, -0x4(%rbp)
jmp 0x32b96
jmp 0x329e3
jmp 0x329e5
jmp 0x329e7
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x32a8a
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x32c70
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x32a77
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %esi
xorl %edx, %edx
callq 0x33330
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x32a6a
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x40(%rax)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0x32a44
jmp 0x32a6c
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x32b96
jmp 0x32a79
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0x32a01
jmp 0x32a8c
jmp 0x32a8e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0xd0(%rax)
je 0x32ac2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0xd0(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x32b8d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0xd0(%rax)
je 0x32b18
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0xd0(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movq -0x8(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jne 0x32b72
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0xb8(%rax)
je 0x32b72
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0xb8(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rdi
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
jmp 0x32b7a
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x32b7c
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0x32ad6
jmp 0x32b8f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
| thr_multi_lock:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
jmp short $+2
loc_329B9:
cmp [rbp+var_14], 1
jbe short loc_329CD
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call sort_locks
jmp short loc_329E3
loc_329CD:
cmp [rbp+var_14], 0
jnz short loc_329E1
jmp short $+2
loc_329D5:
mov [rbp+var_4], 0
jmp loc_32B96
loc_329E1:
jmp short $+2
loc_329E3:
jmp short $+2
loc_329E5:
jmp short $+2
loc_329E7:
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_14]
shl rcx, 3
add rax, rcx
mov [rbp+var_38], rax
loc_32A01:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_32A8A
mov rax, [rbp+var_30]
mov rdi, [rax]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call thr_lock
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jz short loc_32A77
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
sub rax, rcx
sar rax, 3
mov esi, eax
xor edx, edx
call thr_multi_unlock
loc_32A44:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_32A6A
mov rax, [rbp+var_30]
mov rax, [rax]
mov dword ptr [rax+40h], 0
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
jmp short loc_32A44
loc_32A6A:
jmp short $+2
loc_32A6C:
mov eax, [rbp+var_44]
mov [rbp+var_4], eax
jmp loc_32B96
loc_32A77:
jmp short $+2
loc_32A79:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
jmp loc_32A01
loc_32A8A:
jmp short $+2
loc_32A8C:
jmp short $+2
loc_32A8E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+18h]
cmp qword ptr [rax+0D0h], 0
jz short loc_32AC2
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+18h]
mov rax, [rax+0D0h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdi, [rcx+28h]
call rax
loc_32AC2:
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_30], rax
loc_32AD6:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_32B8D
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
cmp qword ptr [rax+0D0h], 0
jz short loc_32B18
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
mov rax, [rax+0D0h]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov rdi, [rcx+28h]
call rax
loc_32B18:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
mov rcx, [rbp+var_30]
mov rcx, [rcx-8]
cmp rax, [rcx+18h]
jnz short loc_32B72
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
cmp qword ptr [rax+0B8h], 0
jz short loc_32B72
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax+18h]
mov rax, [rax+0B8h]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov rdi, [rcx+28h]
mov rcx, [rbp+var_40]
mov rcx, [rcx]
mov rsi, [rcx+28h]
call rax
jmp short loc_32B7A
loc_32B72:
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
loc_32B7A:
jmp short $+2
loc_32B7C:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
jmp loc_32AD6
loc_32B8D:
jmp short $+2
loc_32B8F:
mov [rbp+var_4], 0
loc_32B96:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long thr_multi_lock(_QWORD *a1, unsigned int a2, long long a3, long long a4)
{
unsigned int v5; // [rsp+Ch] [rbp-44h]
_QWORD *v6; // [rsp+10h] [rbp-40h]
unsigned long long v7; // [rsp+18h] [rbp-38h]
_QWORD *v8; // [rsp+20h] [rbp-30h]
_QWORD *i; // [rsp+20h] [rbp-30h]
if ( a2 <= 1 )
{
if ( !a2 )
return 0;
}
else
{
sort_locks(a1, a2);
}
v8 = a1;
v7 = (unsigned long long)&a1[a2];
while ( (unsigned long long)v8 < v7 )
{
v5 = thr_lock(*v8, a3, a4);
if ( v5 )
{
thr_multi_unlock(a1, (unsigned int)(v8 - a1), 0LL);
while ( (unsigned long long)v8 < v7 )
*(_DWORD *)(*v8++ + 64LL) = 0;
return v5;
}
++v8;
}
if ( *(_QWORD *)(*(_QWORD *)(*a1 + 24LL) + 208LL) )
(*(void ( **)(_QWORD))(*(_QWORD *)(*a1 + 24LL) + 208LL))(*(_QWORD *)(*a1 + 40LL));
v6 = a1;
for ( i = a1 + 1; (unsigned long long)i < v7; ++i )
{
if ( *(_QWORD *)(*(_QWORD *)(*i + 24LL) + 208LL) )
(*(void ( **)(_QWORD))(*(_QWORD *)(*i + 24LL) + 208LL))(*(_QWORD *)(*i + 40LL));
if ( *(_QWORD *)(*i + 24LL) == *(_QWORD *)(*(i - 1) + 24LL) && *(_QWORD *)(*(_QWORD *)(*i + 24LL) + 184LL) )
(*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(*i + 24LL) + 184LL))(
*(_QWORD *)(*i + 40LL),
*(_QWORD *)(*v6 + 40LL));
else
v6 = i;
}
return 0;
}
| thr_multi_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
JMP 0x001329b9
LAB_001329b9:
CMP dword ptr [RBP + -0x14],0x1
JBE 0x001329cd
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x00132ba0
JMP 0x001329e3
LAB_001329cd:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x001329e1
JMP 0x001329d5
LAB_001329d5:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00132b96
LAB_001329e1:
JMP 0x001329e3
LAB_001329e3:
JMP 0x001329e5
LAB_001329e5:
JMP 0x001329e7
LAB_001329e7:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_00132a01:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00132a8a
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00132c70
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JZ 0x00132a77
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
SAR RAX,0x3
MOV ESI,EAX
XOR EDX,EDX
CALL 0x00133330
LAB_00132a44:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00132a6a
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00132a44
LAB_00132a6a:
JMP 0x00132a6c
LAB_00132a6c:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00132b96
LAB_00132a77:
JMP 0x00132a79
LAB_00132a79:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00132a01
LAB_00132a8a:
JMP 0x00132a8c
LAB_00132a8c:
JMP 0x00132a8e
LAB_00132a8e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x00132ac2
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xd0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_00132ac2:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
LAB_00132ad6:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00132b8d
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x00132b18
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xd0]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_00132b18:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + -0x8]
CMP RAX,qword ptr [RCX + 0x18]
JNZ 0x00132b72
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0xb8],0x0
JZ 0x00132b72
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV RDI,qword ptr [RCX + 0x28]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x28]
CALL RAX
JMP 0x00132b7a
LAB_00132b72:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
LAB_00132b7a:
JMP 0x00132b7c
LAB_00132b7c:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00132ad6
LAB_00132b8d:
JMP 0x00132b8f
LAB_00132b8f:
MOV dword ptr [RBP + -0x4],0x0
LAB_00132b96:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int thr_multi_lock(long *param_1,uint param_2,int8 param_3,int8 param_4)
{
int iVar1;
long *plVar2;
long *local_48;
long *local_38;
if (param_2 < 2) {
if (param_2 == 0) {
return 0;
}
}
else {
sort_locks(param_1,param_2);
}
plVar2 = param_1 + param_2;
local_38 = param_1;
while( true ) {
if (plVar2 <= local_38) {
if (*(long *)(*(long *)(*param_1 + 0x18) + 0xd0) != 0) {
(**(code **)(*(long *)(*param_1 + 0x18) + 0xd0))(*(int8 *)(*param_1 + 0x28));
}
local_48 = param_1;
for (local_38 = param_1 + 1; local_38 < plVar2; local_38 = local_38 + 1) {
if (*(long *)(*(long *)(*local_38 + 0x18) + 0xd0) != 0) {
(**(code **)(*(long *)(*local_38 + 0x18) + 0xd0))(*(int8 *)(*local_38 + 0x28));
}
if ((*(long *)(*local_38 + 0x18) == *(long *)(local_38[-1] + 0x18)) &&
(*(long *)(*(long *)(*local_38 + 0x18) + 0xb8) != 0)) {
(**(code **)(*(long *)(*local_38 + 0x18) + 0xb8))
(*(int8 *)(*local_38 + 0x28),*(int8 *)(*local_48 + 0x28));
}
else {
local_48 = local_38;
}
}
return 0;
}
iVar1 = thr_lock(*local_38,param_3,param_4);
if (iVar1 != 0) break;
local_38 = local_38 + 1;
}
thr_multi_unlock(param_1,(long)local_38 - (long)param_1 >> 3 & 0xffffffff,0);
for (; local_38 < plVar2; local_38 = local_38 + 1) {
*(int4 *)(*local_38 + 0x40) = 0;
}
return iVar1;
}
|
|
2,449 | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::array();
for (const auto& e : elements) {
if (!e) throw std::runtime_error("Array element is null");
result.push_back(e->evaluate(context));
}
return result;
} | O0 | cpp | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0xe8, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x18(%rsp)
movb $0x0, 0xcf(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x123bf0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x126220
jmp 0x125ebb
leaq 0xb0(%rsp), %rdi
callq 0x123d20
movq 0x18(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
callq 0x126310
movq %rax, 0x90(%rsp)
movq 0x98(%rsp), %rdi
callq 0x126340
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x126370
testb $0x1, %al
jne 0x125f21
jmp 0x12605e
leaq 0x90(%rsp), %rdi
callq 0x1263b0
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x10cdf0
testb $0x1, %al
jne 0x125fed
movl $0x10, %edi
callq 0x5a6b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0xebc2a(%rip), %rsi # 0x211b91
callq 0x5a480
jmp 0x125f6e
movq 0x8(%rsp), %rdi
movq 0x17d036(%rip), %rsi # 0x2a2fb0
movq 0x17cff7(%rip), %rdx # 0x2a2f78
callq 0x5ab30
jmp 0x12609e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x123d20
jmp 0x126091
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x5af90
jmp 0x126087
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x126087
movq 0x80(%rsp), %rdi
callq 0x112f20
movq %rax, %rsi
movq 0xd0(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x112f30
jmp 0x126011
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x1263c0
jmp 0x126022
leaq 0x30(%rsp), %rdi
callq 0x1133d0
leaq 0x90(%rsp), %rdi
callq 0x1264f0
jmp 0x125f03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1133d0
jmp 0x126087
movb $0x1, 0xcf(%rsp)
testb $0x1, 0xcf(%rsp)
jne 0x12607a
movq 0x20(%rsp), %rdi
callq 0x1133d0
movq 0x10(%rsp), %rax
addq $0xe8, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x1133d0
movq 0xa8(%rsp), %rdi
callq 0x5abf0
nop
| _ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 0E8h
mov [rsp+0E8h+var_C8], rdi
mov rax, rdi
mov [rsp+0E8h+var_D8], rax
mov [rsp+0E8h+var_8], rdi
mov [rsp+0E8h+var_10], rsi
mov [rsp+0E8h+var_18], rdx
mov rax, [rsp+0E8h+var_10]
mov [rsp+0E8h+var_D0], rax
mov [rsp+0E8h+var_19], 0
xorps xmm0, xmm0
movaps [rsp+0E8h+var_38], xmm0
mov [rsp+0E8h+var_28], 0
lea rdi, [rsp+0E8h+var_38]
mov [rsp+0E8h+var_C0], rdi
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2Ev; std::vector<minja::Value>::vector(void)
mov rdi, [rsp+0E8h+var_C8]
mov rsi, [rsp+0E8h+var_C0]
call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>)
jmp short $+2
loc_125EBB:
lea rdi, [rsp+0E8h+var_38]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
mov rax, [rsp+0E8h+var_D0]
add rax, 20h ; ' '
mov [rsp+0E8h+var_50], rax
mov rdi, [rsp+0E8h+var_50]
call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE5beginEv; std::vector<std::shared_ptr<minja::Expression>>::begin(void)
mov [rsp+0E8h+var_58], rax
mov rdi, [rsp+0E8h+var_50]
call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE3endEv; std::vector<std::shared_ptr<minja::Expression>>::end(void)
mov [rsp+0E8h+var_60], rax
loc_125F03:
lea rdi, [rsp+0E8h+var_58]
lea rsi, [rsp+0E8h+var_60]
call _ZN9__gnu_cxxneIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_; __gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&)
test al, 1
jnz short loc_125F21
jmp loc_12605E
loc_125F21:
lea rdi, [rsp+0E8h+var_58]
call _ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(void)
mov [rsp+0E8h+var_68], rax
mov rdi, [rsp+0E8h+var_68]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_125FED
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0E8h+var_E0], rax
lea rsi, aArrayElementIs; "Array element is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_125F6E:
mov rdi, [rsp+0E8h+var_E0]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_12609E
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_A8]
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp loc_126091
mov rdi, [rsp+arg_0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
call ___cxa_free_exception
jmp loc_126087
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
jmp loc_126087
loc_125FED:
mov rdi, [rsp+0E8h+var_68]
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+0E8h+var_18]
lea rdi, [rsp+0E8h+var_B8]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short $+2
loc_126011:
mov rdi, [rsp+0E8h+var_C8]; this
lea rsi, [rsp+0E8h+var_B8]; minja::Value *
call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&)
jmp short $+2
loc_126022:
lea rdi, [rsp+0E8h+var_B8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+0E8h+var_58]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(void)
jmp loc_125F03
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_28]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_126087
loc_12605E:
mov [rsp+0E8h+var_19], 1
test [rsp+0E8h+var_19], 1
jnz short loc_12607A
mov rdi, [rsp+0E8h+var_C8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_12607A:
mov rax, [rsp+0E8h+var_D8]
add rsp, 0E8h
retn
loc_126087:
mov rdi, [rsp+arg_18]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_126091:
mov rdi, [rsp+arg_A0]
call __Unwind_Resume
loc_12609E:
xchg ax, ax
| minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *a1, long long a2, long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
void (***v7)(void); // rax
std::runtime_error *exception; // [rsp+8h] [rbp-E0h]
_BYTE v10[80]; // [rsp+30h] [rbp-B8h] BYREF
_QWORD *v11; // [rsp+80h] [rbp-68h]
long long v12; // [rsp+88h] [rbp-60h] BYREF
_QWORD v13[4]; // [rsp+90h] [rbp-58h] BYREF
__int128 v14; // [rsp+B0h] [rbp-38h] BYREF
long long v15; // [rsp+C0h] [rbp-28h]
char v16; // [rsp+CFh] [rbp-19h]
long long v17; // [rsp+D0h] [rbp-18h]
long long v18; // [rsp+D8h] [rbp-10h]
minja::Value *v19; // [rsp+E0h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = 0;
v14 = 0LL;
v15 = 0LL;
std::vector<minja::Value>::vector((long long)&v14);
minja::Value::array((_DWORD)a1, (unsigned int)&v14, v3, v4, v5, v6);
std::vector<minja::Value>::~vector((long long *)&v14);
v13[1] = a2 + 32;
v13[0] = std::vector<std::shared_ptr<minja::Expression>>::begin(a2 + 32);
v12 = std::vector<std::shared_ptr<minja::Expression>>::end(a2 + 32);
while ( (__gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(
v13,
&v12) & 1) != 0 )
{
v11 = (_QWORD *)__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(v13);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v11) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Array element is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v7 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v11);
minja::Expression::evaluate((long long)v10, v7);
minja::Value::push_back(a1, (const minja::Value *)v10);
minja::Value::~Value((minja::Value *)v10);
__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(v13);
}
return a1;
}
| |||
2,450 | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::array();
for (const auto& e : elements) {
if (!e) throw std::runtime_error("Array element is null");
result.push_back(e->evaluate(context));
}
return result;
} | O3 | cpp | minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
callq 0x8e04e
movq %rsp, %rdi
callq 0x8d838
movq 0x20(%r15), %r13
movq 0x28(%r15), %rbp
cmpq %rbp, %r13
je 0x8df4b
leaq 0x58(%rsp), %r15
leaq 0x18(%rsp), %r12
movq (%r13), %rsi
testq %rsi, %rsi
je 0x8df5d
movq %r12, %rdi
movq %r14, %rdx
callq 0x85d64
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8e106
movq %r15, %rdi
xorl %esi, %esi
callq 0x586c0
movq %r15, %rdi
callq 0x5dbae
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x8deea
callq 0x6d59a
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x8def9
callq 0x6d59a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x8df08
callq 0x6d59a
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8df3e
movq 0x9e06f(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x8df29
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x8df33
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x8df3e
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %r13
cmpq %rbp, %r13
jne 0x8dea6
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a450
movq %rax, %r15
leaq 0x62259(%rip), %rsi # 0xf01ca
movq %rax, %rdi
callq 0x1a330
movq 0x9e070(%rip), %rsi # 0x12bff0
movq 0x9dfd9(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af40
movq %rax, %r14
movq %rsp, %rdi
callq 0x8d838
jmp 0x8dfc5
jmp 0x8dfab
movq %rax, %r14
movq %r15, %rdi
callq 0x1a680
jmp 0x8dfbd
movq %rax, %r14
jmp 0x8dfbd
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x86056
movq %rbx, %rdi
callq 0x86056
movq %r14, %rdi
callq 0x1afc0
nop
| _ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+10h], 0
call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>)
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
mov r13, [r15+20h]
mov rbp, [r15+28h]
cmp r13, rbp
jz loc_8DF4B
lea r15, [rsp+98h+var_40]
lea r12, [rsp+98h+var_80]
loc_8DEA6:
mov rsi, [r13+0]
test rsi, rsi
jz loc_8DF5D
mov rdi, r12
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbx; this
mov rsi, r12; minja::Value *
call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+98h+var_48]
test rdi, rdi
jz short loc_8DEEA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8DEEA:
mov rdi, [rsp+98h+var_58]
test rdi, rdi
jz short loc_8DEF9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8DEF9:
mov rdi, [rsp+98h+var_68]
test rdi, rdi
jz short loc_8DF08
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8DF08:
mov rdi, [rsp+98h+var_78]
test rdi, rdi
jz short loc_8DF3E
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_8DF29
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_8DF33
loc_8DF29:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_8DF33:
cmp eax, 1
jnz short loc_8DF3E
mov rax, [rdi]
call qword ptr [rax+18h]
loc_8DF3E:
add r13, 10h
cmp r13, rbp
jnz loc_8DEA6
loc_8DF4B:
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8DF5D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aArrayElementIs; "Array element is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_8DFC5
jmp short loc_8DFAB
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8DFBD
loc_8DFAB:
mov r14, rax
jmp short loc_8DFBD
mov r14, rax
lea rdi, [rsp+98h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_8DFBD:
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_8DFC5:
mov rdi, r14
call __Unwind_Resume
| minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2)
{
void (****v3)(void); // r13
void (****i)(void); // rbp
long long v5; // rdi
signed __int32 v6; // eax
std::runtime_error *exception; // r15
__int128 v9; // [rsp+0h] [rbp-98h] BYREF
long long v10; // [rsp+10h] [rbp-88h]
_BYTE v11[8]; // [rsp+18h] [rbp-80h] BYREF
long long v12; // [rsp+20h] [rbp-78h]
volatile signed __int32 *v13; // [rsp+30h] [rbp-68h]
volatile signed __int32 *v14; // [rsp+40h] [rbp-58h]
volatile signed __int32 *v15; // [rsp+50h] [rbp-48h]
char v16[64]; // [rsp+58h] [rbp-40h] BYREF
v9 = 0LL;
v10 = 0LL;
((void ( *)(minja::Value *, __int128 *))minja::Value::array)(this, &v9);
std::vector<minja::Value>::~vector(&v9);
v3 = *(void (*****)(void))(a2 + 32);
for ( i = *(void (*****)(void))(a2 + 40); v3 != i; v3 += 2 )
{
if ( !*v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Array element is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v11, *v3);
minja::Value::push_back(this, (const minja::Value *)v11);
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(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
v5 = v12;
if ( v12 )
{
if ( _libc_single_threaded )
{
v6 = *(_DWORD *)(v12 + 12);
*(_DWORD *)(v12 + 12) = v6 - 1;
}
else
{
v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF);
}
if ( v6 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL);
}
}
return this;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],0x0
LAB_0018de7e:
CALL 0x0018e04e
MOV RDI,RSP
CALL 0x0018d838
MOV R13,qword ptr [R15 + 0x20]
MOV RBP,qword ptr [R15 + 0x28]
CMP R13,RBP
JZ 0x0018df4b
LEA R15,[RSP + 0x58]
LEA R12,[RSP + 0x18]
LAB_0018dea6:
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x0018df5d
LAB_0018deb3:
MOV RDI,R12
MOV RDX,R14
CALL 0x00185d64
LAB_0018debe:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0018e106
LAB_0018dec9:
MOV RDI,R15
XOR ESI,ESI
CALL 0x001586c0
MOV RDI,R15
CALL 0x0015dbae
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0018deea
CALL 0x0016d59a
LAB_0018deea:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0018def9
CALL 0x0016d59a
LAB_0018def9:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x0018df08
CALL 0x0016d59a
LAB_0018df08:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0018df3e
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x0018df29
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0018df33
LAB_0018df29:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0018df33:
CMP EAX,0x1
JNZ 0x0018df3e
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0018df3e:
ADD R13,0x10
CMP R13,RBP
JNZ 0x0018dea6
LAB_0018df4b:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018df5d:
MOV EDI,0x10
CALL 0x0011a450
MOV R15,RAX
LAB_0018df6a:
LEA RSI,[0x1f01ca]
MOV RDI,RAX
CALL 0x0011a330
LAB_0018df79:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af40
|
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1)
{
int *piVar1;
int8 *puVar2;
int iVar3;
runtime_error *this_00;
int8 *puVar4;
int8 local_98;
int8 uStack_90;
int8 local_88;
Expression local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
local_98 = 0;
uStack_90 = 0;
local_88 = 0;
/* try { // try from 0018de7e to 0018de82 has its CatchHandler @ 0018df8f */
Value::array();
std::vector<minja::Value,std::allocator<minja::Value>>::~vector
((vector<minja::Value,std::allocator<minja::Value>> *)&local_98);
puVar4 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar4 != puVar2) {
do {
if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018df6a to 0018df78 has its CatchHandler @ 0018df9e */
std::runtime_error::runtime_error(this_00,"Array element is null");
/* try { // try from 0018df79 to 0018df8e has its CatchHandler @ 0018df9c */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
/* try { // try from 0018deb3 to 0018debd has its CatchHandler @ 0018dfab */
Expression::evaluate(local_80,(shared_ptr *)*puVar4);
/* try { // try from 0018debe to 0018dec8 has its CatchHandler @ 0018dfb0 */
Value::push_back((Value *)this,(Value *)local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
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 (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
puVar4 = puVar4 + 2;
} while (puVar4 != puVar2);
}
return this;
}
|
|
2,451 | coro::context::context() | tinyCoroLab/src/context.cpp | context::context() noexcept
{
m_id = ginfo.context_id.fetch_add(1, std::memory_order_relaxed);
} | O0 | cpp | coro::context::context():
subq $0x38, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x6a220
movq (%rsp), %rdi
addq $0x20240, %rdi # imm = 0x20240
callq 0x6a320
leaq 0x36b6a(%rip), %rax # 0xa05b8
movq %rax, 0x30(%rsp)
movl $0x1, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x28(%rsp), %eax
movl 0x2c(%rsp), %ecx
movl %ecx, 0x24(%rsp)
decl %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x4, %eax
ja 0x69a9c
movq 0x10(%rsp), %rax
leaq 0x57ed(%rip), %rcx # 0x6f280
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x69af9
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x69af9
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x69af9
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x69af9
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
movq (%rsp), %rax
movl 0x20(%rsp), %ecx
movl %ecx, 0x20248(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
| _ZN4coro7contextC2Ev:
sub rsp, 38h
mov [rsp+38h+var_20], rdi
mov rdi, [rsp+38h+var_20]; this
mov [rsp+38h+var_38], rdi
call _ZN4coro6detail6engineC2Ev; coro::detail::engine::engine(void)
mov rdi, [rsp+38h+var_38]
add rdi, 20240h
call _ZNSt10unique_ptrISt7jthreadSt14default_deleteIS0_EEC2IS2_vEEv; std::unique_ptr<std::jthread>::unique_ptr<std::default_delete<std::jthread>,void>(void)
lea rax, _ZN4coro6detail5ginfoE; coro::detail::ginfo
mov [rsp+38h+var_8], rax
mov [rsp+38h+var_C], 1
mov [rsp+38h+var_10], 0
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_30], rax
mov eax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_C]
mov [rsp+38h+var_14], ecx
dec eax; switch 5 cases
mov ecx, eax
mov [rsp+38h+var_28], rcx
sub eax, 4
ja short def_69A9A; jumptable 0000000000069A9A default case
mov rax, [rsp+38h+var_28]
lea rcx, jpt_69A9A
movsxd rax, ds:(jpt_69A9A - 6F280h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_69A9A:
mov rcx, [rsp+38h+var_30]; jumptable 0000000000069A9A default case
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_69AF9
loc_69AAF:
mov rcx, [rsp+38h+var_30]; jumptable 0000000000069A9A cases 1,2
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_69AF9
loc_69AC2:
mov rcx, [rsp+38h+var_30]; jumptable 0000000000069A9A case 3
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_69AF9
loc_69AD5:
mov rcx, [rsp+38h+var_30]; jumptable 0000000000069A9A case 4
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_69AF9
loc_69AE8:
mov rcx, [rsp+38h+var_30]; jumptable 0000000000069A9A case 5
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
loc_69AF9:
mov rax, [rsp+38h+var_38]
mov ecx, [rsp+38h+var_18]
mov [rax+20248h], ecx
add rsp, 38h
retn
| coro::context * coro::context::context(coro::context *this)
{
coro::context *result; // rax
coro::detail::engine::engine(this);
std::unique_ptr<std::jthread>::unique_ptr<std::default_delete<std::jthread>,void>((char *)this + 131648);
result = this;
*((_DWORD *)this + 32914) = _InterlockedExchangeAdd(&coro::detail::ginfo, 1u);
return result;
}
| context:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RDI
CALL 0x0016a220
MOV RDI,qword ptr [RSP]
ADD RDI,0x20240
CALL 0x0016a320
LEA RAX,[0x1a05b8]
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x1
MOV dword ptr [RSP + 0x28],0x0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x24],ECX
DEC EAX
MOV ECX,EAX
MOV qword ptr [RSP + 0x10],RCX
SUB EAX,0x4
JA 0x00169a9c
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x16f280]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_00169a9c:
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x24]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RSP + 0x20],EAX
JMP 0x00169af9
LAB_00169af9:
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x20248],ECX
ADD RSP,0x38
RET
|
/* WARNING: Removing unreachable block (ram,0x00169a87) */
/* coro::context::context() */
void __thiscall coro::context::context(context *this)
{
int iVar1;
detail::engine::engine((engine *)this);
std::unique_ptr<std::jthread,std::default_delete<std::jthread>>::
unique_ptr<std::default_delete<std::jthread>,void>
((unique_ptr<std::jthread,std::default_delete<std::jthread>> *)(this + 0x20240));
LOCK();
UNLOCK();
iVar1 = detail::ginfo + 1;
*(int *)(this + 0x20248) = detail::ginfo;
detail::ginfo = iVar1;
return;
}
|
|
2,452 | set_setup_actor_key(PFS_setup_actor_key*, char const*, unsigned int, char const*, unsigned int, char const*, unsigned int) | eloqsql/storage/perfschema/pfs_setup_actor.cc | static void set_setup_actor_key(PFS_setup_actor_key *key,
const char *user, uint user_length,
const char *host, uint host_length,
const char *role, uint role_length)
{
assert(user_length <= USERNAME_LENGTH);
assert(host_length <= HOSTNAME_LENGTH);
char *ptr= &key->m_hash_key[0];
memcpy(ptr, user, user_length);
ptr+= user_length;
ptr[0]= 0;
ptr++;
memcpy(ptr, host, host_length);
ptr+= host_length;
ptr[0]= 0;
ptr++;
memcpy(ptr, role, role_length);
ptr+= role_length;
ptr[0]= 0;
ptr++;
key->m_key_length= (uint)(ptr - &key->m_hash_key[0]);
} | O3 | cpp | set_setup_actor_key(PFS_setup_actor_key*, char const*, unsigned int, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x38(%rbp)
movl %r8d, %r12d
movq %rcx, -0x30(%rbp)
movq %rdi, %rbx
movl %edx, %r15d
movq %r15, %rdx
callq 0x26290
leaq (%rbx,%r15), %r14
xorl %r13d, %r13d
leaq (%rbx,%r15), %rdi
incq %rdi
movb %r13b, -0x1(%rdi)
movl %r12d, %r15d
movq -0x30(%rbp), %rsi
movq %r15, %rdx
callq 0x26290
leaq (%r15,%r14), %r12
incq %r12
leaq 0x2(%r15,%r14), %rdi
movb %r13b, -0x1(%rdi)
movq -0x38(%rbp), %rsi
movl 0x10(%rbp), %r14d
movq %r14, %rdx
callq 0x26290
leaq (%r14,%r12), %rax
incq %rax
movb %r13b, (%rax)
subl %ebx, %eax
incl %eax
movl %eax, 0x2c4(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZL19set_setup_actor_keyP19PFS_setup_actor_keyPKcjS2_jS2_j:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], r9
mov r12d, r8d
mov [rbp+var_30], rcx
mov rbx, rdi
mov r15d, edx
mov rdx, r15
call _memcpy
lea r14, [rbx+r15]
xor r13d, r13d
lea rdi, [rbx+r15]
inc rdi
mov [rdi-1], r13b
mov r15d, r12d
mov rsi, [rbp+var_30]
mov rdx, r15
call _memcpy
lea r12, [r15+r14]
inc r12
lea rdi, [r15+r14+2]
mov [rdi-1], r13b
mov rsi, [rbp+var_38]
mov r14d, [rbp+arg_0]
mov rdx, r14
call _memcpy
lea rax, [r14+r12]
inc rax
mov [rax], r13b
sub eax, ebx
inc eax
mov [rbx+2C4h], eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long set_setup_actor_key(
long long a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6,
unsigned int a7)
{
long long v9; // r15
long long v10; // r14
long long v11; // rdi
long long v12; // rdi
_BYTE *v13; // rax
long long result; // rax
v9 = a3;
memcpy(a1, a2, a3);
v10 = a1 + v9;
v11 = a1 + v9 + 1;
*(_BYTE *)(v11 - 1) = 0;
memcpy(v11, a4, a5);
v12 = a5 + v10 + 2;
*(_BYTE *)(v12 - 1) = 0;
memcpy(v12, a6, a7);
v13 = (_BYTE *)(a7 + a5 + v10 + 1 + 1);
*v13 = 0;
result = (unsigned int)((_DWORD)v13 - a1 + 1);
*(_DWORD *)(a1 + 708) = result;
return result;
}
| set_setup_actor_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],R9
MOV R12D,R8D
MOV qword ptr [RBP + -0x30],RCX
MOV RBX,RDI
MOV R15D,EDX
MOV RDX,R15
CALL 0x00126290
LEA R14,[RBX + R15*0x1]
XOR R13D,R13D
LEA RDI,[RBX + R15*0x1]
INC RDI
MOV byte ptr [RDI + -0x1],R13B
MOV R15D,R12D
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R15
CALL 0x00126290
LEA R12,[R15 + R14*0x1]
INC R12
LEA RDI,[R15 + R14*0x1 + 0x2]
MOV byte ptr [RDI + -0x1],R13B
MOV RSI,qword ptr [RBP + -0x38]
MOV R14D,dword ptr [RBP + 0x10]
MOV RDX,R14
CALL 0x00126290
LEA RAX,[R14 + R12*0x1]
INC RAX
MOV byte ptr [RAX],R13B
SUB EAX,EBX
INC EAX
MOV dword ptr [RBX + 0x2c4],EAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* set_setup_actor_key(PFS_setup_actor_key*, char const*, unsigned int, char const*, unsigned int,
char const*, unsigned int) */
void set_setup_actor_key(PFS_setup_actor_key *param_1,char *param_2,uint param_3,char *param_4,
uint param_5,char *param_6,uint param_7)
{
ulong __n;
ulong __n_00;
__n = (ulong)param_3;
memcpy(param_1,param_2,__n);
param_1[__n] = (PFS_setup_actor_key)0x0;
__n_00 = (ulong)param_5;
memcpy(param_1 + __n + 1,param_4,__n_00);
(param_1 + __n_00 + 2 + __n)[-1] = (PFS_setup_actor_key)0x0;
memcpy(param_1 + __n_00 + 2 + __n,param_6,(ulong)param_7);
param_1[(ulong)param_7 + __n_00 + __n + 2] = (PFS_setup_actor_key)0x0;
*(int *)(param_1 + 0x2c4) =
((int)(param_1 + (ulong)param_7 + __n_00 + __n + 2) - (int)param_1) + 1;
return;
}
|
|
2,453 | pvio_socket_internal_connect | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | static int pvio_socket_internal_connect(MARIADB_PVIO *pvio,
const struct sockaddr *name,
size_t namelen)
{
int rc= 0;
struct st_pvio_socket *csock= NULL;
int timeout;
#ifndef _WIN32
unsigned int wait_conn= 1;
time_t start_t= time(NULL);
#endif
if (!pvio || !pvio->data)
return 1;
csock= (struct st_pvio_socket *)pvio->data;
timeout= pvio->timeout[PVIO_CONNECT_TIMEOUT];
/* set non blocking */
pvio_socket_blocking(pvio, 0, 0);
#ifndef _WIN32
do {
rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen);
if (time(NULL) - start_t > (time_t)timeout/1000)
break;
usleep(wait_conn);
wait_conn= wait_conn >= 1000000 ? 1000000 : wait_conn * 2;
} while (rc == -1 && (errno == EINTR || errno == EAGAIN));
/* in case a timeout values was set we need to check error values
EINPROGRESS */
if (timeout != 0 && rc == -1 && errno == EINPROGRESS)
{
rc= pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout);
if (rc < 1)
return -1;
{
int error;
socklen_t error_len= sizeof(error);
if ((rc = getsockopt(csock->socket, SOL_SOCKET, SO_ERROR,
(char *)&error, &error_len)) < 0)
return errno;
else if (error)
return error;
}
}
#ifdef __APPLE__
if (csock->socket)
{
int val= 1;
setsockopt(csock->socket, SOL_SOCKET, SO_NOSIGPIPE, (void *)&val, sizeof(int));
}
#endif
#else
rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen);
if (rc == SOCKET_ERROR)
{
if (WSAGetLastError() == WSAEWOULDBLOCK)
{
if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 0)
return -1;
rc= 0;
}
}
#endif
return rc;
} | O0 | c | pvio_socket_internal_connect:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x1, -0x38(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x143c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5d028
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5d034
movl $0x1, -0x4(%rbp)
jmp 0x5d188
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5bba0
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
callq 0x14380
movl %eax, -0x24(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x143c0
subq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x34(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jle 0x5d09d
jmp 0x5d102
movl -0x38(%rbp), %edi
callq 0x14630
cmpl $0xf4240, -0x38(%rbp) # imm = 0xF4240
jb 0x5d0b8
movl $0xf4240, %eax # imm = 0xF4240
movl %eax, -0x54(%rbp)
jmp 0x5d0c0
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x38(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0x24(%rbp)
movb %al, -0x55(%rbp)
jne 0x5d0f7
callq 0x14050
movq %rax, %rcx
movb $0x1, %al
cmpl $0x4, (%rcx)
movb %al, -0x56(%rbp)
je 0x5d0f1
callq 0x14050
cmpl $0xb, (%rax)
sete %al
movb %al, -0x56(%rbp)
movb -0x56(%rbp), %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x5d058
cmpl $0x0, -0x34(%rbp)
je 0x5d182
cmpl $-0x1, -0x24(%rbp)
jne 0x5d182
callq 0x14050
cmpl $0x73, (%rax)
jne 0x5d182
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
xorl %esi, %esi
callq 0x5ba50
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jge 0x5d138
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d188
movl $0x4, -0x48(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movl $0x1, %esi
movl $0x4, %edx
leaq -0x44(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0x14310
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jge 0x5d170
callq 0x14050
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5d188
cmpl $0x0, -0x44(%rbp)
je 0x5d17e
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5d188
jmp 0x5d180
jmp 0x5d182
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| pvio_socket_internal_connect:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], 0
mov [rbp+var_30], 0
mov [rbp+var_38], 1
xor eax, eax
mov edi, eax
call _time
mov [rbp+var_40], rax
cmp [rbp+var_10], 0
jz short loc_5D028
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_5D034
loc_5D028:
mov [rbp+var_4], 1
jmp loc_5D188
loc_5D034:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+24h]
mov [rbp+var_34], eax
mov rdi, [rbp+var_10]
xor esi, esi
xor eax, eax
mov edx, eax
call pvio_socket_blocking
loc_5D058:
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_20]
mov edx, eax
call _connect
mov [rbp+var_24], eax
xor eax, eax
mov edi, eax
call _time
sub rax, [rbp+var_40]
mov [rbp+var_50], rax
movsxd rax, [rbp+var_34]
mov ecx, 3E8h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_50]
cmp rax, rcx
jle short loc_5D09D
jmp short loc_5D102
loc_5D09D:
mov edi, [rbp+var_38]
call _usleep
cmp [rbp+var_38], 0F4240h
jb short loc_5D0B8
mov eax, 0F4240h
mov [rbp+var_54], eax
jmp short loc_5D0C0
loc_5D0B8:
mov eax, [rbp+var_38]
shl eax, 1
mov [rbp+var_54], eax
loc_5D0C0:
mov eax, [rbp+var_54]
mov [rbp+var_38], eax
xor eax, eax
cmp [rbp+var_24], 0FFFFFFFFh
mov [rbp+var_55], al
jnz short loc_5D0F7
call ___errno_location
mov rcx, rax
mov al, 1
cmp dword ptr [rcx], 4
mov [rbp+var_56], al
jz short loc_5D0F1
call ___errno_location
cmp dword ptr [rax], 0Bh
setz al
mov [rbp+var_56], al
loc_5D0F1:
mov al, [rbp+var_56]
mov [rbp+var_55], al
loc_5D0F7:
mov al, [rbp+var_55]
test al, 1
jnz loc_5D058
loc_5D102:
cmp [rbp+var_34], 0
jz short loc_5D182
cmp [rbp+var_24], 0FFFFFFFFh
jnz short loc_5D182
call ___errno_location
cmp dword ptr [rax], 73h ; 's'
jnz short loc_5D182
mov rdi, [rbp+var_10]
mov edx, [rbp+var_34]
xor esi, esi
call pvio_socket_wait_io_or_timeout
mov [rbp+var_24], eax
cmp [rbp+var_24], 1
jge short loc_5D138
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_5D188
loc_5D138:
mov [rbp+var_48], 4
mov rax, [rbp+var_30]
mov edi, [rax]
mov esi, 1
mov edx, 4
lea rcx, [rbp+var_44]
lea r8, [rbp+var_48]
call _getsockopt
mov [rbp+var_24], eax
cmp eax, 0
jge short loc_5D170
call ___errno_location
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_5D188
loc_5D170:
cmp [rbp+var_44], 0
jz short loc_5D17E
mov eax, [rbp+var_44]
mov [rbp+var_4], eax
jmp short loc_5D188
loc_5D17E:
jmp short $+2
loc_5D180:
jmp short $+2
loc_5D182:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_5D188:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long pvio_socket_internal_connect(int **a1, long long a2, long long a3)
{
long long v3; // rdi
long long v4; // rdi
bool v6; // [rsp+Ah] [rbp-56h]
bool v7; // [rsp+Bh] [rbp-55h]
int v8; // [rsp+Ch] [rbp-54h]
int v9; // [rsp+18h] [rbp-48h] BYREF
unsigned int v10; // [rsp+1Ch] [rbp-44h] BYREF
long long v11; // [rsp+20h] [rbp-40h]
unsigned int v12; // [rsp+28h] [rbp-38h]
signed int v13; // [rsp+2Ch] [rbp-34h]
unsigned int *v14; // [rsp+30h] [rbp-30h]
int v15; // [rsp+3Ch] [rbp-24h]
long long v16; // [rsp+40h] [rbp-20h]
long long v17; // [rsp+48h] [rbp-18h]
int **v18; // [rsp+50h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = 0;
v14 = 0LL;
v12 = 1;
v11 = time(0LL);
if ( a1 && *v18 )
{
v14 = (unsigned int *)*v18;
v13 = *((_DWORD *)v18 + 9);
pvio_socket_blocking((unsigned int **)v18, 0, 0LL);
do
{
v15 = connect(*v14, v17, (unsigned int)v16);
v3 = 0LL;
if ( time(0LL) - v11 > v13 / 1000LL )
break;
v3 = v12;
usleep(v12);
if ( v12 < 0xF4240 )
v8 = 2 * v12;
else
v8 = 1000000;
v12 = v8;
v7 = 0;
if ( v15 == -1 )
{
v6 = 1;
if ( *(_DWORD *)__errno_location(v3) != 4 )
v6 = *(_DWORD *)__errno_location(v3) == 11;
v7 = v6;
}
}
while ( v7 );
if ( v13 && v15 == -1 && *(_DWORD *)__errno_location(v3) == 115 )
{
v15 = pvio_socket_wait_io_or_timeout(v18, 0, v13);
if ( v15 < 1 )
return (unsigned int)-1;
v9 = 4;
v4 = *v14;
v15 = getsockopt(v4, 1LL, 4LL, &v10, &v9);
if ( v15 < 0 )
return *(unsigned int *)__errno_location(v4);
if ( v10 )
return v10;
}
return (unsigned int)v15;
}
return 1;
}
| pvio_socket_internal_connect:
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 dword ptr [RBP + -0x24],0x0
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x38],0x1
XOR EAX,EAX
MOV EDI,EAX
CALL 0x001143c0
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0015d028
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0015d034
LAB_0015d028:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015d188
LAB_0015d034:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x24]
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0015bba0
LAB_0015d058:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,EAX
CALL 0x00114380
MOV dword ptr [RBP + -0x24],EAX
XOR EAX,EAX
MOV EDI,EAX
CALL 0x001143c0
SUB RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOVSXD RAX,dword ptr [RBP + -0x34]
MOV ECX,0x3e8
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,RCX
JLE 0x0015d09d
JMP 0x0015d102
LAB_0015d09d:
MOV EDI,dword ptr [RBP + -0x38]
CALL 0x00114630
CMP dword ptr [RBP + -0x38],0xf4240
JC 0x0015d0b8
MOV EAX,0xf4240
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0015d0c0
LAB_0015d0b8:
MOV EAX,dword ptr [RBP + -0x38]
SHL EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
LAB_0015d0c0:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x38],EAX
XOR EAX,EAX
CMP dword ptr [RBP + -0x24],-0x1
MOV byte ptr [RBP + -0x55],AL
JNZ 0x0015d0f7
CALL 0x00114050
MOV RCX,RAX
MOV AL,0x1
CMP dword ptr [RCX],0x4
MOV byte ptr [RBP + -0x56],AL
JZ 0x0015d0f1
CALL 0x00114050
CMP dword ptr [RAX],0xb
SETZ AL
MOV byte ptr [RBP + -0x56],AL
LAB_0015d0f1:
MOV AL,byte ptr [RBP + -0x56]
MOV byte ptr [RBP + -0x55],AL
LAB_0015d0f7:
MOV AL,byte ptr [RBP + -0x55]
TEST AL,0x1
JNZ 0x0015d058
LAB_0015d102:
CMP dword ptr [RBP + -0x34],0x0
JZ 0x0015d182
CMP dword ptr [RBP + -0x24],-0x1
JNZ 0x0015d182
CALL 0x00114050
CMP dword ptr [RAX],0x73
JNZ 0x0015d182
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x0015ba50
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x1
JGE 0x0015d138
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015d188
LAB_0015d138:
MOV dword ptr [RBP + -0x48],0x4
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
MOV EDX,0x4
LEA RCX,[RBP + -0x44]
LEA R8,[RBP + -0x48]
CALL 0x00114310
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JGE 0x0015d170
CALL 0x00114050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d188
LAB_0015d170:
CMP dword ptr [RBP + -0x44],0x0
JZ 0x0015d17e
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015d188
LAB_0015d17e:
JMP 0x0015d180
LAB_0015d180:
JMP 0x0015d182
LAB_0015d182:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0015d188:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int pvio_socket_internal_connect(long *param_1,sockaddr *param_2,int8 param_3)
{
time_t tVar1;
int *piVar2;
bool bVar3;
__useconds_t local_5c;
socklen_t local_50;
int local_4c;
time_t local_48;
__useconds_t local_40;
int local_3c;
int *local_38;
int local_2c;
int8 local_28;
sockaddr *local_20;
long *local_18;
local_2c = 0;
local_38 = (int *)0x0;
local_40 = 1;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_48 = time((time_t *)0x0);
if ((local_18 == (long *)0x0) || (*local_18 == 0)) {
return 1;
}
local_38 = (int *)*local_18;
local_3c = *(int *)((long)local_18 + 0x24);
pvio_socket_blocking(local_18,0,0);
do {
local_2c = connect(*local_38,local_20,(socklen_t)local_28);
tVar1 = time((time_t *)0x0);
if ((long)local_3c / 1000 < tVar1 - local_48) break;
usleep(local_40);
if (local_40 < 1000000) {
local_5c = local_40 << 1;
}
else {
local_5c = 1000000;
}
local_40 = local_5c;
bVar3 = false;
if (local_2c == -1) {
piVar2 = __errno_location();
bVar3 = true;
if (*piVar2 != 4) {
piVar2 = __errno_location();
bVar3 = *piVar2 == 0xb;
}
}
} while (bVar3);
if (((local_3c != 0) && (local_2c == -1)) && (piVar2 = __errno_location(), *piVar2 == 0x73)) {
local_2c = pvio_socket_wait_io_or_timeout(local_18,0,local_3c);
if (local_2c < 1) {
return -1;
}
local_50 = 4;
local_2c = getsockopt(*local_38,1,4,&local_4c,&local_50);
if (local_2c < 0) {
piVar2 = __errno_location();
return *piVar2;
}
if (local_4c != 0) {
return local_4c;
}
}
return local_2c;
}
|
|
2,454 | minja::ArgumentsValue::has_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O3 | cpp | minja::ArgumentsValue::has_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %r12
cmpq %r12, %r15
je 0xb6513
movq (%rsi), %rbx
movq 0x8(%rsi), %r14
cmpq %r14, 0x8(%r15)
jne 0xb650a
movb $0x1, %bpl
testq %r14, %r14
je 0xb6515
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1b930
testl %eax, %eax
je 0xb6515
addq $0x70, %r15
cmpq %r12, %r15
jne 0xb64ea
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
mov r15, [rdi+18h]
mov r12, [rdi+20h]
cmp r15, r12
jz short loc_B6513
mov rbx, [rsi]
mov r14, [rsi+8]
loc_B64EA:
cmp [r15+8], r14
jnz short loc_B650A
mov bpl, 1
test r14, r14
jz short loc_B6515
mov rdi, [r15]
mov rsi, rbx
mov rdx, r14
call _bcmp
test eax, eax
jz short loc_B6515
loc_B650A:
add r15, 70h ; 'p'
cmp r15, r12
jnz short loc_B64EA
loc_B6513:
xor ebp, ebp
loc_B6515:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long minja::ArgumentsValue::has_named(long long a1, long long *a2)
{
unsigned int v2; // ebp
_QWORD *v3; // r15
_QWORD *v4; // r12
long long v5; // rbx
long long v6; // r14
v3 = *(_QWORD **)(a1 + 24);
v4 = *(_QWORD **)(a1 + 32);
if ( v3 == v4 )
{
return 0;
}
else
{
v5 = *a2;
v6 = a2[1];
while ( 1 )
{
if ( v3[1] == v6 )
{
LOBYTE(v2) = 1;
if ( !v6 || !(unsigned int)bcmp(*v3, v5) )
break;
}
v3 += 14;
if ( v3 == v4 )
return 0;
}
}
return v2;
}
| has_named:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,qword ptr [RDI + 0x18]
MOV R12,qword ptr [RDI + 0x20]
CMP R15,R12
JZ 0x001b6513
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
LAB_001b64ea:
CMP qword ptr [R15 + 0x8],R14
JNZ 0x001b650a
MOV BPL,0x1
TEST R14,R14
JZ 0x001b6515
MOV RDI,qword ptr [R15]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011b930
TEST EAX,EAX
JZ 0x001b6515
LAB_001b650a:
ADD R15,0x70
CMP R15,R12
JNZ 0x001b64ea
LAB_001b6513:
XOR EBP,EBP
LAB_001b6515:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */
ulong __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
ulong unaff_RBP;
int8 *puVar3;
puVar3 = *(int8 **)(this + 0x18);
puVar1 = *(int8 **)(this + 0x20);
if (puVar3 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar3[1] == __n) {
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),1);
if (__n == 0) goto LAB_001b6515;
iVar2 = bcmp((void *)*puVar3,__s2,__n);
if (iVar2 == 0) goto LAB_001b6515;
}
puVar3 = puVar3 + 0xe;
} while (puVar3 != puVar1);
}
unaff_RBP = 0;
LAB_001b6515:
return unaff_RBP & 0xffffffff;
}
|
|
2,455 | verify_col_data | eloqsql/libmariadb/unittest/libmariadb/my_test.h | int verify_col_data(MYSQL *mysql, const char *table, const char *col,
const char *exp_data)
{
static char query[MAX_TEST_QUERY_LENGTH];
MYSQL_RES *result;
MYSQL_ROW row;
int rc;
if (table && col)
{
sprintf(query, "SELECT %s FROM %s LIMIT 1", col, table);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
}
result= mysql_use_result(mysql);
FAIL_IF(!result, "Invalid result set");
if (!(row= mysql_fetch_row(result)) || !row[0]) {
diag("Failed to get the result");
goto error;
}
if(strcmp(row[0], exp_data)) {
diag("Expected %s, got %s", exp_data, row[0]);
goto error;
}
mysql_free_result(result);
return OK;
error:
mysql_free_result(result);
return FAIL;
} | O3 | c | verify_col_data:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r15
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x13c7b
movq %rdx, %r8
movq %rsi, %r9
leaq 0x38383(%rip), %r12 # 0x4bf90
leaq 0x225b7(%rip), %rcx # 0x361cb
movl $0x1, %r14d
movl $0x12c, %edx # imm = 0x12C
movq %r12, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x132a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x1d045
testl %eax, %eax
je 0x13c7b
movl %eax, %r12d
movq %r15, %rdi
callq 0x1f0be
movq %rax, %rbx
movq %r15, %rdi
callq 0x1f0a9
leaq 0x2258b(%rip), %rdi # 0x361e5
leaq 0x22467(%rip), %r8 # 0x360c8
movl %r12d, %esi
movq %rbx, %rdx
movl %eax, %ecx
movl $0x17f, %r9d # imm = 0x17F
xorl %eax, %eax
callq 0x16f1f
jmp 0x13d04
movq %r15, %rdi
callq 0x1c474
testq %rax, %rax
je 0x13cdd
movq %rax, %r14
movq %rax, %rdi
callq 0x1e140
testq %rax, %rax
je 0x13cc5
movq (%rax), %r15
testq %r15, %r15
je 0x13cc5
movq %r15, %rdi
movq %rbx, %rsi
callq 0x13640
testl %eax, %eax
je 0x13d10
leaq 0x2257d(%rip), %rdi # 0x36233
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x16f1f
jmp 0x13cd3
leaq 0x2254e(%rip), %rdi # 0x3621a
xorl %eax, %eax
callq 0x16f1f
movq %r14, %rdi
callq 0x18cf2
jmp 0x13cfe
leaq 0x223bc(%rip), %rdi # 0x360a0
leaq 0x2251c(%rip), %rsi # 0x36207
leaq 0x223d6(%rip), %rdx # 0x360c8
movl $0x182, %ecx # imm = 0x182
xorl %eax, %eax
callq 0x16f1f
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x18cf2
xorl %r14d, %r14d
jmp 0x13d04
| verify_col_data:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rcx
mov r15, rdi
test rsi, rsi
setz al
test rdx, rdx
setz cl
or cl, al
jnz short loc_13C7B
mov r8, rdx
mov r9, rsi
lea r12, verify_col_data_query
lea rcx, aSelectSFromSLi; "SELECT %s FROM %s LIMIT 1"
mov r14d, 1
mov edx, 12Ch
mov rdi, r12
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, r15
mov rsi, r12
call mysql_query
test eax, eax
jz short loc_13C7B
mov r12d, eax
mov rdi, r15
call mysql_error
mov rbx, rax
mov rdi, r15
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r12d
mov rdx, rbx
mov ecx, eax
mov r9d, 17Fh
xor eax, eax
call diag
jmp loc_13D04
loc_13C7B:
mov rdi, r15
call mysql_use_result
test rax, rax
jz short loc_13CDD
mov r14, rax
mov rdi, rax
call mysql_fetch_row
test rax, rax
jz short loc_13CC5
mov r15, [rax]
test r15, r15
jz short loc_13CC5
mov rdi, r15
mov rsi, rbx
call _strcmp
test eax, eax
jz short loc_13D10
lea rdi, aExpectedSGotS; "Expected %s, got %s"
mov rsi, rbx
mov rdx, r15
xor eax, eax
call diag
jmp short loc_13CD3
loc_13CC5:
lea rdi, aFailedToGetThe; "Failed to get the result"
xor eax, eax
call diag
loc_13CD3:
mov rdi, r14
call mysql_free_result
jmp short loc_13CFE
loc_13CDD:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 182h
xor eax, eax
call diag
loc_13CFE:
mov r14d, 1
loc_13D04:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_13D10:
mov rdi, r14
call mysql_free_result
xor r14d, r14d
jmp short loc_13D04
| long long verify_col_data(long long a1, const char *a2, const char *a3, long long a4)
{
unsigned int v5; // r14d
int v6; // eax
int v7; // r12d
int v8; // ebx
int v9; // eax
long long v10; // rax
int v11; // r8d
int v12; // r9d
long long v13; // r14
_QWORD *row; // rax
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long v19; // r15
int v20; // ecx
int v21; // r8d
int v22; // r9d
if ( a2 == 0LL
|| a3 == 0LL
|| (v5 = 1,
__sprintf_chk(&verify_col_data_query, 1LL, 300LL, "SELECT %s FROM %s LIMIT 1", a3, a2),
a2 = (const char *)&verify_col_data_query,
(v6 = mysql_query(a1, &verify_col_data_query)) == 0) )
{
v10 = mysql_use_result(a1);
if ( v10 )
{
v13 = v10;
row = (_QWORD *)mysql_fetch_row(v10);
if ( row && (v19 = *row) != 0 )
{
if ( !(unsigned int)strcmp(*row, a4) )
{
mysql_free_result(v13);
return 0;
}
diag((unsigned int)"Expected %s, got %s", a4, v19, v20, v21, v22);
}
else
{
diag((unsigned int)"Failed to get the result", (_DWORD)a2, v15, v16, v17, v18);
}
mysql_free_result(v13);
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invalid result set",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
386,
v11,
v12);
}
return 1;
}
else
{
v7 = v6;
v8 = mysql_error(a1);
v9 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v7,
v8,
v9,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
383);
}
return v5;
}
| verify_col_data:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R15,RDI
TEST RSI,RSI
SETZ AL
TEST RDX,RDX
SETZ CL
OR CL,AL
JNZ 0x00113c7b
MOV R8,RDX
MOV R9,RSI
LEA R12,[0x14bf90]
LEA RCX,[0x1361cb]
MOV R14D,0x1
MOV EDX,0x12c
MOV RDI,R12
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001132a0
MOV RDI,R15
MOV RSI,R12
CALL 0x0011d045
TEST EAX,EAX
JZ 0x00113c7b
MOV R12D,EAX
MOV RDI,R15
CALL 0x0011f0be
MOV RBX,RAX
MOV RDI,R15
CALL 0x0011f0a9
LEA RDI,[0x1361e5]
LEA R8,[0x1360c8]
MOV ESI,R12D
MOV RDX,RBX
MOV ECX,EAX
MOV R9D,0x17f
XOR EAX,EAX
CALL 0x00116f1f
JMP 0x00113d04
LAB_00113c7b:
MOV RDI,R15
CALL 0x0011c474
TEST RAX,RAX
JZ 0x00113cdd
MOV R14,RAX
MOV RDI,RAX
CALL 0x0011e140
TEST RAX,RAX
JZ 0x00113cc5
MOV R15,qword ptr [RAX]
TEST R15,R15
JZ 0x00113cc5
MOV RDI,R15
MOV RSI,RBX
CALL 0x00113640
TEST EAX,EAX
JZ 0x00113d10
LEA RDI,[0x136233]
MOV RSI,RBX
MOV RDX,R15
XOR EAX,EAX
CALL 0x00116f1f
JMP 0x00113cd3
LAB_00113cc5:
LEA RDI,[0x13621a]
XOR EAX,EAX
CALL 0x00116f1f
LAB_00113cd3:
MOV RDI,R14
CALL 0x00118cf2
JMP 0x00113cfe
LAB_00113cdd:
LEA RDI,[0x1360a0]
LEA RSI,[0x136207]
LEA RDX,[0x1360c8]
MOV ECX,0x182
XOR EAX,EAX
CALL 0x00116f1f
LAB_00113cfe:
MOV R14D,0x1
LAB_00113d04:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00113d10:
MOV RDI,R14
CALL 0x00118cf2
XOR R14D,R14D
JMP 0x00113d04
|
int8 verify_col_data(int8 param_1,long param_2,long param_3,char *param_4)
{
char *__s1;
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
int8 *puVar5;
if (param_3 != 0 && param_2 != 0) {
__sprintf_chk(verify_col_data_query,1,300,"SELECT %s FROM %s LIMIT 1",param_3,param_2);
iVar1 = mysql_query(param_1,verify_col_data_query);
if (iVar1 != 0) {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x17f
);
return 1;
}
}
lVar4 = mysql_use_result(param_1);
if (lVar4 == 0) {
diag("Error: %s (%s: %d)","Invalid result set",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x182);
}
else {
puVar5 = (int8 *)mysql_fetch_row(lVar4);
if ((puVar5 == (int8 *)0x0) || (__s1 = (char *)*puVar5, __s1 == (char *)0x0)) {
diag("Failed to get the result");
}
else {
iVar1 = strcmp(__s1,param_4);
if (iVar1 == 0) {
mysql_free_result(lVar4);
return 0;
}
diag("Expected %s, got %s",param_4,__s1);
}
mysql_free_result(lVar4);
}
return 1;
}
|
|
2,456 | stmt_buffered_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static int stmt_buffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
if (!stmt->result_cursor)
{
*row= NULL;
stmt->state= MYSQL_STMT_FETCH_DONE;
return MYSQL_NO_DATA;
}
stmt->state= MYSQL_STMT_USER_FETCHING;
*row= (uchar *)stmt->result_cursor->data;
stmt->result_cursor= stmt->result_cursor->next;
return 0;
} | O0 | c | stmt_buffered_fetch:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
jne 0x505e9
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x6, 0x50(%rax)
movl $0x64, -0x4(%rbp)
jmp 0x5062a
movq -0x10(%rbp), %rax
movl $0x5, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
| stmt_buffered_fetch:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+0E0h], 0
jnz short loc_505E9
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 6
mov [rbp+var_4], 64h ; 'd'
jmp short loc_5062A
loc_505E9:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 5
mov rax, [rbp+var_10]
mov rax, [rax+0E0h]
mov rcx, [rax+8]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax+0E0h]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+0E0h], rcx
mov [rbp+var_4], 0
loc_5062A:
mov eax, [rbp+var_4]
pop rbp
retn
| long long stmt_buffered_fetch(long long a1, _QWORD *a2)
{
if ( *(_QWORD *)(a1 + 224) )
{
*(_DWORD *)(a1 + 80) = 5;
*a2 = *(_QWORD *)(*(_QWORD *)(a1 + 224) + 8LL);
*(_QWORD *)(a1 + 224) = **(_QWORD **)(a1 + 224);
return 0;
}
else
{
*a2 = 0LL;
*(_DWORD *)(a1 + 80) = 6;
return 100;
}
}
| stmt_buffered_fetch:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0xe0],0x0
JNZ 0x001505e9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x6
MOV dword ptr [RBP + -0x4],0x64
JMP 0x0015062a
LAB_001505e9:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_0015062a:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 stmt_buffered_fetch(long param_1,int8 *param_2)
{
int4 local_c;
if (*(long *)(param_1 + 0xe0) == 0) {
*param_2 = 0;
*(int4 *)(param_1 + 0x50) = 6;
local_c = 100;
}
else {
*(int4 *)(param_1 + 0x50) = 5;
*param_2 = *(int8 *)(*(long *)(param_1 + 0xe0) + 8);
*(int8 *)(param_1 + 0xe0) = **(int8 **)(param_1 + 0xe0);
local_c = 0;
}
return local_c;
}
|
|
2,457 | my_mb_wc_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!IS_CONTINUATION_BYTE(s[1]))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0xb90ad
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb92a9
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0xb90c4
movl $0x0, -0x4(%rbp)
jmp 0xb92a9
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0xb9120
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0xb90ed
movl $0x0, -0x4(%rbp)
jmp 0xb92a9
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xb92a9
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0xb91c2
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xb916d
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xb916d
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0xb9179
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0xb9179
movl $0x0, -0x4(%rbp)
jmp 0xb92a9
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0xb92a9
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0xb92a0
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xb923b
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xb923b
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0xb923b
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0xb9221
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0xb923b
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0xb9244
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0xb9244
movl $0x0, -0x4(%rbp)
jmp 0xb92a9
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0xb92a9
jmp 0xb92a2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
| my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_B90AD
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_B92A9
loc_B90AD:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_B90C4
mov [rbp+var_4], 0
jmp loc_B92A9
loc_B90C4:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_B9120
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_B90ED
mov [rbp+var_4], 0
jmp loc_B92A9
loc_B90ED:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_B92A9
loc_B9120:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_B91C2
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_B916D
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_B916D
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_B9179
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_B9179
loc_B916D:
mov [rbp+var_4], 0
jmp loc_B92A9
loc_B9179:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_B92A9
loc_B91C2:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_B92A0
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_B923B
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_B923B
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_B923B
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_B9221
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_B923B
loc_B9221:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_B9244
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_B9244
loc_B923B:
mov [rbp+var_4], 0
jmp short loc_B92A9
loc_B9244:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_B92A9
loc_B92A0:
jmp short $+2
loc_B92A2:
mov [rbp+var_4], 0
loc_B92A9:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf8mb4_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
v4 = *a3;
if ( *a3 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (a3[1] ^ 0x80) < 64
&& (a3[2] ^ 0x80) < 64
&& (a3[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a3[1] >= 0x90u)
&& (v4 <= 0xF3u || a3[1] <= 0x8Fu) )
{
*a2 = a3[3] ^ 0x80u | ((long long)(a3[2] ^ 0x80u) << 6) | ((long long)(a3[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) )
{
*a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 )
{
*a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
*a2 = v4;
return 1;
}
}
| my_mb_wc_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x001b90ad
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b92a9
LAB_001b90ad:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x001b90c4
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b92a9
LAB_001b90c4:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x001b9120
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x001b90ed
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b92a9
LAB_001b90ed:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001b92a9
LAB_001b9120:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x001b91c2
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001b916d
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001b916d
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x001b9179
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x001b9179
LAB_001b916d:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b92a9
LAB_001b9179:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001b92a9
LAB_001b91c2:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x001b92a0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001b923b
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001b923b
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001b923b
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x001b9221
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x001b923b
LAB_001b9221:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x001b9244
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x001b9244
LAB_001b923b:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b92a9
LAB_001b9244:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x7
MOVSXD RCX,EAX
SHL RCX,0x12
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0xc
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x001b92a9
LAB_001b92a0:
JMP 0x001b92a2
LAB_001b92a2:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b92a9:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb4_no_range(int8 param_1,ulong *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
bVar1 = *param_3;
if (bVar1 < 0x80) {
*param_2 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if ((param_3[1] ^ 0x80) < 0x40) {
*param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_3[1])))) {
*param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 |
(long)(int)(param_3[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if ((((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((param_3[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_3[1])))) &&
((bVar1 < 0xf4 || (param_3[1] < 0x90)))) {
*param_2 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_3[1] ^ 0x80) << 0xc |
(long)(int)(param_3[2] ^ 0x80) << 6 | (long)(int)(param_3[3] ^ 0x80);
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
2,458 | my_8bit_charset_flags_from_data | eloqsql/strings/ctype-simple.c | uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (my_charset_is_8bit_pure_ascii(cs))
flags|= MY_CS_PUREASCII;
if (!my_charset_is_ascii_compatible(cs))
flags|= MY_CS_NONASCII;
return flags;
} | O0 | c | my_8bit_charset_flags_from_data:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7c220
cmpb $0x0, %al
je 0x7c1fb
movl -0xc(%rbp), %eax
orl $0x1000, %eax # imm = 0x1000
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7c280
cmpb $0x0, %al
jne 0x7c213
movl -0xc(%rbp), %eax
orl $0x2000, %eax # imm = 0x2000
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_8bit_charset_flags_from_data:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rdi, [rbp+var_8]
call my_charset_is_8bit_pure_ascii
cmp al, 0
jz short loc_7C1FB
mov eax, [rbp+var_C]
or eax, 1000h
mov [rbp+var_C], eax
loc_7C1FB:
mov rdi, [rbp+var_8]
call my_charset_is_ascii_compatible
cmp al, 0
jnz short loc_7C213
mov eax, [rbp+var_C]
or eax, 2000h
mov [rbp+var_C], eax
loc_7C213:
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long my_8bit_charset_flags_from_data(long long a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch]
v2 = 0;
if ( (unsigned __int8)my_charset_is_8bit_pure_ascii(a1) )
v2 = 4096;
if ( !(unsigned __int8)my_charset_is_ascii_compatible(a1) )
v2 |= 0x2000u;
return v2;
}
| my_8bit_charset_flags_from_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017c220
CMP AL,0x0
JZ 0x0017c1fb
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x1000
MOV dword ptr [RBP + -0xc],EAX
LAB_0017c1fb:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0017c280
CMP AL,0x0
JNZ 0x0017c213
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x2000
MOV dword ptr [RBP + -0xc],EAX
LAB_0017c213:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
uint my_8bit_charset_flags_from_data(int8 param_1)
{
char cVar1;
int4 local_14;
local_14 = 0;
cVar1 = my_charset_is_8bit_pure_ascii(param_1);
if (cVar1 != '\0') {
local_14 = 0x1000;
}
cVar1 = my_charset_is_ascii_compatible(param_1);
if (cVar1 == '\0') {
local_14 = local_14 | 0x2000;
}
return local_14;
}
|
|
2,459 | my_8bit_charset_flags_from_data | eloqsql/strings/ctype-simple.c | uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (my_charset_is_8bit_pure_ascii(cs))
flags|= MY_CS_PUREASCII;
if (!my_charset_is_ascii_compatible(cs))
flags|= MY_CS_NONASCII;
return flags;
} | O3 | c | my_8bit_charset_flags_from_data:
movq 0x68(%rdi), %rcx
testq %rcx, %rcx
je 0x5acb8
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %edx, %edx
cmpw $0x80, (%rcx,%rdx,2)
jae 0x5ac9f
incq %rdx
cmpq $0x100, %rdx # imm = 0x100
jne 0x5ac86
movl $0x1000, %eax # imm = 0x1000
xorl %edx, %edx
movzwl (%rcx,%rdx,2), %esi
cmpq %rsi, %rdx
jne 0x5acbb
incq %rdx
cmpq $0x80, %rdx
jne 0x5aca1
jmp 0x5acc0
xorl %eax, %eax
retq
orl $0x2000, %eax # imm = 0x2000
popq %rbp
retq
| my_8bit_charset_flags_from_data:
mov rcx, [rdi+68h]
test rcx, rcx
jz short loc_5ACB8
push rbp
mov rbp, rsp
xor eax, eax
xor edx, edx
loc_5AC86:
cmp word ptr [rcx+rdx*2], 80h
jnb short loc_5AC9F
inc rdx
cmp rdx, 100h
jnz short loc_5AC86
mov eax, 1000h
loc_5AC9F:
xor edx, edx
loc_5ACA1:
movzx esi, word ptr [rcx+rdx*2]
cmp rdx, rsi
jnz short loc_5ACBB
inc rdx
cmp rdx, 80h
jnz short loc_5ACA1
jmp short loc_5ACC0
loc_5ACB8:
xor eax, eax
retn
loc_5ACBB:
or eax, 2000h
loc_5ACC0:
pop rbp
retn
| char * my_8bit_charset_flags_from_data(long long a1)
{
long long v1; // rcx
char *result; // rax
long long v3; // rdx
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 104);
if ( !v1 )
return 0LL;
result = 0LL;
v3 = 0LL;
while ( *(_WORD *)(v1 + 2 * v3) < 0x80u )
{
if ( ++v3 == 256 )
{
result = "strncpy";
break;
}
}
v4 = 0LL;
while ( v4 == *(unsigned __int16 *)(v1 + 2 * v4) )
{
if ( ++v4 == 128 )
return result;
}
return (char *)((unsigned int)result | 0x2000);
}
| my_8bit_charset_flags_from_data:
MOV RCX,qword ptr [RDI + 0x68]
TEST RCX,RCX
JZ 0x0015acb8
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
XOR EDX,EDX
LAB_0015ac86:
CMP word ptr [RCX + RDX*0x2],0x80
JNC 0x0015ac9f
INC RDX
CMP RDX,0x100
JNZ 0x0015ac86
MOV EAX,0x1000
LAB_0015ac9f:
XOR EDX,EDX
LAB_0015aca1:
MOVZX ESI,word ptr [RCX + RDX*0x2]
CMP RDX,RSI
JNZ 0x0015acbb
INC RDX
CMP RDX,0x80
JNZ 0x0015aca1
JMP 0x0015acc0
LAB_0015acb8:
XOR EAX,EAX
RET
LAB_0015acbb:
OR EAX,0x2000
LAB_0015acc0:
POP RBP
RET
|
uint my_8bit_charset_flags_from_data(long param_1)
{
long lVar1;
uint uVar2;
long lVar3;
ulong uVar4;
lVar1 = *(long *)(param_1 + 0x68);
if (lVar1 == 0) {
return 0;
}
uVar2 = 0;
lVar3 = 0;
do {
if (0x7f < *(ushort *)(lVar1 + lVar3 * 2)) goto LAB_0015ac9f;
lVar3 = lVar3 + 1;
} while (lVar3 != 0x100);
uVar2 = 0x1000;
LAB_0015ac9f:
uVar4 = 0;
do {
if (uVar4 != *(ushort *)(lVar1 + uVar4 * 2)) {
return uVar2 | 0x2000;
}
uVar4 = uVar4 + 1;
} while (uVar4 != 0x80);
return uVar2;
}
|
|
2,460 | 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 0xa272e
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 0xa271a
popq %rbp
retq
| bitmap_subtract:
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rax, rcx
ja short locret_A272E
push rbp
mov rbp, rsp
mov rdx, [rsi]
loc_A271A:
mov esi, [rdx]
not esi
and [rax], esi
add rdx, 4
add rax, 4
cmp rax, rcx
jbe short loc_A271A
pop rbp
locret_A272E:
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 0x001a272e
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
LAB_001a271a:
MOV ESI,dword ptr [RDX]
NOT ESI
AND dword ptr [RAX],ESI
ADD RDX,0x4
ADD RAX,0x4
CMP RAX,RCX
JBE 0x001a271a
POP RBP
LAB_001a272e:
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;
}
|
|
2,461 | blst_aggregate_in_g2 | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/aggregate.c | BLST_ERROR blst_aggregate_in_g2(POINTonE2 *out, const POINTonE2 *in,
const unsigned char *zwire)
{
POINTonE2 P[1];
BLST_ERROR ret;
ret = POINTonE2_Deserialize_Z((POINTonE2_affine *)P, zwire);
if (ret != BLST_SUCCESS)
return ret;
if (vec_is_zero(P, sizeof(POINTonE2_affine))) {
if (in == NULL)
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
vec_copy(P->Z, BLS12_381_Rx.p, sizeof(P->Z));
if (!POINTonE2_in_G2(P))
return BLST_POINT_NOT_IN_GROUP;
if (in == NULL) {
vec_copy(out, P, sizeof(P));
} else {
POINTonE2_dadd_affine(out, in, (POINTonE2_affine *)P);
}
return BLST_SUCCESS;
} | O1 | c | blst_aggregate_in_g2:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x120, %rsp # imm = 0x120
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x130(%rbp), %rdi
movq %rdx, %rsi
callq 0x61179
testl %eax, %eax
jne 0x665fd
leaq -0x130(%rbp), %rdi
movl $0xc0, %esi
callq 0x74d40
testq %rax, %rax
je 0x665a3
xorl %eax, %eax
testq %r14, %r14
jne 0x665fd
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0x24, %rax
jne 0x66590
jmp 0x665fb
leaq -0x70(%rbp), %rdi
leaq 0x2a6ca(%rip), %rsi # 0x90c78
movl $0xc, %ecx
rep movsq (%rsi), %es:(%rdi)
leaq -0x130(%rbp), %rdi
callq 0x6385f
testq %rax, %rax
je 0x665e0
testq %r14, %r14
je 0x665e7
leaq -0x130(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61ee5
jmp 0x665fb
movl $0x3, %eax
jmp 0x665fd
leaq -0x130(%rbp), %rsi
movl $0x120, %edx # imm = 0x120
movq %rbx, %rdi
callq 0x22090
xorl %eax, %eax
addq $0x120, %rsp # imm = 0x120
popq %rbx
popq %r14
popq %rbp
retq
| blst_aggregate_in_g2:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 120h
mov r14, rsi
mov rbx, rdi
lea rdi, [rbp+var_130]
mov rsi, rdx
call POINTonE2_Deserialize_Z
test eax, eax
jnz loc_665FD
lea rdi, [rbp+var_130]
mov esi, 0C0h
call vec_is_zero_16x
test rax, rax
jz short loc_665A3
xor eax, eax
test r14, r14
jnz short loc_665FD
xor eax, eax
loc_66590:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 24h ; '$'
jnz short loc_66590
jmp short loc_665FB
loc_665A3:
lea rdi, [rbp+var_70]
lea rsi, BLS12_381_Rx
mov ecx, 0Ch
rep movsq
lea rdi, [rbp+var_130]
call POINTonE2_in_G2
test rax, rax
jz short loc_665E0
test r14, r14
jz short loc_665E7
lea rdx, [rbp+var_130]
mov rdi, rbx
mov rsi, r14
call POINTonE2_dadd_affine
jmp short loc_665FB
loc_665E0:
mov eax, 3
jmp short loc_665FD
loc_665E7:
lea rsi, [rbp+var_130]
mov edx, 120h
mov rdi, rbx
call _memcpy
loc_665FB:
xor eax, eax
loc_665FD:
add rsp, 120h
pop rbx
pop r14
pop rbp
retn
| long long blst_aggregate_in_g2(long long a1, long long a2, unsigned __int8 *a3)
{
long long result; // rax
long long i; // rax
_BYTE v5[192]; // [rsp+0h] [rbp-130h] BYREF
_BYTE v6[96]; // [rsp+C0h] [rbp-70h] BYREF
result = POINTonE2_Deserialize_Z((long long)v5, a3);
if ( !(_DWORD)result )
{
if ( vec_is_zero_16x(v5, 192LL) )
{
result = 0LL;
if ( a2 )
return result;
for ( i = 0LL; i != 36; ++i )
*(_QWORD *)(a1 + 8 * i) = 0LL;
}
else
{
qmemcpy(v6, &BLS12_381_Rx, sizeof(v6));
if ( !POINTonE2_in_G2((long long)v5) )
return 3LL;
if ( a2 )
POINTonE2_dadd_affine(a1, a2, (long long)v5);
else
memcpy(a1);
}
return 0LL;
}
return result;
}
| blst_aggregate_in_g2:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x120
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RBP + -0x130]
MOV RSI,RDX
CALL 0x00161179
TEST EAX,EAX
JNZ 0x001665fd
LEA RDI,[RBP + -0x130]
MOV ESI,0xc0
CALL 0x00174d40
TEST RAX,RAX
JZ 0x001665a3
XOR EAX,EAX
TEST R14,R14
JNZ 0x001665fd
XOR EAX,EAX
LAB_00166590:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0x24
JNZ 0x00166590
JMP 0x001665fb
LAB_001665a3:
LEA RDI,[RBP + -0x70]
LEA RSI,[0x190c78]
MOV ECX,0xc
MOVSQ.REP RDI,RSI
LEA RDI,[RBP + -0x130]
CALL 0x0016385f
TEST RAX,RAX
JZ 0x001665e0
TEST R14,R14
JZ 0x001665e7
LEA RDX,[RBP + -0x130]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00161ee5
JMP 0x001665fb
LAB_001665e0:
MOV EAX,0x3
JMP 0x001665fd
LAB_001665e7:
LEA RSI,[RBP + -0x130]
MOV EDX,0x120
MOV RDI,RBX
CALL 0x00122090
LAB_001665fb:
XOR EAX,EAX
LAB_001665fd:
ADD RSP,0x120
POP RBX
POP R14
POP RBP
RET
|
int8 blst_aggregate_in_g2(void *param_1,long param_2,int8 param_3)
{
int8 uVar1;
long lVar2;
int8 *puVar3;
int8 *puVar4;
byte bVar5;
int1 local_138 [192];
int8 local_78 [12];
bVar5 = 0;
uVar1 = POINTonE2_Deserialize_Z(local_138,param_3);
if ((int)uVar1 == 0) {
lVar2 = vec_is_zero_16x(local_138,0xc0);
if (lVar2 == 0) {
puVar3 = &BLS12_381_Rx;
puVar4 = local_78;
for (lVar2 = 0xc; lVar2 != 0; lVar2 = lVar2 + -1) {
*puVar4 = *puVar3;
puVar3 = puVar3 + (ulong)bVar5 * -2 + 1;
puVar4 = puVar4 + (ulong)bVar5 * -2 + 1;
}
lVar2 = POINTonE2_in_G2(local_138);
if (lVar2 == 0) {
return 3;
}
if (param_2 == 0) {
memcpy(param_1,local_138,0x120);
}
else {
POINTonE2_dadd_affine(param_1,param_2,local_138);
}
}
else {
if (param_2 != 0) {
return 0;
}
lVar2 = 0;
do {
*(int8 *)((long)param_1 + lVar2 * 8) = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 0x24);
}
uVar1 = 0;
}
return uVar1;
}
|
|
2,462 | my_lengthsp_8bit | eloqsql/strings/ctype-simple.c | size_t my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t length)
{
const char *end;
end= (const char *) skip_trailing_space((const uchar *)ptr, length);
return (size_t) (end-ptr);
} | O3 | c | my_lengthsp_8bit:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %rdi
cmpq $0x15, %rdx
jb 0x3f4bb
movq %rdi, %rdx
andq $-0x4, %rdx
cmpq %rsi, %rdx
jbe 0x3f4bb
leaq 0x3(%rsi), %rax
andq $-0x4, %rax
movq %rdi, %rcx
movb -0x1(%rdi), %r8b
cmpq %rdx, %rdi
jbe 0x3f4dc
leaq -0x1(%rcx), %rdi
cmpb $0x20, %r8b
je 0x3f4a3
jmp 0x3f4be
movq %rdi, %rcx
movq %rcx, %rdx
subq %rsi, %rdx
movq %rdx, %rax
cmpq %rsi, %rcx
jbe 0x3f4da
cmpb $0x20, -0x1(%rcx)
leaq -0x1(%rcx), %rcx
leaq -0x1(%rax), %rdx
je 0x3f4c4
popq %rbp
retq
cmpb $0x20, %r8b
setne %dil
cmpq %rdx, %rax
setae %dl
orb %dil, %dl
jne 0x3f4be
movq %rcx, %rdx
movq %rdx, %rcx
cmpq %rax, %rdx
jbe 0x3f4be
leaq -0x4(%rcx), %rdx
cmpl $0x20202020, -0x4(%rcx) # imm = 0x20202020
je 0x3f4f2
jmp 0x3f4be
| my_lengthsp_8bit:
push rbp
mov rbp, rsp
lea rdi, [rsi+rdx]
cmp rdx, 15h
jb short loc_3F4BB
mov rdx, rdi
and rdx, 0FFFFFFFFFFFFFFFCh
cmp rdx, rsi
jbe short loc_3F4BB
lea rax, [rsi+3]
and rax, 0FFFFFFFFFFFFFFFCh
loc_3F4A3:
mov rcx, rdi
mov r8b, [rdi-1]
cmp rdi, rdx
jbe short loc_3F4DC
lea rdi, [rcx-1]
cmp r8b, 20h ; ' '
jz short loc_3F4A3
jmp short loc_3F4BE
loc_3F4BB:
mov rcx, rdi
loc_3F4BE:
mov rdx, rcx
sub rdx, rsi
loc_3F4C4:
mov rax, rdx
cmp rcx, rsi
jbe short loc_3F4DA
cmp byte ptr [rcx-1], 20h ; ' '
lea rcx, [rcx-1]
lea rdx, [rax-1]
jz short loc_3F4C4
loc_3F4DA:
pop rbp
retn
loc_3F4DC:
cmp r8b, 20h ; ' '
setnz dil
cmp rax, rdx
setnb dl
or dl, dil
jnz short loc_3F4BE
mov rdx, rcx
loc_3F4F2:
mov rcx, rdx
cmp rdx, rax
jbe short loc_3F4BE
lea rdx, [rcx-4]
cmp dword ptr [rcx-4], 20202020h
jz short loc_3F4F2
jmp short loc_3F4BE
| unsigned long long my_lengthsp_8bit(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned long long v3; // rdi
unsigned long long v4; // rdx
unsigned long long v5; // rax
unsigned long long v6; // rcx
char v7; // r8
unsigned long long v8; // rdx
unsigned long long result; // rax
bool v10; // zf
unsigned long long v11; // rdx
v3 = a2 + a3;
if ( a3 < 0x15 || (v4 = v3 & 0xFFFFFFFFFFFFFFFCLL, (v3 & 0xFFFFFFFFFFFFFFFCLL) <= a2) )
{
v6 = v3;
}
else
{
v5 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v6 = v3;
v7 = *(_BYTE *)(v3 - 1);
if ( v3 <= v4 )
break;
--v3;
if ( v7 != 32 )
goto LABEL_8;
}
if ( v7 == 32 && v5 < v4 )
{
v11 = v3;
do
{
v6 = v11;
if ( v11 <= v5 )
break;
v11 -= 4LL;
}
while ( *(_DWORD *)(v6 - 4) == 538976288 );
}
}
LABEL_8:
v8 = v6 - a2;
do
{
result = v8;
if ( v6 <= a2 )
break;
v10 = *(_BYTE *)--v6 == 32;
--v8;
}
while ( v10 );
return result;
}
| my_lengthsp_8bit:
PUSH RBP
MOV RBP,RSP
LEA RDI,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x0013f4bb
MOV RDX,RDI
AND RDX,-0x4
CMP RDX,RSI
JBE 0x0013f4bb
LEA RAX,[RSI + 0x3]
AND RAX,-0x4
LAB_0013f4a3:
MOV RCX,RDI
MOV R8B,byte ptr [RDI + -0x1]
CMP RDI,RDX
JBE 0x0013f4dc
LEA RDI,[RCX + -0x1]
CMP R8B,0x20
JZ 0x0013f4a3
JMP 0x0013f4be
LAB_0013f4bb:
MOV RCX,RDI
LAB_0013f4be:
MOV RDX,RCX
SUB RDX,RSI
LAB_0013f4c4:
MOV RAX,RDX
CMP RCX,RSI
JBE 0x0013f4da
CMP byte ptr [RCX + -0x1],0x20
LEA RCX,[RCX + -0x1]
LEA RDX,[RAX + -0x1]
JZ 0x0013f4c4
LAB_0013f4da:
POP RBP
RET
LAB_0013f4dc:
CMP R8B,0x20
SETNZ DIL
CMP RAX,RDX
SETNC DL
OR DL,DIL
JNZ 0x0013f4be
MOV RDX,RCX
LAB_0013f4f2:
MOV RCX,RDX
CMP RDX,RAX
JBE 0x0013f4be
LEA RDX,[RCX + -0x4]
CMP dword ptr [RCX + -0x4],0x20202020
JZ 0x0013f4f2
JMP 0x0013f4be
|
void my_lengthsp_8bit(int8 param_1,ulong param_2,ulong param_3)
{
char *pcVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uVar4 = param_2 + param_3;
if ((0x14 < param_3) && (uVar5 = uVar4 & 0xfffffffffffffffc, param_2 < uVar5)) {
uVar3 = param_2 + 3 & 0xfffffffffffffffc;
uVar2 = uVar4;
do {
uVar4 = uVar2;
if (uVar4 <= uVar5) {
uVar2 = uVar4;
if (uVar3 < uVar5 && *(char *)(uVar4 - 1) == ' ') goto LAB_0013f4f2;
break;
}
uVar2 = uVar4 - 1;
} while (*(char *)(uVar4 - 1) == ' ');
}
goto LAB_0013f4c4;
while (uVar2 = uVar4 - 4, *(int *)(uVar4 - 4) == 0x20202020) {
LAB_0013f4f2:
uVar4 = uVar2;
if (uVar4 <= uVar3) break;
}
LAB_0013f4c4:
do {
if (uVar4 <= param_2) {
return;
}
pcVar1 = (char *)(uVar4 - 1);
uVar4 = uVar4 - 1;
} while (*pcVar1 == ' ');
return;
}
|
|
2,463 | my_wildcmp_uca_impl | eloqsql/strings/ctype-uca.c | static
int my_wildcmp_uca_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
my_wc_t s_wc, w_wc;
int scan;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (1)
{
my_bool escaped= 0;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
result= 1; /* Found an anchor char */
break;
}
wildstr+= scan;
if (w_wc == (my_wc_t) escape && wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
escaped= 1;
}
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
if (!escaped && w_wc == (my_wc_t) w_one)
{
result= 1; /* Found an anchor char */
}
else
{
if (my_uca_charcmp(cs,s_wc,w_wc))
return 1; /* No match */
}
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
}
if (w_wc == (my_wc_t) w_many)
{ /* Found w_many */
/* Remove any '%' and '_' from the wild search string */
for ( ; wildstr != wildend ; )
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
wildstr+= scan;
continue;
}
if (w_wc == (my_wc_t) w_one)
{
wildstr+= scan;
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return 0; /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
if (w_wc == (my_wc_t) escape)
{
if (wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
}
}
while (1)
{
/* Skip until the first character from wildstr is found */
while (str != str_end)
{
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
if (!my_uca_charcmp(cs,s_wc,w_wc))
break;
str+= scan;
}
if (str == str_end)
return -1;
str+= scan;
result= my_wildcmp_uca_impl(cs, str, str_end, wildstr, wildend,
escape, w_one, w_many,
recurse_level + 1);
if (result <= 0)
return result;
}
}
}
return (str != str_end ? 1 : 0);
} | O3 | c | my_wildcmp_uca_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, -0x54(%rbp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, -0x40(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
movl 0x20(%rbp), %eax
movq %rax, -0x60(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r14
leaq 0x33419b(%rip), %rax # 0x373058
movq (%rax), %rax
testq %rax, %rax
je 0x3eed7
movl 0x20(%rbp), %edi
callq *%rax
movl $0x1, %ebx
testl %eax, %eax
jne 0x3f154
cmpq %r12, %r13
je 0x3efd8
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %ecx
cltq
movq %rax, -0x78(%rbp)
movslq -0x54(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq %ecx, %rax
movq %rax, -0x68(%rbp)
movq %r14, -0x48(%rbp)
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0x3f14f
movq -0x38(%rbp), %rcx
cmpq -0x78(%rbp), %rcx
je 0x3efea
movl %eax, %eax
addq %rax, %r13
cmpq -0x70(%rbp), %rcx
jne 0x3ef86
cmpq %r12, %r13
jae 0x3ef86
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0x3f14f
movl %eax, %ebx
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq %r14, %rax
movq -0x30(%rbp), %r14
movq %r14, %rdx
movq -0x40(%rbp), %rcx
callq *%rax
testl %eax, %eax
jle 0x3f14f
movl %ebx, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, %r14
movq %r14, -0x30(%rbp)
movq -0x38(%rbp), %rdx
movq -0x48(%rbp), %r14
jmp 0x3efb6
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rbx
movq %rbx, %rdx
movq -0x40(%rbp), %rcx
callq *%r14
testl %eax, %eax
jle 0x3f14f
movl %eax, %eax
addq %rax, %rbx
movq %rbx, -0x30(%rbp)
movq -0x38(%rbp), %rdx
cmpq -0x68(%rbp), %rdx
je 0x3efcf
movq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0x43974
movl $0x1, %ebx
testl %eax, %eax
jne 0x3f154
cmpq %r12, %r13
jne 0x3eeff
xorl %ebx, %ebx
movq -0x40(%rbp), %rax
cmpq %rax, -0x30(%rbp)
setne %bl
jmp 0x3f154
xorl %ebx, %ebx
cmpq %r12, %r13
je 0x3f154
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0x3f14f
movl %eax, %r14d
movq -0x38(%rbp), %rax
cmpq -0x78(%rbp), %rax
jne 0x3f02e
movl %r14d, %eax
addq %rax, %r13
cmpq %r12, %r13
movq -0x48(%rbp), %r14
jne 0x3eff5
jmp 0x3f154
cmpq -0x68(%rbp), %rax
jne 0x3f05c
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq *-0x48(%rbp)
testl %eax, %eax
jle 0x3f14f
movl %r14d, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, -0x30(%rbp)
jmp 0x3f020
movq -0x40(%rbp), %rax
cmpq %rax, -0x30(%rbp)
je 0x3f165
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
movq -0x48(%rbp), %r14
callq *%r14
testl %eax, %eax
jle 0x3f14f
movl %eax, %eax
addq %rax, %r13
movq -0x70(%rbp), %rax
cmpq %rax, -0x38(%rbp)
jne 0x3f0b7
cmpq %r12, %r13
jae 0x3f0b7
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0x3f14f
movl %eax, %eax
addq %rax, %r13
movq -0x60(%rbp), %rax
incl %eax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rbx
movq -0x40(%rbp), %rcx
cmpq %rcx, %rbx
je 0x3f165
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jle 0x3f14f
movl %eax, %r14d
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %r15, %rdi
callq 0x43974
movl %r14d, %ecx
addq %rcx, %rbx
testl %eax, %eax
je 0x3f10f
movq -0x40(%rbp), %rcx
cmpq %rcx, %rbx
movq -0x48(%rbp), %r14
jne 0x3f0d2
jmp 0x3f165
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, -0x30(%rbp)
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
movq %r13, %rcx
movq %r12, %r8
movl -0x54(%rbp), %r9d
pushq -0x60(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0x3ee7e
addq $0x20, %rsp
movl %eax, %ebx
testl %eax, %eax
movq -0x48(%rbp), %r14
jg 0x3f0c1
jmp 0x3f154
movl $0x1, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0x3f154
| my_wildcmp_uca_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_54], r9d
mov r12, r8
mov r13, rcx
mov [rbp+var_40], rdx
mov [rbp+var_30], rsi
mov r15, rdi
mov eax, [rbp+arg_10]
mov [rbp+var_60], rax
mov rax, [rdi+0B8h]
mov r14, [rax+28h]
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_3EED7
mov edi, [rbp+arg_10]
call rax
mov ebx, 1
test eax, eax
jnz loc_3F154
loc_3EED7:
cmp r13, r12
jz loc_3EFD8
mov eax, [rbp+arg_8]
mov ecx, [rbp+arg_0]
cdqe
mov [rbp+var_78], rax
movsxd rax, [rbp+var_54]
mov [rbp+var_70], rax
movsxd rax, ecx
mov [rbp+var_68], rax
mov [rbp+var_48], r14
loc_3EEFF:
mov rdi, r15
lea rsi, [rbp+var_38]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_3F14F
mov rcx, [rbp+var_38]
cmp rcx, [rbp+var_78]
jz loc_3EFEA
mov eax, eax
add r13, rax
cmp rcx, [rbp+var_70]
jnz short loc_3EF86
cmp r13, r12
jnb short loc_3EF86
mov rdi, r15
lea rsi, [rbp+var_38]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_3F14F
mov ebx, eax
mov rdi, r15
lea rsi, [rbp+var_50]
mov rax, r14
mov r14, [rbp+var_30]
mov rdx, r14
mov rcx, [rbp+var_40]
call rax
test eax, eax
jle loc_3F14F
mov ecx, ebx
add r13, rcx
mov eax, eax
add r14, rax
mov [rbp+var_30], r14
mov rdx, [rbp+var_38]
mov r14, [rbp+var_48]
jmp short loc_3EFB6
loc_3EF86:
mov rdi, r15
lea rsi, [rbp+var_50]
mov rbx, [rbp+var_30]
mov rdx, rbx
mov rcx, [rbp+var_40]
call r14
test eax, eax
jle loc_3F14F
mov eax, eax
add rbx, rax
mov [rbp+var_30], rbx
mov rdx, [rbp+var_38]
cmp rdx, [rbp+var_68]
jz short loc_3EFCF
loc_3EFB6:
mov rsi, [rbp+var_50]
mov rdi, r15
call my_uca_charcmp
mov ebx, 1
test eax, eax
jnz loc_3F154
loc_3EFCF:
cmp r13, r12
jnz loc_3EEFF
loc_3EFD8:
xor ebx, ebx
mov rax, [rbp+var_40]
cmp [rbp+var_30], rax
setnz bl
jmp loc_3F154
loc_3EFEA:
xor ebx, ebx
cmp r13, r12
jz loc_3F154
loc_3EFF5:
mov rdi, r15
lea rsi, [rbp+var_38]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_3F14F
mov r14d, eax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_78]
jnz short loc_3F02E
mov eax, r14d
add r13, rax
loc_3F020:
cmp r13, r12
mov r14, [rbp+var_48]
jnz short loc_3EFF5
jmp loc_3F154
loc_3F02E:
cmp rax, [rbp+var_68]
jnz short loc_3F05C
mov rdi, r15
lea rsi, [rbp+var_50]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_40]
call [rbp+var_48]
test eax, eax
jle loc_3F14F
mov ecx, r14d
add r13, rcx
mov eax, eax
add [rbp+var_30], rax
jmp short loc_3F020
loc_3F05C:
mov rax, [rbp+var_40]
cmp [rbp+var_30], rax
jz loc_3F165
lea rsi, [rbp+var_38]
mov rdi, r15
mov rdx, r13
mov rcx, r12
mov r14, [rbp+var_48]
call r14
test eax, eax
jle loc_3F14F
mov eax, eax
add r13, rax
mov rax, [rbp+var_70]
cmp [rbp+var_38], rax
jnz short loc_3F0B7
cmp r13, r12
jnb short loc_3F0B7
lea rsi, [rbp+var_38]
mov rdi, r15
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_3F14F
mov eax, eax
add r13, rax
loc_3F0B7:
mov rax, [rbp+var_60]
inc eax
mov [rbp+var_60], rax
loc_3F0C1:
mov rbx, [rbp+var_30]
mov rcx, [rbp+var_40]
cmp rbx, rcx
jz loc_3F165
loc_3F0D2:
mov rdi, r15
lea rsi, [rbp+var_50]
mov rdx, rbx
call r14
test eax, eax
jle short loc_3F14F
mov r14d, eax
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_38]
mov rdi, r15
call my_uca_charcmp
mov ecx, r14d
add rbx, rcx
test eax, eax
jz short loc_3F10F
mov rcx, [rbp+var_40]
cmp rbx, rcx
mov r14, [rbp+var_48]
jnz short loc_3F0D2
jmp short loc_3F165
loc_3F10F:
sub rsp, 8
mov rdi, r15
mov [rbp+var_30], rbx
mov rsi, rbx
mov rdx, [rbp+var_40]
mov rcx, r13
mov r8, r12
mov r9d, [rbp+var_54]
push [rbp+var_60]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_uca_impl
add rsp, 20h
mov ebx, eax
test eax, eax
mov r14, [rbp+var_48]
jg loc_3F0C1
jmp short loc_3F154
loc_3F14F:
mov ebx, 1
loc_3F154:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3F165:
mov ebx, 0FFFFFFFFh
jmp short loc_3F154
| long long my_wildcmp_uca_impl(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
unsigned long long a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
long long ( *v11)(long long, long long *, unsigned long long, unsigned long long); // r14
unsigned int v12; // ebx
int v13; // eax
int v14; // eax
unsigned int v15; // ebx
long long ( *v16)(long long, long long *, long long, long long); // rax
long long v17; // r14
int v18; // eax
long long v19; // rdx
long long v20; // rbx
int v21; // eax
int v22; // eax
unsigned int v23; // r14d
int v24; // eax
long long ( *v25)(long long, long long *, unsigned long long, unsigned long long); // r14
int v26; // eax
unsigned long long v27; // r13
int v28; // eax
long long v29; // rbx
int v30; // eax
long long v33; // [rsp+30h] [rbp-50h] BYREF
long long ( *v34)(long long, long long *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-48h]
long long v35; // [rsp+40h] [rbp-40h]
long long v36; // [rsp+48h] [rbp-38h] BYREF
long long v37; // [rsp+50h] [rbp-30h]
v35 = a3;
v37 = a2;
v11 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( !my_string_stack_guard || (v12 = 1, !(unsigned int)my_string_stack_guard(a9)) )
{
if ( a4 != a5 )
{
v34 = v11;
while ( 1 )
{
v13 = v11(a1, &v36, a4, a5);
if ( v13 <= 0 )
return 1;
if ( v36 == a8 )
{
v12 = 0;
if ( a4 == a5 )
return v12;
while ( 1 )
{
v22 = v11(a1, &v36, a4, a5);
if ( v22 <= 0 )
return 1;
v23 = v22;
if ( v36 == a8 )
{
a4 += (unsigned int)v22;
}
else
{
if ( v36 != a7 )
{
if ( v37 == v35 )
return (unsigned int)-1;
v25 = v34;
v26 = v34(a1, &v36, a4, a5);
if ( v26 <= 0 )
return 1;
v27 = (unsigned int)v26 + a4;
if ( v36 == a6 && v27 < a5 )
{
v28 = v25(a1, &v36, v27, a5);
if ( v28 <= 0 )
return 1;
LODWORD(v27) = v28 + v27;
}
LABEL_32:
v29 = v37;
if ( v37 == v35 )
return (unsigned int)-1;
while ( 1 )
{
v30 = ((long long ( *)(long long, long long *, long long))v25)(a1, &v33, v29);
if ( v30 <= 0 )
return 1;
v29 += (unsigned int)v30;
if ( !(unsigned int)my_uca_charcmp(a1, v33, v36) )
{
v37 = v29;
v12 = my_wildcmp_uca_impl(a1, v29, v35, v27, a5, a6, a7, a8, a9 + 1);
v25 = v34;
if ( (int)v12 > 0 )
goto LABEL_32;
return v12;
}
v25 = v34;
if ( v29 == v35 )
return (unsigned int)-1;
}
}
v24 = v34(a1, &v33, v37, v35);
if ( v24 <= 0 )
return 1;
a4 += v23;
v37 += (unsigned int)v24;
}
v11 = v34;
if ( a4 == a5 )
return v12;
}
}
a4 += (unsigned int)v13;
if ( v36 == a6 && a4 < a5 )
break;
v20 = v37;
v21 = v11(a1, &v33, v37, v35);
if ( v21 <= 0 )
return 1;
v37 = (unsigned int)v21 + v20;
v19 = v36;
if ( v36 != a7 )
goto LABEL_14;
LABEL_15:
if ( a4 == a5 )
return v37 != v35;
}
v14 = v11(a1, &v36, a4, a5);
if ( v14 <= 0 )
return 1;
v15 = v14;
v16 = (long long ( *)(long long, long long *, long long, long long))v11;
v17 = v37;
v18 = v16(a1, &v33, v37, v35);
if ( v18 <= 0 )
return 1;
a4 += v15;
v37 = (unsigned int)v18 + v17;
v19 = v36;
v11 = v34;
LABEL_14:
v12 = 1;
if ( (unsigned int)my_uca_charcmp(a1, v33, v19) )
return v12;
goto LABEL_15;
}
return v37 != v35;
}
return v12;
}
| my_wildcmp_uca_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],R9D
MOV R12,R8
MOV R13,RCX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x30],RSI
MOV R15,RDI
MOV EAX,dword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV R14,qword ptr [RAX + 0x28]
LEA RAX,[0x473058]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x0013eed7
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
MOV EBX,0x1
TEST EAX,EAX
JNZ 0x0013f154
LAB_0013eed7:
CMP R13,R12
JZ 0x0013efd8
MOV EAX,dword ptr [RBP + 0x18]
MOV ECX,dword ptr [RBP + 0x10]
CDQE
MOV qword ptr [RBP + -0x78],RAX
MOVSXD RAX,dword ptr [RBP + -0x54]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RAX,ECX
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x48],R14
LAB_0013eeff:
MOV RDI,R15
LEA RSI,[RBP + -0x38]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x0013f14f
MOV RCX,qword ptr [RBP + -0x38]
CMP RCX,qword ptr [RBP + -0x78]
JZ 0x0013efea
MOV EAX,EAX
ADD R13,RAX
CMP RCX,qword ptr [RBP + -0x70]
JNZ 0x0013ef86
CMP R13,R12
JNC 0x0013ef86
MOV RDI,R15
LEA RSI,[RBP + -0x38]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x0013f14f
MOV EBX,EAX
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RAX,R14
MOV R14,qword ptr [RBP + -0x30]
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x40]
CALL RAX
TEST EAX,EAX
JLE 0x0013f14f
MOV ECX,EBX
ADD R13,RCX
MOV EAX,EAX
ADD R14,RAX
MOV qword ptr [RBP + -0x30],R14
MOV RDX,qword ptr [RBP + -0x38]
MOV R14,qword ptr [RBP + -0x48]
JMP 0x0013efb6
LAB_0013ef86:
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RBX,qword ptr [RBP + -0x30]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x40]
CALL R14
TEST EAX,EAX
JLE 0x0013f14f
MOV EAX,EAX
ADD RBX,RAX
MOV qword ptr [RBP + -0x30],RBX
MOV RDX,qword ptr [RBP + -0x38]
CMP RDX,qword ptr [RBP + -0x68]
JZ 0x0013efcf
LAB_0013efb6:
MOV RSI,qword ptr [RBP + -0x50]
MOV RDI,R15
CALL 0x00143974
MOV EBX,0x1
TEST EAX,EAX
JNZ 0x0013f154
LAB_0013efcf:
CMP R13,R12
JNZ 0x0013eeff
LAB_0013efd8:
XOR EBX,EBX
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RBP + -0x30],RAX
SETNZ BL
JMP 0x0013f154
LAB_0013efea:
XOR EBX,EBX
CMP R13,R12
JZ 0x0013f154
LAB_0013eff5:
MOV RDI,R15
LEA RSI,[RBP + -0x38]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x0013f14f
MOV R14D,EAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x78]
JNZ 0x0013f02e
MOV EAX,R14D
ADD R13,RAX
LAB_0013f020:
CMP R13,R12
MOV R14,qword ptr [RBP + -0x48]
JNZ 0x0013eff5
JMP 0x0013f154
LAB_0013f02e:
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x0013f05c
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x40]
CALL qword ptr [RBP + -0x48]
TEST EAX,EAX
JLE 0x0013f14f
MOV ECX,R14D
ADD R13,RCX
MOV EAX,EAX
ADD qword ptr [RBP + -0x30],RAX
JMP 0x0013f020
LAB_0013f05c:
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RBP + -0x30],RAX
JZ 0x0013f165
LEA RSI,[RBP + -0x38]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
MOV R14,qword ptr [RBP + -0x48]
CALL R14
TEST EAX,EAX
JLE 0x0013f14f
MOV EAX,EAX
ADD R13,RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP qword ptr [RBP + -0x38],RAX
JNZ 0x0013f0b7
CMP R13,R12
JNC 0x0013f0b7
LEA RSI,[RBP + -0x38]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x0013f14f
MOV EAX,EAX
ADD R13,RAX
LAB_0013f0b7:
MOV RAX,qword ptr [RBP + -0x60]
INC EAX
MOV qword ptr [RBP + -0x60],RAX
LAB_0013f0c1:
MOV RBX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x40]
CMP RBX,RCX
JZ 0x0013f165
LAB_0013f0d2:
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RDX,RBX
CALL R14
TEST EAX,EAX
JLE 0x0013f14f
MOV R14D,EAX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x38]
MOV RDI,R15
CALL 0x00143974
MOV ECX,R14D
ADD RBX,RCX
TEST EAX,EAX
JZ 0x0013f10f
MOV RCX,qword ptr [RBP + -0x40]
CMP RBX,RCX
MOV R14,qword ptr [RBP + -0x48]
JNZ 0x0013f0d2
JMP 0x0013f165
LAB_0013f10f:
SUB RSP,0x8
MOV RDI,R15
MOV qword ptr [RBP + -0x30],RBX
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,R13
MOV R8,R12
MOV R9D,dword ptr [RBP + -0x54]
PUSH qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x0013ee7e
ADD RSP,0x20
MOV EBX,EAX
TEST EAX,EAX
MOV R14,qword ptr [RBP + -0x48]
JG 0x0013f0c1
JMP 0x0013f154
LAB_0013f14f:
MOV EBX,0x1
LAB_0013f154:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013f165:
MOV EBX,0xffffffff
JMP 0x0013f154
|
uint my_wildcmp_uca_impl(long param_1,long param_2,long param_3,ulong param_4,ulong param_5,
int param_6,int param_7,int param_8,int param_9)
{
int iVar1;
uint uVar2;
uint uVar3;
long lVar4;
code *pcVar5;
int8 local_58;
code *local_50;
long local_48;
long local_40;
long local_38;
pcVar5 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_48 = param_3;
local_38 = param_2;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar1 = (*my_string_stack_guard)(param_9), iVar1 != 0)) {
return 1;
}
if (param_4 != param_5) {
local_50 = pcVar5;
do {
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
lVar4 = local_38;
if ((int)uVar2 < 1) {
return 1;
}
if (local_40 == param_8) {
do {
if (param_4 == param_5) {
return 0;
}
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
pcVar5 = local_50;
if ((int)uVar2 < 1) {
return 1;
}
if (local_40 != param_8) {
if (local_40 != param_7) {
if (local_38 == local_48) {
return 0xffffffff;
}
uVar2 = (*local_50)(param_1,&local_40,param_4,param_5);
if (0 < (int)uVar2) {
param_4 = param_4 + uVar2;
if ((local_40 == param_6) && (param_4 < param_5)) {
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
if ((int)uVar2 < 1) {
return 1;
}
param_4 = param_4 + uVar2;
}
do {
lVar4 = local_38;
if (local_38 == local_48) {
return 0xffffffff;
}
while( true ) {
uVar2 = (*pcVar5)(param_1,&local_58,lVar4);
if ((int)uVar2 < 1) {
return 1;
}
iVar1 = my_uca_charcmp(param_1,local_58,local_40);
lVar4 = lVar4 + (ulong)uVar2;
if (iVar1 == 0) break;
pcVar5 = local_50;
if (lVar4 == local_48) {
return 0xffffffff;
}
}
local_38 = lVar4;
uVar2 = my_wildcmp_uca_impl(param_1,lVar4,local_48,param_4,param_5,param_6,param_7
,param_8,param_9 + 1);
pcVar5 = local_50;
if ((int)uVar2 < 1) {
return uVar2;
}
} while( true );
}
return 1;
}
uVar3 = (*local_50)(param_1,&local_58,local_38,local_48);
if ((int)uVar3 < 1) {
return 1;
}
local_38 = local_38 + (ulong)uVar3;
}
param_4 = param_4 + uVar2;
pcVar5 = local_50;
} while( true );
}
param_4 = param_4 + uVar2;
if ((local_40 == param_6) && (param_4 < param_5)) {
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
lVar4 = local_38;
if ((int)uVar2 < 1) {
return 1;
}
uVar3 = (*pcVar5)(param_1,&local_58,local_38,local_48);
if ((int)uVar3 < 1) {
return 1;
}
param_4 = param_4 + uVar2;
local_38 = lVar4 + (ulong)uVar3;
pcVar5 = local_50;
LAB_0013efb6:
iVar1 = my_uca_charcmp(param_1,local_58,local_40);
if (iVar1 != 0) {
return 1;
}
}
else {
uVar2 = (*pcVar5)(param_1,&local_58,local_38,local_48);
if ((int)uVar2 < 1) {
return 1;
}
local_38 = lVar4 + (ulong)uVar2;
if (local_40 != param_7) goto LAB_0013efb6;
}
} while (param_4 != param_5);
}
return (uint)(local_38 != local_48);
}
|
|
2,464 | mp_sub | bluesky950520[P]quickjs/libbf.c | limb_t mp_sub(limb_t *res, const limb_t *op1, const limb_t *op2,
mp_size_t n, limb_t carry)
{
int i;
limb_t k, a, v, k1;
k = carry;
for(i=0;i<n;i++) {
v = op1[i];
a = v - op2[i];
k1 = a > v;
v = a - k;
k = (v > a) | k1;
res[i] = v;
}
return k;
} | O2 | c | mp_sub:
movq %r8, %rax
xorl %r8d, %r8d
testq %rcx, %rcx
cmovleq %r8, %rcx
cmpq %r8, %rcx
je 0x73ab5
movq (%rsi,%r8,8), %r9
subq (%rdx,%r8,8), %r9
setb %r10b
subq %rax, %r9
setb %al
orb %r10b, %al
movzbl %al, %eax
movq %r9, (%rdi,%r8,8)
incq %r8
jmp 0x73a8f
retq
| mp_sub:
mov rax, r8
xor r8d, r8d
test rcx, rcx
cmovle rcx, r8
loc_73A8F:
cmp rcx, r8
jz short locret_73AB5
mov r9, [rsi+r8*8]
sub r9, [rdx+r8*8]
setb r10b
sub r9, rax
setb al
or al, r10b
movzx eax, al
mov [rdi+r8*8], r9
inc r8
jmp short loc_73A8F
locret_73AB5:
retn
| unsigned long long mp_sub(long long a1, long long a2, long long a3, long long a4, unsigned long long a5)
{
unsigned long long result; // rax
long long v6; // r8
unsigned long long v7; // r9
bool v8; // cf
unsigned long long v9; // r9
bool v10; // r10
unsigned long long v11; // r9
result = a5;
v6 = 0LL;
if ( a4 <= 0 )
a4 = 0LL;
while ( a4 != v6 )
{
v7 = *(_QWORD *)(a2 + 8 * v6);
v8 = v7 < *(_QWORD *)(a3 + 8 * v6);
v9 = v7 - *(_QWORD *)(a3 + 8 * v6);
v10 = v8;
v8 = v9 < result;
v11 = v9 - result;
result = v10 | (unsigned __int8)v8;
*(_QWORD *)(a1 + 8 * v6++) = v11;
}
return result;
}
| mp_sub:
MOV RAX,R8
XOR R8D,R8D
TEST RCX,RCX
CMOVLE RCX,R8
LAB_00173a8f:
CMP RCX,R8
JZ 0x00173ab5
MOV R9,qword ptr [RSI + R8*0x8]
SUB R9,qword ptr [RDX + R8*0x8]
SETC R10B
SUB R9,RAX
SETC AL
OR AL,R10B
MOVZX EAX,AL
MOV qword ptr [RDI + R8*0x8],R9
INC R8
JMP 0x00173a8f
LAB_00173ab5:
RET
|
void mp_sub(long param_1,long param_2,long param_3,long param_4,ulong param_5)
{
ulong *puVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
long lVar5;
lVar3 = 0;
if (param_4 < 1) {
param_4 = lVar3;
}
for (; param_4 != lVar3; lVar3 = lVar3 + 1) {
uVar2 = *(ulong *)(param_2 + lVar3 * 8);
puVar1 = (ulong *)(param_3 + lVar3 * 8);
uVar4 = uVar2 - *puVar1;
lVar5 = uVar4 - param_5;
param_5 = (ulong)(uVar4 < param_5 || uVar2 < *puVar1);
*(long *)(param_1 + lVar3 * 8) = lVar5;
}
return;
}
|
|
2,465 | escape_quotes_for_mysql | eloqsql/mysys/charset.c | size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
} | O0 | c | escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
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 -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xdc995
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0xdc9a0
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0xdcb10
movb %al, -0x49(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xdcae9
movsbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0xdca5f
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xdcb40
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0xdca5f
movq -0x10(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq -0x48(%rbp), %rax
jbe 0xdca1b
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xdcae9
jmp 0xdca1d
movl -0x50(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x0, %eax
je 0xdca51
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xdca1d
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xdcad8
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0xdcaa8
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x48(%rbp), %rax
jbe 0xdca82
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xdcae9
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
jmp 0xdcad6
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x48(%rbp), %rax
jbe 0xdcabf
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xdcae9
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xdcad8
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xdc9ce
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| escape_quotes_for_mysql:
push rbp
mov rbp, rsp
sub rsp, 60h
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_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
cmp [rbp+var_18], 0
jz short loc_DC995
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_60], rax
jmp short loc_DC9A0
loc_DC995:
mov rax, [rbp+var_28]
shl rax, 1
mov [rbp+var_60], rax
loc_DC9A0:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
call my_ci_use_mb
mov [rbp+var_49], al
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_DC9CE:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_DCAE9
movsx eax, [rbp+var_49]
cmp eax, 0
jz short loc_DCA5F
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
call my_ismbchar
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_DCA5F
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_50]
add rax, rcx
cmp rax, [rbp+var_48]
jbe short loc_DCA1B
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp loc_DCAE9
loc_DCA1B:
jmp short $+2
loc_DCA1D:
mov eax, [rbp+var_50]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_50], ecx
cmp eax, 0
jz short loc_DCA51
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_DCA1D
loc_DCA51:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_DCAD8
loc_DCA5F:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_DCAA8
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_48]
jbe short loc_DCA82
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_DCAE9
loc_DCA82:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_DCAD6
loc_DCAA8:
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_48]
jbe short loc_DCABF
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_DCAE9
loc_DCABF:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_DCAD6:
jmp short $+2
loc_DCAD8:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_DC9CE
loc_DCAE9:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6)
{
char *v7; // rax
char v8; // cl
char *v9; // rax
_BYTE *v10; // rax
char *v11; // rax
long long v13; // [rsp+0h] [rbp-60h]
int v14; // [rsp+10h] [rbp-50h]
char v15; // [rsp+17h] [rbp-49h]
unsigned long long v16; // [rsp+18h] [rbp-48h]
char *v17; // [rsp+20h] [rbp-40h]
char *v21; // [rsp+50h] [rbp-10h]
v21 = a2;
if ( a3 )
v13 = a3 - 1;
else
v13 = 2 * a5;
v16 = (unsigned long long)&a2[v13];
v15 = my_ci_use_mb(a1);
*a6 = 0;
v17 = &a4[a5];
while ( a4 < v17 )
{
if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 )
{
if ( (unsigned long long)&v21[v14] > v16 )
{
*a6 = 1;
break;
}
while ( v14-- )
{
v7 = a4++;
v8 = *v7;
v9 = v21++;
*v9 = v8;
}
--a4;
}
else if ( *a4 == 39 )
{
if ( (unsigned long long)(v21 + 2) > v16 )
{
*a6 = 1;
break;
}
*v21 = 39;
v10 = v21 + 1;
v21 += 2;
*v10 = 39;
}
else
{
if ( (unsigned long long)(v21 + 1) > v16 )
{
*a6 = 1;
break;
}
v11 = v21++;
*v11 = *a4;
}
++a4;
}
*v21 = 0;
return (_BYTE *)(v21 - a2);
}
| escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
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 + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001dc995
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001dc9a0
LAB_001dc995:
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_001dc9a0:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001dcb10
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_001dc9ce:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001dcae9
MOVSX EAX,byte ptr [RBP + -0x49]
CMP EAX,0x0
JZ 0x001dca5f
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x001dcb40
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x001dca5f
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x50]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001dca1b
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001dcae9
LAB_001dca1b:
JMP 0x001dca1d
LAB_001dca1d:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x50],ECX
CMP EAX,0x0
JZ 0x001dca51
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x001dca1d
LAB_001dca51:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001dcad8
LAB_001dca5f:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x001dcaa8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001dca82
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001dcae9
LAB_001dca82:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
JMP 0x001dcad6
LAB_001dcaa8:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001dcabf
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001dcae9
LAB_001dcabf:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_001dcad6:
JMP 0x001dcad8
LAB_001dcad8:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001dc9ce
LAB_001dcae9:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long escape_quotes_for_mysql
(int8 param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
char cVar1;
char *pcVar2;
long local_68;
int local_58;
char *local_28;
char *local_18;
if (param_3 == 0) {
local_68 = param_5 << 1;
}
else {
local_68 = param_3 + -1;
}
pcVar2 = param_2 + local_68;
cVar1 = my_ci_use_mb(param_1);
*param_6 = 0;
local_28 = param_4;
local_18 = param_2;
do {
if (param_4 + param_5 <= local_28) {
LAB_001dcae9:
*local_18 = '\0';
return (long)local_18 - (long)param_2;
}
if ((cVar1 == '\0') ||
(local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_18 + 2) {
*param_6 = 1;
goto LAB_001dcae9;
}
*local_18 = '\'';
local_18[1] = '\'';
local_18 = local_18 + 2;
}
else {
if (pcVar2 < local_18 + 1) {
*param_6 = 1;
goto LAB_001dcae9;
}
*local_18 = *local_28;
local_18 = local_18 + 1;
}
}
else {
if (pcVar2 < local_18 + local_58) {
*param_6 = 1;
goto LAB_001dcae9;
}
while (local_58 != 0) {
*local_18 = *local_28;
local_58 = local_58 + -1;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
|
|
2,466 | find_table_share(char const*, char const*) | eloqsql/storage/perfschema/ha_perfschema.cc | static const PFS_engine_table_share*
find_table_share(const char *db, const char *name)
{
DBUG_ENTER("find_table_share");
if (compare_database_names(db, PERFORMANCE_SCHEMA_str.str) != 0)
DBUG_RETURN(NULL);
const PFS_engine_table_share* result;
result= PFS_engine_table::find_engine_table_share(name);
DBUG_RETURN(result);
} | O0 | cpp | find_table_share(char const*, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xc0205d(%rip), %rax # 0x1af2fe8
movq (%rax), %rsi
callq 0xef1b90
cmpl $0x0, %eax
je 0xef0fa4
jmp 0xef0f9a
movq $0x0, -0x8(%rbp)
jmp 0xef0fb9
movq -0x18(%rbp), %rdi
callq 0xf030c0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL16find_table_sharePKcS0_:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]; char *
lea rax, PERFORMANCE_SCHEMA_str
mov rsi, [rax]; char *
call _ZL22compare_database_namesPKcS0_; compare_database_names(char const*,char const*)
cmp eax, 0
jz short loc_EF0FA4
jmp short $+2
loc_EF0F9A:
mov [rbp+var_8], 0
jmp short loc_EF0FB9
loc_EF0FA4:
mov rdi, [rbp+var_18]; this
call _ZN16PFS_engine_table23find_engine_table_shareEPKc; PFS_engine_table::find_engine_table_share(char const*)
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_EF0FB9:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long find_table_share(const char *a1, PFS_engine_table *a2)
{
const char *v2; // rsi
v2 = PERFORMANCE_SCHEMA_str;
if ( (unsigned int)compare_database_names(a1, PERFORMANCE_SCHEMA_str) )
return 0LL;
else
return PFS_engine_table::find_engine_table_share(a2, v2);
}
| get_single_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00ef0f8e
LAB_00ef0f8e:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00ef0fd0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x10]
LEA RSI,[RBP + -0x28]
LEA RDX,[RBP + -0x30]
CALL 0x00eea690
MOV RDI,qword ptr [RBP + -0x20]
MOVSD XMM0,qword ptr [RBP + -0x28]
MOVSD XMM1,qword ptr [RBP + -0x30]
CALL 0x00eee930
CMP EAX,0x0
JZ 0x00ef0fce
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00ef1017
LAB_00ef0fce:
JMP 0x00ef1003
LAB_00ef0fd0:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOVSD XMM0,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOVSD XMM1,qword ptr [RAX + 0x30]
CALL 0x00eee930
CMP EAX,0x0
JZ 0x00ef1001
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00ef1017
LAB_00ef1001:
JMP 0x00ef1003
LAB_00ef1003:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00ef0f10
MOV dword ptr [RBP + -0x4],0x0
LAB_00ef1017:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
/* Gcalc_operation_reducer::get_single_result(Gcalc_operation_reducer::res_point*,
Gcalc_result_receiver*) */
int4 __thiscall
Gcalc_operation_reducer::get_single_result
(Gcalc_operation_reducer *this,res_point *param_1,Gcalc_result_receiver *param_2)
{
int iVar1;
double local_38;
double local_30;
Gcalc_result_receiver *local_28;
res_point *local_20;
Gcalc_operation_reducer *local_18;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
if (*(int *)(param_1 + 8) == 0) {
iVar1 = Gcalc_result_receiver::single_point
(param_2,*(double *)(*(long *)(param_1 + 0x10) + 0x28),
*(double *)(*(long *)(param_1 + 0x10) + 0x30));
if (iVar1 != 0) {
return 1;
}
}
else {
Gcalc_heap::Info::calc_xy(*(Info **)(param_1 + 0x10),&local_30,&local_38);
iVar1 = Gcalc_result_receiver::single_point(local_28,local_30,local_38);
if (iVar1 != 0) {
return 1;
}
}
free_result(this,local_20);
return 0;
}
|
|
2,467 | init_instruments(PFS_global_param const*) | eloqsql/storage/perfschema/pfs_instr.cc | int init_instruments(const PFS_global_param *param)
{
uint index;
/* Make sure init_event_name_sizing is called */
assert(wait_class_max != 0);
file_handle_max= param->m_file_handle_sizing;
file_handle_full= false;
file_handle_lost= 0;
pfs_max_digest_length= param->m_max_digest_length;
pfs_max_sqltext= param->m_max_sql_text_length;
events_waits_history_per_thread= param->m_events_waits_history_sizing;
events_stages_history_per_thread= param->m_events_stages_history_sizing;
events_statements_history_per_thread= param->m_events_statements_history_sizing;
statement_stack_max= param->m_statement_stack_sizing;
events_transactions_history_per_thread= param->m_events_transactions_history_sizing;
session_connect_attrs_size_per_thread= param->m_session_connect_attrs_sizing;
session_connect_attrs_lost= 0;
file_handle_array= NULL;
thread_internal_id_counter.m_u64= 0;
if (global_mutex_container.init(param->m_mutex_sizing))
return 1;
if (global_rwlock_container.init(param->m_rwlock_sizing))
return 1;
if (global_cond_container.init(param->m_cond_sizing))
return 1;
if (global_file_container.init(param->m_file_sizing))
return 1;
if (file_handle_max > 0)
{
file_handle_array= PFS_MALLOC_ARRAY(& builtin_memory_file_handle,
file_handle_max,
sizeof(PFS_file*), PFS_file*,
MYF(MY_ZEROFILL));
if (unlikely(file_handle_array == NULL))
return 1;
}
if (global_table_container.init(param->m_table_sizing))
return 1;
if (global_socket_container.init(param->m_socket_sizing))
return 1;
if (global_mdl_container.init(param->m_metadata_lock_sizing))
return 1;
if (global_thread_container.init(param->m_thread_sizing))
return 1;
if (stage_class_max > 0)
{
global_instr_class_stages_array=
PFS_MALLOC_ARRAY(& builtin_memory_global_stages,
stage_class_max,
sizeof(PFS_stage_stat), PFS_stage_stat,
MYF(MY_ZEROFILL));
if (unlikely(global_instr_class_stages_array == NULL))
return 1;
for (index= 0; index < stage_class_max; index++)
global_instr_class_stages_array[index].reset();
}
if (statement_class_max > 0)
{
global_instr_class_statements_array=
PFS_MALLOC_ARRAY(& builtin_memory_global_statements,
statement_class_max,
sizeof(PFS_statement_stat), PFS_statement_stat,
MYF(MY_ZEROFILL));
if (unlikely(global_instr_class_statements_array == NULL))
return 1;
for (index= 0; index < statement_class_max; index++)
global_instr_class_statements_array[index].reset();
}
if (memory_class_max > 0)
{
global_instr_class_memory_array=
PFS_MALLOC_ARRAY(& builtin_memory_global_memory,
memory_class_max,
sizeof(PFS_memory_stat), PFS_memory_stat,
MYF(MY_ZEROFILL));
if (unlikely(global_instr_class_memory_array == NULL))
return 1;
for (index= 0; index < memory_class_max; index++)
global_instr_class_memory_array[index].reset();
}
return 0;
} | O3 | cpp | init_instruments(PFS_global_param const*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x88(%rdi), %rax
andq $0x0, 0x3ab189(%rip) # 0x3d2618
movq %rax, 0x3ab172(%rip) # 0x3d2608
movb $0x0, 0x3ab173(%rip) # 0x3d2610
movq 0x150(%rdi), %rax
movq %rax, 0x3ab195(%rip) # 0x3d2640
movq 0x158(%rdi), %rax
movq %rax, 0x3ab18f(%rip) # 0x3d2648
movq 0xa0(%rdi), %rax
movq %rax, 0x3ab159(%rip) # 0x3d2620
movq 0xe0(%rdi), %rax
movq %rax, 0x3ab153(%rip) # 0x3d2628
movq 0xf8(%rdi), %rax
movq %rax, 0x3ab14d(%rip) # 0x3d2630
movl 0x138(%rdi), %eax
movl %eax, 0x3ab149(%rip) # 0x3d2638
movq 0x120(%rdi), %rax
movq %rax, 0x3ab173(%rip) # 0x3d2670
movq 0x130(%rdi), %rax
andq $0x0, 0x3ab15c(%rip) # 0x3d2668
andq $0x0, 0x3ab164(%rip) # 0x3d2678
andq $0x0, 0x3ab1a4(%rip) # 0x3d26c0
movq %rax, 0x3ab13d(%rip) # 0x3d2660
movq %rdi, -0x30(%rbp)
movq 0x58(%rdi), %rbx
xorl %eax, %eax
movb $0x1, %r15b
leaq 0x36be29(%rip), %r12 # 0x393360
pushq $0x1
popq %r13
xorl %r14d, %r14d
movq (%r12,%rax,8), %rdi
movq %rbx, %rsi
callq 0x3a262
orl %eax, %r14d
movq %r13, %rax
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x2753e
pushq $0x1
popq %rbx
testl %r14d, %r14d
jne 0x27637
movq -0x30(%rbp), %r14
movq 0x60(%r14), %rsi
leaq 0x36be01(%rip), %rdi # 0x393378
callq 0x387fc
testl %eax, %eax
jne 0x27637
movq 0x68(%r14), %rsi
leaq 0x36dec9(%rip), %rdi # 0x395458
callq 0x388be
testl %eax, %eax
jne 0x27637
movq 0x80(%r14), %rsi
leaq 0x36e78e(%rip), %rdi # 0x395d38
callq 0x38980
testl %eax, %eax
jne 0x27637
movq 0x3ab04a(%rip), %rsi # 0x3d2608
testq %rsi, %rsi
jle 0x275e1
leaq 0x3a5836(%rip), %rdi # 0x3cce00
pushq $0x8
popq %rdx
pushq $0x20
popq %rcx
callq 0x2cd3c
movq %rax, 0x3ab09c(%rip) # 0x3d2678
testq %rax, %rax
je 0x27637
movq 0x78(%r14), %rsi
leaq 0x37d3ac(%rip), %rdi # 0x3a4998
callq 0x38a42
testl %eax, %eax
jne 0x27637
movq 0x90(%r14), %rsi
leaq 0x376815(%rip), %rdi # 0x39de18
callq 0x38b04
testl %eax, %eax
jne 0x27637
movq 0x148(%r14), %rsi
leaq 0x3770de(%rip), %rdi # 0x39e6f8
callq 0x38bc6
testl %eax, %eax
jne 0x27637
movq 0x70(%r14), %rsi
leaq 0x3a426a(%rip), %rdi # 0x3cb898
callq 0x38c88
testl %eax, %eax
je 0x27648
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3ab241(%rip), %r14 # 0x3d2890
movq (%r14), %rsi
testq %rsi, %rsi
je 0x276a7
leaq 0x3a6062(%rip), %rdi # 0x3cd6c0
pushq $0x20
popq %rcx
movq %rcx, %rdx
callq 0x2cd3c
movq %rax, 0x3ab010(%rip) # 0x3d2680
testq %rax, %rax
je 0x27637
cmpq $0x0, (%r14)
je 0x276a7
pushq $0x1
popq %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq 0x3aaff6(%rip), %rdx # 0x3d2680
shlq $0x5, %rcx
movups %xmm0, (%rdx,%rcx)
orq $-0x1, 0x10(%rdx,%rcx)
andq $0x0, 0x18(%rdx,%rcx)
movl %eax, %ecx
incl %eax
cmpq %rcx, (%r14)
ja 0x27683
leaq 0x3ab1f2(%rip), %r14 # 0x3d28a0
movq (%r14), %rsi
testq %rsi, %rsi
je 0x27701
leaq 0x3a6143(%rip), %rdi # 0x3cd800
pushq $0x20
popq %rcx
movl $0xb8, %edx
callq 0x2cd3c
movq %rax, 0x3aafb7(%rip) # 0x3d2688
testq %rax, %rax
je 0x27637
cmpq $0x0, (%r14)
je 0x27701
pushq $0x1
popq %rax
xorl %ecx, %ecx
movq 0x3aaf9c(%rip), %rdx # 0x3d2688
imulq $0xb8, %rcx, %rcx
andq $0x0, (%rdx,%rcx)
movl %eax, %ecx
incl %eax
cmpq %rcx, (%r14)
ja 0x276e5
leaq 0x3ab1b8(%rip), %r14 # 0x3d28c0
movq (%r14), %rsi
testq %rsi, %rsi
je 0x2777c
leaq 0x3a6229(%rip), %rdi # 0x3cd940
pushq $0x48
popq %rdx
pushq $0x20
popq %rcx
callq 0x2cd3c
movq %rax, 0x3aaf67(%rip) # 0x3d2690
testq %rax, %rax
je 0x27637
cmpq $0x0, (%r14)
movl $0x0, %ebx
je 0x27637
pushq $0x1
popq %rax
xorl %ebx, %ebx
xorps %xmm0, %xmm0
xorl %ecx, %ecx
movq 0x3aaf3e(%rip), %rdx # 0x3d2690
imulq $0x48, %rcx, %rcx
movb $0x0, (%rdx,%rcx)
movups %xmm0, 0x8(%rdx,%rcx)
movups %xmm0, 0x18(%rdx,%rcx)
movups %xmm0, 0x28(%rdx,%rcx)
movups %xmm0, 0x38(%rdx,%rcx)
movl %eax, %ecx
incl %eax
cmpq %rcx, (%r14)
ja 0x2774b
jmp 0x27637
xorl %ebx, %ebx
jmp 0x27637
| _Z16init_instrumentsPK16PFS_global_param:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rax, [rdi+88h]
and cs:file_handle_lost, 0
mov cs:file_handle_max, rax
mov cs:file_handle_full, 0
mov rax, [rdi+150h]
mov cs:pfs_max_digest_length, rax
mov rax, [rdi+158h]
mov cs:pfs_max_sqltext, rax
mov rax, [rdi+0A0h]
mov cs:events_waits_history_per_thread, rax
mov rax, [rdi+0E0h]
mov cs:events_stages_history_per_thread, rax
mov rax, [rdi+0F8h]
mov cs:events_statements_history_per_thread, rax
mov eax, [rdi+138h]
mov cs:statement_stack_max, eax
mov rax, [rdi+120h]
mov cs:events_transactions_history_per_thread, rax
mov rax, [rdi+130h]
and cs:session_connect_attrs_lost, 0
and cs:file_handle_array, 0
and cs:_ZL26thread_internal_id_counter, 0; thread_internal_id_counter
mov cs:session_connect_attrs_size_per_thread, rax
mov [rbp+var_30], rdi
mov rbx, [rdi+58h]
xor eax, eax
mov r15b, 1
lea r12, global_mutex_container
push 1
pop r13
xor r14d, r14d
loc_2753E:
mov rdi, [r12+rax*8]
mov rsi, rbx
call _ZN29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::init(long)
or r14d, eax
mov rax, r13
test r15b, 1
mov r15d, 0
jnz short loc_2753E
push 1
pop rbx
test r14d, r14d
jnz loc_27637
mov r14, [rbp+var_30]
mov rsi, [r14+60h]
lea rdi, global_rwlock_container
call _ZN29PFS_buffer_scalable_containerI10PFS_rwlockLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>::init(long)
test eax, eax
jnz loc_27637
mov rsi, [r14+68h]
lea rdi, global_cond_container
call _ZN29PFS_buffer_scalable_containerI8PFS_condLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::init(long)
test eax, eax
jnz loc_27637
mov rsi, [r14+80h]
lea rdi, global_file_container
call _ZN29PFS_buffer_scalable_containerI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::init(long)
test eax, eax
jnz loc_27637
mov rsi, cs:file_handle_max
test rsi, rsi
jle short loc_275E1
lea rdi, builtin_memory_file_handle
push 8
pop rdx
push 20h ; ' '
pop rcx
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:file_handle_array, rax
test rax, rax
jz short loc_27637
loc_275E1:
mov rsi, [r14+78h]
lea rdi, global_table_container
call _ZN29PFS_buffer_scalable_containerI9PFS_tableLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>::init(long)
test eax, eax
jnz short loc_27637
mov rsi, [r14+90h]
lea rdi, global_socket_container
call _ZN29PFS_buffer_scalable_containerI10PFS_socketLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>::init(long)
test eax, eax
jnz short loc_27637
mov rsi, [r14+148h]
lea rdi, global_mdl_container
call _ZN29PFS_buffer_scalable_containerI17PFS_metadata_lockLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl; PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>::init(long)
test eax, eax
jnz short loc_27637
mov rsi, [r14+70h]
lea rdi, global_thread_container
call _ZN29PFS_buffer_scalable_containerI10PFS_threadLi256ELi256E16PFS_thread_array20PFS_thread_allocatorE4initEl; PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::init(long)
test eax, eax
jz short loc_27648
loc_27637:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_27648:
lea r14, stage_class_max
mov rsi, [r14]
test rsi, rsi
jz short loc_276A7
lea rdi, builtin_memory_global_stages
push 20h ; ' '
pop rcx
mov rdx, rcx
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:global_instr_class_stages_array, rax
test rax, rax
jz short loc_27637
cmp qword ptr [r14], 0
jz short loc_276A7
push 1
pop rax
xor ecx, ecx
xorps xmm0, xmm0
loc_27683:
mov rdx, cs:global_instr_class_stages_array
shl rcx, 5
movups xmmword ptr [rdx+rcx], xmm0
or qword ptr [rdx+rcx+10h], 0FFFFFFFFFFFFFFFFh
and qword ptr [rdx+rcx+18h], 0
mov ecx, eax
inc eax
cmp [r14], rcx
ja short loc_27683
loc_276A7:
lea r14, statement_class_max
mov rsi, [r14]
test rsi, rsi
jz short loc_27701
lea rdi, builtin_memory_global_statements
push 20h ; ' '
pop rcx
mov edx, 0B8h
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:global_instr_class_statements_array, rax
test rax, rax
jz loc_27637
cmp qword ptr [r14], 0
jz short loc_27701
push 1
pop rax
xor ecx, ecx
loc_276E5:
mov rdx, cs:global_instr_class_statements_array
imul rcx, 0B8h
and qword ptr [rdx+rcx], 0
mov ecx, eax
inc eax
cmp [r14], rcx
ja short loc_276E5
loc_27701:
lea r14, memory_class_max
mov rsi, [r14]
test rsi, rsi
jz short loc_2777C
lea rdi, builtin_memory_global_memory
push 48h ; 'H'
pop rdx
push 20h ; ' '
pop rcx
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:global_instr_class_memory_array, rax
test rax, rax
jz loc_27637
cmp qword ptr [r14], 0
mov ebx, 0
jz loc_27637
push 1
pop rax
xor ebx, ebx
xorps xmm0, xmm0
xor ecx, ecx
loc_2774B:
mov rdx, cs:global_instr_class_memory_array
imul rcx, 48h ; 'H'
mov byte ptr [rdx+rcx], 0
movups xmmword ptr [rdx+rcx+8], xmm0
movups xmmword ptr [rdx+rcx+18h], xmm0
movups xmmword ptr [rdx+rcx+28h], xmm0
movups xmmword ptr [rdx+rcx+38h], xmm0
mov ecx, eax
inc eax
cmp [r14], rcx
ja short loc_2774B
jmp loc_27637
loc_2777C:
xor ebx, ebx
jmp loc_27637
| long long init_instruments(long long a1)
{
long long v1; // rax
long long v2; // rax
long long v3; // rbx
long long v4; // rax
char v5; // r15
int v6; // r14d
bool v7; // zf
unsigned int v8; // ebx
unsigned int v10; // eax
unsigned long long v11; // rcx
long long v12; // rdx
long long v13; // rcx
unsigned int v14; // eax
unsigned long long v15; // rcx
unsigned int v16; // eax
unsigned long long v17; // rcx
PFS_memory_stat *v18; // rdx
long long v19; // rcx
v1 = *(_QWORD *)(a1 + 136);
file_handle_lost = 0LL;
file_handle_max = v1;
file_handle_full = 0;
pfs_max_digest_length = *(_QWORD *)(a1 + 336);
pfs_max_sqltext = *(_QWORD *)(a1 + 344);
events_waits_history_per_thread = *(_QWORD *)(a1 + 160);
events_stages_history_per_thread = *(_QWORD *)(a1 + 224);
events_statements_history_per_thread = *(_QWORD *)(a1 + 248);
statement_stack_max = *(_DWORD *)(a1 + 312);
events_transactions_history_per_thread = *(_QWORD *)(a1 + 288);
v2 = *(_QWORD *)(a1 + 304);
session_connect_attrs_lost = 0LL;
file_handle_array = 0LL;
thread_internal_id_counter = 0LL;
session_connect_attrs_size_per_thread = v2;
v3 = *(_QWORD *)(a1 + 88);
v4 = 0LL;
v5 = 1;
v6 = 0;
do
{
v6 |= PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::init(
global_mutex_container[v4],
v3);
v4 = 1LL;
v7 = (v5 & 1) == 0;
v5 = 0;
}
while ( !v7 );
v8 = 1;
if ( !v6
&& !(unsigned int)PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>::init(
&global_rwlock_container,
*(_QWORD *)(a1 + 96))
&& !(unsigned int)PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::init(
&global_cond_container,
*(_QWORD *)(a1 + 104))
&& !(unsigned int)PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::init(
&global_file_container,
*(_QWORD *)(a1 + 128))
&& (file_handle_max <= 0
|| (file_handle_array = pfs_malloc_array(&builtin_memory_file_handle, file_handle_max, 8LL, 32LL)) != 0)
&& !(unsigned int)PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>::init(
&global_table_container,
*(_QWORD *)(a1 + 120))
&& !(unsigned int)PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>::init(
&global_socket_container,
*(_QWORD *)(a1 + 144))
&& !(unsigned int)PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>::init(
&global_mdl_container,
*(_QWORD *)(a1 + 328))
&& !(unsigned int)PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::init(
&global_thread_container,
*(_QWORD *)(a1 + 112)) )
{
if ( stage_class_max )
{
global_instr_class_stages_array = pfs_malloc_array(&builtin_memory_global_stages, stage_class_max, 32LL, 32LL);
if ( !global_instr_class_stages_array )
return v8;
if ( stage_class_max )
{
v10 = 1;
v11 = 0LL;
do
{
v12 = global_instr_class_stages_array;
v13 = 32 * v11;
*(_OWORD *)(global_instr_class_stages_array + v13) = 0LL;
*(_QWORD *)(v12 + v13 + 16) = -1LL;
*(_QWORD *)(v12 + v13 + 24) = 0LL;
v11 = v10++;
}
while ( stage_class_max > v11 );
}
}
if ( statement_class_max )
{
global_instr_class_statements_array = pfs_malloc_array(
&builtin_memory_global_statements,
statement_class_max,
184LL,
32LL);
if ( !global_instr_class_statements_array )
return v8;
if ( statement_class_max )
{
v14 = 1;
v15 = 0LL;
do
{
*(_QWORD *)(global_instr_class_statements_array + 184 * v15) = 0LL;
v15 = v14++;
}
while ( statement_class_max > v15 );
}
}
if ( memory_class_max )
{
global_instr_class_memory_array = (PFS_memory_stat *)pfs_malloc_array(
&builtin_memory_global_memory,
memory_class_max,
72LL,
32LL);
if ( global_instr_class_memory_array )
{
v8 = 0;
if ( memory_class_max )
{
v16 = 1;
v8 = 0;
v17 = 0LL;
do
{
v18 = global_instr_class_memory_array;
v19 = 72 * v17;
*((_BYTE *)global_instr_class_memory_array + v19) = 0;
*(_OWORD *)((char *)v18 + v19 + 8) = 0LL;
*(_OWORD *)((char *)v18 + v19 + 24) = 0LL;
*(_OWORD *)((char *)v18 + v19 + 40) = 0LL;
*(_OWORD *)((char *)v18 + v19 + 56) = 0LL;
v17 = v16++;
}
while ( memory_class_max > v17 );
}
}
}
else
{
return 0;
}
}
return v8;
}
| init_instruments:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x88]
AND qword ptr [0x004d2618],0x0
MOV qword ptr [0x004d2608],RAX
MOV byte ptr [0x004d2610],0x0
MOV RAX,qword ptr [RDI + 0x150]
MOV qword ptr [0x004d2640],RAX
MOV RAX,qword ptr [RDI + 0x158]
MOV qword ptr [0x004d2648],RAX
MOV RAX,qword ptr [RDI + 0xa0]
MOV qword ptr [0x004d2620],RAX
MOV RAX,qword ptr [RDI + 0xe0]
MOV qword ptr [0x004d2628],RAX
MOV RAX,qword ptr [RDI + 0xf8]
MOV qword ptr [0x004d2630],RAX
MOV EAX,dword ptr [RDI + 0x138]
MOV dword ptr [0x004d2638],EAX
MOV RAX,qword ptr [RDI + 0x120]
MOV qword ptr [0x004d2670],RAX
MOV RAX,qword ptr [RDI + 0x130]
AND qword ptr [0x004d2668],0x0
AND qword ptr [0x004d2678],0x0
AND qword ptr [0x004d26c0],0x0
MOV qword ptr [0x004d2660],RAX
MOV qword ptr [RBP + -0x30],RDI
MOV RBX,qword ptr [RDI + 0x58]
XOR EAX,EAX
MOV R15B,0x1
LEA R12,[0x493360]
PUSH 0x1
POP R13
XOR R14D,R14D
LAB_0012753e:
MOV RDI,qword ptr [R12 + RAX*0x8]
MOV RSI,RBX
CALL 0x0013a262
OR R14D,EAX
MOV RAX,R13
TEST R15B,0x1
MOV R15D,0x0
JNZ 0x0012753e
PUSH 0x1
POP RBX
TEST R14D,R14D
JNZ 0x00127637
MOV R14,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [R14 + 0x60]
LEA RDI,[0x493378]
CALL 0x001387fc
TEST EAX,EAX
JNZ 0x00127637
MOV RSI,qword ptr [R14 + 0x68]
LEA RDI,[0x495458]
CALL 0x001388be
TEST EAX,EAX
JNZ 0x00127637
MOV RSI,qword ptr [R14 + 0x80]
LEA RDI,[0x495d38]
CALL 0x00138980
TEST EAX,EAX
JNZ 0x00127637
MOV RSI,qword ptr [0x004d2608]
TEST RSI,RSI
JLE 0x001275e1
LEA RDI,[0x4cce00]
PUSH 0x8
POP RDX
PUSH 0x20
POP RCX
CALL 0x0012cd3c
MOV qword ptr [0x004d2678],RAX
TEST RAX,RAX
JZ 0x00127637
LAB_001275e1:
MOV RSI,qword ptr [R14 + 0x78]
LEA RDI,[0x4a4998]
CALL 0x00138a42
TEST EAX,EAX
JNZ 0x00127637
MOV RSI,qword ptr [R14 + 0x90]
LEA RDI,[0x49de18]
CALL 0x00138b04
TEST EAX,EAX
JNZ 0x00127637
MOV RSI,qword ptr [R14 + 0x148]
LEA RDI,[0x49e6f8]
CALL 0x00138bc6
TEST EAX,EAX
JNZ 0x00127637
MOV RSI,qword ptr [R14 + 0x70]
LEA RDI,[0x4cb898]
CALL 0x00138c88
TEST EAX,EAX
JZ 0x00127648
LAB_00127637:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00127648:
LEA R14,[0x4d2890]
MOV RSI,qword ptr [R14]
TEST RSI,RSI
JZ 0x001276a7
LEA RDI,[0x4cd6c0]
PUSH 0x20
POP RCX
MOV RDX,RCX
CALL 0x0012cd3c
MOV qword ptr [0x004d2680],RAX
TEST RAX,RAX
JZ 0x00127637
CMP qword ptr [R14],0x0
JZ 0x001276a7
PUSH 0x1
POP RAX
XOR ECX,ECX
XORPS XMM0,XMM0
LAB_00127683:
MOV RDX,qword ptr [0x004d2680]
SHL RCX,0x5
MOVUPS xmmword ptr [RDX + RCX*0x1],XMM0
OR qword ptr [RDX + RCX*0x1 + 0x10],-0x1
AND qword ptr [RDX + RCX*0x1 + 0x18],0x0
MOV ECX,EAX
INC EAX
CMP qword ptr [R14],RCX
JA 0x00127683
LAB_001276a7:
LEA R14,[0x4d28a0]
MOV RSI,qword ptr [R14]
TEST RSI,RSI
JZ 0x00127701
LEA RDI,[0x4cd800]
PUSH 0x20
POP RCX
MOV EDX,0xb8
CALL 0x0012cd3c
MOV qword ptr [0x004d2688],RAX
TEST RAX,RAX
JZ 0x00127637
CMP qword ptr [R14],0x0
JZ 0x00127701
PUSH 0x1
POP RAX
XOR ECX,ECX
LAB_001276e5:
MOV RDX,qword ptr [0x004d2688]
IMUL RCX,RCX,0xb8
AND qword ptr [RDX + RCX*0x1],0x0
MOV ECX,EAX
INC EAX
CMP qword ptr [R14],RCX
JA 0x001276e5
LAB_00127701:
LEA R14,[0x4d28c0]
MOV RSI,qword ptr [R14]
TEST RSI,RSI
JZ 0x0012777c
LEA RDI,[0x4cd940]
PUSH 0x48
POP RDX
PUSH 0x20
POP RCX
CALL 0x0012cd3c
MOV qword ptr [0x004d2690],RAX
TEST RAX,RAX
JZ 0x00127637
CMP qword ptr [R14],0x0
MOV EBX,0x0
JZ 0x00127637
PUSH 0x1
POP RAX
XOR EBX,EBX
XORPS XMM0,XMM0
XOR ECX,ECX
LAB_0012774b:
MOV RDX,qword ptr [0x004d2690]
IMUL RCX,RCX,0x48
MOV byte ptr [RDX + RCX*0x1],0x0
MOVUPS xmmword ptr [RDX + RCX*0x1 + 0x8],XMM0
MOVUPS xmmword ptr [RDX + RCX*0x1 + 0x18],XMM0
MOVUPS xmmword ptr [RDX + RCX*0x1 + 0x28],XMM0
MOVUPS xmmword ptr [RDX + RCX*0x1 + 0x38],XMM0
MOV ECX,EAX
INC EAX
CMP qword ptr [R14],RCX
JA 0x0012774b
JMP 0x00127637
LAB_0012777c:
XOR EBX,EBX
JMP 0x00127637
|
/* init_instruments(PFS_global_param const*) */
int8 init_instruments(PFS_global_param *param_1)
{
int8 *puVar1;
long lVar2;
bool bVar3;
uint uVar4;
int iVar5;
ulong uVar6;
long lVar7;
int8 uVar8;
uint uVar9;
bool bVar10;
file_handle_max = *(ulong *)(param_1 + 0x88);
file_handle_lost = 0;
file_handle_full = 0;
pfs_max_digest_length = *(int8 *)(param_1 + 0x150);
pfs_max_sqltext = *(int8 *)(param_1 + 0x158);
events_waits_history_per_thread = *(int8 *)(param_1 + 0xa0);
events_stages_history_per_thread = *(int8 *)(param_1 + 0xe0);
events_statements_history_per_thread = *(int8 *)(param_1 + 0xf8);
statement_stack_max = *(int4 *)(param_1 + 0x138);
events_transactions_history_per_thread = *(int8 *)(param_1 + 0x120);
session_connect_attrs_size_per_thread = *(int8 *)(param_1 + 0x130);
session_connect_attrs_lost = 0;
file_handle_array = 0;
thread_internal_id_counter = 0;
lVar2 = *(long *)(param_1 + 0x58);
uVar9 = 0;
lVar7 = 0;
bVar3 = true;
do {
bVar10 = bVar3;
uVar4 = PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>
::init((PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>
*)(&global_mutex_container)[lVar7],lVar2);
uVar9 = uVar9 | uVar4;
lVar7 = 1;
bVar3 = false;
} while (bVar10);
uVar8 = 1;
if ((((((uVar9 == 0) &&
(iVar5 = PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>
::init((PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>
*)global_rwlock_container,*(long *)(param_1 + 0x60)), iVar5 == 0)) &&
(iVar5 = PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>
::init((PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>
*)global_cond_container,*(long *)(param_1 + 0x68)), iVar5 == 0)) &&
(iVar5 = PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
::init((PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>
*)&global_file_container,*(long *)(param_1 + 0x80)), iVar5 == 0)) &&
((((long)file_handle_max < 1 ||
(file_handle_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_file_handle,
file_handle_max,8,0x20), file_handle_array != 0)) &&
((iVar5 = PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>
::init((PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>
*)global_table_container,*(long *)(param_1 + 0x78)), iVar5 == 0 &&
((iVar5 = PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>
::init((PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>
*)global_socket_container,*(long *)(param_1 + 0x90)), iVar5 == 0 &&
(iVar5 = PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>
::init((PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>
*)global_mdl_container,*(long *)(param_1 + 0x148)), iVar5 == 0)))))))) &&
(iVar5 = PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>
::init((PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>
*)global_thread_container,*(long *)(param_1 + 0x70)), iVar5 == 0)) {
if (stage_class_max != 0) {
global_instr_class_stages_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_global_stages,stage_class_max
,0x20,0x20);
if (global_instr_class_stages_array == 0) {
return 1;
}
if (stage_class_max != 0) {
uVar9 = 1;
uVar6 = 0;
do {
lVar2 = global_instr_class_stages_array;
lVar7 = uVar6 * 0x20;
puVar1 = (int8 *)(global_instr_class_stages_array + lVar7);
*puVar1 = 0;
puVar1[1] = 0;
*(int8 *)(lVar2 + 0x10 + lVar7) = 0xffffffffffffffff;
*(int8 *)(lVar2 + 0x18 + lVar7) = 0;
uVar6 = (ulong)uVar9;
uVar9 = uVar9 + 1;
} while (uVar6 < stage_class_max);
}
}
if (statement_class_max != 0) {
global_instr_class_statements_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_global_statements,
statement_class_max,0xb8,0x20);
if (global_instr_class_statements_array == 0) {
return 1;
}
if (statement_class_max != 0) {
uVar9 = 1;
uVar6 = 0;
do {
*(int8 *)(global_instr_class_statements_array + uVar6 * 0xb8) = 0;
uVar6 = (ulong)uVar9;
uVar9 = uVar9 + 1;
} while (uVar6 < statement_class_max);
}
}
if (memory_class_max == 0) {
uVar8 = 0;
}
else {
global_instr_class_memory_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_global_memory,
memory_class_max,0x48,0x20);
if ((global_instr_class_memory_array != 0) && (uVar8 = 0, memory_class_max != 0)) {
uVar9 = 1;
uVar8 = 0;
uVar6 = 0;
do {
lVar2 = global_instr_class_memory_array;
lVar7 = uVar6 * 0x48;
*(int1 *)(global_instr_class_memory_array + lVar7) = 0;
puVar1 = (int8 *)(lVar2 + 8 + lVar7);
*puVar1 = 0;
puVar1[1] = 0;
puVar1 = (int8 *)(lVar2 + 0x18 + lVar7);
*puVar1 = 0;
puVar1[1] = 0;
puVar1 = (int8 *)(lVar2 + 0x28 + lVar7);
*puVar1 = 0;
puVar1[1] = 0;
puVar1 = (int8 *)(lVar2 + 0x38 + lVar7);
*puVar1 = 0;
puVar1[1] = 0;
uVar6 = (ulong)uVar9;
uVar9 = uVar9 + 1;
} while (uVar6 < memory_class_max);
}
}
}
return uVar8;
}
|
|
2,468 | js_proxy_call | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_call(JSContext *ctx, JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv, int flags)
{
JSProxyData *s;
JSValue method, arg_array, ret;
JSValue args[3];
if (flags & JS_CALL_FLAG_CONSTRUCTOR)
return js_proxy_call_constructor(ctx, func_obj, this_obj, argc, argv);
s = get_proxy_method(ctx, &method, func_obj, JS_ATOM_apply);
if (!s)
return JS_EXCEPTION;
if (!s->is_func) {
JS_FreeValue(ctx, method);
return JS_ThrowTypeError(ctx, "not a function");
}
if (JS_IsUndefined(method))
return JS_Call(ctx, s->target, this_obj, argc, argv);
arg_array = js_create_array(ctx, argc, argv);
if (JS_IsException(arg_array)) {
ret = JS_EXCEPTION;
goto fail;
}
args[0] = s->target;
args[1] = this_obj;
args[2] = arg_array;
ret = JS_Call(ctx, method, s->handler, 3, args);
fail:
JS_FreeValue(ctx, method);
JS_FreeValue(ctx, arg_array);
return ret;
} | O2 | c | js_proxy_call:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, %ebp
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
testb $0x1, 0xa8(%rsp)
jne 0x2efb9
leaq 0x18(%rsp), %rsi
pushq $0x5b
popq %r8
movq %rbx, %rdi
callq 0x35d01
pushq $0x6
popq %r14
testq %rax, %rax
je 0x2f012
movq %rax, %r13
cmpb $0x0, 0x20(%rax)
je 0x2f028
movq 0x20(%rsp), %r14
cmpl $0x3, %r14d
jne 0x2f056
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r15, %rcx
movq %r12, %r8
movl %ebp, %r9d
callq 0x21eb6
movq %rax, %r15
movq %rdx, %r14
movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000
andq %rax, %r12
jmp 0x2f138
movq %r12, 0x8(%rsp)
movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000
leaq 0x18(%rsp), %rsi
pushq $0x5f
popq %r8
movq %rbx, %rdi
callq 0x35d01
pushq $0x6
popq %r14
testq %rax, %rax
je 0x2f017
movq %rax, %r13
movq 0x8(%rax), %rdx
cmpl $-0x1, %edx
jne 0x2effc
movq (%r13), %rsi
testb $0x10, 0x5(%rsi)
jne 0x2f08a
leaq 0x5762d(%rip), %rsi # 0x86630
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x2f01a
xorl %r15d, %r15d
jmp 0x2f04e
xorl %r15d, %r15d
xorl %r13d, %r13d
orq %r13, %r15
andq %r13, %r12
jmp 0x2f138
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
leaq 0x581c9(%rip), %rsi # 0x8720a
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
xorl %r12d, %r12d
jmp 0x2f138
movq %rbx, %rdi
movl %ebp, %esi
movq 0xa0(%rsp), %rdx
callq 0x3a2bd
movq %rdx, %rbp
movq 0x18(%rsp), %rsi
cmpl $0x6, %ebp
jne 0x2f0c8
xorl %r15d, %r15d
movq %r14, %rcx
pushq $0x6
popq %r14
xorl %r12d, %r12d
movq %rax, %r13
jmp 0x2f11f
movq 0x20(%rsp), %rax
cmpl $0x3, %eax
jne 0x2f150
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r15, %rcx
movq 0x8(%rsp), %r8
movl %ebp, %r9d
callq 0x28200
movq %rax, %r15
movq %rdx, %r14
movq %rax, %r13
andq %r12, %r13
jmp 0x2f01d
movups (%r13), %xmm0
leaq 0x30(%rsp), %rdx
movaps %xmm0, (%rdx)
movq %r15, 0x10(%rdx)
movq %r12, 0x18(%rdx)
movq %rax, 0x20(%rdx)
movq %rbp, 0x28(%rdx)
movq 0x10(%r13), %rcx
movq 0x18(%r13), %r8
movq %rdx, (%rsp)
pushq $0x3
popq %r9
movq %rbx, %rdi
movq %rax, %r13
movq %rsi, %r15
movq %r14, %rdx
callq 0x21eb6
movq %r15, %rsi
movq %rax, %r15
movq %r14, %rcx
movq %rdx, %r14
movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000
andq %rax, %r12
movq %rbx, %rdi
movq %rcx, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
movl %r15d, %eax
orq %r12, %rax
movq %r14, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movq 0xa0(%rsp), %rdx
callq 0x3a2bd
movq %rdx, %rbp
pushq $0x6
popq %r14
movq 0x18(%rsp), %rsi
cmpl $0x6, %ebp
movq %rax, 0x28(%rsp)
jne 0x2f18a
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x10(%rsp), %rdx
jmp 0x2f209
movups (%r13), %xmm0
leaq 0x30(%rsp), %rdx
movaps %xmm0, (%rdx)
movq %rax, 0x10(%rdx)
movq %rbp, 0x18(%rdx)
movq %r15, 0x20(%rdx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x28(%rdx)
movq 0x10(%r13), %rcx
movq 0x18(%r13), %r8
movq %rdx, (%rsp)
pushq $0x3
popq %r9
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdx
callq 0x21eb6
movq %rax, %r15
movq %rax, %r13
andq %r12, %r13
cmpl $-0x1, %edx
je 0x2f1e1
cmpl $0x6, %edx
jne 0x2f1e6
movq %rdx, %r14
jmp 0x2f1ff
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1801e
movq %rbx, %rdi
callq 0x1d5e1
xorl %r15d, %r15d
xorl %r13d, %r13d
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1801e
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rdx
callq 0x1801e
jmp 0x2f01d
| js_proxy_call:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov ebp, r9d
mov r12, r8
mov r15, rcx
mov rcx, rdx
mov rdx, rsi
mov rbx, rdi
test [rsp+98h+arg_8], 1
jnz short loc_2EFB9
lea rsi, [rsp+98h+var_80]
push 5Bh ; '['
pop r8
mov rdi, rbx
call get_proxy_method
push 6
pop r14
test rax, rax
jz loc_2F012
mov r13, rax
cmp byte ptr [rax+20h], 0
jz loc_2F028
mov r14, [rsp+98h+var_78]
cmp r14d, 3
jnz loc_2F056
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rax, [rsp+98h+arg_0]
mov [rsp+98h+var_98], rax
mov rdi, rbx
mov rcx, r15
mov r8, r12
mov r9d, ebp
call JS_Call
mov r15, rax
mov r14, rdx
mov r12, 0FFFFFFFF00000000h
and r12, rax
jmp loc_2F138
loc_2EFB9:
mov [rsp+98h+var_90], r12
mov r12, 0FFFFFFFF00000000h
lea rsi, [rsp+98h+var_80]
push 5Fh ; '_'
pop r8
mov rdi, rbx
call get_proxy_method
push 6
pop r14
test rax, rax
jz short loc_2F017
mov r13, rax
mov rdx, [rax+8]
cmp edx, 0FFFFFFFFh
jnz short loc_2EFFC
mov rsi, [r13+0]
test byte ptr [rsi+5], 10h
jnz loc_2F08A
loc_2EFFC:
lea rsi, aNotAConstructo; "not a constructor"
xor r15d, r15d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_2F01A
loc_2F012:
xor r15d, r15d
jmp short loc_2F04E
loc_2F017:
xor r15d, r15d
loc_2F01A:
xor r13d, r13d
loc_2F01D:
or r15, r13
and r12, r13
jmp loc_2F138
loc_2F028:
mov rsi, [rsp+98h+var_80]
mov rdx, [rsp+98h+var_78]
mov rdi, rbx
call JS_FreeValue
lea rsi, aSetAddIsNotAFu+0Bh; "not a function"
xor r15d, r15d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_2F04E:
xor r12d, r12d
jmp loc_2F138
loc_2F056:
mov rdi, rbx
mov esi, ebp
mov rdx, [rsp+98h+arg_0]
call js_create_array
mov rbp, rdx
mov rsi, [rsp+98h+var_80]
cmp ebp, 6
jnz short loc_2F0C8
xor r15d, r15d
mov rcx, r14
push 6
pop r14
xor r12d, r12d
mov r13, rax
jmp loc_2F11F
loc_2F08A:
mov rax, [rsp+98h+var_78]
cmp eax, 3
jnz loc_2F150
mov rax, [rsp+98h+arg_0]
mov [rsp+98h+var_98], rax
mov rdi, rbx
mov rcx, r15
mov r8, [rsp+98h+var_90]
mov r9d, ebp
call JS_CallConstructor2
mov r15, rax
mov r14, rdx
mov r13, rax
and r13, r12
jmp loc_2F01D
loc_2F0C8:
movups xmm0, xmmword ptr [r13+0]
lea rdx, [rsp+98h+var_68]
movaps xmmword ptr [rdx], xmm0
mov [rdx+10h], r15
mov [rdx+18h], r12
mov [rdx+20h], rax
mov [rdx+28h], rbp
mov rcx, [r13+10h]
mov r8, [r13+18h]
mov [rsp+98h+var_98], rdx
push 3
pop r9
mov rdi, rbx
mov r13, rax
mov r15, rsi
mov rdx, r14
call JS_Call
mov rsi, r15
mov r15, rax
mov rcx, r14
mov r14, rdx
mov r12, 0FFFFFFFF00000000h
and r12, rax
loc_2F11F:
mov rdi, rbx
mov rdx, rcx
call JS_FreeValue
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
loc_2F138:
mov eax, r15d
or rax, r12
mov rdx, r14
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F150:
mov [rsp+98h+var_88], rax
mov rdi, rbx
mov esi, ebp
mov rdx, [rsp+98h+arg_0]
call js_create_array
mov rbp, rdx
push 6
pop r14
mov rsi, [rsp+98h+var_80]
cmp ebp, 6
mov [rsp+98h+var_70], rax
jnz short loc_2F18A
xor r15d, r15d
xor r13d, r13d
mov rdx, [rsp+98h+var_88]
jmp short loc_2F209
loc_2F18A:
movups xmm0, xmmword ptr [r13+0]
lea rdx, [rsp+98h+var_68]
movaps xmmword ptr [rdx], xmm0
mov [rdx+10h], rax
mov [rdx+18h], rbp
mov [rdx+20h], r15
mov rcx, [rsp+98h+var_90]
mov [rdx+28h], rcx
mov rcx, [r13+10h]
mov r8, [r13+18h]
mov [rsp+98h+var_98], rdx
push 3
pop r9
mov rdi, rbx
mov [rsp+98h+var_90], rsi
mov rdx, [rsp+98h+var_88]
call JS_Call
mov r15, rax
mov r13, rax
and r13, r12
cmp edx, 0FFFFFFFFh
jz short loc_2F1E1
cmp edx, 6
jnz short loc_2F1E6
loc_2F1E1:
mov r14, rdx
jmp short loc_2F1FF
loc_2F1E6:
mov rdi, rbx
mov rsi, r15
call JS_FreeValue
mov rdi, rbx
call JS_ThrowTypeErrorNotAnObject
xor r15d, r15d
xor r13d, r13d
loc_2F1FF:
mov rdx, [rsp+98h+var_88]
mov rsi, [rsp+98h+var_90]
loc_2F209:
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+98h+var_70]
mov rdx, rbp
call JS_FreeValue
jmp loc_2F01D
| unsigned long long js_proxy_call(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
unsigned int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
long long a15,
char a16)
{
long long v19; // rax
long long v20; // r13
long long v21; // r14
long long v22; // rax
unsigned int v23; // r15d
unsigned long long v24; // r12
__m128 *proxy_method; // rax
long long v26; // rcx
long long v27; // r8
long long v28; // r9
__m128 v29; // xmm4
__m128 v30; // xmm5
__m128 *v31; // r13
long long v32; // rdx
unsigned long long v33; // r13
long long v34; // rdx
long long v35; // rcx
long long v36; // r8
long long v37; // r9
__m128 v38; // xmm4
__m128 v39; // xmm5
long long v40; // rax
long long v41; // rdx
long long v42; // rbp
long long v43; // rsi
long long v44; // rcx
long long v45; // r13
long long v46; // rcx
long long v47; // r8
long long v48; // rax
long long array; // rax
long long v51; // rdx
long long v52; // rbp
long long v53; // rsi
long long v54; // rdx
__m128 v55; // xmm0
long long v56; // rax
long long v57; // rdx
long long v58; // rsi
long long v59; // rdx
long long v60; // rcx
long long v61; // r8
long long v62; // r9
__m128 v63; // xmm4
__m128 v64; // xmm5
char v65; // [rsp+0h] [rbp-98h]
char v66; // [rsp+0h] [rbp-98h]
long long v68; // [rsp+8h] [rbp-90h]
long long v69; // [rsp+10h] [rbp-88h]
long long v70; // [rsp+18h] [rbp-80h] BYREF
long long v71; // [rsp+20h] [rbp-78h]
long long v72; // [rsp+28h] [rbp-70h]
__m128 v73; // [rsp+30h] [rbp-68h] BYREF
long long v74; // [rsp+40h] [rbp-58h]
long long v75; // [rsp+48h] [rbp-50h]
long long v76; // [rsp+50h] [rbp-48h]
long long v77; // [rsp+58h] [rbp-40h]
if ( (a16 & 1) != 0 )
{
proxy_method = (__m128 *)get_proxy_method(a1, &v70, a2, a3, 95LL);
if ( proxy_method )
{
v31 = proxy_method;
v32 = proxy_method->m128_i64[1];
if ( (_DWORD)v32 == -1 && (*(_BYTE *)(proxy_method->m128_u64[0] + 5) & 0x10) != 0 )
{
if ( (_DWORD)v71 == 3 )
{
a4 = JS_CallConstructor2(a1, proxy_method->m128_u64[0], -1, a4, a5, a6, a15);
v33 = a4 & 0xFFFFFFFF00000000LL;
}
else
{
v69 = v71;
array = js_create_array(a1, a6, a15);
v52 = v51;
v53 = v70;
v72 = array;
if ( (_DWORD)v51 == 6 )
{
LODWORD(a4) = 0;
v33 = 0LL;
v54 = v69;
}
else
{
v55 = *v31;
v73 = *v31;
v74 = array;
v75 = v51;
v76 = a4;
v77 = a5;
v68 = v70;
v56 = JS_Call(a1, v70, v69, v31[1].m128_u64[0], v31[1].m128_u64[1], 3, (long long)&v73);
LODWORD(a4) = v56;
v33 = v56 & 0xFFFFFFFF00000000LL;
if ( (_DWORD)v57 != -1 && (_DWORD)v57 != 6 )
{
v58 = v56;
JS_FreeValue(a1, v56, v57);
JS_ThrowTypeErrorNotAnObject(a1, v55, a8, a9, a10, v63, v64, a13, a14, v58, v59, v60, v61, v62, v66);
LODWORD(a4) = 0;
v33 = 0LL;
}
v54 = v69;
v53 = v68;
}
JS_FreeValue(a1, v53, v54);
JS_FreeValue(a1, v72, v52);
}
goto LABEL_13;
}
LODWORD(a4) = 0;
JS_ThrowTypeError(a1, (long long)"not a constructor", v32, v26, v27, v28, a7, a8, a9, a10, v29, v30, a13, a14, v65);
}
else
{
LODWORD(a4) = 0;
}
v33 = 0LL;
LABEL_13:
v23 = v33 | a4;
v24 = v33 & 0xFFFFFFFF00000000LL;
return v24 | v23;
}
v19 = get_proxy_method(a1, &v70, a2, a3, 91LL);
if ( !v19 )
{
v23 = 0;
LABEL_15:
v24 = 0LL;
return v24 | v23;
}
v20 = v19;
if ( !*(_BYTE *)(v19 + 32) )
{
JS_FreeValue(a1, v70, v71);
v23 = 0;
JS_ThrowTypeError(a1, (long long)"not a function", v34, v35, v36, v37, a7, a8, a9, a10, v38, v39, a13, a14, v65);
goto LABEL_15;
}
v21 = v71;
if ( (_DWORD)v71 == 3 )
{
v22 = JS_Call(a1, *(_QWORD *)v19, *(_QWORD *)(v19 + 8), a4, a5, a6, a15);
v23 = v22;
v24 = v22 & 0xFFFFFFFF00000000LL;
}
else
{
v40 = js_create_array(a1, a6, a15);
v42 = v41;
v43 = v70;
if ( (_DWORD)v41 == 6 )
{
v23 = 0;
v44 = v21;
v24 = 0LL;
v45 = v40;
}
else
{
v73 = *(__m128 *)v20;
v74 = a4;
v75 = a5;
v76 = v40;
v77 = v41;
v46 = *(_QWORD *)(v20 + 16);
v47 = *(_QWORD *)(v20 + 24);
v45 = v40;
v48 = JS_Call(a1, v70, v21, v46, v47, 3, (long long)&v73);
v23 = v48;
v44 = v21;
v24 = v48 & 0xFFFFFFFF00000000LL;
}
JS_FreeValue(a1, v43, v44);
JS_FreeValue(a1, v45, v42);
}
return v24 | v23;
}
| js_proxy_call:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV EBP,R9D
MOV R12,R8
MOV R15,RCX
MOV RCX,RDX
MOV RDX,RSI
MOV RBX,RDI
TEST byte ptr [RSP + 0xa8],0x1
JNZ 0x0012efb9
LEA RSI,[RSP + 0x18]
PUSH 0x5b
POP R8
MOV RDI,RBX
CALL 0x00135d01
PUSH 0x6
POP R14
TEST RAX,RAX
JZ 0x0012f012
MOV R13,RAX
CMP byte ptr [RAX + 0x20],0x0
JZ 0x0012f028
MOV R14,qword ptr [RSP + 0x20]
CMP R14D,0x3
JNZ 0x0012f056
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RCX,R15
MOV R8,R12
MOV R9D,EBP
CALL 0x00121eb6
MOV R15,RAX
MOV R14,RDX
MOV R12,-0x100000000
AND R12,RAX
JMP 0x0012f138
LAB_0012efb9:
MOV qword ptr [RSP + 0x8],R12
MOV R12,-0x100000000
LEA RSI,[RSP + 0x18]
PUSH 0x5f
POP R8
MOV RDI,RBX
CALL 0x00135d01
PUSH 0x6
POP R14
TEST RAX,RAX
JZ 0x0012f017
MOV R13,RAX
MOV RDX,qword ptr [RAX + 0x8]
CMP EDX,-0x1
JNZ 0x0012effc
MOV RSI,qword ptr [R13]
TEST byte ptr [RSI + 0x5],0x10
JNZ 0x0012f08a
LAB_0012effc:
LEA RSI,[0x186630]
XOR R15D,R15D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x0012f01a
LAB_0012f012:
XOR R15D,R15D
JMP 0x0012f04e
LAB_0012f017:
XOR R15D,R15D
LAB_0012f01a:
XOR R13D,R13D
LAB_0012f01d:
OR R15,R13
AND R12,R13
JMP 0x0012f138
LAB_0012f028:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RDI,RBX
CALL 0x0011801e
LEA RSI,[0x18720a]
XOR R15D,R15D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
LAB_0012f04e:
XOR R12D,R12D
JMP 0x0012f138
LAB_0012f056:
MOV RDI,RBX
MOV ESI,EBP
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x0013a2bd
MOV RBP,RDX
MOV RSI,qword ptr [RSP + 0x18]
CMP EBP,0x6
JNZ 0x0012f0c8
XOR R15D,R15D
MOV RCX,R14
PUSH 0x6
POP R14
XOR R12D,R12D
MOV R13,RAX
JMP 0x0012f11f
LAB_0012f08a:
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,0x3
JNZ 0x0012f150
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RCX,R15
MOV R8,qword ptr [RSP + 0x8]
MOV R9D,EBP
CALL 0x00128200
MOV R15,RAX
MOV R14,RDX
MOV R13,RAX
AND R13,R12
JMP 0x0012f01d
LAB_0012f0c8:
MOVUPS XMM0,xmmword ptr [R13]
LEA RDX,[RSP + 0x30]
MOVAPS xmmword ptr [RDX],XMM0
MOV qword ptr [RDX + 0x10],R15
MOV qword ptr [RDX + 0x18],R12
MOV qword ptr [RDX + 0x20],RAX
MOV qword ptr [RDX + 0x28],RBP
MOV RCX,qword ptr [R13 + 0x10]
MOV R8,qword ptr [R13 + 0x18]
MOV qword ptr [RSP],RDX
PUSH 0x3
POP R9
MOV RDI,RBX
MOV R13,RAX
MOV R15,RSI
MOV RDX,R14
CALL 0x00121eb6
MOV RSI,R15
MOV R15,RAX
MOV RCX,R14
MOV R14,RDX
MOV R12,-0x100000000
AND R12,RAX
LAB_0012f11f:
MOV RDI,RBX
MOV RDX,RCX
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
LAB_0012f138:
MOV EAX,R15D
OR RAX,R12
MOV RDX,R14
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f150:
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,RBX
MOV ESI,EBP
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x0013a2bd
MOV RBP,RDX
PUSH 0x6
POP R14
MOV RSI,qword ptr [RSP + 0x18]
CMP EBP,0x6
MOV qword ptr [RSP + 0x28],RAX
JNZ 0x0012f18a
XOR R15D,R15D
XOR R13D,R13D
MOV RDX,qword ptr [RSP + 0x10]
JMP 0x0012f209
LAB_0012f18a:
MOVUPS XMM0,xmmword ptr [R13]
LEA RDX,[RSP + 0x30]
MOVAPS xmmword ptr [RDX],XMM0
MOV qword ptr [RDX + 0x10],RAX
MOV qword ptr [RDX + 0x18],RBP
MOV qword ptr [RDX + 0x20],R15
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RDX + 0x28],RCX
MOV RCX,qword ptr [R13 + 0x10]
MOV R8,qword ptr [R13 + 0x18]
MOV qword ptr [RSP],RDX
PUSH 0x3
POP R9
MOV RDI,RBX
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x00121eb6
MOV R15,RAX
MOV R13,RAX
AND R13,R12
CMP EDX,-0x1
JZ 0x0012f1e1
CMP EDX,0x6
JNZ 0x0012f1e6
LAB_0012f1e1:
MOV R14,RDX
JMP 0x0012f1ff
LAB_0012f1e6:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011801e
MOV RDI,RBX
CALL 0x0011d5e1
XOR R15D,R15D
XOR R13D,R13D
LAB_0012f1ff:
MOV RDX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
LAB_0012f209:
MOV RDI,RBX
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,RBP
CALL 0x0011801e
JMP 0x0012f01d
|
int1 [16]
js_proxy_call(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6,int8 param_7,byte param_8)
{
int8 *puVar1;
long *plVar2;
ulong uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int8 local_80;
int8 local_78;
int8 local_70;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int8 local_58;
int8 local_50;
int1 local_48 [16];
if ((param_8 & 1) == 0) {
puVar1 = (int8 *)get_proxy_method(param_1,&local_80,param_2,param_3,0x5b);
if (puVar1 != (int8 *)0x0) {
if (*(char *)(puVar1 + 4) != '\0') {
if ((int)local_78 == 3) {
auVar4 = JS_Call(param_1,*puVar1,puVar1[1],param_4,param_5,param_6,param_7);
uVar3 = auVar4._0_8_ & 0xffffffff00000000;
}
else {
auVar5 = js_create_array(param_1,param_6,param_7);
if (auVar5._8_4_ == 6) {
auVar4 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
else {
local_68 = *(int4 *)puVar1;
uStack_64 = *(int4 *)((long)puVar1 + 4);
uStack_60 = *(int4 *)(puVar1 + 1);
uStack_5c = *(int4 *)((long)puVar1 + 0xc);
local_58 = param_4;
local_50 = param_5;
local_48 = auVar5;
auVar4 = JS_Call(param_1,local_80,local_78,puVar1[2],puVar1[3],3,&local_68);
uVar3 = auVar4._0_8_ & 0xffffffff00000000;
}
JS_FreeValue(param_1,local_80,local_78);
JS_FreeValue(param_1,auVar5._0_8_,auVar5._8_8_);
}
goto LAB_0012f138;
}
JS_FreeValue(param_1,local_80,local_78);
JS_ThrowTypeError(param_1,"not a function");
}
auVar4 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
else {
plVar2 = (long *)get_proxy_method(param_1,&local_80,param_2,param_3,0x5f);
if (plVar2 != (long *)0x0) {
if (((int)plVar2[1] == -1) && ((*(byte *)(*plVar2 + 5) & 0x10) != 0)) {
if ((int)local_78 == 3) {
auVar4 = JS_CallConstructor2(param_1,*plVar2,plVar2[1],param_4,param_5,param_6,param_7);
uVar3 = auVar4._0_8_ & 0xffffffff00000000;
}
else {
auVar5 = js_create_array(param_1,param_6,param_7);
local_70 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
auVar4 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
else {
local_68 = (int4)*plVar2;
uStack_64 = *(int4 *)((long)plVar2 + 4);
uStack_60 = (int4)plVar2[1];
uStack_5c = *(int4 *)((long)plVar2 + 0xc);
local_58 = local_70;
local_50 = auVar5._8_8_;
local_48._0_8_ = param_4;
local_48._8_8_ = param_5;
auVar4 = JS_Call(param_1,local_80,local_78,plVar2[2],plVar2[3],3,&local_68);
uVar3 = auVar4._0_8_ & 0xffffffff00000000;
if ((auVar4._8_4_ != -1) && (auVar4._8_4_ != 6)) {
JS_FreeValue(param_1,auVar4._0_8_);
JS_ThrowTypeErrorNotAnObject(param_1);
auVar4 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
}
JS_FreeValue(param_1,local_80,local_78);
JS_FreeValue(param_1,local_70,auVar5._8_8_);
}
goto LAB_0012f138;
}
JS_ThrowTypeError(param_1,"not a constructor");
}
auVar4 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
LAB_0012f138:
auVar5._0_8_ = auVar4._0_8_ & 0xffffffff | uVar3;
auVar5._8_8_ = auVar4._8_8_;
return auVar5;
}
|
|
2,469 | diff | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int i, wa, wb;
ULong *xa, *xae, *xb, *xbe, *xc;
ULLong borrow, y;
i= cmp(a,b);
if (!i)
{
c= Balloc(0, alloc);
c->wds= 1;
c->p.x[0]= 0;
return c;
}
if (i < 0)
{
c= a;
a= b;
b= c;
i= 1;
}
else
i= 0;
c= Balloc(a->k, alloc);
c->sign= i;
wa= a->wds;
xa= a->p.x;
xae= xa + wa;
wb= b->wds;
xb= b->p.x;
xbe= xb + wb;
xc= c->p.x;
borrow= 0;
do
{
y= (ULLong)*xa++ - *xb++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (xb < xbe);
while (xa < xae)
{
y= *xa++ - borrow;
borrow= y >> 32 & (ULong)1;
*xc++= (ULong) (y & FFFFFFFF);
}
while (!*--xc)
wa--;
c->wds= wa;
return c;
} | O0 | c | diff:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5bc40
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x5c28e
movq -0x20(%rbp), %rsi
xorl %edi, %edi
callq 0x5be50
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5c43a
cmpl $0x0, -0x2c(%rbp)
jge 0x5c2b5
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x2c(%rbp)
jmp 0x5c2bc
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rsi
callq 0x5be50
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x34(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
movq -0x50(%rbp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, -0x50(%rbp)
movl (%rcx), %ecx
subq %rcx, %rax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jb 0x5c33d
jmp 0x5c3a7
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x5c3fd
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl (%rax), %eax
subq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
shrq $0x20, %rax
andq $0x1, %rax
movq %rax, -0x68(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x70(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
jmp 0x5c3a7
jmp 0x5c3ff
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5c41d
jmp 0x5c428
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x5c3ff
movl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| diff:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call cmp
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_5C28E
mov rsi, [rbp+var_20]
xor edi, edi
call Balloc
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov rax, [rbp+var_28]
mov rax, [rax]
mov dword ptr [rax], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp loc_5C43A
loc_5C28E:
cmp [rbp+var_2C], 0
jge short loc_5C2B5
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_10], rax
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov [rbp+var_2C], 1
jmp short loc_5C2BC
loc_5C2B5:
mov [rbp+var_2C], 0
loc_5C2BC:
mov rax, [rbp+var_10]
mov edi, [rax+8]
mov rsi, [rbp+var_20]
call Balloc
mov [rbp+var_28], rax
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov eax, [rax+14h]
mov [rbp+var_34], eax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_34]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_60], rax
mov [rbp+var_68], 0
loc_5C33D:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
mov rcx, [rbp+var_50]
mov rdx, rcx
add rdx, 4
mov [rbp+var_50], rdx
mov ecx, [rcx]
sub rax, rcx
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jb short loc_5C33D
jmp short $+2
loc_5C3A7:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnb short loc_5C3FD
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov eax, [rax]
sub rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
shr rax, 20h
and rax, 1
mov [rbp+var_68], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_70]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
jmp short loc_5C3A7
loc_5C3FD:
jmp short $+2
loc_5C3FF:
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_5C41D
jmp short loc_5C428
loc_5C41D:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_5C3FF
loc_5C428:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+14h], ecx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_5C43A:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long diff(long long a1, long long a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rcx
_DWORD *v5; // rax
unsigned int *v6; // rax
_DWORD *v7; // rax
_DWORD *v8; // rax
unsigned long long v10; // [rsp+0h] [rbp-70h]
unsigned long long v11; // [rsp+0h] [rbp-70h]
long long v12; // [rsp+8h] [rbp-68h]
_DWORD *v13; // [rsp+10h] [rbp-60h]
unsigned long long v14; // [rsp+18h] [rbp-58h]
unsigned int *v15; // [rsp+20h] [rbp-50h]
unsigned long long v16; // [rsp+28h] [rbp-48h]
unsigned int *v17; // [rsp+30h] [rbp-40h]
int v18; // [rsp+40h] [rbp-30h]
int v19; // [rsp+44h] [rbp-2Ch]
int v20; // [rsp+44h] [rbp-2Ch]
long long v21; // [rsp+48h] [rbp-28h]
long long v22; // [rsp+48h] [rbp-28h]
long long v24; // [rsp+58h] [rbp-18h]
long long v25; // [rsp+60h] [rbp-10h]
v25 = a1;
v24 = a2;
v19 = cmp(a1, a2);
if ( v19 )
{
if ( v19 >= 0 )
{
v20 = 0;
}
else
{
v25 = a2;
v24 = a1;
v20 = 1;
}
v22 = Balloc(*(_DWORD *)(v25 + 8), a3);
*(_DWORD *)(v22 + 16) = v20;
v18 = *(_DWORD *)(v25 + 20);
v17 = *(unsigned int **)v25;
v16 = 4LL * v18 + *(_QWORD *)v25;
v15 = *(unsigned int **)v24;
v14 = 4LL * *(int *)(v24 + 20) + *(_QWORD *)v24;
v13 = *(_DWORD **)v22;
v12 = 0LL;
do
{
v3 = v17++;
v4 = v15++;
v10 = *v3 - (unsigned long long)*v4 - v12;
v12 = HIDWORD(v10) & 1;
v5 = v13++;
*v5 = v10;
}
while ( (unsigned long long)v15 < v14 );
while ( (unsigned long long)v17 < v16 )
{
v6 = v17++;
v11 = *v6 - v12;
v12 = HIDWORD(v11) & 1;
v7 = v13++;
*v7 = v11;
}
while ( 1 )
{
v8 = v13--;
if ( *(v8 - 1) )
break;
--v18;
}
*(_DWORD *)(v22 + 20) = v18;
return v22;
}
else
{
v21 = Balloc(0, a3);
*(_DWORD *)(v21 + 20) = 1;
**(_DWORD **)v21 = 0;
return v21;
}
}
| diff:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0015bc40
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x0015c28e
MOV RSI,qword ptr [RBP + -0x20]
XOR EDI,EDI
CALL 0x0015be50
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015c43a
LAB_0015c28e:
CMP dword ptr [RBP + -0x2c],0x0
JGE 0x0015c2b5
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x0015c2bc
LAB_0015c2b5:
MOV dword ptr [RBP + -0x2c],0x0
LAB_0015c2bc:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0015be50
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x34]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x68],0x0
LAB_0015c33d:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x50]
MOV RDX,RCX
ADD RDX,0x4
MOV qword ptr [RBP + -0x50],RDX
MOV ECX,dword ptr [RCX]
SUB RAX,RCX
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JC 0x0015c33d
JMP 0x0015c3a7
LAB_0015c3a7:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x0015c3fd
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV EAX,dword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x20
AND RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
JMP 0x0015c3a7
LAB_0015c3fd:
JMP 0x0015c3ff
LAB_0015c3ff:
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x0015c41d
JMP 0x0015c428
LAB_0015c41d:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0015c3ff
LAB_0015c428:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015c43a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
int8 * diff(int8 *param_1,int8 *param_2,int8 param_3)
{
uint *puVar1;
uint *puVar2;
int iVar3;
ulong uVar4;
uint *puVar5;
uint *puVar6;
int4 *puVar7;
ulong local_70;
int4 *local_68;
uint *local_58;
uint *local_48;
int local_38;
uint local_34;
int8 *local_20;
int8 *local_18;
int8 *local_10;
iVar3 = cmp(param_1,param_2);
if (iVar3 == 0) {
local_10 = (int8 *)Balloc(0,param_3);
*(int4 *)((long)local_10 + 0x14) = 1;
*(int4 *)*local_10 = 0;
}
else {
local_20 = param_2;
local_18 = param_1;
if (iVar3 < 0) {
local_20 = param_1;
local_18 = param_2;
}
local_34 = (uint)(iVar3 < 0);
local_10 = (int8 *)Balloc(*(int4 *)(local_18 + 1),param_3);
*(uint *)(local_10 + 2) = local_34;
local_38 = *(int *)((long)local_18 + 0x14);
puVar1 = (uint *)*local_18;
iVar3 = *(int *)((long)local_20 + 0x14);
puVar2 = (uint *)*local_20;
local_70 = 0;
local_68 = (int4 *)*local_10;
local_58 = puVar2;
local_48 = puVar1;
do {
puVar5 = local_48 + 1;
puVar6 = local_58 + 1;
uVar4 = ((ulong)*local_48 - (ulong)*local_58) - local_70;
local_70 = uVar4 >> 0x20 & 1;
puVar7 = local_68 + 1;
*local_68 = (int)uVar4;
local_68 = puVar7;
local_58 = puVar6;
local_48 = puVar5;
} while (puVar6 < puVar2 + iVar3);
while (local_48 < puVar1 + local_38) {
uVar4 = *local_48 - local_70;
local_70 = uVar4 >> 0x20 & 1;
*local_68 = (int)uVar4;
local_68 = local_68 + 1;
local_48 = local_48 + 1;
}
while (local_68[-1] == 0) {
local_38 = local_38 + -1;
local_68 = local_68 + -1;
}
*(int *)((long)local_10 + 0x14) = local_38;
}
return local_10;
}
|
|
2,470 | LefDefParser::defiNet::polyRouteStatus(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp | const char* defiNet::polyRouteStatus(int index) const {
char errMsg[128];
if (index < 0 || index > numPolys_) {
sprintf (errMsg, "ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numPolys_);
defiError(0, 6085, errMsg, defData);
return 0;
}
return polyRouteStatus_[index];
} | O3 | cpp | LefDefParser::defiNet::polyRouteStatus(int) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
sets %al
movl 0x170(%rdi), %ecx
cmpl %esi, %ecx
setl %sil
orb %al, %sil
cmpb $0x1, %sil
jne 0x23ab4
leaq 0x1f2f2(%rip), %rsi # 0x42d7e
xorl %r14d, %r14d
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x6060
movq 0x240(%rbx), %rcx
xorl %edi, %edi
movl $0x17c5, %esi # imm = 0x17C5
movq %r15, %rdx
callq 0x18f80
jmp 0x23ac1
movq 0x198(%rbx), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %r14
movq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK12LefDefParser7defiNet15polyRouteStatusEi:
push r15
push r14
push rbx
sub rsp, 80h
mov edx, esi
mov rbx, rdi
test esi, esi
sets al
mov ecx, [rdi+170h]
cmp ecx, esi
setl sil
or sil, al
cmp sil, 1
jnz short loc_23AB4
lea rsi, aErrorDefpars60_6; "ERROR (DEFPARS-6085): The index number "...
xor r14d, r14d
mov r15, rsp
mov rdi, r15
xor eax, eax
call _sprintf
mov rcx, [rbx+240h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17C5h; int
mov rdx, r15; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
jmp short loc_23AC1
loc_23AB4:
mov rax, [rbx+198h]
mov ecx, edx
mov r14, [rax+rcx*8]
loc_23AC1:
mov rax, r14
add rsp, 80h
pop rbx
pop r14
pop r15
retn
| long long LefDefParser::defiNet::polyRouteStatus(LefDefParser::defiNet *this, int a2)
{
int v2; // ecx
long long v3; // r14
LefDefParser::defrData *v4; // r8
char v6[152]; // [rsp+0h] [rbp-98h] BYREF
v2 = *((_DWORD *)this + 92);
if ( a2 >= 0 && v2 >= a2 )
return *(_QWORD *)(*((_QWORD *)this + 51) + 8LL * (unsigned int)a2);
v3 = 0LL;
sprintf(
v6,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6085, v6, *((LefDefParser::defrData **)this + 72), v4);
return v3;
}
| polyRouteStatus:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x80
MOV EDX,ESI
MOV RBX,RDI
TEST ESI,ESI
SETS AL
MOV ECX,dword ptr [RDI + 0x170]
CMP ECX,ESI
SETL SIL
OR SIL,AL
CMP SIL,0x1
JNZ 0x00123ab4
LEA RSI,[0x142d7e]
XOR R14D,R14D
MOV R15,RSP
MOV RDI,R15
XOR EAX,EAX
CALL 0x00106060
MOV RCX,qword ptr [RBX + 0x240]
XOR EDI,EDI
MOV ESI,0x17c5
MOV RDX,R15
CALL 0x00118f80
JMP 0x00123ac1
LAB_00123ab4:
MOV RAX,qword ptr [RBX + 0x198]
MOV ECX,EDX
MOV R14,qword ptr [RAX + RCX*0x8]
LAB_00123ac1:
MOV RAX,R14
ADD RSP,0x80
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::defiNet::polyRouteStatus(int) const */
int8 __thiscall LefDefParser::defiNet::polyRouteStatus(defiNet *this,int param_1)
{
int8 uVar1;
char acStack_98 [128];
if (*(int *)(this + 0x170) < param_1 || param_1 < 0) {
uVar1 = 0;
sprintf(acStack_98,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17c5,acStack_98,*(defrData **)(this + 0x240));
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0x198) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
|
|
2,471 | 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::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>::at<char const (&) [13], 0>(char const (&) [13]) | llama.cpp/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | cpp | 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::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>::at<char const (&) [13], 0>(char const (&) [13]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xc453f
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xc4529
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21ff0
testl %eax, %eax
je 0xc451e
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xc44ff
jmp 0xc4521
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xc459d
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x21690
movq %rax, %rbx
movq %r14, %rdi
callq 0x9810e
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x64ad1(%rip), %rsi # 0x129032
leaq 0x20(%rsp), %rdi
callq 0x8d6dd
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x97f36
xorl %ebp, %ebp
leaq 0xabab4(%rip), %rsi # 0x170040
leaq -0x40563(%rip), %rdx # 0x84030
movq %rbx, %rdi
callq 0x21ad0
jmp 0xc4616
movl $0x20, %edi
callq 0x21690
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x216c0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x33c38
leaq 0x64a76(%rip), %rsi # 0x129048
leaq 0x64a75(%rip), %rcx # 0x12904e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x8d765
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x9669a
xorl %ebp, %ebp
leaq 0xab9b9(%rip), %rsi # 0x16ffc0
leaq -0x405de(%rip), %rdx # 0x84030
movq %rbx, %rdi
callq 0x21ad0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc4634
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xc467f
movq 0x10(%rsp), %rsi
jmp 0xc4677
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xc4689
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xc4689
jmp 0xc4686
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc467f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
testb %bpl, %bpl
jne 0xc4689
jmp 0xc4691
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f80
movq %r14, %rdi
callq 0x21b70
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_C453F
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_C4529
loc_C44FF:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_C451E
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_C44FF
jmp short loc_C4521
loc_C451E:
mov rax, rbx
loc_C4521:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_C4529:
cmp rax, rbx
jz short loc_C459D
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_C453F:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_C4616
loc_C459D:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_C4616:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C4634
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C4634:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_C467F
mov rsi, [rsp+68h+var_58]
jmp short loc_C4677
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_C4689
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C4689
jmp short loc_C4686
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C467F
mov rsi, [rsp+68h+var_38]
loc_C4677:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C467F:
test bpl, bpl
jnz short loc_C4689
jmp short loc_C4691
loc_C4686:
mov r14, rax
loc_C4689:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C4691:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v11,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001c453f
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001c4529
LAB_001c44ff:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00121ff0
TEST EAX,EAX
JZ 0x001c451e
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001c44ff
JMP 0x001c4521
LAB_001c451e:
MOV RAX,RBX
LAB_001c4521:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001c4529:
CMP RAX,RBX
JZ 0x001c459d
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001c453f:
MOV EDI,0x20
CALL 0x00121690
MOV RBX,RAX
MOV RDI,R14
CALL 0x0019810e
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001c455a:
LEA RSI,[0x229032]
LEA RDI,[RSP + 0x20]
CALL 0x0018d6dd
MOV BPL,0x1
LAB_001c456e:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00197f36
XOR EBP,EBP
LEA RSI,[0x270040]
LEA RDX,[0x184030]
MOV RDI,RBX
CALL 0x00121ad0
LAB_001c459d:
MOV EDI,0x20
CALL 0x00121690
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x001216c0
LEA RDX,[RAX + R15*0x1]
LAB_001c45c0:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00133c38
LAB_001c45cb:
LEA RSI,[0x229048]
LEA RCX,[0x22904e]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0018d765
MOV BPL,0x1
LAB_001c45e9:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0019669a
XOR EBP,EBP
LEA RSI,[0x26ffc0]
LEA RDX,[0x184030]
MOV RDI,RBX
CALL 0x00121ad0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001c455a to 001c456a has its CatchHandler @ 001c4686 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001c456e to 001c459a has its CatchHandler @ 001c4661 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001c45c0 to 001c45ca has its CatchHandler @ 001c465f */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001c45cb to 001c45e5 has its CatchHandler @ 001c4644 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001c45e9 to 001c4615 has its CatchHandler @ 001c4616 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
2,472 | my_casedn_str_mb | eloqsql/strings/ctype-mb.c | size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_lower;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O0 | c | my_casedn_str_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x116a27
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x9c(%rax), %eax
addq %rax, %rdx
callq 0x116940
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x116a05
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x116a25
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1169c4
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_casedn_str_mb:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+48h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_1169C4:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_116A27
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+9Ch]
add rdx, rax
call my_ismbchar_0
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_116A05
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_116A25
loc_116A05:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
loc_116A25:
jmp short loc_1169C4
loc_116A27:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
sub rax, rcx
add rsp, 30h
pop rbp
retn
| _BYTE * my_casedn_str_mb(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-20h]
unsigned int v4; // [rsp+1Ch] [rbp-14h]
_BYTE *v5; // [rsp+20h] [rbp-10h]
v5 = a2;
v3 = *(_QWORD *)(a1 + 72);
while ( *v5 )
{
v4 = my_ismbchar_0(a1, (long long)v5, (long long)&v5[*(unsigned int *)(a1 + 156)]);
if ( v4 )
{
v5 += v4;
}
else
{
*v5 = *(_BYTE *)(v3 + (unsigned __int8)*v5);
++v5;
}
}
return (_BYTE *)(v5 - a2);
}
| |||
2,473 | my_casedn_str_mb | eloqsql/strings/ctype-mb.c | size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_lower;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O3 | c | my_casedn_str_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %rax
je 0xb3154
movq %rdi, %r14
movq 0x48(%rdi), %r12
movq %rbx, %r15
movl 0x9c(%r14), %edx
addq %r15, %rdx
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0xb3144
movzbl (%r15), %eax
movb (%r12,%rax), %al
movb %al, (%r15)
movl $0x1, %ecx
jmp 0xb3146
movl %eax, %ecx
leaq (%r15,%rcx), %rax
cmpb $0x0, (%r15,%rcx)
movq %rax, %r15
jne 0xb3110
subq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_str_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
cmp byte ptr [rsi], 0
mov rax, rsi
jz short loc_B3154
mov r14, rdi
mov r12, [rdi+48h]
mov r15, rbx
loc_B3110:
mov edx, [r14+9Ch]
add rdx, r15
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_B3144
movzx eax, byte ptr [r15]
mov al, [r12+rax]
mov [r15], al
mov ecx, 1
jmp short loc_B3146
loc_B3144:
mov ecx, eax
loc_B3146:
lea rax, [r15+rcx]
cmp byte ptr [r15+rcx], 0
mov r15, rax
jnz short loc_B3110
loc_B3154:
sub rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_casedn_str_mb(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
long long v3; // r12
_BYTE *v4; // r15
int v5; // eax
long long v6; // rcx
bool v7; // zf
v2 = a2;
if ( *a2 )
{
v3 = *(_QWORD *)(a1 + 72);
v4 = a2;
do
{
v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
&v4[*(unsigned int *)(a1 + 156)]);
if ( v5 >= 2 )
{
v6 = (unsigned int)v5;
}
else
{
*v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4);
v6 = 1LL;
}
v2 = &v4[v6];
v7 = v4[v6] == 0;
v4 += v6;
}
while ( !v7 );
}
return v2 - a2;
}
| my_casedn_str_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV RAX,RSI
JZ 0x001b3154
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x48]
MOV R15,RBX
LAB_001b3110:
MOV EDX,dword ptr [R14 + 0x9c]
ADD RDX,R15
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x001b3144
MOVZX EAX,byte ptr [R15]
MOV AL,byte ptr [R12 + RAX*0x1]
MOV byte ptr [R15],AL
MOV ECX,0x1
JMP 0x001b3146
LAB_001b3144:
MOV ECX,EAX
LAB_001b3146:
LEA RAX,[R15 + RCX*0x1]
CMP byte ptr [R15 + RCX*0x1],0x0
MOV R15,RAX
JNZ 0x001b3110
LAB_001b3154:
SUB RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_casedn_str_mb(long param_1,byte *param_2)
{
byte *pbVar1;
long lVar2;
uint uVar3;
byte *pbVar4;
ulong uVar5;
byte *pbVar6;
pbVar4 = param_2;
if (*param_2 != 0) {
lVar2 = *(long *)(param_1 + 0x48);
pbVar6 = param_2;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c));
if ((int)uVar3 < 2) {
*pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6);
uVar5 = 1;
}
else {
uVar5 = (ulong)uVar3;
}
pbVar4 = pbVar6 + uVar5;
pbVar1 = pbVar6 + uVar5;
pbVar6 = pbVar4;
} while (*pbVar1 != 0);
}
return (long)pbVar4 - (long)param_2;
}
|
|
2,474 | ma_dpointer | eloqsql/storage/maria/ma_search.c | void _ma_dpointer(MARIA_SHARE *share, uchar *buff, my_off_t pos)
{
if (pos != HA_OFFSET_ERROR)
pos= (*share->recpos_to_keypos)(share, pos);
switch (share->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8: mi_int8store(buff,pos); break;
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
case 8: *buff++=0;
/* fall through */
case 7: *buff++=0;
/* fall through */
case 6: *buff++=0;
/* fall through */
case 5: *buff++=0;
/* fall through */
#endif
case 4: mi_int4store(buff,pos); break;
case 3: mi_int3store(buff,pos); break;
case 2: mi_int2store(buff,(uint) pos); break;
case 0: break; /* For NO_RECORD */
default: abort(); /* Impossible */
}
} | O0 | c | ma_dpointer:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x6b4b7
movq -0x8(%rbp), %rax
movq 0x6d0(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x740(%rax), %eax
movq %rax, -0x88(%rbp)
subq $0x8, %rax
ja 0x6b799
movq -0x88(%rbp), %rax
leaq 0xeda28(%rip), %rcx # 0x158f08
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x30(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x30(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x38(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x38(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
jmp 0x6b79e
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x40(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x40(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x40(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x48(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x48(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x6b79e
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x58(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x58(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x6b79e
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x60(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x60(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x60(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x68(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x6b79e
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x70(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x70(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x70(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x6b79e
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x78(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x78(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x6b79e
movq -0x18(%rbp), %rax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x7c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x6b79e
jmp 0x6b79e
callq 0x2a5d0
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_dpointer:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh
jz short loc_6B4B7
mov rax, [rbp+var_8]
mov rax, [rax+6D0h]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call rax
mov [rbp+var_18], rax
loc_6B4B7:
mov rax, [rbp+var_8]
mov eax, [rax+740h]
mov [rbp+var_88], rax
sub rax, 8; switch 9 cases
ja def_6B4E7; jumptable 000000000006B4E7 default case, case 1
mov rax, [rbp+var_88]
lea rcx, jpt_6B4E7
movsxd rax, ds:(jpt_6B4E7 - 158F08h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6B4E9:
mov rax, [rbp+var_18]; jumptable 000000000006B4E7 case 8
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_30]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_30]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_30]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
mov rax, [rbp+var_38]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_38]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_38]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
jmp loc_6B79E
loc_6B591:
mov rax, [rbp+var_18]; jumptable 000000000006B4E7 case 7
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_40]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_40]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_40]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_48]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_48]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_48]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_6B79E
loc_6B618:
mov rax, [rbp+var_18]; jumptable 000000000006B4E7 case 6
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_50]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_50]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_50]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_58]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_58]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_6B79E
loc_6B68E:
mov rax, [rbp+var_18]; jumptable 000000000006B4E7 case 5
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_68], rax
mov rax, [rbp+var_60]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_60]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_60]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_60]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_68]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_6B79E
loc_6B6F3:
mov rax, [rbp+var_18]; jumptable 000000000006B4E7 case 4
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_70]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_70]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_70]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_6B79E
loc_6B73C:
mov rax, [rbp+var_18]; jumptable 000000000006B4E7 case 3
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_78]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_78]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_6B79E
loc_6B774:
mov rax, [rbp+var_18]; jumptable 000000000006B4E7 case 2
mov [rbp+var_7C], eax
mov eax, [rbp+var_7C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov eax, [rbp+var_7C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_6B79E
loc_6B797:
jmp short loc_6B79E; jumptable 000000000006B4E7 case 0
def_6B4E7:
call _abort; jumptable 000000000006B4E7 default case, case 1
loc_6B79E:
add rsp, 90h
pop rbp
retn
| _BYTE * ma_dpointer(long long a1, _BYTE *a2, long long a3)
{
_BYTE *result; // rax
long long v4; // [rsp+78h] [rbp-18h]
_BYTE *v5; // [rsp+80h] [rbp-10h]
v5 = a2;
v4 = a3;
if ( a3 != -1 )
{
a2 = (_BYTE *)a3;
v4 = (*(long long ( **)(long long, long long))(a1 + 1744))(a1, a3);
}
result = (_BYTE *)*(unsigned int *)(a1 + 1856);
switch ( *(_DWORD *)(a1 + 1856) )
{
case 0:
return result;
case 2:
v5[1] = v4;
result = v5;
*v5 = BYTE1(v4);
break;
case 3:
v5[2] = v4;
v5[1] = BYTE1(v4);
result = v5;
*v5 = BYTE2(v4);
break;
case 4:
v5[3] = v4;
v5[2] = BYTE1(v4);
v5[1] = BYTE2(v4);
result = v5;
*v5 = BYTE3(v4);
break;
case 5:
v5[4] = v4;
v5[3] = BYTE1(v4);
v5[2] = BYTE2(v4);
v5[1] = BYTE3(v4);
result = v5;
*v5 = BYTE4(v4);
break;
case 6:
v5[5] = v4;
v5[4] = BYTE1(v4);
v5[3] = BYTE2(v4);
v5[2] = BYTE3(v4);
v5[1] = BYTE4(v4);
result = v5;
*v5 = BYTE5(v4);
break;
case 7:
v5[6] = v4;
v5[5] = BYTE1(v4);
v5[4] = BYTE2(v4);
v5[3] = BYTE3(v4);
v5[2] = BYTE4(v4);
v5[1] = BYTE5(v4);
result = v5;
*v5 = BYTE6(v4);
break;
case 8:
v5[3] = BYTE4(v4);
v5[2] = BYTE5(v4);
v5[1] = BYTE6(v4);
*v5 = HIBYTE(v4);
v5[7] = v4;
v5[6] = BYTE1(v4);
v5[5] = BYTE2(v4);
result = v5;
v5[4] = BYTE3(v4);
break;
default:
abort(a1, a2, a3);
}
return result;
}
| _ma_dpointer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x18],-0x1
JZ 0x0016b4b7
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x6d0]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL RAX
MOV qword ptr [RBP + -0x18],RAX
LAB_0016b4b7:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x740]
MOV qword ptr [RBP + -0x88],RAX
SUB RAX,0x8
JA 0x0016b799
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x258f08]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
JMP 0x0016b79e
caseD_7:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0016b79e
caseD_6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x58]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0016b79e
caseD_5:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x68]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0016b79e
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0016b79e
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0016b79e
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x7c],EAX
MOV EAX,dword ptr [RBP + -0x7c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x7c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x0016b79e
caseD_0:
JMP 0x0016b79e
caseD_1:
CALL 0x0012a5d0
LAB_0016b79e:
ADD RSP,0x90
POP RBP
RET
|
void _ma_dpointer(long param_1,int1 *param_2,long param_3)
{
int1 uVar1;
int1 uVar2;
int1 uVar3;
int1 uVar4;
int1 uVar5;
int1 uVar6;
int1 uVar7;
long local_20;
local_20 = param_3;
if (param_3 != -1) {
local_20 = (**(code **)(param_1 + 0x6d0))(param_1,param_3);
}
uVar4 = (int1)local_20;
uVar5 = (int1)((ulong)local_20 >> 8);
uVar6 = (int1)((ulong)local_20 >> 0x10);
uVar7 = (int1)((ulong)local_20 >> 0x18);
uVar1 = (int1)((ulong)local_20 >> 0x20);
uVar2 = (int1)((ulong)local_20 >> 0x28);
uVar3 = (int1)((ulong)local_20 >> 0x30);
switch(*(int4 *)(param_1 + 0x740)) {
case 0:
break;
default:
/* WARNING: Subroutine does not return */
abort();
case 2:
param_2[1] = uVar4;
*param_2 = uVar5;
break;
case 3:
param_2[2] = uVar4;
param_2[1] = uVar5;
*param_2 = uVar6;
break;
case 4:
param_2[3] = uVar4;
param_2[2] = uVar5;
param_2[1] = uVar6;
*param_2 = uVar7;
break;
case 5:
param_2[4] = uVar4;
param_2[3] = uVar5;
param_2[2] = uVar6;
param_2[1] = uVar7;
*param_2 = uVar1;
break;
case 6:
param_2[5] = uVar4;
param_2[4] = uVar5;
param_2[3] = uVar6;
param_2[2] = uVar7;
param_2[1] = uVar1;
*param_2 = uVar2;
break;
case 7:
param_2[6] = uVar4;
param_2[5] = uVar5;
param_2[4] = uVar6;
param_2[3] = uVar7;
param_2[2] = uVar1;
param_2[1] = uVar2;
*param_2 = uVar3;
break;
case 8:
param_2[3] = uVar1;
param_2[2] = uVar2;
param_2[1] = uVar3;
*param_2 = (char)((ulong)local_20 >> 0x38);
param_2[7] = uVar4;
param_2[6] = uVar5;
param_2[5] = uVar6;
param_2[4] = uVar7;
}
return;
}
|
|
2,475 | glfwGetOSMesaContext | untodesu[P]riteg/build_O3/_deps/glfw-src/src/osmesa_context.c | GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* handle)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (window->context.client == GLFW_NO_API)
{
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
return NULL;
}
return window->context.osmesa.handle;
} | O3 | c | glfwGetOSMesaContext:
pushq %rbx
leaq 0x7ff4a(%rip), %rax # 0xa8638
cmpl $0x0, (%rax)
je 0x28705
cmpl $0x0, 0x1f8(%rdi)
je 0x2870e
movq 0x2a0(%rdi), %rbx
jmp 0x2871e
xorl %ebx, %ebx
movl $0x10001, %edi # imm = 0x10001
jmp 0x28715
xorl %ebx, %ebx
movl $0x1000a, %edi # imm = 0x1000A
xorl %esi, %esi
xorl %eax, %eax
callq 0x18e91
movq %rbx, %rax
popq %rbx
retq
nop
| glfwGetOSMesaContext:
push rbx
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_28705
cmp dword ptr [rdi+1F8h], 0
jz short loc_2870E
mov rbx, [rdi+2A0h]
jmp short loc_2871E
loc_28705:
xor ebx, ebx
mov edi, offset loc_10001
jmp short loc_28715
loc_2870E:
xor ebx, ebx
mov edi, 1000Ah
loc_28715:
xor esi, esi
xor eax, eax
call _glfwInputError
loc_2871E:
mov rax, rbx
pop rbx
retn
| long long glfwGetOSMesaContext(long long a1)
{
long long v1; // rbx
void *v2; // rdi
if ( !glfw[0] )
{
v1 = 0LL;
v2 = &loc_10001;
LABEL_6:
glfwInputError((unsigned int)v2, 0LL);
return v1;
}
if ( !*(_DWORD *)(a1 + 504) )
{
v1 = 0LL;
LODWORD(v2) = 65546;
goto LABEL_6;
}
return *(_QWORD *)(a1 + 672);
}
| glfwGetOSMesaContext:
PUSH RBX
LEA RAX,[0x1a8638]
CMP dword ptr [RAX],0x0
JZ 0x00128705
CMP dword ptr [RDI + 0x1f8],0x0
JZ 0x0012870e
MOV RBX,qword ptr [RDI + 0x2a0]
JMP 0x0012871e
LAB_00128705:
XOR EBX,EBX
MOV EDI,0x10001
JMP 0x00128715
LAB_0012870e:
XOR EBX,EBX
MOV EDI,0x1000a
LAB_00128715:
XOR ESI,ESI
XOR EAX,EAX
CALL 0x00118e91
LAB_0012871e:
MOV RAX,RBX
POP RBX
RET
|
int8 glfwGetOSMesaContext(long param_1)
{
int8 uVar1;
if (_glfw == 0) {
uVar1 = 0x10001;
}
else {
if (*(int *)(param_1 + 0x1f8) != 0) {
return *(int8 *)(param_1 + 0x2a0);
}
uVar1 = 0x1000a;
}
_glfwInputError(uVar1,0);
return 0;
}
|
|
2,476 | process_int_arg | eloqsql/strings/my_vsnprintf.c | static char *process_int_arg(char *to, const char *end, size_t length,
longlong par, char arg_type, uint print_type)
{
size_t res_length, to_length;
char *store_start= to, *store_end;
char buff[32];
if ((to_length= (size_t) (end-to)) < 16 || length)
store_start= buff;
if (arg_type == 'd' || arg_type == 'i')
store_end= longlong10_to_str(par, store_start, -10);
else if (arg_type == 'u')
store_end= longlong10_to_str(par, store_start, 10);
else if (arg_type == 'p')
{
store_start[0]= '0';
store_start[1]= 'x';
store_end= ll2str(par, store_start + 2, 16, 0);
}
else if (arg_type == 'o')
{
store_end= ll2str(par, store_start, 8, 0);
}
else
{
DBUG_ASSERT(arg_type == 'X' || arg_type =='x');
store_end= ll2str(par, store_start, 16, (arg_type == 'X'));
}
if ((res_length= (size_t) (store_end - store_start)) > to_length)
return to; /* num doesn't fit in output */
/* If %#d syntax was used, we have to pre-zero/pre-space the string */
if (store_start == buff)
{
length= MY_MIN(length, to_length);
if (res_length < length)
{
size_t diff= (length- res_length);
bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' ');
if (arg_type == 'p' && print_type & PREZERO_ARG)
{
if (diff > 1)
to[1]= 'x';
else
store_start[0]= 'x';
store_start[1]= '0';
}
to+= diff;
}
bmove(to, store_start, res_length);
}
to+= res_length;
return to;
} | O3 | c | process_int_arg:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
subq %rdi, %r13
cmpq $0x10, %r13
setb %al
movq %rdx, -0x68(%rbp)
testq %rdx, %rdx
setne %dl
orb %al, %dl
leaq -0x50(%rbp), %rax
movq %rdi, %r15
cmovneq %rax, %r15
cmpl $0x6e, %r8d
movl %r8d, -0x58(%rbp)
movb %dl, -0x51(%rbp)
movq %r9, -0x60(%rbp)
jle 0xd6dc2
cmpl $0x6f, %r8d
je 0xd6de3
cmpl $0x70, %r8d
je 0xd6df3
movq %rax, %r12
cmpl $0x75, %r8d
jne 0xd6e17
movq %rcx, %rdi
movq %r15, %rsi
movl $0xa, %edx
jmp 0xd6ddc
movq %rax, %r12
cmpl $0x64, %r8d
je 0xd6dd1
cmpl $0x69, %r8d
jne 0xd6e17
movq %rcx, %rdi
movq %r15, %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
callq 0xd5972
jmp 0xd6e32
movq %rax, %r12
movq %rcx, %rdi
movq %r15, %rsi
movl $0x8, %edx
jmp 0xd6e13
movb $0x30, (%r15)
testb %dl, %dl
movq %rbx, %rsi
movq %rax, %r12
cmovneq %rax, %rsi
movb $0x78, 0x1(%rsi)
addq $0x2, %rsi
movq %rcx, %rdi
movl $0x10, %edx
xorl %ecx, %ecx
jmp 0xd6e2d
xorl %eax, %eax
cmpb $0x58, %r8b
sete %al
movq %rcx, %rdi
movq %r15, %rsi
movl $0x10, %edx
movl %eax, %ecx
callq 0xd589c
movq %rax, %r14
subq %r15, %r14
cmpq %r13, %r14
ja 0xd6eae
cmpq %r12, %r15
jne 0xd6eab
movq -0x68(%rbp), %r12
cmpq %r12, %r13
cmovbq %r13, %r12
subq %r14, %r12
jbe 0xd6e9d
movq -0x60(%rbp), %rax
andl $0x4, %eax
sete %r13b
leal 0x20(,%rax,4), %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x292b0
cmpb $0x70, -0x58(%rbp)
setne %al
orb %r13b, %al
jne 0xd6e9a
leaq 0x1(%rbx), %rax
cmpq $0x2, %r12
cmovbq %r15, %rax
movb $0x78, (%rax)
cmpb $0x0, -0x51(%rbp)
leaq -0x50(%rbp), %rax
cmoveq %rbx, %rax
movb $0x30, 0x1(%rax)
addq %r12, %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x29120
addq %r14, %rbx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xd6ecf
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29260
| process_int_arg:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
sub r13, rdi
cmp r13, 10h
setb al
mov [rbp+var_68], rdx
test rdx, rdx
setnz dl
or dl, al
lea rax, [rbp+var_50]
mov r15, rdi
cmovnz r15, rax
cmp r8d, 6Eh ; 'n'
mov [rbp+var_58], r8d
mov [rbp+var_51], dl
mov [rbp+var_60], r9
jle short loc_D6DC2
cmp r8d, 6Fh ; 'o'
jz short loc_D6DE3
cmp r8d, 70h ; 'p'
jz short loc_D6DF3
mov r12, rax
cmp r8d, 75h ; 'u'
jnz short loc_D6E17
mov rdi, rcx
mov rsi, r15
mov edx, 0Ah
jmp short loc_D6DDC
loc_D6DC2:
mov r12, rax
cmp r8d, 64h ; 'd'
jz short loc_D6DD1
cmp r8d, 69h ; 'i'
jnz short loc_D6E17
loc_D6DD1:
mov rdi, rcx
mov rsi, r15
mov edx, 0FFFFFFF6h
loc_D6DDC:
call int10_to_str
jmp short loc_D6E32
loc_D6DE3:
mov r12, rax
mov rdi, rcx
mov rsi, r15
mov edx, 8
jmp short loc_D6E13
loc_D6DF3:
mov byte ptr [r15], 30h ; '0'
test dl, dl
mov rsi, rbx
mov r12, rax
cmovnz rsi, rax
mov byte ptr [rsi+1], 78h ; 'x'
add rsi, 2
mov rdi, rcx
mov edx, 10h
loc_D6E13:
xor ecx, ecx
jmp short loc_D6E2D
loc_D6E17:
xor eax, eax
cmp r8b, 58h ; 'X'
setz al
mov rdi, rcx
mov rsi, r15
mov edx, 10h
mov ecx, eax
loc_D6E2D:
call int2str
loc_D6E32:
mov r14, rax
sub r14, r15
cmp r14, r13
ja short loc_D6EAE
cmp r15, r12
jnz short loc_D6EAB
mov r12, [rbp+var_68]
cmp r13, r12
cmovb r12, r13
sub r12, r14
jbe short loc_D6E9D
mov rax, [rbp+var_60]
and eax, 4
setz r13b
lea esi, ds:20h[rax*4]
mov rdi, rbx
mov rdx, r12
call _memset
cmp byte ptr [rbp+var_58], 70h ; 'p'
setnz al
or al, r13b
jnz short loc_D6E9A
lea rax, [rbx+1]
cmp r12, 2
cmovb rax, r15
mov byte ptr [rax], 78h ; 'x'
cmp [rbp+var_51], 0
lea rax, [rbp+var_50]
cmovz rax, rbx
mov byte ptr [rax+1], 30h ; '0'
loc_D6E9A:
add rbx, r12
loc_D6E9D:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call _memmove
loc_D6EAB:
add rbx, r14
loc_D6EAE:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_D6ECF
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D6ECF:
call ___stack_chk_fail
| _BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, char a6)
{
_BYTE *v6; // rbx
unsigned long long v7; // r13
bool v8; // dl
_BYTE *v9; // r15
unsigned long long v10; // rdi
_BYTE *v11; // rsi
int v12; // edx
_BYTE *v13; // rax
unsigned long long v14; // rdi
_BYTE *v15; // rsi
unsigned int v16; // edx
_BYTE *v17; // rsi
BOOL v18; // ecx
unsigned long long v19; // r14
unsigned long long v20; // r12
bool v21; // cc
unsigned long long v22; // r12
_BYTE *v23; // rax
_BYTE *v24; // rax
char v28; // [rsp+18h] [rbp-58h]
bool v29; // [rsp+1Fh] [rbp-51h]
_BYTE v30[32]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v31; // [rsp+40h] [rbp-30h]
v6 = a1;
v31 = __readfsqword(0x28u);
v7 = a2 - (_QWORD)a1;
v8 = (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 != 0;
v9 = a1;
if ( v8 )
v9 = v30;
v28 = a5;
v29 = v8;
if ( a5 <= 110 )
{
if ( a5 == 100 || a5 == 105 )
{
v10 = a4;
v11 = v9;
v12 = -10;
goto LABEL_11;
}
goto LABEL_17;
}
switch ( a5 )
{
case 'o':
v14 = a4;
v15 = v9;
v16 = 8;
break;
case 'p':
*v9 = 48;
v17 = a1;
if ( v8 )
v17 = v30;
v17[1] = 120;
v15 = v17 + 2;
v14 = a4;
v16 = 16;
break;
case 'u':
v10 = a4;
v11 = v9;
v12 = 10;
LABEL_11:
v13 = int10_to_str(v10, v11, v12);
goto LABEL_19;
default:
LABEL_17:
v14 = a4;
v15 = v9;
v16 = 16;
v18 = (_BYTE)a5 == 88;
goto LABEL_18;
}
v18 = 0;
LABEL_18:
v13 = int2str(v14, v15, v16, v18);
LABEL_19:
v19 = v13 - v9;
if ( v13 - v9 <= v7 )
{
if ( v9 == v30 )
{
v20 = a3;
if ( v7 < a3 )
v20 = v7;
v21 = v20 <= v19;
v22 = v20 - v19;
if ( !v21 )
{
memset(v6, 4 * (a6 & 4u) + 32, v22);
if ( (a6 & 4) != 0 && v28 == 112 )
{
v23 = v6 + 1;
if ( v22 < 2 )
v23 = v9;
*v23 = 120;
v24 = v30;
if ( !v29 )
v24 = v6;
v24[1] = 48;
}
v6 += v22;
}
memmove(v6, v9, v19);
}
v6 += v19;
}
return v6;
}
| process_int_arg:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
SUB R13,RDI
CMP R13,0x10
SETC AL
MOV qword ptr [RBP + -0x68],RDX
TEST RDX,RDX
SETNZ DL
OR DL,AL
LEA RAX,[RBP + -0x50]
MOV R15,RDI
CMOVNZ R15,RAX
CMP R8D,0x6e
MOV dword ptr [RBP + -0x58],R8D
MOV byte ptr [RBP + -0x51],DL
MOV qword ptr [RBP + -0x60],R9
JLE 0x001d6dc2
CMP R8D,0x6f
JZ 0x001d6de3
CMP R8D,0x70
JZ 0x001d6df3
MOV R12,RAX
CMP R8D,0x75
JNZ 0x001d6e17
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0xa
JMP 0x001d6ddc
LAB_001d6dc2:
MOV R12,RAX
CMP R8D,0x64
JZ 0x001d6dd1
CMP R8D,0x69
JNZ 0x001d6e17
LAB_001d6dd1:
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0xfffffff6
LAB_001d6ddc:
CALL 0x001d5972
JMP 0x001d6e32
LAB_001d6de3:
MOV R12,RAX
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0x8
JMP 0x001d6e13
LAB_001d6df3:
MOV byte ptr [R15],0x30
TEST DL,DL
MOV RSI,RBX
MOV R12,RAX
CMOVNZ RSI,RAX
MOV byte ptr [RSI + 0x1],0x78
ADD RSI,0x2
MOV RDI,RCX
MOV EDX,0x10
LAB_001d6e13:
XOR ECX,ECX
JMP 0x001d6e2d
LAB_001d6e17:
XOR EAX,EAX
CMP R8B,0x58
SETZ AL
MOV RDI,RCX
MOV RSI,R15
MOV EDX,0x10
MOV ECX,EAX
LAB_001d6e2d:
CALL 0x001d589c
LAB_001d6e32:
MOV R14,RAX
SUB R14,R15
CMP R14,R13
JA 0x001d6eae
CMP R15,R12
JNZ 0x001d6eab
MOV R12,qword ptr [RBP + -0x68]
CMP R13,R12
CMOVC R12,R13
SUB R12,R14
JBE 0x001d6e9d
MOV RAX,qword ptr [RBP + -0x60]
AND EAX,0x4
SETZ R13B
LEA ESI,[0x20 + RAX*0x4]
MOV RDI,RBX
MOV RDX,R12
CALL 0x001292b0
CMP byte ptr [RBP + -0x58],0x70
SETNZ AL
OR AL,R13B
JNZ 0x001d6e9a
LEA RAX,[RBX + 0x1]
CMP R12,0x2
CMOVC RAX,R15
MOV byte ptr [RAX],0x78
CMP byte ptr [RBP + -0x51],0x0
LEA RAX,[RBP + -0x50]
CMOVZ RAX,RBX
MOV byte ptr [RAX + 0x1],0x30
LAB_001d6e9a:
ADD RBX,R12
LAB_001d6e9d:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00129120
LAB_001d6eab:
ADD RBX,R14
LAB_001d6eae:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001d6ecf
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d6ecf:
CALL 0x00129260
|
int1 *
process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,int param_5,
uint param_6)
{
long lVar1;
int1 *puVar2;
int8 uVar3;
ulong uVar4;
ulong __n;
int1 *__src;
long in_FS_OFFSET;
bool bVar5;
bool bVar6;
bool bVar7;
int1 local_58 [32];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = param_2 - (long)param_1;
bVar5 = uVar4 < 0x10;
bVar6 = param_3 != 0;
__src = param_1;
if (bVar6 || bVar5) {
__src = local_58;
}
puVar2 = __src;
if (param_5 < 0x6f) {
if ((param_5 == 100) || (param_5 == 0x69)) {
uVar3 = 0xfffffff6;
LAB_001d6ddc:
lVar1 = int10_to_str(param_4,__src,uVar3);
goto LAB_001d6e32;
}
LAB_001d6e17:
bVar7 = (char)param_5 == 'X';
uVar3 = 0x10;
}
else {
if (param_5 == 0x6f) {
uVar3 = 8;
}
else {
if (param_5 != 0x70) {
if (param_5 != 0x75) goto LAB_001d6e17;
uVar3 = 10;
goto LAB_001d6ddc;
}
*__src = 0x30;
puVar2 = param_1;
if (bVar6 || bVar5) {
puVar2 = local_58;
}
puVar2[1] = 0x78;
uVar3 = 0x10;
puVar2 = puVar2 + 2;
}
bVar7 = false;
}
lVar1 = int2str(param_4,puVar2,uVar3,bVar7);
LAB_001d6e32:
__n = lVar1 - (long)__src;
if (__n <= uVar4) {
if (__src == local_58) {
if (uVar4 < param_3) {
param_3 = uVar4;
}
uVar4 = param_3 - __n;
if (__n <= param_3 && uVar4 != 0) {
memset(param_1,(param_6 & 4) * 4 + 0x20,uVar4);
if ((char)param_5 == 'p' && (param_6 & 4) != 0) {
puVar2 = param_1 + 1;
if (uVar4 < 2) {
puVar2 = __src;
}
*puVar2 = 0x78;
puVar2 = local_58;
if (!bVar6 && !bVar5) {
puVar2 = param_1;
}
puVar2[1] = 0x30;
}
param_1 = param_1 + uVar4;
}
memmove(param_1,__src,__n);
}
param_1 = param_1 + __n;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
2,477 | lf_alloc_new | eloqsql/mysys/lf_alloc-pin.c | void *lf_alloc_new(LF_PINS *pins)
{
LF_ALLOCATOR *allocator= (LF_ALLOCATOR *)(pins->pinbox->free_func_arg);
uchar *node;
for (;;)
{
do
{
node= allocator->top;
lf_pin(pins, 0, node);
} while (node != allocator->top && LF_BACKOFF());
if (!node)
{
node= (void *)my_malloc(key_memory_lf_node, allocator->element_size,
MYF(MY_WME));
if (allocator->constructor)
allocator->constructor(node);
#ifdef MY_LF_EXTRA_DEBUG
if (likely(node != 0))
my_atomic_add32(&allocator->mallocs, 1);
#endif
break;
}
if (my_atomic_casptr((void **)(char *)&allocator->top,
(void *)&node, anext_node(node)))
break;
}
lf_unpin(pins, 0);
return node;
} | O3 | c | lf_alloc_new:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq 0x30(%rax), %r15
leaq 0x2c8761(%rip), %rcx # 0x2f0828
movq 0x48(%r15), %r14
movq %r14, %rax
xchgq %rax, (%rbx)
cmpq 0x48(%r15), %r14
je 0x280e5
movl (%rcx), %eax
testl %eax, %eax
je 0x280c7
pause
decl %eax
jne 0x280dd
jmp 0x280c7
testq %r14, %r14
je 0x280ff
movl 0x38(%r15), %eax
movq (%r14,%rax), %rdx
movq %r14, %rax
lock
cmpxchgq %rdx, 0x48(%r15)
jne 0x280c7
jmp 0x28127
leaq 0x33f6ca(%rip), %rax # 0x3677d0
movl (%rax), %edi
movl 0x50(%r15), %esi
movl $0x10, %edx
callq 0x2c5d5
movq %rax, %r14
movq 0x58(%r15), %rax
testq %rax, %rax
je 0x28127
movq %r14, %rdi
callq *%rax
xorl %eax, %eax
xchgq %rax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| lf_alloc_new:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+20h]
mov r15, [rax+30h]
lea rcx, my_cpu_relax_multiplier
loc_280C7:
mov r14, [r15+48h]
mov rax, r14
xchg rax, [rbx]
cmp r14, [r15+48h]
jz short loc_280E5
mov eax, [rcx]
test eax, eax
jz short loc_280C7
loc_280DD:
pause
dec eax
jnz short loc_280DD
jmp short loc_280C7
loc_280E5:
test r14, r14
jz short loc_280FF
mov eax, [r15+38h]
mov rdx, [r14+rax]
mov rax, r14
lock cmpxchg [r15+48h], rdx
jnz short loc_280C7
jmp short loc_28127
loc_280FF:
lea rax, key_memory_lf_node
mov edi, [rax]
mov esi, [r15+50h]
mov edx, 10h
call my_malloc
mov r14, rax
mov rax, [r15+58h]
test rax, rax
jz short loc_28127
mov rdi, r14
call rax
loc_28127:
xor eax, eax
xchg rax, [rbx]
mov rax, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long lf_alloc_new(long long a1)
{
long long v1; // r15
long long v2; // r14
int i; // eax
void ( *v4)(long long); // rax
v1 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 48LL);
while ( 1 )
{
while ( 1 )
{
v2 = *(_QWORD *)(v1 + 72);
_InterlockedExchange64((volatile long long *)a1, v2);
if ( v2 == *(_QWORD *)(v1 + 72) )
break;
for ( i = my_cpu_relax_multiplier; i; --i )
_mm_pause();
}
if ( !v2 )
break;
if ( v2 == _InterlockedCompareExchange64(
(volatile signed long long *)(v1 + 72),
*(_QWORD *)(v2 + *(unsigned int *)(v1 + 56)),
v2) )
goto LABEL_11;
}
v2 = my_malloc(key_memory_lf_node, *(unsigned int *)(v1 + 80), 16LL);
v4 = *(void ( **)(long long))(v1 + 88);
if ( v4 )
v4(v2);
LABEL_11:
_InterlockedExchange64((volatile long long *)a1, 0LL);
return v2;
}
| lf_alloc_new:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x20]
MOV R15,qword ptr [RAX + 0x30]
LEA RCX,[0x3f0828]
LAB_001280c7:
MOV R14,qword ptr [R15 + 0x48]
MOV RAX,R14
XCHG qword ptr [RBX],RAX
CMP R14,qword ptr [R15 + 0x48]
JZ 0x001280e5
MOV EAX,dword ptr [RCX]
TEST EAX,EAX
JZ 0x001280c7
LAB_001280dd:
PAUSE
DEC EAX
JNZ 0x001280dd
JMP 0x001280c7
LAB_001280e5:
TEST R14,R14
JZ 0x001280ff
MOV EAX,dword ptr [R15 + 0x38]
MOV RDX,qword ptr [R14 + RAX*0x1]
MOV RAX,R14
CMPXCHG.LOCK qword ptr [R15 + 0x48],RDX
JNZ 0x001280c7
JMP 0x00128127
LAB_001280ff:
LEA RAX,[0x4677d0]
MOV EDI,dword ptr [RAX]
MOV ESI,dword ptr [R15 + 0x50]
MOV EDX,0x10
CALL 0x0012c5d5
MOV R14,RAX
MOV RAX,qword ptr [R15 + 0x58]
TEST RAX,RAX
JZ 0x00128127
MOV RDI,R14
CALL RAX
LAB_00128127:
XOR EAX,EAX
XCHG qword ptr [RBX],RAX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
long lf_alloc_new(long *param_1)
{
long lVar1;
int iVar2;
long lVar3;
bool bVar4;
lVar1 = *(long *)(param_1[4] + 0x30);
do {
while( true ) {
lVar3 = *(long *)(lVar1 + 0x48);
LOCK();
*param_1 = lVar3;
UNLOCK();
iVar2 = my_cpu_relax_multiplier;
if (lVar3 == *(long *)(lVar1 + 0x48)) break;
for (; iVar2 != 0; iVar2 = iVar2 + -1) {
}
}
if (lVar3 == 0) {
lVar3 = my_malloc(key_memory_lf_node,*(int4 *)(lVar1 + 0x50),0x10);
if (*(code **)(lVar1 + 0x58) != (code *)0x0) {
(**(code **)(lVar1 + 0x58))(lVar3);
}
break;
}
LOCK();
bVar4 = lVar3 == *(long *)(lVar1 + 0x48);
if (bVar4) {
*(long *)(lVar1 + 0x48) = *(long *)(lVar3 + (ulong)*(uint *)(lVar1 + 0x38));
}
UNLOCK();
} while (!bVar4);
LOCK();
*param_1 = 0;
UNLOCK();
return lVar3;
}
|
|
2,478 | SchemaConverter::check_errors() | monkey531[P]llama/common/json-schema-to-grammar.cpp | void check_errors() {
if (!_errors.empty()) {
throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n"));
}
if (!_warnings.empty()) {
fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str());
}
} | O2 | cpp | SchemaConverter::check_errors():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %r14
movq 0xc8(%rdi), %rax
cmpq 0xd0(%rdi), %rax
jne 0x8d61c
movq 0xe0(%r14), %rax
cmpq 0xe8(%r14), %rax
jne 0x8d5b6
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x709cb(%rip), %rax # 0xfdf88
movq (%rax), %rbx
leaq 0x2ba32(%rip), %rsi # 0xb8ff9
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x26cb4
addq $0xe0, %r14
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x5467a
leaq 0x30(%rsp), %r14
movq (%r14), %rdx
leaq 0x2b9c7(%rip), %rsi # 0xb8fc5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x23cd0
movq %r14, %rdi
callq 0x24208
leaq 0x10(%rsp), %rdi
callq 0x24208
jmp 0x8d5ad
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %rbx
leaq 0x1d221(%rip), %rsi # 0xaa84f
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x26cb4
addq $0xc8, %r14
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %r14, %rsi
callq 0x5467a
leaq 0x2b948(%rip), %rsi # 0xb8fa5
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x59126
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x7096b(%rip), %rsi # 0xfdff0
movq 0x708cc(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x24208
jmp 0x8d6a9
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x24208
jmp 0x8d6bb
movq %rax, %r14
movb $0x1, %bpl
leaq 0x50(%rsp), %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x8d6cf
jmp 0x8d6eb
movq %rax, %r14
movq %rbx, %rdi
callq 0x236a0
jmp 0x8d6eb
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24208
jmp 0x8d6eb
movq %rax, %r14
movq %r14, %rdi
callq 0x23fc0
nop
| _ZN15SchemaConverter12check_errorsEv:
push rbp
push r14
push rbx
sub rsp, 70h
mov r14, rdi
mov rax, [rdi+0C8h]
cmp rax, [rdi+0D0h]
jnz short loc_8D61C
mov rax, [r14+0E0h]
cmp rax, [r14+0E8h]
jnz short loc_8D5B6
loc_8D5AD:
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_8D5B6:
mov rax, cs:stderr_ptr
mov rbx, [rax]
lea rsi, asc_B8FF9; "; "
lea rdi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add r14, 0E0h
lea rdi, [rsp+88h+var_58]
lea rdx, [rsp+88h+var_78]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea r14, [rsp+88h+var_58]
mov rdx, [r14]
lea rsi, aWarningJsonSch; "WARNING: JSON schema conversion was inc"...
mov rdi, rbx
xor eax, eax
call _fprintf
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D5AD
loc_8D61C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aProcessingRequ+18h; "\n"
lea rdi, [rsp+88h+var_38]
lea rdx, [rsp+88h+var_79]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add r14, 0C8h
lea rdi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_38]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n"
lea rdi, [rsp+88h+var_58]
lea rdx, [rsp+88h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+88h+var_58]
mov rdi, rbx
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, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+88h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D6A9
mov r14, rax
mov bpl, 1
loc_8D6A9:
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D6BB
mov r14, rax
mov bpl, 1
loc_8D6BB:
lea rdi, [rsp+88h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_8D6CF
jmp short loc_8D6EB
mov r14, rax
loc_8D6CF:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_8D6EB
mov r14, rax
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D6EB
mov r14, rax
loc_8D6EB:
mov rdi, r14
call __Unwind_Resume
| void SchemaConverter::check_errors(SchemaConverter *this)
{
long long v1; // rbx
void *exception; // rbx
_QWORD v3[4]; // [rsp+10h] [rbp-78h] BYREF
const char *v4[4]; // [rsp+30h] [rbp-58h] BYREF
_QWORD v5[7]; // [rsp+50h] [rbp-38h] BYREF
if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) )
{
exception = __cxa_allocate_exception(0x10uLL);
std::string::basic_string<std::allocator<char>>(v5, (long long)"\n");
string_join((long long)v3, (long long *)this + 25, (long long)v5);
std::operator+<char>((long long)v4, (long long)"JSON schema conversion failed:\n", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) )
{
v1 = stderr;
std::string::basic_string<std::allocator<char>>(v3, (long long)"; ");
string_join((long long)v4, (long long *)this + 28, (long long)v3);
fprintf(v1, "WARNING: JSON schema conversion was incomplete: %s\n", v4[0]);
std::string::~string(v4);
std::string::~string(v3);
}
}
| check_errors:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xc8]
CMP RAX,qword ptr [RDI + 0xd0]
JNZ 0x0018d61c
MOV RAX,qword ptr [R14 + 0xe0]
CMP RAX,qword ptr [R14 + 0xe8]
JNZ 0x0018d5b6
LAB_0018d5ad:
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_0018d5b6:
MOV RAX,qword ptr [0x001fdf88]
MOV RBX,qword ptr [RAX]
LAB_0018d5c0:
LEA RSI,[0x1b8ff9]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x50]
CALL 0x00126cb4
LAB_0018d5d6:
ADD R14,0xe0
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
MOV RSI,R14
CALL 0x0015467a
LAB_0018d5ef:
LEA R14,[RSP + 0x30]
MOV RDX,qword ptr [R14]
LEA RSI,[0x1b8fc5]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00123cd0
MOV RDI,R14
CALL 0x00124208
LEA RDI,[RSP + 0x10]
CALL 0x00124208
JMP 0x0018d5ad
LAB_0018d61c:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV RBX,RAX
LAB_0018d627:
LEA RSI,[0x1aa84f]
LEA RDI,[RSP + 0x50]
LEA RDX,[RSP + 0xf]
CALL 0x00126cb4
LAB_0018d63d:
ADD R14,0xc8
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x50]
MOV RSI,R14
CALL 0x0015467a
LAB_0018d656:
LEA RSI,[0x1b8fa5]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x00159126
MOV BPL,0x1
LAB_0018d66f:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f30
|
/* SchemaConverter::check_errors() */
void __thiscall SchemaConverter::check_errors(SchemaConverter *this)
{
FILE *__stream;
runtime_error *this_00;
allocator local_79;
string local_78 [32];
int8 local_58 [4];
allocator local_38 [32];
if (*(long *)(this + 200) == *(long *)(this + 0xd0)) {
if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) {
__stream = *(FILE **)PTR_stderr_001fdf88;
/* try { // try from 0018d5c0 to 0018d5d5 has its CatchHandler @ 0018d6e8 */
std::__cxx11::string::string<std::allocator<char>>(local_78,"; ",local_38);
/* try { // try from 0018d5d6 to 0018d5ee has its CatchHandler @ 0018d6d9 */
string_join((vector *)local_58,(string *)(this + 0xe0));
fprintf(__stream,"WARNING: JSON schema conversion was incomplete: %s\n",local_58[0]);
std::__cxx11::string::~string((string *)local_58);
std::__cxx11::string::~string(local_78);
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018d627 to 0018d63c has its CatchHandler @ 0018d6cc */
std::__cxx11::string::string<std::allocator<char>>((string *)local_38,"\n",&local_79);
/* try { // try from 0018d63d to 0018d655 has its CatchHandler @ 0018d6b5 */
string_join((vector *)local_78,(string *)(this + 200));
/* try { // try from 0018d656 to 0018d66b has its CatchHandler @ 0018d6a3 */
std::operator+((char *)local_58,(string *)"JSON schema conversion failed:\n");
/* try { // try from 0018d66f to 0018d693 has its CatchHandler @ 0018d694 */
std::runtime_error::runtime_error(this_00,(string *)local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
|
|
2,479 | Spu::GenerateSample() | sp1187[P]veesem/src/core/spg200/spu.cc | void Spu::GenerateSample() {
int32_t left_out = 0;
int32_t right_out = 0;
for (int channel_index = 0; channel_index < 16; channel_index++) {
const auto& channel = channel_data_[channel_index];
if (!channel_enable_[channel_index] || channel_stop_[channel_index])
continue;
TickChannel(channel_index);
uint16_t prev_sample_part =
(static_cast<uint64_t>(channel.wave_data_0) * ((1 << 19) - channel.phase_acc)) >> 19;
uint16_t cur_sample_part = (static_cast<uint64_t>(channel.wave_data) * channel.phase_acc) >> 19;
int16_t sample = (prev_sample_part + cur_sample_part) - 0x8000;
const auto& pan = channel.pan;
int left_pan = std::clamp((0x80 - static_cast<int>(pan.pan)) * 2, 0x0, 0x7f);
int right_pan = std::clamp(static_cast<int>(pan.pan) * 2, 0x0, 0x7f);
sample = (sample * static_cast<int>(channel.envelope_data.edd)) >> 7;
left_out += (sample * left_pan * static_cast<int>(pan.volume)) >> 14;
right_out += (sample * right_pan * static_cast<int>(pan.volume)) >> 14;
}
int16_t left_final = (left_out >> (4 - control_.high_volume)) * main_volume_ >> 7;
int16_t right_final = (right_out >> (4 - control_.high_volume)) * main_volume_ >> 7;
wave_out_l_ = left_final ^ 0x8000;
wave_out_r_ = right_final ^ 0x8000;
audio_buffer_[audio_buffer_pos_++] = wave_out_l_;
audio_buffer_[audio_buffer_pos_++] = wave_out_r_;
if (audio_buffer_pos_ == audio_buffer_.size() + 1)
audio_buffer_pos_ = 0;
} | O1 | cpp | Spu::GenerateSample():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6044(%rdi), %r12
xorl %r14d, %r14d
movl $0x7f, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x63a0(%rbx), %rdx
movl $0x1, %eax
movl %r14d, %ecx
shlq %cl, %rax
btq %r14, %rdx
jae 0xbed4
testq %rax, 0x63c0(%rbx)
jne 0xbed4
movq %rbx, %rdi
movl %r14d, %esi
callq 0xc038
movzwl -0xa(%r12), %eax
movl (%r12), %ecx
movl $0x80000, %edx # imm = 0x80000
subl %ecx, %edx
imulq %rax, %rdx
shrq $0x13, %rdx
movzwl -0x8(%r12), %esi
imulq %rcx, %rsi
shrq $0x13, %rsi
addl %edx, %esi
movzwl -0x16(%r12), %eax
movl %eax, %ecx
shrl $0x7, %ecx
andl $0xfe, %ecx
movl $0x100, %edx # imm = 0x100
subl %ecx, %edx
cmpl $0x7f, %edx
cmovael %r13d, %edx
cmpl %r13d, %ecx
cmovael %r13d, %ecx
movswl %si, %esi
xorl $0x7f8000, %esi # imm = 0x7F8000
movzwl -0xe(%r12), %edi
shll $0x9, %edi
movzwl %di, %edi
imull %esi, %edi
sarl $0x10, %edi
andl %r13d, %eax
imull %edi, %eax
imull %eax, %edx
sarl $0xe, %edx
addl %edx, %ebp
imull %ecx, %eax
sarl $0xe, %eax
addl %eax, %r15d
incq %r14
addq $0x38, %r12
cmpq $0x10, %r14
jne 0xbe1f
movb 0x6404(%rbx), %al
shrb $0x6, %al
movb $0x4, %cl
subb %al, %cl
sarl %cl, %ebp
movzbl 0x63fc(%rbx), %eax
imull %eax, %ebp
sarl %cl, %r15d
imull %eax, %r15d
shrl $0x7, %ebp
movl $0x8000, %eax # imm = 0x8000
xorl %eax, %ebp
movw %bp, 0x63f8(%rbx)
shrl $0x7, %r15d
xorl %eax, %r15d
movw %r15w, 0x63fa(%rbx)
movq 0x6000(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x6000(%rbx)
movw %bp, (%rbx,%rax,2)
movzwl 0x63fa(%rbx), %ecx
leaq 0x2(%rax), %rdx
movq %rdx, 0x6000(%rbx)
movw %cx, 0x2(%rbx,%rax,2)
cmpq $0x3001, %rdx # imm = 0x3001
jne 0xbf66
movq $0x0, 0x6000(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN3Spu14GenerateSampleEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea r12, [rdi+6044h]
xor r14d, r14d
mov r13d, 7Fh
xor ebp, ebp
xor r15d, r15d
loc_BE1F:
mov rdx, [rbx+63A0h]
mov eax, 1
mov ecx, r14d
shl rax, cl
bt rdx, r14
jnb loc_BED4
test [rbx+63C0h], rax
jnz loc_BED4
mov rdi, rbx; this
mov esi, r14d; int
call _ZN3Spu11TickChannelEi; Spu::TickChannel(int)
movzx eax, word ptr [r12-0Ah]
mov ecx, [r12]
mov edx, offset loc_80000
sub edx, ecx
imul rdx, rax
shr rdx, 13h
movzx esi, word ptr [r12-8]
imul rsi, rcx
shr rsi, 13h
add esi, edx
movzx eax, word ptr [r12-16h]
mov ecx, eax
shr ecx, 7
and ecx, 0FEh
mov edx, 100h
sub edx, ecx
cmp edx, 7Fh
cmovnb edx, r13d
cmp ecx, r13d
cmovnb ecx, r13d
movsx esi, si
xor esi, 7F8000h
movzx edi, word ptr [r12-0Eh]
shl edi, 9
movzx edi, di
imul edi, esi
sar edi, 10h
and eax, r13d
imul eax, edi
imul edx, eax
sar edx, 0Eh
add ebp, edx
imul eax, ecx
sar eax, 0Eh
add r15d, eax
loc_BED4:
inc r14
add r12, 38h ; '8'
cmp r14, 10h
jnz loc_BE1F
mov al, [rbx+6404h]
shr al, 6
mov cl, 4
sub cl, al
sar ebp, cl
movzx eax, byte ptr [rbx+63FCh]
imul ebp, eax
sar r15d, cl
imul r15d, eax
shr ebp, 7
mov eax, 8000h
xor ebp, eax
mov [rbx+63F8h], bp
shr r15d, 7
xor r15d, eax
mov [rbx+63FAh], r15w
mov rax, [rbx+6000h]
lea rcx, [rax+1]
mov [rbx+6000h], rcx
mov [rbx+rax*2], bp
movzx ecx, word ptr [rbx+63FAh]
lea rdx, [rax+2]
mov [rbx+6000h], rdx
mov [rbx+rax*2+2], cx
cmp rdx, 3001h
jnz short loc_BF66
mov qword ptr [rbx+6000h], 0
loc_BF66:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long Spu::GenerateSample(Spu *this)
{
_DWORD *v1; // r12
unsigned long long v2; // r14
int v3; // ebp
int v4; // r15d
long long v5; // rdx
unsigned __int16 v6; // ax
unsigned int v7; // ecx
int v8; // edx
int v9; // eax
char v10; // cl
int v11; // eax
unsigned int v12; // ebp
long long result; // rax
__int16 v14; // cx
v1 = (_DWORD *)((char *)this + 24644);
v2 = 0LL;
v3 = 0;
v4 = 0;
do
{
v5 = *((_QWORD *)this + 3188);
if ( _bittest64(&v5, v2) && ((1LL << v2) & *((_QWORD *)this + 3192)) == 0 )
{
Spu::TickChannel(this, v2);
v6 = *((_WORD *)v1 - 11);
v7 = (v6 >> 7) & 0xFE;
v8 = 256 - v7;
if ( 256 - v7 >= 0x7F )
v8 = 127;
if ( v7 >= 0x7F )
v7 = 127;
v9 = ((((__int16)(((*((unsigned __int16 *)v1 - 5) * (unsigned long long)(unsigned int)((_DWORD)&loc_80000 - *v1)) >> 19)
+ (((unsigned int)*v1 * (unsigned long long)*((unsigned __int16 *)v1 - 4)) >> 19)) ^ 0x7F8000)
* (unsigned __int16)(*((_WORD *)v1 - 7) << 9)) >> 16)
* (v6 & 0x7F);
v3 += (v9 * v8) >> 14;
v4 += (int)(v7 * v9) >> 14;
}
++v2;
v1 += 14;
}
while ( v2 != 16 );
v10 = 4 - (*((_BYTE *)this + 25604) >> 6);
v11 = *((unsigned __int8 *)this + 25596);
v12 = ((unsigned int)(v11 * (v3 >> v10)) >> 7) ^ 0x8000;
*((_WORD *)this + 12796) = v12;
*((_WORD *)this + 12797) = ((unsigned int)(v11 * (v4 >> v10)) >> 7) ^ 0x8000;
result = *((_QWORD *)this + 3072);
*((_QWORD *)this + 3072) = result + 1;
*((_WORD *)this + result) = v12;
v14 = *((_WORD *)this + 12797);
*((_QWORD *)this + 3072) = result + 2;
*((_WORD *)this + result + 1) = v14;
if ( result == 12287 )
*((_QWORD *)this + 3072) = 0LL;
return result;
}
| GenerateSample:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R12,[RDI + 0x6044]
XOR R14D,R14D
MOV R13D,0x7f
XOR EBP,EBP
XOR R15D,R15D
LAB_0010be1f:
MOV RDX,qword ptr [RBX + 0x63a0]
MOV EAX,0x1
MOV ECX,R14D
SHL RAX,CL
BT RDX,R14
JNC 0x0010bed4
TEST qword ptr [RBX + 0x63c0],RAX
JNZ 0x0010bed4
MOV RDI,RBX
MOV ESI,R14D
CALL 0x0010c038
MOVZX EAX,word ptr [R12 + -0xa]
MOV ECX,dword ptr [R12]
MOV EDX,0x80000
SUB EDX,ECX
IMUL RDX,RAX
SHR RDX,0x13
MOVZX ESI,word ptr [R12 + -0x8]
IMUL RSI,RCX
SHR RSI,0x13
ADD ESI,EDX
MOVZX EAX,word ptr [R12 + -0x16]
MOV ECX,EAX
SHR ECX,0x7
AND ECX,0xfe
MOV EDX,0x100
SUB EDX,ECX
CMP EDX,0x7f
CMOVNC EDX,R13D
CMP ECX,R13D
CMOVNC ECX,R13D
MOVSX ESI,SI
XOR ESI,0x7f8000
MOVZX EDI,word ptr [R12 + -0xe]
SHL EDI,0x9
MOVZX EDI,DI
IMUL EDI,ESI
SAR EDI,0x10
AND EAX,R13D
IMUL EAX,EDI
IMUL EDX,EAX
SAR EDX,0xe
ADD EBP,EDX
IMUL EAX,ECX
SAR EAX,0xe
ADD R15D,EAX
LAB_0010bed4:
INC R14
ADD R12,0x38
CMP R14,0x10
JNZ 0x0010be1f
MOV AL,byte ptr [RBX + 0x6404]
SHR AL,0x6
MOV CL,0x4
SUB CL,AL
SAR EBP,CL
MOVZX EAX,byte ptr [RBX + 0x63fc]
IMUL EBP,EAX
SAR R15D,CL
IMUL R15D,EAX
SHR EBP,0x7
MOV EAX,0x8000
XOR EBP,EAX
MOV word ptr [RBX + 0x63f8],BP
SHR R15D,0x7
XOR R15D,EAX
MOV word ptr [RBX + 0x63fa],R15W
MOV RAX,qword ptr [RBX + 0x6000]
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBX + 0x6000],RCX
MOV word ptr [RBX + RAX*0x2],BP
MOVZX ECX,word ptr [RBX + 0x63fa]
LEA RDX,[RAX + 0x2]
MOV qword ptr [RBX + 0x6000],RDX
MOV word ptr [RBX + RAX*0x2 + 0x2],CX
CMP RDX,0x3001
JNZ 0x0010bf66
MOV qword ptr [RBX + 0x6000],0x0
LAB_0010bf66:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Spu::GenerateSample() */
void __thiscall Spu::GenerateSample(Spu *this)
{
long lVar1;
int iVar2;
byte bVar3;
uint uVar4;
uint uVar5;
ushort uVar6;
int iVar7;
Spu *pSVar8;
ulong uVar9;
int iVar10;
pSVar8 = this + 0x6044;
uVar9 = 0;
iVar7 = 0;
iVar10 = 0;
do {
if (((*(ulong *)(this + 0x63a0) >> (uVar9 & 0x3f) & 1) != 0) &&
((*(ulong *)(this + 0x63c0) & 1L << ((byte)uVar9 & 0x3f)) == 0)) {
TickChannel(this,(int)uVar9);
uVar4 = *(ushort *)(pSVar8 + -0x16) >> 7 & 0xfe;
uVar5 = 0x100 - uVar4;
if (0x7e < uVar5) {
uVar5 = 0x7f;
}
if (0x7e < uVar4) {
uVar4 = 0x7f;
}
iVar2 = (*(ushort *)(pSVar8 + -0x16) & 0x7f) *
((int)((int)(((ulong)*(ushort *)(pSVar8 + -0xe) & 0x7f) << 9) *
((int)(short)((short)((ulong)*(ushort *)(pSVar8 + -8) * (ulong)*(uint *)pSVar8
>> 0x13) +
(short)((ulong)(0x80000 - *(uint *)pSVar8) *
(ulong)*(ushort *)(pSVar8 + -10) >> 0x13)) ^ 0x7f8000U)) >>
0x10);
iVar7 = iVar7 + ((int)(uVar5 * iVar2) >> 0xe);
iVar10 = iVar10 + ((int)(iVar2 * uVar4) >> 0xe);
}
uVar9 = uVar9 + 1;
pSVar8 = pSVar8 + 0x38;
} while (uVar9 != 0x10);
bVar3 = 4 - ((byte)this[0x6404] >> 6);
uVar6 = (ushort)((iVar7 >> (bVar3 & 0x1f)) * (uint)(byte)this[0x63fc] >> 7) ^ 0x8000;
*(ushort *)(this + 0x63f8) = uVar6;
*(ushort *)(this + 0x63fa) =
(ushort)((iVar10 >> (bVar3 & 0x1f)) * (uint)(byte)this[0x63fc] >> 7) ^ 0x8000;
lVar1 = *(long *)(this + 0x6000);
*(long *)(this + 0x6000) = lVar1 + 1;
*(ushort *)(this + lVar1 * 2) = uVar6;
*(long *)(this + 0x6000) = lVar1 + 2;
*(int2 *)(this + lVar1 * 2 + 2) = *(int2 *)(this + 0x63fa);
if (lVar1 + 2 == 0x3001) {
*(int8 *)(this + 0x6000) = 0;
}
return;
}
|
|
2,480 | free_block | eloqsql/mysys/mf_keycache.c | static void free_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block)
{
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block",
("block %u to be freed, hash_link %p status: %u",
BLOCK_NUMBER(block), block->hash_link,
block->status));
/*
Assert that the block is not free already. And that it is in a clean
state. Note that the block might just be assigned to a hash_link and
not yet read (BLOCK_READ may not be set here). In this case a reader
is registered in the hash_link and free_block() will wait for it
below.
*/
DBUG_ASSERT((block->status & BLOCK_IN_USE) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_REASSIGNED | BLOCK_IN_FLUSH |
BLOCK_CHANGED | BLOCK_FOR_UPDATE)));
/* Assert that the block is in a file_blocks chain. */
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
/* Assert that the block is not in the LRU ring. */
DBUG_ASSERT(!block->next_used && !block->prev_used);
/*
IMHO the below condition (if()) makes no sense. I can't see how it
could be possible that free_block() is entered with a NULL hash_link
pointer. The only place where it can become NULL is in free_block()
(or before its first use ever, but for those blocks free_block() is
not called). I don't remove the conditional as it cannot harm, but
place an DBUG_ASSERT to confirm my hypothesis. Eventually the
condition (if()) can be removed.
*/
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
if (block->hash_link)
{
/*
While waiting for readers to finish, new readers might request the
block. But since we set block->status|= BLOCK_REASSIGNED, they
will wait on block->wqueue[COND_FOR_SAVED]. They must be signalled
later.
*/
block->status|= BLOCK_REASSIGNED;
wait_for_readers(keycache, block);
/*
The block must not have been freed by another thread. Repeat some
checks. An additional requirement is that it must be read now
(BLOCK_READ).
*/
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT((block->status & (BLOCK_READ | BLOCK_IN_USE |
BLOCK_REASSIGNED)) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_IN_FLUSH | BLOCK_CHANGED |
BLOCK_FOR_UPDATE)));
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->prev_used);
/*
Unset BLOCK_REASSIGNED again. If we hand the block to an evicting
thread (through unreg_request() below), other threads must not see
this flag. They could become confused.
*/
block->status&= ~BLOCK_REASSIGNED;
/*
Do not release the hash_link until the block is off all lists.
At least not if we hand it over for eviction in unreg_request().
*/
}
/*
Unregister the block request and link the block into the LRU ring.
This enables eviction for the block. If the LRU ring was empty and
threads are waiting for a block, then the block wil be handed over
for eviction immediately. Otherwise we will unlink it from the LRU
ring again, without releasing the lock in between. So decrementing
the request counter and updating statistics are the only relevant
operation in this case. Assert that there are no other requests
registered.
*/
DBUG_ASSERT(block->requests == 1);
unreg_request(keycache, block, 0);
/*
Note that even without releasing the cache lock it is possible that
the block is immediately selected for eviction by link_block() and
thus not added to the LRU ring. In this case we must not touch the
block any more.
*/
if (block->status & BLOCK_IN_EVICTION)
return;
/* Error blocks are not put into the LRU ring. */
if (!(block->status & BLOCK_ERROR))
{
/* Here the block must be in the LRU ring. Unlink it again. */
DBUG_ASSERT(block->next_used && block->prev_used &&
*block->prev_used == block);
unlink_block(keycache, block);
}
if (block->temperature == BLOCK_WARM)
keycache->warm_blocks--;
block->temperature= BLOCK_COLD;
/* Remove from file_blocks hash. */
unlink_changed(block);
/* Remove reference to block from hash table. */
unlink_hash(keycache, block->hash_link);
block->hash_link= NULL;
block->status= 0;
block->length= 0;
block->offset= keycache->key_cache_block_size;
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block", ("block is freed"));
/* Enforced by unlink_changed(), but just to be sure. */
DBUG_ASSERT(!block->next_changed && !block->prev_changed);
/* Enforced by unlink_block(): not in LRU ring nor in free_block_list. */
DBUG_ASSERT(!block->next_used && !block->prev_used);
/* Insert the free block in the free list. */
block->next_used= keycache->free_block_list;
keycache->free_block_list= block;
/* Keep track of the number of currently unused blocks. */
keycache->blocks_unused++;
/* All pending requests for this page must be resubmitted. */
release_whole_queue(&block->wqueue[COND_FOR_SAVED]);
} | O0 | c | free_block:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x75bd2
jmp 0x75bd4
jmp 0x75bd6
jmp 0x75bd8
jmp 0x75bda
jmp 0x75bdc
jmp 0x75bde
jmp 0x75be0
jmp 0x75be2
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x75c22
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x8, %ecx
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x76cc0
jmp 0x75c09
jmp 0x75c0b
jmp 0x75c0d
jmp 0x75c0f
jmp 0x75c11
jmp 0x75c13
jmp 0x75c15
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
andl $-0x9, %ecx
movl %ecx, 0x50(%rax)
jmp 0x75c24
jmp 0x75c26
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x75a30
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x75c4b
jmp 0x75d26
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x75c6b
jmp 0x75c5c
jmp 0x75c5e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x76ef0
movq -0x10(%rbp), %rax
cmpl $0x1, 0x54(%rax)
jne 0x75c85
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x54(%rax)
movq -0x10(%rbp), %rdi
callq 0x76d60
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x768c0
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x48(%rax)
jmp 0x75cdc
jmp 0x75cde
jmp 0x75ce0
jmp 0x75ce2
jmp 0x75ce4
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
addq $0x8, %rdi
callq 0x76c30
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| free_block:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_75BD2:
jmp short $+2
loc_75BD4:
jmp short $+2
loc_75BD6:
jmp short $+2
loc_75BD8:
jmp short $+2
loc_75BDA:
jmp short $+2
loc_75BDC:
jmp short $+2
loc_75BDE:
jmp short $+2
loc_75BE0:
jmp short $+2
loc_75BE2:
mov rax, [rbp+var_10]
cmp qword ptr [rax+20h], 0
jz short loc_75C22
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
or ecx, 8
mov [rax+50h], ecx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call wait_for_readers
jmp short $+2
loc_75C09:
jmp short $+2
loc_75C0B:
jmp short $+2
loc_75C0D:
jmp short $+2
loc_75C0F:
jmp short $+2
loc_75C11:
jmp short $+2
loc_75C13:
jmp short $+2
loc_75C15:
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
and ecx, 0FFFFFFF7h
mov [rax+50h], ecx
loc_75C22:
jmp short $+2
loc_75C24:
jmp short $+2
loc_75C26:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
xor edx, edx
call unreg_request
mov rax, [rbp+var_10]
mov eax, [rax+50h]
and eax, 80h
cmp eax, 0
jz short loc_75C4B
jmp loc_75D26
loc_75C4B:
mov rax, [rbp+var_10]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz short loc_75C6B
jmp short $+2
loc_75C5C:
jmp short $+2
loc_75C5E:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call unlink_block
loc_75C6B:
mov rax, [rbp+var_10]
cmp dword ptr [rax+54h], 1
jnz short loc_75C85
mov rax, [rbp+var_8]
mov rcx, [rax+68h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+68h], rcx
loc_75C85:
mov rax, [rbp+var_10]
mov dword ptr [rax+54h], 0
mov rdi, [rbp+var_10]
call unlink_changed
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
call unlink_hash
mov rax, [rbp+var_10]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+4Ch], 0
mov rax, [rbp+var_8]
mov ecx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+48h], ecx
jmp short $+2
loc_75CDC:
jmp short $+2
loc_75CDE:
jmp short $+2
loc_75CE0:
jmp short $+2
loc_75CE2:
jmp short $+2
loc_75CE4:
mov rax, [rbp+var_8]
mov rcx, [rax+98h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+98h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+58h]
add rcx, 1
mov [rax+58h], rcx
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
add rdi, 8
call release_whole_queue
loc_75D26:
add rsp, 10h
pop rbp
retn
| long long free_block(long long a1, long long a2)
{
long long result; // rax
if ( *(_QWORD *)(a2 + 32) )
{
*(_DWORD *)(a2 + 80) |= 8u;
wait_for_readers(a1, a2);
*(_DWORD *)(a2 + 80) &= ~8u;
}
unreg_request((_QWORD *)a1, a2, 0);
result = *(_DWORD *)(a2 + 80) & 0x80;
if ( !(_DWORD)result )
{
if ( (*(_DWORD *)(a2 + 80) & 1) == 0 )
unlink_block(a1, a2);
if ( *(_DWORD *)(a2 + 84) == 1 )
--*(_QWORD *)(a1 + 104);
*(_DWORD *)(a2 + 84) = 0;
unlink_changed(a2);
unlink_hash(a1, *(_QWORD *)(a2 + 32));
*(_QWORD *)(a2 + 32) = 0LL;
*(_DWORD *)(a2 + 80) = 0;
*(_DWORD *)(a2 + 76) = 0;
*(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 24);
*(_QWORD *)a2 = *(_QWORD *)(a1 + 152);
*(_QWORD *)(a1 + 152) = a2;
++*(_QWORD *)(a1 + 88);
return release_whole_queue(a2 + 48);
}
return result;
}
| free_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00175bd2
LAB_00175bd2:
JMP 0x00175bd4
LAB_00175bd4:
JMP 0x00175bd6
LAB_00175bd6:
JMP 0x00175bd8
LAB_00175bd8:
JMP 0x00175bda
LAB_00175bda:
JMP 0x00175bdc
LAB_00175bdc:
JMP 0x00175bde
LAB_00175bde:
JMP 0x00175be0
LAB_00175be0:
JMP 0x00175be2
LAB_00175be2:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00175c22
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x8
MOV dword ptr [RAX + 0x50],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00176cc0
JMP 0x00175c09
LAB_00175c09:
JMP 0x00175c0b
LAB_00175c0b:
JMP 0x00175c0d
LAB_00175c0d:
JMP 0x00175c0f
LAB_00175c0f:
JMP 0x00175c11
LAB_00175c11:
JMP 0x00175c13
LAB_00175c13:
JMP 0x00175c15
LAB_00175c15:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
AND ECX,0xfffffff7
MOV dword ptr [RAX + 0x50],ECX
LAB_00175c22:
JMP 0x00175c24
LAB_00175c24:
JMP 0x00175c26
LAB_00175c26:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
XOR EDX,EDX
CALL 0x00175a30
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00175c4b
JMP 0x00175d26
LAB_00175c4b:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x00175c6b
JMP 0x00175c5c
LAB_00175c5c:
JMP 0x00175c5e
LAB_00175c5e:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00176ef0
LAB_00175c6b:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x54],0x1
JNZ 0x00175c85
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x68]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x68],RCX
LAB_00175c85:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x54],0x0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00176d60
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
CALL 0x001768c0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x48],ECX
JMP 0x00175cdc
LAB_00175cdc:
JMP 0x00175cde
LAB_00175cde:
JMP 0x00175ce0
LAB_00175ce0:
JMP 0x00175ce2
LAB_00175ce2:
JMP 0x00175ce4
LAB_00175ce4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x98]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x58]
ADD RCX,0x1
MOV qword ptr [RAX + 0x58],RCX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
ADD RDI,0x8
CALL 0x00176c30
LAB_00175d26:
ADD RSP,0x10
POP RBP
RET
|
void free_block(long param_1,int8 *param_2)
{
if (param_2[4] != 0) {
*(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) | 8;
wait_for_readers(param_1,param_2);
*(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) & 0xfffffff7;
}
unreg_request(param_1,param_2,0);
if ((*(uint *)(param_2 + 10) & 0x80) == 0) {
if ((*(uint *)(param_2 + 10) & 1) == 0) {
unlink_block(param_1,param_2);
}
if (*(int *)((long)param_2 + 0x54) == 1) {
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1;
}
*(int4 *)((long)param_2 + 0x54) = 0;
unlink_changed(param_2);
unlink_hash(param_1,param_2[4]);
param_2[4] = 0;
*(int4 *)(param_2 + 10) = 0;
*(int4 *)((long)param_2 + 0x4c) = 0;
*(int4 *)(param_2 + 9) = *(int4 *)(param_1 + 0x18);
*param_2 = *(int8 *)(param_1 + 0x98);
*(int8 **)(param_1 + 0x98) = param_2;
*(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1;
release_whole_queue(param_2 + 6);
}
return;
}
|
|
2,481 | func_gb2312_uni_onechar | eloqsql/strings/ctype-gb2312.c | static int func_gb2312_uni_onechar(int code){
if ((code>=0x2121)&&(code<=0x2658))
return(tab_gb2312_uni0[code-0x2121]);
if ((code>=0x2721)&&(code<=0x296F))
return(tab_gb2312_uni1[code-0x2721]);
if ((code>=0x3021)&&(code<=0x777E))
return(tab_gb2312_uni2[code-0x3021]);
return(0);
} | O0 | c | func_gb2312_uni_onechar:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x2121, -0x8(%rbp) # imm = 0x2121
jl 0x8dde4
cmpl $0x2658, -0x8(%rbp) # imm = 0x2658
jg 0x8dde4
movl -0x8(%rbp), %eax
subl $0x2121, %eax # imm = 0x2121
movslq %eax, %rcx
leaq 0xca885(%rip), %rax # 0x158660
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x8de45
cmpl $0x2721, -0x8(%rbp) # imm = 0x2721
jl 0x8de11
cmpl $0x296f, -0x8(%rbp) # imm = 0x296F
jg 0x8de11
movl -0x8(%rbp), %eax
subl $0x2721, %eax # imm = 0x2721
movslq %eax, %rcx
leaq 0xcb2c8(%rip), %rax # 0x1590d0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x8de45
cmpl $0x3021, -0x8(%rbp) # imm = 0x3021
jl 0x8de3e
cmpl $0x777e, -0x8(%rbp) # imm = 0x777E
jg 0x8de3e
movl -0x8(%rbp), %eax
subl $0x3021, %eax # imm = 0x3021
movslq %eax, %rcx
leaq 0xcb73b(%rip), %rax # 0x159570
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x8de45
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| func_gb2312_uni_onechar:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 2121h
jl short loc_8DDE4
cmp [rbp+var_8], 2658h
jg short loc_8DDE4
mov eax, [rbp+var_8]
sub eax, 2121h
movsxd rcx, eax
lea rax, tab_gb2312_uni0
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_8DE45
loc_8DDE4:
cmp [rbp+var_8], 2721h
jl short loc_8DE11
cmp [rbp+var_8], 296Fh
jg short loc_8DE11
mov eax, [rbp+var_8]
sub eax, 2721h
movsxd rcx, eax
lea rax, tab_gb2312_uni1
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_8DE45
loc_8DE11:
cmp [rbp+var_8], 3021h
jl short loc_8DE3E
cmp [rbp+var_8], 777Eh
jg short loc_8DE3E
mov eax, [rbp+var_8]
sub eax, 3021h
movsxd rcx, eax
lea rax, tab_gb2312_uni2
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_8DE45
loc_8DE3E:
mov [rbp+var_4], 0
loc_8DE45:
mov eax, [rbp+var_4]
pop rbp
retn
| long long func_gb2312_uni_onechar(int a1)
{
if ( a1 < 8481 || a1 > 9816 )
{
if ( a1 < 10017 || a1 > 10607 )
{
if ( a1 < 12321 || a1 > 30590 )
return 0;
else
return tab_gb2312_uni2[a1 - 12321];
}
else
{
return tab_gb2312_uni1[a1 - 10017];
}
}
else
{
return tab_gb2312_uni0[a1 - 8481];
}
}
| func_gb2312_uni_onechar:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0x2121
JL 0x0018dde4
CMP dword ptr [RBP + -0x8],0x2658
JG 0x0018dde4
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2121
MOVSXD RCX,EAX
LEA RAX,[0x258660]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018de45
LAB_0018dde4:
CMP dword ptr [RBP + -0x8],0x2721
JL 0x0018de11
CMP dword ptr [RBP + -0x8],0x296f
JG 0x0018de11
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2721
MOVSXD RCX,EAX
LEA RAX,[0x2590d0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018de45
LAB_0018de11:
CMP dword ptr [RBP + -0x8],0x3021
JL 0x0018de3e
CMP dword ptr [RBP + -0x8],0x777e
JG 0x0018de3e
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3021
MOVSXD RCX,EAX
LEA RAX,[0x259570]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018de45
LAB_0018de3e:
MOV dword ptr [RBP + -0x4],0x0
LAB_0018de45:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int2 func_gb2312_uni_onechar(int param_1)
{
int2 uVar1;
if ((param_1 < 0x2121) || (0x2658 < param_1)) {
if ((param_1 < 0x2721) || (0x296f < param_1)) {
if ((param_1 < 0x3021) || (0x777e < param_1)) {
uVar1 = 0;
}
else {
uVar1 = *(int2 *)(tab_gb2312_uni2 + (long)(param_1 + -0x3021) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_gb2312_uni1 + (long)(param_1 + -0x2721) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_gb2312_uni0 + (long)(param_1 + -0x2121) * 2);
}
return uVar1;
}
|
|
2,482 | inline_mysql_file_close | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_close(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_close(file, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_close(file, flags);
return result;
} | O3 | c | inline_mysql_file_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %r15d
leaq 0x33e2b6(%rip), %rax # 0x3880c0
movq (%rax), %rax
leaq -0x60(%rbp), %rdi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x49e37
movl %r14d, %edi
movq %rbx, %rsi
callq 0xa1461
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
movl %r15d, %esi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x2c377
jmp 0x49e2c
| inline_mysql_file_close_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 48h
mov rbx, rdx
mov r14d, esi
mov r15d, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_60]
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_49E37
mov edi, r14d
mov rsi, rbx
call my_close
loc_49E2C:
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_49E37:
mov rdi, rax
mov esi, r15d
mov edx, r14d
mov rcx, rbx
call inline_mysql_file_close_cold_1_0
jmp short loc_49E2C
| long long inline_mysql_file_close_0(unsigned int a1, long long a2, long long a3)
{
long long v4; // rax
_BYTE v6[96]; // [rsp+0h] [rbp-60h] BYREF
v4 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v6, a2, 4LL);
if ( v4 )
return inline_mysql_file_close_cold_1_0(v4, a1, a2, a3);
else
return my_close((unsigned int)a2, a3);
}
| inline_mysql_file_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R14D,ESI
MOV R15D,EDI
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x60]
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00149e37
MOV EDI,R14D
MOV RSI,RBX
CALL 0x001a1461
LAB_00149e2c:
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00149e37:
MOV RDI,RAX
MOV ESI,R15D
MOV EDX,R14D
MOV RCX,RBX
CALL 0x0012c377
JMP 0x00149e2c
|
void inline_mysql_file_close(int4 param_1,ulong param_2,int8 param_3)
{
long lVar1;
int1 local_68 [72];
lVar1 = (**(code **)(PSI_server + 0x158))(local_68,param_2,4);
if (lVar1 == 0) {
my_close(param_2 & 0xffffffff,param_3);
}
else {
inline_mysql_file_close_cold_1(lVar1,param_1,param_2 & 0xffffffff,param_3);
}
return;
}
|
|
2,483 | ma_state_info_write | eloqsql/storage/maria/ma_open.c | uint _ma_state_info_write(MARIA_SHARE *share, uint pWrite)
{
uint res;
if (share->options & HA_OPTION_READ_ONLY_DATA)
return 0;
if (pWrite & MA_STATE_INFO_WRITE_LOCK)
mysql_mutex_lock(&share->intern_lock);
else if (maria_multi_threaded && !share->temporary)
mysql_mutex_assert_owner(&share->intern_lock);
if (share->base.born_transactional && translog_status == TRANSLOG_OK &&
!maria_in_recovery)
{
/*
In a recovery, we want to set is_of_horizon to the LSN of the last
record executed by Recovery, not the current EOF of the log (which
is too new). Recovery does it by itself.
*/
share->state.is_of_horizon= translog_get_horizon();
DBUG_PRINT("info", ("is_of_horizon set to LSN " LSN_FMT "",
LSN_IN_PARTS(share->state.is_of_horizon)));
}
res= _ma_state_info_write_sub(share->kfile.file, &share->state, pWrite);
if (pWrite & MA_STATE_INFO_WRITE_LOCK)
mysql_mutex_unlock(&share->intern_lock);
/* If open_count != 0 we have to write the state again at close */
share->changed= share->state.open_count != 0;
return res;
} | O3 | c | ma_state_info_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
testb $0x1, 0x722(%rdi)
jne 0x54f98
movl %esi, %r14d
movq %rdi, %rbx
testb $0x4, %r14b
je 0x54f26
leaq 0x8f0(%rbx), %rdi
cmpq $0x0, 0x930(%rbx)
jne 0x54fa6
callq 0x29220
cmpb $0x0, 0x44c(%rbx)
je 0x54f55
leaq 0x3a867a(%rip), %rax # 0x3fd5b0
cmpl $0x1, (%rax)
jne 0x54f55
leaq 0x3a8640(%rip), %rax # 0x3fd582
cmpb $0x0, (%rax)
jne 0x54f55
xorl %eax, %eax
callq 0x4bf54
movq %rax, 0x180(%rbx)
movl 0x760(%rbx), %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x54fce
movl %eax, %r15d
testb $0x4, %r14b
je 0x54f8a
leaq 0x8f0(%rbx), %r14
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x54fbc
movq %r14, %rdi
callq 0x291e0
cmpl $0x0, 0x16c(%rbx)
setne 0x7de(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x85acc(%rip), %rsi # 0xdaa79
movl $0x5e3, %edx # imm = 0x5E3
callq 0x2eb8f
jmp 0x54f26
leaq 0x33104d(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x54f82
| _ma_state_info_write:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
xor r15d, r15d
test byte ptr [rdi+722h], 1
jnz loc_54F98
mov r14d, esi
mov rbx, rdi
test r14b, 4
jz short loc_54F26
lea rdi, [rbx+8F0h]
cmp qword ptr [rbx+930h], 0
jnz loc_54FA6
call _pthread_mutex_lock
loc_54F26:
cmp byte ptr [rbx+44Ch], 0
jz short loc_54F55
lea rax, translog_status
cmp dword ptr [rax], 1
jnz short loc_54F55
lea rax, maria_in_recovery
cmp byte ptr [rax], 0
jnz short loc_54F55
xor eax, eax
call translog_get_horizon
mov [rbx+180h], rax
loc_54F55:
mov edi, [rbx+760h]
mov rsi, rbx
mov edx, r14d
call _ma_state_info_write_sub
mov r15d, eax
test r14b, 4
jz short loc_54F8A
lea r14, [rbx+8F0h]
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_54FBC
loc_54F82:
mov rdi, r14
call _pthread_mutex_unlock
loc_54F8A:
cmp dword ptr [rbx+16Ch], 0
setnz byte ptr [rbx+7DEh]
loc_54F98:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_54FA6:
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5E3h
call psi_mutex_lock
jmp loc_54F26
loc_54FBC:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_54F82
| long long ma_state_info_write(long long a1, unsigned int a2)
{
unsigned int v2; // r15d
long long v4; // rdi
long long v5; // rdi
v2 = 0;
if ( (*(_BYTE *)(a1 + 1826) & 1) == 0 )
{
if ( (a2 & 4) != 0 )
{
v4 = a1 + 2288;
if ( *(_QWORD *)(a1 + 2352) )
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x5E3u);
else
pthread_mutex_lock(v4);
}
if ( *(_BYTE *)(a1 + 1100) && translog_status == 1 && !maria_in_recovery )
*(_QWORD *)(a1 + 384) = translog_get_horizon();
v2 = ma_state_info_write_sub(*(unsigned int *)(a1 + 1888), a1, a2);
if ( (a2 & 4) != 0 )
{
v5 = *(_QWORD *)(a1 + 2352);
if ( v5 )
((void ( *)(long long))PSI_server[44])(v5);
pthread_mutex_unlock(a1 + 2288);
}
*(_BYTE *)(a1 + 2014) = *(_DWORD *)(a1 + 364) != 0;
}
return v2;
}
| _ma_state_info_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
XOR R15D,R15D
TEST byte ptr [RDI + 0x722],0x1
JNZ 0x00154f98
MOV R14D,ESI
MOV RBX,RDI
TEST R14B,0x4
JZ 0x00154f26
LEA RDI,[RBX + 0x8f0]
CMP qword ptr [RBX + 0x930],0x0
JNZ 0x00154fa6
CALL 0x00129220
LAB_00154f26:
CMP byte ptr [RBX + 0x44c],0x0
JZ 0x00154f55
LEA RAX,[0x4fd5b0]
CMP dword ptr [RAX],0x1
JNZ 0x00154f55
LEA RAX,[0x4fd582]
CMP byte ptr [RAX],0x0
JNZ 0x00154f55
XOR EAX,EAX
CALL 0x0014bf54
MOV qword ptr [RBX + 0x180],RAX
LAB_00154f55:
MOV EDI,dword ptr [RBX + 0x760]
MOV RSI,RBX
MOV EDX,R14D
CALL 0x00154fce
MOV R15D,EAX
TEST R14B,0x4
JZ 0x00154f8a
LEA R14,[RBX + 0x8f0]
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x00154fbc
LAB_00154f82:
MOV RDI,R14
CALL 0x001291e0
LAB_00154f8a:
CMP dword ptr [RBX + 0x16c],0x0
SETNZ byte ptr [RBX + 0x7de]
LAB_00154f98:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00154fa6:
LEA RSI,[0x1daa79]
MOV EDX,0x5e3
CALL 0x0012eb8f
JMP 0x00154f26
LAB_00154fbc:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00154f82
|
int4 _ma_state_info_write(long param_1,uint param_2)
{
int4 uVar1;
int8 uVar2;
uVar1 = 0;
if ((*(byte *)(param_1 + 0x722) & 1) == 0) {
if ((param_2 & 4) != 0) {
if (*(long *)(param_1 + 0x930) == 0) {
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0));
}
else {
psi_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x5e3);
}
}
if (((*(char *)(param_1 + 0x44c) != '\0') && (translog_status == 1)) &&
(maria_in_recovery == '\0')) {
uVar2 = translog_get_horizon();
*(int8 *)(param_1 + 0x180) = uVar2;
}
uVar1 = _ma_state_info_write_sub(*(int4 *)(param_1 + 0x760),param_1,param_2);
if ((param_2 & 4) != 0) {
if (*(long *)(param_1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x8f0));
}
*(bool *)(param_1 + 0x7de) = *(int *)(param_1 + 0x16c) != 0;
}
return uVar1;
}
|
|
2,484 | create_tailoring | eloqsql/strings/ctype-uca.c | static my_bool
create_tailoring(struct charset_info_st *cs,
MY_CHARSET_LOADER *loader)
{
MY_COLL_RULES rules;
MY_UCA_INFO new_uca, *src_uca= NULL;
int rc= 0;
uint i;
*loader->error= '\0';
if (!cs->tailoring)
return 0; /* Ok to add a collation without tailoring */
memset(&rules, 0, sizeof(rules));
rules.loader= loader;
rules.uca= cs->uca ? cs->uca : &my_uca_v400; /* For logical positions, etc */
memset(&new_uca, 0, sizeof(new_uca));
/* Parse ICU Collation Customization expression */
if ((rc= my_coll_rule_parse(&rules,
cs->tailoring,
cs->tailoring + strlen(cs->tailoring))))
goto ex;
if (rules.version == 520) /* Unicode-5.2.0 requested */
{
src_uca= &my_uca_v520;
cs->caseinfo= &my_unicase_unicode520;
}
else if (rules.version == 400) /* Unicode-4.0.0 requested */
{
src_uca= &my_uca_v400;
cs->caseinfo= &my_unicase_default;
}
else /* No Unicode version specified */
{
src_uca= cs->uca ? cs->uca : &my_uca_v400;
if (!cs->caseinfo)
cs->caseinfo= &my_unicase_default;
}
cs->levels_for_order= rules.strength ? rules.strength : 1;
for (i= 0; i != cs->levels_for_order; i++)
{
if ((rc= (src_uca->level[i].maxchar == 0)))
{
my_snprintf(loader->error, sizeof(loader->error) - 1,
"%s: no level #%d data for this Unicode version.",
cs->coll_name.str, i + 1);
goto ex;
}
if ((rc= init_weight_level(loader, &rules,
&new_uca.level[i], &src_uca->level[i])))
goto ex;
}
if (!(cs->uca= (MY_UCA_INFO *) (loader->once_alloc)(sizeof(MY_UCA_INFO))))
{
rc= 1;
goto ex;
}
cs->uca[0]= new_uca;
if (cs->levels_for_order > 1)
cs->coll= (cs->state & MY_CS_NOPAD) ?
&my_uca_collation_handler_nopad_multilevel_generic :
&my_uca_collation_handler_multilevel_generic;
ex:
(loader->free)(rules.rule);
if (rc != 0 && loader->error[0])
loader->reporter(ERROR_LEVEL, "%s", loader->error);
return rc;
} | O0 | c | create_tailoring:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x128(%rbp)
movl $0x0, -0x12c(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x4e403
movb $0x0, -0x1(%rbp)
jmp 0x4e740
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x24190
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x4e437
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x138(%rbp)
jmp 0x4e447
leaq 0x26aa02(%rip), %rax # 0x2b8e40
movq %rax, -0x138(%rbp)
jmp 0x4e447
movq -0x138(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0xd0, %edx
callq 0x24190
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x148(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x24130
movq -0x148(%rbp), %rdx
movq -0x140(%rbp), %rsi
addq %rax, %rdx
leaq -0x50(%rbp), %rdi
callq 0x4e750
movl %eax, -0x12c(%rbp)
cmpl $0x0, %eax
je 0x4e4ba
jmp 0x4e6f5
cmpl $0x208, -0x50(%rbp) # imm = 0x208
jne 0x4e4e5
leaq 0x26fade(%rip), %rax # 0x2bdfa8
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rax
leaq 0x17e864(%rip), %rcx # 0x1ccd40
movq %rcx, 0x78(%rax)
jmp 0x4e565
cmpl $0x190, -0x50(%rbp) # imm = 0x190
jne 0x4e50d
leaq 0x26a94b(%rip), %rax # 0x2b8e40
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rax
leaq 0x17e809(%rip), %rcx # 0x1ccd10
movq %rcx, 0x78(%rax)
jmp 0x4e563
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x4e529
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x150(%rbp)
jmp 0x4e539
leaq 0x26a910(%rip), %rax # 0x2b8e40
movq %rax, -0x150(%rbp)
jmp 0x4e539
movq -0x150(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x4e561
movq -0x10(%rbp), %rax
leaq 0x17e7b3(%rip), %rcx # 0x1ccd10
movq %rcx, 0x78(%rax)
jmp 0x4e563
jmp 0x4e565
cmpl $0x0, -0x4c(%rbp)
je 0x4e576
movl -0x4c(%rbp), %eax
movl %eax, -0x154(%rbp)
jmp 0x4e583
movl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x4e583
movl -0x154(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0xb2(%rax)
movl $0x0, -0x130(%rbp)
movl -0x130(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0xb2(%rcx), %ecx
cmpl %ecx, %eax
je 0x4e674
movq -0x128(%rbp), %rax
movl -0x130(%rbp), %ecx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
sete %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x12c(%rbp)
testb $0x1, %al
jne 0x4e5e7
jmp 0x4e616
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movl -0x130(%rbp), %r8d
addl $0x1, %r8d
movl $0x7f, %esi
leaq 0x2d587(%rip), %rdx # 0x7bb91
movb $0x0, %al
callq 0x769c0
jmp 0x4e6f5
movq -0x18(%rbp), %rdi
leaq -0x120(%rbp), %rdx
movl -0x130(%rbp), %eax
imulq $0x38, %rax, %rax
addq %rax, %rdx
movq -0x128(%rbp), %rcx
movl -0x130(%rbp), %eax
imulq $0x38, %rax, %rax
addq %rax, %rcx
leaq -0x50(%rbp), %rsi
callq 0x4e830
movsbl %al, %eax
movl %eax, -0x12c(%rbp)
cmpl $0x0, %eax
je 0x4e65e
jmp 0x4e6f5
jmp 0x4e660
movl -0x130(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x130(%rbp)
jmp 0x4e59f
movq -0x18(%rbp), %rax
movl $0xd0, %edi
callq *0x80(%rax)
movq -0x10(%rbp), %rcx
movq %rax, 0x60(%rcx)
cmpq $0x0, %rax
jne 0x4e69d
movl $0x1, -0x12c(%rbp)
jmp 0x4e6f5
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
leaq -0x120(%rbp), %rsi
movl $0xd0, %edx
callq 0x24230
movq -0x10(%rbp), %rax
movzbl 0xb2(%rax), %eax
cmpl $0x1, %eax
jle 0x4e6f3
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x17bbb6(%rip), %rcx # 0x1ca290
leaq 0x17bc1f(%rip), %rax # 0x1ca300
cmpl $0x0, %edx
cmovneq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc0(%rax)
jmp 0x4e6f5
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rax
movq -0x30(%rbp), %rdi
callq *%rax
cmpl $0x0, -0x12c(%rbp)
je 0x4e737
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4e737
movq -0x18(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x18(%rbp), %rdx
xorl %edi, %edi
leaq 0x2da1c(%rip), %rsi # 0x7c14f
movb $0x0, %al
callq *%rcx
movl -0x12c(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
nopl (%rax)
| create_tailoring:
push rbp
mov rbp, rsp
sub rsp, 160h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_128], 0
mov [rbp+var_12C], 0
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jnz short loc_4E403
mov [rbp+var_1], 0
jmp loc_4E740
loc_4E403:
lea rdi, [rbp+var_50]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+60h], 0
jz short loc_4E437
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov [rbp+var_138], rax
jmp short loc_4E447
loc_4E437:
lea rax, my_uca_v400
mov [rbp+var_138], rax
jmp short $+2
loc_4E447:
mov rax, [rbp+var_138]
mov [rbp+var_48], rax
lea rdi, [rbp+var_120]
xor esi, esi
mov edx, 0D0h
call _memset
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_140], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_148], rax
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call _strlen
mov rdx, [rbp+var_148]
mov rsi, [rbp+var_140]
add rdx, rax
lea rdi, [rbp+var_50]
call my_coll_rule_parse
mov [rbp+var_12C], eax
cmp eax, 0
jz short loc_4E4BA
jmp loc_4E6F5
loc_4E4BA:
cmp [rbp+var_50], 208h
jnz short loc_4E4E5
lea rax, my_uca_v520
mov [rbp+var_128], rax
mov rax, [rbp+var_10]
lea rcx, my_unicase_unicode520
mov [rax+78h], rcx
jmp loc_4E565
loc_4E4E5:
cmp [rbp+var_50], 190h
jnz short loc_4E50D
lea rax, my_uca_v400
mov [rbp+var_128], rax
mov rax, [rbp+var_10]
lea rcx, my_unicase_default
mov [rax+78h], rcx
jmp short loc_4E563
loc_4E50D:
mov rax, [rbp+var_10]
cmp qword ptr [rax+60h], 0
jz short loc_4E529
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov [rbp+var_150], rax
jmp short loc_4E539
loc_4E529:
lea rax, my_uca_v400
mov [rbp+var_150], rax
jmp short $+2
loc_4E539:
mov rax, [rbp+var_150]
mov [rbp+var_128], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+78h], 0
jnz short loc_4E561
mov rax, [rbp+var_10]
lea rcx, my_unicase_default
mov [rax+78h], rcx
loc_4E561:
jmp short $+2
loc_4E563:
jmp short $+2
loc_4E565:
cmp [rbp+var_4C], 0
jz short loc_4E576
mov eax, [rbp+var_4C]
mov [rbp+var_154], eax
jmp short loc_4E583
loc_4E576:
mov eax, 1
mov [rbp+var_154], eax
jmp short $+2
loc_4E583:
mov eax, [rbp+var_154]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+0B2h], cl
mov [rbp+var_130], 0
loc_4E59F:
mov eax, [rbp+var_130]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+0B2h]
cmp eax, ecx
jz loc_4E674
mov rax, [rbp+var_128]
mov ecx, [rbp+var_130]
imul rcx, 38h ; '8'
add rax, rcx
cmp qword ptr [rax], 0
setz al
mov cl, al
and cl, 1
movzx ecx, cl
mov [rbp+var_12C], ecx
test al, 1
jnz short loc_4E5E7
jmp short loc_4E616
loc_4E5E7:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov r8d, [rbp+var_130]
add r8d, 1
mov esi, 7Fh
lea rdx, aSNoLevelDDataF; "%s: no level #%d data for this Unicode "...
mov al, 0
call my_snprintf
jmp loc_4E6F5
loc_4E616:
mov rdi, [rbp+var_18]
lea rdx, [rbp+var_120]
mov eax, [rbp+var_130]
imul rax, 38h ; '8'
add rdx, rax
mov rcx, [rbp+var_128]
mov eax, [rbp+var_130]
imul rax, 38h ; '8'
add rcx, rax
lea rsi, [rbp+var_50]
call init_weight_level
movsx eax, al
mov [rbp+var_12C], eax
cmp eax, 0
jz short loc_4E65E
jmp loc_4E6F5
loc_4E65E:
jmp short $+2
loc_4E660:
mov eax, [rbp+var_130]
add eax, 1
mov [rbp+var_130], eax
jmp loc_4E59F
loc_4E674:
mov rax, [rbp+var_18]
mov edi, 0D0h
call qword ptr [rax+80h]
mov rcx, [rbp+var_10]
mov [rcx+60h], rax
cmp rax, 0
jnz short loc_4E69D
mov [rbp+var_12C], 1
jmp short loc_4E6F5
loc_4E69D:
mov rax, [rbp+var_10]
mov rdi, [rax+60h]
lea rsi, [rbp+var_120]
mov edx, 0D0h
call _memcpy
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+0B2h]
cmp eax, 1
jle short loc_4E6F3
mov rax, [rbp+var_10]
mov edx, [rax+0Ch]
and edx, 20000h
lea rcx, my_uca_collation_handler_multilevel_generic
lea rax, my_uca_collation_handler_nopad_multilevel_generic
cmp edx, 0
cmovnz rcx, rax
mov rax, [rbp+var_10]
mov [rax+0C0h], rcx
loc_4E6F3:
jmp short $+2
loc_4E6F5:
mov rax, [rbp+var_18]
mov rax, [rax+98h]
mov rdi, [rbp+var_30]
call rax
cmp [rbp+var_12C], 0
jz short loc_4E737
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_4E737
mov rax, [rbp+var_18]
mov rcx, [rax+0A0h]
mov rdx, [rbp+var_18]
xor edi, edi
lea rsi, aAtLineDPosDS+13h; "%s"
mov al, 0
call rcx
loc_4E737:
mov eax, [rbp+var_12C]
mov [rbp+var_1], al
loc_4E740:
mov al, [rbp+var_1]
add rsp, 160h
pop rbp
retn
| char create_tailoring(long long a1, const char *a2)
{
long long v2; // rax
int v3; // r9d
char inited; // al
long long v5; // rax
long long ( **v6)(); // rcx
char v8; // [rsp+Ch] [rbp-154h]
_UNKNOWN **v9; // [rsp+10h] [rbp-150h]
long long v10; // [rsp+20h] [rbp-140h]
void *v11; // [rsp+28h] [rbp-138h]
unsigned int i; // [rsp+30h] [rbp-130h]
int v13; // [rsp+34h] [rbp-12Ch]
_UNKNOWN **v14; // [rsp+38h] [rbp-128h]
_QWORD v15[26]; // [rsp+40h] [rbp-120h] BYREF
int v16; // [rsp+110h] [rbp-50h] BYREF
int v17; // [rsp+114h] [rbp-4Ch]
void *v18; // [rsp+118h] [rbp-48h]
long long v19; // [rsp+130h] [rbp-30h]
const char *v20; // [rsp+138h] [rbp-28h]
const char *v21; // [rsp+148h] [rbp-18h]
long long v22; // [rsp+150h] [rbp-10h]
v22 = a1;
v21 = a2;
*a2 = 0;
if ( !*(_QWORD *)(v22 + 56) )
return 0;
memset(&v16, 0LL, 56LL);
v20 = v21;
if ( *(_QWORD *)(v22 + 96) )
v11 = *(void **)(v22 + 96);
else
v11 = &my_uca_v400;
v18 = v11;
memset(v15, 0LL, sizeof(v15));
v10 = *(_QWORD *)(v22 + 56);
v2 = strlen(v10);
v13 = my_coll_rule_parse(&v16, v10, v2 + v10);
if ( !v13 )
{
if ( v16 == 520 )
{
v14 = &my_uca_v520;
*(_QWORD *)(v22 + 120) = &my_unicase_unicode520;
}
else if ( v16 == 400 )
{
v14 = (_UNKNOWN **)&my_uca_v400;
*(_QWORD *)(v22 + 120) = &my_unicase_default;
}
else
{
if ( *(_QWORD *)(v22 + 96) )
v9 = *(_UNKNOWN ***)(v22 + 96);
else
v9 = (_UNKNOWN **)&my_uca_v400;
v14 = v9;
if ( !*(_QWORD *)(v22 + 120) )
*(_QWORD *)(v22 + 120) = &my_unicase_default;
}
if ( v17 )
v8 = v17;
else
v8 = 1;
*(_BYTE *)(v22 + 178) = v8;
for ( i = 0; i != *(unsigned __int8 *)(v22 + 178); ++i )
{
v13 = v14[7 * i] == 0LL;
if ( !v14[7 * i] )
{
my_snprintf(
(_DWORD)v21,
127,
(unsigned int)"%s: no level #%d data for this Unicode version.",
*(_QWORD *)(v22 + 32),
i + 1,
v3);
goto LABEL_31;
}
inited = init_weight_level(v21, &v16, &v15[7 * i], &v14[7 * i]);
v13 = inited;
if ( inited )
goto LABEL_31;
}
v5 = (*((long long ( **)(long long))v21 + 16))(208LL);
*(_QWORD *)(v22 + 96) = v5;
if ( v5 )
{
memcpy(*(_QWORD *)(v22 + 96), v15, 208LL);
if ( *(unsigned __int8 *)(v22 + 178) > 1u )
{
v6 = my_uca_collation_handler_multilevel_generic;
if ( (*(_DWORD *)(v22 + 12) & 0x20000) != 0 )
v6 = my_uca_collation_handler_nopad_multilevel_generic;
*(_QWORD *)(v22 + 192) = v6;
}
}
else
{
v13 = 1;
}
}
LABEL_31:
(*((void ( **)(long long))v21 + 19))(v19);
if ( v13 && *v21 )
(*((void (**)(_QWORD, const char *, ...))v21 + 20))(0LL, "%s", v21);
return v13;
}
| create_tailoring:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x128],0x0
MOV dword ptr [RBP + -0x12c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x0014e403
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014e740
LAB_0014e403:
LEA RDI,[RBP + -0x50]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00124190
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0014e437
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x138],RAX
JMP 0x0014e447
LAB_0014e437:
LEA RAX,[0x3b8e40]
MOV qword ptr [RBP + -0x138],RAX
JMP 0x0014e447
LAB_0014e447:
MOV RAX,qword ptr [RBP + -0x138]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x120]
XOR ESI,ESI
MOV EDX,0xd0
CALL 0x00124190
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x140],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00124130
MOV RDX,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RBP + -0x140]
ADD RDX,RAX
LEA RDI,[RBP + -0x50]
CALL 0x0014e750
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x0
JZ 0x0014e4ba
JMP 0x0014e6f5
LAB_0014e4ba:
CMP dword ptr [RBP + -0x50],0x208
JNZ 0x0014e4e5
LEA RAX,[0x3bdfa8]
MOV qword ptr [RBP + -0x128],RAX
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2ccd40]
MOV qword ptr [RAX + 0x78],RCX
JMP 0x0014e565
LAB_0014e4e5:
CMP dword ptr [RBP + -0x50],0x190
JNZ 0x0014e50d
LEA RAX,[0x3b8e40]
MOV qword ptr [RBP + -0x128],RAX
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2ccd10]
MOV qword ptr [RAX + 0x78],RCX
JMP 0x0014e563
LAB_0014e50d:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0014e529
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x150],RAX
JMP 0x0014e539
LAB_0014e529:
LEA RAX,[0x3b8e40]
MOV qword ptr [RBP + -0x150],RAX
JMP 0x0014e539
LAB_0014e539:
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x128],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x78],0x0
JNZ 0x0014e561
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2ccd10]
MOV qword ptr [RAX + 0x78],RCX
LAB_0014e561:
JMP 0x0014e563
LAB_0014e563:
JMP 0x0014e565
LAB_0014e565:
CMP dword ptr [RBP + -0x4c],0x0
JZ 0x0014e576
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x154],EAX
JMP 0x0014e583
LAB_0014e576:
MOV EAX,0x1
MOV dword ptr [RBP + -0x154],EAX
JMP 0x0014e583
LAB_0014e583:
MOV EAX,dword ptr [RBP + -0x154]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xb2],CL
MOV dword ptr [RBP + -0x130],0x0
LAB_0014e59f:
MOV EAX,dword ptr [RBP + -0x130]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0xb2]
CMP EAX,ECX
JZ 0x0014e674
MOV RAX,qword ptr [RBP + -0x128]
MOV ECX,dword ptr [RBP + -0x130]
IMUL RCX,RCX,0x38
ADD RAX,RCX
CMP qword ptr [RAX],0x0
SETZ AL
MOV CL,AL
AND CL,0x1
MOVZX ECX,CL
MOV dword ptr [RBP + -0x12c],ECX
TEST AL,0x1
JNZ 0x0014e5e7
JMP 0x0014e616
LAB_0014e5e7:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
MOV R8D,dword ptr [RBP + -0x130]
ADD R8D,0x1
MOV ESI,0x7f
LEA RDX,[0x17bb91]
MOV AL,0x0
CALL 0x001769c0
JMP 0x0014e6f5
LAB_0014e616:
MOV RDI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x120]
MOV EAX,dword ptr [RBP + -0x130]
IMUL RAX,RAX,0x38
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x128]
MOV EAX,dword ptr [RBP + -0x130]
IMUL RAX,RAX,0x38
ADD RCX,RAX
LEA RSI,[RBP + -0x50]
CALL 0x0014e830
MOVSX EAX,AL
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x0
JZ 0x0014e65e
JMP 0x0014e6f5
LAB_0014e65e:
JMP 0x0014e660
LAB_0014e660:
MOV EAX,dword ptr [RBP + -0x130]
ADD EAX,0x1
MOV dword ptr [RBP + -0x130],EAX
JMP 0x0014e59f
LAB_0014e674:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,0xd0
CALL qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x60],RAX
CMP RAX,0x0
JNZ 0x0014e69d
MOV dword ptr [RBP + -0x12c],0x1
JMP 0x0014e6f5
LAB_0014e69d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[RBP + -0x120]
MOV EDX,0xd0
CALL 0x00124230
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0xb2]
CMP EAX,0x1
JLE 0x0014e6f3
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xc]
AND EDX,0x20000
LEA RCX,[0x2ca290]
LEA RAX,[0x2ca300]
CMP EDX,0x0
CMOVNZ RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc0],RCX
LAB_0014e6f3:
JMP 0x0014e6f5
LAB_0014e6f5:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x98]
MOV RDI,qword ptr [RBP + -0x30]
CALL RAX
CMP dword ptr [RBP + -0x12c],0x0
JZ 0x0014e737
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0014e737
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0xa0]
MOV RDX,qword ptr [RBP + -0x18]
XOR EDI,EDI
LEA RSI,[0x17c14f]
MOV AL,0x0
CALL RCX
LAB_0014e737:
MOV EAX,dword ptr [RBP + -0x12c]
MOV byte ptr [RBP + -0x1],AL
LAB_0014e740:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x160
POP RBP
RET
|
int1 create_tailoring(long param_1,char *param_2)
{
int8 uVar1;
char cVar2;
size_t sVar3;
long lVar4;
int1 *puVar5;
int1 local_15c;
int1 *local_158;
int1 *local_140;
uint local_138;
uint local_134;
int1 *local_130;
int1 local_128 [208];
int local_58;
int local_54;
int1 *local_50;
int8 local_38;
char *local_30;
char *local_20;
long local_18;
int1 local_9;
*param_2 = '\0';
if (*(long *)(param_1 + 0x38) == 0) {
local_9 = 0;
}
else {
local_20 = param_2;
local_18 = param_1;
memset(&local_58,0,0x38);
local_30 = local_20;
if (*(long *)(local_18 + 0x60) == 0) {
local_140 = my_uca_v400;
}
else {
local_140 = *(int1 **)(local_18 + 0x60);
}
local_50 = local_140;
memset(local_128,0,0xd0);
uVar1 = *(int8 *)(local_18 + 0x38);
lVar4 = *(long *)(local_18 + 0x38);
sVar3 = strlen(*(char **)(local_18 + 0x38));
local_134 = my_coll_rule_parse(&local_58,uVar1,lVar4 + sVar3);
if (local_134 == 0) {
if (local_58 == 0x208) {
local_130 = my_uca_v520;
*(int1 **)(local_18 + 0x78) = my_unicase_unicode520;
}
else if (local_58 == 400) {
local_130 = my_uca_v400;
*(int1 **)(local_18 + 0x78) = my_unicase_default;
}
else {
if (*(long *)(local_18 + 0x60) == 0) {
local_158 = my_uca_v400;
}
else {
local_158 = *(int1 **)(local_18 + 0x60);
}
local_130 = local_158;
if (*(long *)(local_18 + 0x78) == 0) {
*(int1 **)(local_18 + 0x78) = my_unicase_default;
}
}
if (local_54 == 0) {
local_15c = 1;
}
else {
local_15c = (int1)local_54;
}
*(int1 *)(local_18 + 0xb2) = local_15c;
for (local_138 = 0; local_138 != *(byte *)(local_18 + 0xb2); local_138 = local_138 + 1) {
local_134 = (uint)(*(long *)(local_130 + (ulong)local_138 * 0x38) == 0);
if (*(long *)(local_130 + (ulong)local_138 * 0x38) == 0) {
my_snprintf(local_20,0x7f,"%s: no level #%d data for this Unicode version.",
*(int8 *)(local_18 + 0x20),local_138 + 1);
goto LAB_0014e6f5;
}
cVar2 = init_weight_level(local_20,&local_58,local_128 + (ulong)local_138 * 0x38,
local_130 + (ulong)local_138 * 0x38);
local_134 = (uint)cVar2;
if (local_134 != 0) goto LAB_0014e6f5;
}
lVar4 = (**(code **)(local_20 + 0x80))(0xd0);
*(long *)(local_18 + 0x60) = lVar4;
if (lVar4 == 0) {
local_134 = 1;
}
else {
memcpy(*(void **)(local_18 + 0x60),local_128,0xd0);
if (1 < *(byte *)(local_18 + 0xb2)) {
puVar5 = my_uca_collation_handler_multilevel_generic;
if ((*(uint *)(local_18 + 0xc) & 0x20000) != 0) {
puVar5 = my_uca_collation_handler_nopad_multilevel_generic;
}
*(int1 **)(local_18 + 0xc0) = puVar5;
}
}
}
LAB_0014e6f5:
(**(code **)(local_20 + 0x98))(local_38);
if ((local_134 != 0) && (*local_20 != '\0')) {
(**(code **)(local_20 + 0xa0))(0,"%s",local_20);
}
local_9 = (int1)local_134;
}
return local_9;
}
|
|
2,485 | ma_apply_redo_bitmap_new_page | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info,
LSN lsn __attribute__ ((unused)),
const uchar *header)
{
MARIA_SHARE *share= info->s;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
my_bool error;
pgcache_page_no_t from, to, min_from;
DBUG_ENTER("_ma_apply_redo_bitmap_new_page");
from= page_korr(header);
to= page_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to));
if ((from > to) ||
(from % bitmap->pages_covered) != 0 ||
(to % bitmap->pages_covered) != 0)
{
error= TRUE; /* corrupted log record */
goto err;
}
min_from= (share->state.state.data_file_length / bitmap->block_size - 1) /
bitmap->pages_covered + 1;
min_from*= bitmap->pages_covered;
if (from < min_from)
{
DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from));
/*
We have to overwrite. It could be that there was a bitmap page in
memory, covering a data page which went to disk, then crash: the
bitmap page is now full of zeros and is ==min_from, we have to overwrite
it with correct checksum.
*/
}
share->state.changed|= STATE_CHANGED;
bzero(info->buff, bitmap->block_size);
if (!(error=
_ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to,
info->buff)))
share->state.state.data_file_length= (to + 1) * bitmap->block_size;
err:
DBUG_RETURN(error);
} | O0 | c | ma_apply_redo_bitmap_new_page:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x43fe0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
addq $0x5, %rdi
callq 0x43fe0
movq %rax, -0x40(%rbp)
jmp 0x4449d
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x444d5
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
jne 0x444d5
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
je 0x444de
movb $0x1, -0x29(%rbp)
jmp 0x445aa
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x134(%rcx), %ecx
xorl %edx, %edx
divq %rcx
subq $0x1, %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x138(%rax), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x44532
jmp 0x4452e
jmp 0x44530
jmp 0x44532
movq -0x20(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x170(%rax)
movq -0x8(%rbp), %rax
movq 0x378(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x378(%rax), %r8
callq 0x445c0
movb %al, -0x29(%rbp)
cmpb $0x0, %al
jne 0x445a8
movq -0x40(%rbp), %rcx
addq $0x1, %rcx
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
imulq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x445aa
jmp 0x445ac
movb -0x29(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_apply_redo_bitmap_new_page:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 0A10h
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
call uint5korr
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
add rdi, 5
call uint5korr
mov [rbp+var_40], rax
jmp short $+2
loc_4449D:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
ja short loc_444D5
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jnz short loc_444D5
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jz short loc_444DE
loc_444D5:
mov [rbp+var_29], 1
jmp loc_445AA
loc_444DE:
mov rax, [rbp+var_20]
mov rax, [rax+40h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+134h]
xor edx, edx
div rcx
sub rax, 1
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rax, [rax+138h]
imul rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jnb short loc_44532
jmp short $+2
loc_4452E:
jmp short $+2
loc_44530:
jmp short $+2
loc_44532:
mov rax, [rbp+var_20]
mov ecx, [rax+170h]
or ecx, 1
mov [rax+170h], ecx
mov rax, [rbp+var_8]
mov rdi, [rax+378h]
mov rax, [rbp+var_28]
mov eax, [rax+134h]
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_40]
mov rax, [rbp+var_8]
mov r8, [rax+378h]
call _ma_bitmap_create_missing_into_pagecache
mov [rbp+var_29], al
cmp al, 0
jnz short loc_445A8
mov rcx, [rbp+var_40]
add rcx, 1
mov rax, [rbp+var_28]
mov eax, [rax+134h]
imul rcx, rax
mov rax, [rbp+var_20]
mov [rax+40h], rcx
loc_445A8:
jmp short $+2
loc_445AA:
jmp short $+2
loc_445AC:
mov al, [rbp+var_29]
mov [rbp+var_49], al
mov al, [rbp+var_49]
add rsp, 50h
pop rbp
retn
| char ma_apply_redo_bitmap_new_page(long long *a1, long long a2, unsigned int *a3)
{
unsigned long long v4; // [rsp+10h] [rbp-40h]
unsigned long long v5; // [rsp+18h] [rbp-38h]
char missing_into_pagecache; // [rsp+27h] [rbp-29h]
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
v8 = *a1;
v7 = *a1 + 2576;
v5 = uint5korr(a3);
v4 = uint5korr((unsigned int *)((char *)a3 + 5));
if ( v5 > v4 || v5 % *(_QWORD *)(v7 + 312) || v4 % *(_QWORD *)(v7 + 312) )
return 1;
*(_DWORD *)(v8 + 368) |= 1u;
memset(a1[111], 0LL, *(unsigned int *)(v7 + 308));
missing_into_pagecache = ma_bitmap_create_missing_into_pagecache(v8, v7, v5, v4, a1[111]);
if ( !missing_into_pagecache )
*(_QWORD *)(v8 + 64) = *(unsigned int *)(v7 + 308) * (v4 + 1);
return missing_into_pagecache;
}
| _ma_apply_redo_bitmap_new_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fe0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x5
CALL 0x00143fe0
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0014449d
LAB_0014449d:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001444d5
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JNZ 0x001444d5
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JZ 0x001444de
LAB_001444d5:
MOV byte ptr [RBP + -0x29],0x1
JMP 0x001445aa
LAB_001444de:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x134]
XOR EDX,EDX
DIV RCX
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x138]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x00144532
JMP 0x0014452e
LAB_0014452e:
JMP 0x00144530
LAB_00144530:
JMP 0x00144532
LAB_00144532:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1
MOV dword ptr [RAX + 0x170],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RAX + 0x378]
CALL 0x001445c0
MOV byte ptr [RBP + -0x29],AL
CMP AL,0x0
JNZ 0x001445a8
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x40],RCX
LAB_001445a8:
JMP 0x001445aa
LAB_001445aa:
JMP 0x001445ac
LAB_001445ac:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x49],AL
MOV AL,byte ptr [RBP + -0x49]
ADD RSP,0x50
POP RBP
RET
|
char _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,long param_3)
{
long lVar1;
ulong uVar2;
ulong uVar3;
char local_31;
lVar1 = *param_1;
uVar2 = uint5korr(param_3);
uVar3 = uint5korr(param_3 + 5);
if (((uVar3 < uVar2) || (uVar2 % *(ulong *)(lVar1 + 0xb48) != 0)) ||
(uVar3 % *(ulong *)(lVar1 + 0xb48) != 0)) {
local_31 = '\x01';
}
else {
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 1;
memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44));
local_31 = _ma_bitmap_create_missing_into_pagecache
(lVar1,lVar1 + 0xa10,uVar2,uVar3,param_1[0x6f]);
if (local_31 == '\0') {
*(ulong *)(lVar1 + 0x40) = (uVar3 + 1) * (ulong)*(uint *)(lVar1 + 0xb44);
}
}
return local_31;
}
|
|
2,486 | ma_apply_redo_bitmap_new_page | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info,
LSN lsn __attribute__ ((unused)),
const uchar *header)
{
MARIA_SHARE *share= info->s;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
my_bool error;
pgcache_page_no_t from, to, min_from;
DBUG_ENTER("_ma_apply_redo_bitmap_new_page");
from= page_korr(header);
to= page_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to));
if ((from > to) ||
(from % bitmap->pages_covered) != 0 ||
(to % bitmap->pages_covered) != 0)
{
error= TRUE; /* corrupted log record */
goto err;
}
min_from= (share->state.state.data_file_length / bitmap->block_size - 1) /
bitmap->pages_covered + 1;
min_from*= bitmap->pages_covered;
if (from < min_from)
{
DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from));
/*
We have to overwrite. It could be that there was a bitmap page in
memory, covering a data page which went to disk, then crash: the
bitmap page is now full of zeros and is ==min_from, we have to overwrite
it with correct checksum.
*/
}
share->state.changed|= STATE_CHANGED;
bzero(info->buff, bitmap->block_size);
if (!(error=
_ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to,
info->buff)))
share->state.state.data_file_length= (to + 1) * bitmap->block_size;
err:
DBUG_RETURN(error);
} | O3 | c | ma_apply_redo_bitmap_new_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdx), %eax
movl 0x5(%rdx), %ecx
movzbl 0x4(%rdx), %r12d
shlq $0x20, %r12
orq %rax, %r12
movzbl 0x9(%rdx), %r14d
shlq $0x20, %r14
orq %rcx, %r14
movb $0x1, %bl
cmpq %r14, %r12
ja 0x41f0d
movq %rdi, %r13
movq (%rdi), %r15
movq 0xb48(%r15), %rcx
movq %r12, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x41f0d
movq %r14, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x41f0d
orb $0x1, 0x170(%r15)
leaq 0xa10(%r15), %rax
movq %rax, -0x30(%rbp)
movq 0x378(%r13), %rdi
movl 0xb44(%r15), %edx
xorl %esi, %esi
callq 0x292c0
movq 0x378(%r13), %r8
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x41f1e
testb %al, %al
jne 0x41f0d
incq %r14
movl 0xb44(%r15), %eax
imulq %r14, %rax
movq %rax, 0x40(%r15)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_apply_redo_bitmap_new_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov eax, [rdx]
mov ecx, [rdx+5]
movzx r12d, byte ptr [rdx+4]
shl r12, 20h
or r12, rax
movzx r14d, byte ptr [rdx+9]
shl r14, 20h
or r14, rcx
mov bl, 1
cmp r12, r14
ja loc_41F0D
mov r13, rdi
mov r15, [rdi]
mov rcx, [r15+0B48h]
mov rax, r12
xor edx, edx
div rcx
test rdx, rdx
jnz short loc_41F0D
mov rax, r14
xor edx, edx
div rcx
test rdx, rdx
jnz short loc_41F0D
or byte ptr [r15+170h], 1
lea rax, [r15+0A10h]
mov [rbp+var_30], rax
mov rdi, [r13+378h]
mov edx, [r15+0B44h]
xor esi, esi
call _memset
mov r8, [r13+378h]
mov rdi, r15
mov rsi, [rbp+var_30]
mov rdx, r12
mov rcx, r14
call _ma_bitmap_create_missing_into_pagecache
test al, al
jnz short loc_41F0D
inc r14
mov eax, [r15+0B44h]
imul rax, r14
mov [r15+40h], rax
xor ebx, ebx
loc_41F0D:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_apply_redo_bitmap_new_page(_QWORD *a1, long long a2, unsigned int *a3)
{
unsigned int v3; // ebx
unsigned long long v4; // r12
unsigned long long v5; // r14
long long v6; // r15
unsigned long long v7; // rcx
v4 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32);
v5 = *(unsigned int *)((char *)a3 + 5) | ((unsigned long long)*((unsigned __int8 *)a3 + 9) << 32);
LOBYTE(v3) = 1;
if ( v4 <= v5 )
{
v6 = *a1;
v7 = *(_QWORD *)(*a1 + 2888LL);
if ( !(v4 % v7) && !(v5 % v7) )
{
*(_BYTE *)(v6 + 368) |= 1u;
memset(a1[111], 0LL, *(unsigned int *)(v6 + 2884));
if ( !(unsigned __int8)ma_bitmap_create_missing_into_pagecache(v6, v6 + 2576, v4, v5, a1[111]) )
{
*(_QWORD *)(v6 + 64) = (v5 + 1) * *(unsigned int *)(v6 + 2884);
return 0;
}
}
}
return v3;
}
| _ma_apply_redo_bitmap_new_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RDX + 0x5]
MOVZX R12D,byte ptr [RDX + 0x4]
SHL R12,0x20
OR R12,RAX
MOVZX R14D,byte ptr [RDX + 0x9]
SHL R14,0x20
OR R14,RCX
MOV BL,0x1
CMP R12,R14
JA 0x00141f0d
MOV R13,RDI
MOV R15,qword ptr [RDI]
MOV RCX,qword ptr [R15 + 0xb48]
MOV RAX,R12
XOR EDX,EDX
DIV RCX
TEST RDX,RDX
JNZ 0x00141f0d
MOV RAX,R14
XOR EDX,EDX
DIV RCX
TEST RDX,RDX
JNZ 0x00141f0d
OR byte ptr [R15 + 0x170],0x1
LEA RAX,[R15 + 0xa10]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [R13 + 0x378]
MOV EDX,dword ptr [R15 + 0xb44]
XOR ESI,ESI
CALL 0x001292c0
MOV R8,qword ptr [R13 + 0x378]
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R12
MOV RCX,R14
CALL 0x00141f1e
TEST AL,AL
JNZ 0x00141f0d
INC R14
MOV EAX,dword ptr [R15 + 0xb44]
IMUL RAX,R14
MOV qword ptr [R15 + 0x40],RAX
XOR EBX,EBX
LAB_00141f0d:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,uint5 *param_3)
{
long lVar1;
char cVar2;
int8 unaff_RBX;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uVar4 = (ulong)*param_3;
uVar5 = (ulong)*(uint5 *)((long)param_3 + 5);
uVar3 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (uVar4 <= uVar5) {
lVar1 = *param_1;
if ((uVar4 % *(ulong *)(lVar1 + 0xb48) == 0) && (uVar5 % *(ulong *)(lVar1 + 0xb48) == 0)) {
*(byte *)(lVar1 + 0x170) = *(byte *)(lVar1 + 0x170) | 1;
memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44));
cVar2 = _ma_bitmap_create_missing_into_pagecache
(lVar1,lVar1 + 0xa10,uVar4,uVar5,param_1[0x6f]);
if (cVar2 == '\0') {
*(ulong *)(lVar1 + 0x40) = (ulong)*(uint *)(lVar1 + 0xb44) * (uVar5 + 1);
uVar3 = 0;
}
}
}
return uVar3 & 0xffffffff;
}
|
|
2,487 | engine_add_statemachine | qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/engine.c | int32_t
engine_add_statemachine (const STATEMACHINE_T *statemachine)
{
int i ;
int32_t res = ENGINE_FAIL ;
if (statemachine->magic != STATEMACHINE_MAGIC) {
ENGINE_LOG(0, ENGINE_LOG_TYPE_ERROR,
"[err] engine_statemachine '%s' invalid magic!",
statemachine->name) ;
} else {
for (i=0; i<ENGINE_MAX_INSTANCES; i++) {
if (_engine_instance[i].statemachine == 0) {
memset (&_engine_instance[i], 0, sizeof (_engine_instance[i])) ;
_engine_instance[i].statemachine = statemachine ;
_engine_instance[i].idx = i ;
ENGINE_LOG(0, ENGINE_LOG_TYPE_INIT,
"[ini] engine_statemachine '%s' loaded", statemachine->name) ;
res = ENGINE_OK ;
break ;
} else if (strncmp((char*)_engine_instance[i].statemachine->name,
(char*)statemachine->name, 16) == 0) {
ENGINE_LOG(0, ENGINE_LOG_TYPE_ERROR,
"[err] engine_statemachine failed %s already added!",
statemachine->name) ;
break ;
}
}
if (res != ENGINE_OK) {
ENGINE_LOG(0, ENGINE_LOG_TYPE_ERROR,
"[err] engine_statemachine failed '%s', too many state machines!",
statemachine->name) ;
}
}
return res ;
} | O0 | c | engine_add_statemachine:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpl $0x1304, %eax # imm = 0x1304
je 0x13855
movzwl 0x38b4f(%rip), %eax # 0x4c378
andl $0x2, %eax
cmpl $0x0, %eax
je 0x13850
movq -0x8(%rbp), %rcx
addq $0xc, %rcx
xorl %eax, %eax
movl %eax, %edi
movl $0x2, %esi
leaq 0x20d58(%rip), %rdx # 0x345a1
movb $0x0, %al
callq 0x12f10
jmp 0x139c5
movl $0x0, -0xc(%rbp)
cmpl $0x14, -0xc(%rbp)
jge 0x1398d
movslq -0xc(%rbp), %rcx
leaq 0x39edf(%rip), %rax # 0x4d750
imulq $0xd8, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x13917
movslq -0xc(%rbp), %rax
leaq 0x39ebf(%rip), %rdi # 0x4d750
imulq $0xd8, %rax, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0xd8, %edx
callq 0x6270
movq -0x8(%rbp), %rcx
movslq -0xc(%rbp), %rdx
leaq 0x39e9a(%rip), %rax # 0x4d750
imulq $0xd8, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x39e7e(%rip), %rax # 0x4d750
imulq $0xd8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movzwl 0x38a93(%rip), %eax # 0x4c378
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
je 0x1390e
movq -0x8(%rbp), %rcx
addq $0xc, %rcx
xorl %eax, %eax
movl %eax, %edi
movl $0x100, %esi # imm = 0x100
leaq 0x20cc8(%rip), %rdx # 0x345cf
movb $0x0, %al
callq 0x12f10
movl $0x0, -0x10(%rbp)
jmp 0x1398d
movslq -0xc(%rbp), %rcx
leaq 0x39e2e(%rip), %rax # 0x4d750
imulq $0xd8, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
addq $0xc, %rdi
movq -0x8(%rbp), %rsi
addq $0xc, %rsi
movl $0x10, %edx
callq 0x60a0
cmpl $0x0, %eax
jne 0x1397b
movzwl 0x38a26(%rip), %eax # 0x4c378
andl $0x2, %eax
cmpl $0x0, %eax
je 0x13979
movq -0x8(%rbp), %rcx
addq $0xc, %rcx
xorl %eax, %eax
movl %eax, %edi
movl $0x2, %esi
leaq 0x20c83(%rip), %rdx # 0x345f5
movb $0x0, %al
callq 0x12f10
jmp 0x1398d
jmp 0x1397d
jmp 0x1397f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1385c
cmpl $0x0, -0x10(%rbp)
je 0x139c3
movzwl 0x389de(%rip), %eax # 0x4c378
andl $0x2, %eax
cmpl $0x0, %eax
je 0x139c1
movq -0x8(%rbp), %rcx
addq $0xc, %rcx
xorl %eax, %eax
movl %eax, %edi
movl $0x2, %esi
leaq 0x20c6e(%rip), %rdx # 0x34628
movb $0x0, %al
callq 0x12f10
jmp 0x139c3
jmp 0x139c5
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
| engine_add_statemachine:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], 0FFFFFFFFh
mov rax, [rbp+var_8]
movzx eax, word ptr [rax+2]
cmp eax, 1304h
jz short loc_13855
movzx eax, cs:_engine_log_filter
and eax, 2
cmp eax, 0
jz short loc_13850
mov rcx, [rbp+var_8]
add rcx, 0Ch
xor eax, eax
mov edi, eax
mov esi, 2
lea rdx, aErrEngineState; "[err] engine_statemachine '%s' invalid "...
mov al, 0
call engine_log
loc_13850:
jmp loc_139C5
loc_13855:
mov [rbp+var_C], 0
loc_1385C:
cmp [rbp+var_C], 14h
jge loc_1398D
movsxd rcx, [rbp+var_C]
lea rax, _engine_instance
imul rcx, 0D8h
add rax, rcx
cmp qword ptr [rax+8], 0
jnz loc_13917
movsxd rax, [rbp+var_C]
lea rdi, _engine_instance
imul rax, 0D8h
add rdi, rax
xor esi, esi
mov edx, 0D8h
call _memset
mov rcx, [rbp+var_8]
movsxd rdx, [rbp+var_C]
lea rax, _engine_instance
imul rdx, 0D8h
add rax, rdx
mov [rax+8], rcx
mov ecx, [rbp+var_C]
movsxd rdx, [rbp+var_C]
lea rax, _engine_instance
imul rdx, 0D8h
add rax, rdx
mov [rax], ecx
movzx eax, cs:_engine_log_filter
and eax, 100h
cmp eax, 0
jz short loc_1390E
mov rcx, [rbp+var_8]
add rcx, 0Ch
xor eax, eax
mov edi, eax
mov esi, 100h
lea rdx, aIniEngineState; "[ini] engine_statemachine '%s' loaded"
mov al, 0
call engine_log
loc_1390E:
mov [rbp+var_10], 0
jmp short loc_1398D
loc_13917:
movsxd rcx, [rbp+var_C]
lea rax, _engine_instance
imul rcx, 0D8h
add rax, rcx
mov rdi, [rax+8]
add rdi, 0Ch
mov rsi, [rbp+var_8]
add rsi, 0Ch
mov edx, 10h
call _strncmp
cmp eax, 0
jnz short loc_1397B
movzx eax, cs:_engine_log_filter
and eax, 2
cmp eax, 0
jz short loc_13979
mov rcx, [rbp+var_8]
add rcx, 0Ch
xor eax, eax
mov edi, eax
mov esi, 2
lea rdx, aErrEngineState_0; "[err] engine_statemachine failed %s alr"...
mov al, 0
call engine_log
loc_13979:
jmp short loc_1398D
loc_1397B:
jmp short $+2
loc_1397D:
jmp short $+2
loc_1397F:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_1385C
loc_1398D:
cmp [rbp+var_10], 0
jz short loc_139C3
movzx eax, cs:_engine_log_filter
and eax, 2
cmp eax, 0
jz short loc_139C1
mov rcx, [rbp+var_8]
add rcx, 0Ch
xor eax, eax
mov edi, eax
mov esi, 2
lea rdx, aErrEngineState_1; "[err] engine_statemachine failed '%s', "...
mov al, 0
call engine_log
loc_139C1:
jmp short $+2
loc_139C3:
jmp short $+2
loc_139C5:
mov eax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| long long engine_add_statemachine(long long a1)
{
unsigned int v2; // [rsp+0h] [rbp-10h]
int i; // [rsp+4h] [rbp-Ch]
v2 = -1;
if ( *(_WORD *)(a1 + 2) == 4868 )
{
for ( i = 0; i < 20; ++i )
{
if ( !engine_instance[27 * i + 1] )
{
memset(&engine_instance[27 * i], 0LL, 216LL);
engine_instance[27 * i + 1] = a1;
LODWORD(engine_instance[27 * i]) = i;
if ( (engine_log_filter & 0x100) != 0 )
engine_log(0LL, 256, (long long)"[ini] engine_statemachine '%s' loaded", (const char *)(a1 + 12));
v2 = 0;
break;
}
if ( !(unsigned int)strncmp(engine_instance[27 * i + 1] + 12LL, a1 + 12, 16LL) )
{
if ( (engine_log_filter & 2) != 0 )
engine_log(0LL, 2, (long long)"[err] engine_statemachine failed %s already added!", (const char *)(a1 + 12));
break;
}
}
if ( v2 && (engine_log_filter & 2) != 0 )
engine_log(
0LL,
2,
(long long)"[err] engine_statemachine failed '%s', too many state machines!",
(const char *)(a1 + 12));
}
else if ( (engine_log_filter & 2) != 0 )
{
engine_log(0LL, 2, (long long)"[err] engine_statemachine '%s' invalid magic!", (const char *)(a1 + 12));
}
return v2;
}
| engine_add_statemachine:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0x10],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX + 0x2]
CMP EAX,0x1304
JZ 0x00113855
MOVZX EAX,word ptr [0x0014c378]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00113850
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0xc
XOR EAX,EAX
MOV EDI,EAX
MOV ESI,0x2
LEA RDX,[0x1345a1]
MOV AL,0x0
CALL 0x00112f10
LAB_00113850:
JMP 0x001139c5
LAB_00113855:
MOV dword ptr [RBP + -0xc],0x0
LAB_0011385c:
CMP dword ptr [RBP + -0xc],0x14
JGE 0x0011398d
MOVSXD RCX,dword ptr [RBP + -0xc]
LEA RAX,[0x14d750]
IMUL RCX,RCX,0xd8
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00113917
MOVSXD RAX,dword ptr [RBP + -0xc]
LEA RDI,[0x14d750]
IMUL RAX,RAX,0xd8
ADD RDI,RAX
XOR ESI,ESI
MOV EDX,0xd8
CALL 0x00106270
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RBP + -0xc]
LEA RAX,[0x14d750]
IMUL RDX,RDX,0xd8
ADD RAX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOVSXD RDX,dword ptr [RBP + -0xc]
LEA RAX,[0x14d750]
IMUL RDX,RDX,0xd8
ADD RAX,RDX
MOV dword ptr [RAX],ECX
MOVZX EAX,word ptr [0x0014c378]
AND EAX,0x100
CMP EAX,0x0
JZ 0x0011390e
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0xc
XOR EAX,EAX
MOV EDI,EAX
MOV ESI,0x100
LEA RDX,[0x1345cf]
MOV AL,0x0
CALL 0x00112f10
LAB_0011390e:
MOV dword ptr [RBP + -0x10],0x0
JMP 0x0011398d
LAB_00113917:
MOVSXD RCX,dword ptr [RBP + -0xc]
LEA RAX,[0x14d750]
IMUL RCX,RCX,0xd8
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x8]
ADD RDI,0xc
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc
MOV EDX,0x10
CALL 0x001060a0
CMP EAX,0x0
JNZ 0x0011397b
MOVZX EAX,word ptr [0x0014c378]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00113979
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0xc
XOR EAX,EAX
MOV EDI,EAX
MOV ESI,0x2
LEA RDX,[0x1345f5]
MOV AL,0x0
CALL 0x00112f10
LAB_00113979:
JMP 0x0011398d
LAB_0011397b:
JMP 0x0011397d
LAB_0011397d:
JMP 0x0011397f
LAB_0011397f:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0011385c
LAB_0011398d:
CMP dword ptr [RBP + -0x10],0x0
JZ 0x001139c3
MOVZX EAX,word ptr [0x0014c378]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001139c1
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0xc
XOR EAX,EAX
MOV EDI,EAX
MOV ESI,0x2
LEA RDX,[0x134628]
MOV AL,0x0
CALL 0x00112f10
LAB_001139c1:
JMP 0x001139c3
LAB_001139c3:
JMP 0x001139c5
LAB_001139c5:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
int engine_add_statemachine(long param_1)
{
int iVar1;
int local_18;
int local_14;
local_18 = -1;
if (*(short *)(param_1 + 2) == 0x1304) {
for (local_14 = 0; local_14 < 0x14; local_14 = local_14 + 1) {
if (*(long *)(_engine_instance + (long)local_14 * 0xd8 + 8) == 0) {
memset(_engine_instance + (long)local_14 * 0xd8,0,0xd8);
*(long *)(_engine_instance + (long)local_14 * 0xd8 + 8) = param_1;
*(int *)(_engine_instance + (long)local_14 * 0xd8) = local_14;
if ((_engine_log_filter & 0x100) != 0) {
engine_log(0,0x100,s__ini__engine_statemachine___s__l_001345cf,param_1 + 0xc);
}
local_18 = 0;
break;
}
iVar1 = strncmp((char *)(*(long *)(_engine_instance + (long)local_14 * 0xd8 + 8) + 0xc),
(char *)(param_1 + 0xc),0x10);
if (iVar1 == 0) {
if ((_engine_log_filter & 2) != 0) {
engine_log(0,2,s__err__engine_statemachine_failed_001345f5,param_1 + 0xc);
}
break;
}
}
if ((local_18 != 0) && ((_engine_log_filter & 2) != 0)) {
engine_log(0,2,s__err__engine_statemachine_failed_00134628,param_1 + 0xc);
}
}
else if ((_engine_log_filter & 2) != 0) {
engine_log(0,2,s__err__engine_statemachine___s__i_001345a1,param_1 + 0xc);
}
return local_18;
}
|
|
2,488 | bool ImPlot3D::BeginItemEx<ImPlot3D::Getter3DPoints>(char const*, ImPlot3D::Getter3DPoints const&, int, int) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d_items.cpp | bool BeginItemEx(const char* label_id, const _Getter& getter, ImPlot3DItemFlags flags = 0, ImPlot3DCol recolor_from = IMPLOT3D_AUTO) {
if (BeginItem(label_id, flags, recolor_from)) {
ImPlot3DContext& gp = *GImPlot3D;
ImPlot3DPlot& plot = *gp.CurrentPlot;
if (plot.FitThisFrame && !ImHasFlag(flags, ImPlot3DItemFlags_NoFit)) {
for (int i = 0; i < getter.Count; i++)
plot.ExtendFit(getter(i));
}
return true;
}
return false;
} | O1 | cpp | bool ImPlot3D::BeginItemEx<ImPlot3D::Getter3DPoints>(char const*, ImPlot3D::Getter3DPoints const&, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movl %edx, %esi
movl %ecx, %edx
callq 0x56858
movb %al, 0x7(%rsp)
testb %al, %al
je 0x64114
testb $0x2, %r14b
jne 0x64114
leaq 0x2d2e2d(%rip), %rax # 0x336c98
movq (%rax), %rax
movq 0x28(%rax), %r14
cmpb $0x0, 0x1f4(%r14)
je 0x64114
cmpl $0x0, 0x48(%rbx)
jle 0x64114
xorl %r12d, %r12d
leaq 0x232100(%rip), %r15 # 0x295f94
leaq 0x232109(%rip), %rbp # 0x295fa4
xorl %r13d, %r13d
movq (%rbx), %rcx
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x10(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
leaq 0x2320bb(%rip), %r8 # 0x295f84
movslq (%r8,%rdx,4), %rdx
addq %r8, %rdx
jmpq *%rdx
addl %r13d, %eax
cltd
idivl %esi
movslq %edx, %rax
imulq %rdi, %rax
addq %rax, %rcx
movss (%rcx), %xmm0
movq 0x18(%rbx), %rcx
movl 0x20(%rbx), %esi
movl 0x24(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x28(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
addl %r13d, %eax
cltd
idivl %esi
movslq %edx, %rax
leaq (%rcx,%rax,4), %rax
movss (%rax), %xmm0
movq 0x18(%rbx), %rcx
movl 0x20(%rbx), %esi
movl 0x24(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x28(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
addq %r12, %rcx
movss (%rcx), %xmm0
movq 0x18(%rbx), %rcx
movl 0x20(%rbx), %esi
movl 0x24(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x28(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
imulq %r13, %rdi
addq %rdi, %rcx
movss (%rcx), %xmm0
movq 0x18(%rbx), %rcx
movl 0x20(%rbx), %esi
movl 0x24(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x28(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
addl %r13d, %eax
cltd
idivl %esi
movslq %edx, %rax
imulq %rdi, %rax
addq %rcx, %rax
movss (%rax), %xmm1
movq 0x30(%rbx), %rcx
movl 0x38(%rbx), %esi
movl 0x3c(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x40(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%rbp,%rdx,4), %rdx
addq %rbp, %rdx
jmpq *%rdx
addl %r13d, %eax
cltd
idivl %esi
movslq %edx, %rax
leaq (%rcx,%rax,4), %rax
movss (%rax), %xmm1
movq 0x30(%rbx), %rcx
movl 0x38(%rbx), %esi
movl 0x3c(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x40(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%rbp,%rdx,4), %rdx
addq %rbp, %rdx
jmpq *%rdx
addq %r12, %rcx
movss (%rcx), %xmm1
movq 0x30(%rbx), %rcx
movl 0x38(%rbx), %esi
movl 0x3c(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x40(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%rbp,%rdx,4), %rdx
addq %rbp, %rdx
jmpq *%rdx
imulq %r13, %rdi
addq %rcx, %rdi
movss (%rdi), %xmm1
movq 0x30(%rbx), %rcx
movl 0x38(%rbx), %esi
movl 0x3c(%rbx), %eax
xorl %edx, %edx
testq %rax, %rax
sete %dl
movslq 0x40(%rbx), %rdi
xorl %r8d, %r8d
cmpq $0x4, %rdi
sete %r8b
leal (%rdx,%r8,2), %edx
movslq (%rbp,%rdx,4), %rdx
addq %rbp, %rdx
jmpq *%rdx
addl %r13d, %eax
cltd
idivl %esi
movslq %edx, %rax
imulq %rdi, %rax
addq %rax, %rcx
jmp 0x640e1
addl %r13d, %eax
cltd
idivl %esi
movslq %edx, %rax
leaq (%rcx,%rax,4), %rcx
jmp 0x640e1
addq %r12, %rcx
jmp 0x640e1
imulq %r13, %rdi
addq %rdi, %rcx
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss (%rcx), %xmm1
movlps %xmm0, 0x8(%rsp)
movss %xmm1, 0x10(%rsp)
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0x54f18
incq %r13
movslq 0x48(%rbx), %rax
addq $0x4, %r12
cmpq %rax, %r13
jl 0x63e9e
movb 0x7(%rsp), %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN8ImPlot3D11BeginItemExINS_9GetterXYZINS_10IndexerIdxIfEES3_S3_EEEEbPKcRKT_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14d, edx
mov rbx, rsi
mov esi, edx; char *
mov edx, ecx; int
call _ZN8ImPlot3D9BeginItemEPKcii; ImPlot3D::BeginItem(char const*,int,int)
mov [rsp+48h+var_41], al
test al, al
jz loc_64114
test r14b, 2
jnz loc_64114
lea rax, _ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov rax, [rax]
mov r14, [rax+28h]
cmp byte ptr [r14+1F4h], 0
jz loc_64114
cmp dword ptr [rbx+48h], 0
jle loc_64114
xor r12d, r12d
lea r15, jpt_63F12
lea rbp, jpt_64002
xor r13d, r13d
loc_63E9E:
mov rcx, [rbx]
mov esi, [rbx+8]
mov eax, [rbx+0Ch]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+10h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
lea r8, jpt_63ED0
movsxd rdx, ds:(jpt_63ED0 - 295F84h)[r8+rdx*4]; switch 4 cases
add rdx, r8
jmp rdx; switch jump
loc_63ED2:
add eax, r13d; jumptable 0000000000063ED0 case 0
cdq
idiv esi
movsxd rax, edx
imul rax, rdi
add rcx, rax
movss xmm0, dword ptr [rcx]
mov rcx, [rbx+18h]
mov esi, [rbx+20h]
mov eax, [rbx+24h]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+28h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ds:(jpt_63F12 - 295F94h)[r15+rdx*4]; switch 4 cases
add rdx, r15
jmp rdx; switch jump
loc_63F14:
add eax, r13d; jumptable 0000000000063ED0 case 2
cdq
idiv esi
movsxd rax, edx
lea rax, [rcx+rax*4]
movss xmm0, dword ptr [rax]
mov rcx, [rbx+18h]
mov esi, [rbx+20h]
mov eax, [rbx+24h]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+28h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ds:(jpt_63F12 - 295F94h)[r15+rdx*4]; switch 4 cases
add rdx, r15
jmp rdx; switch jump
loc_63F53:
add rcx, r12; jumptable 0000000000063ED0 case 3
movss xmm0, dword ptr [rcx]
mov rcx, [rbx+18h]
mov esi, [rbx+20h]
mov eax, [rbx+24h]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+28h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ds:(jpt_63F12 - 295F94h)[r15+rdx*4]; switch 4 cases
add rdx, r15
jmp rdx; switch jump
loc_63F88:
imul rdi, r13; jumptable 0000000000063ED0 case 1
add rcx, rdi
movss xmm0, dword ptr [rcx]
mov rcx, [rbx+18h]
mov esi, [rbx+20h]
mov eax, [rbx+24h]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+28h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ds:(jpt_63F12 - 295F94h)[r15+rdx*4]; switch 4 cases
add rdx, r15
jmp rdx; switch jump
loc_63FC1:
add eax, r13d; jumptable 0000000000063F12 case 0
cdq
idiv esi
movsxd rax, edx
imul rax, rdi
add rax, rcx
movss xmm1, dword ptr [rax]
mov rcx, [rbx+30h]
mov esi, [rbx+38h]
mov eax, [rbx+3Ch]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+40h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ss:(jpt_64002 - 295FA4h)[rbp+rdx*4]; switch 4 cases
add rdx, rbp
jmp rdx; switch jump
loc_64004:
add eax, r13d; jumptable 0000000000063F12 case 2
cdq
idiv esi
movsxd rax, edx
lea rax, [rcx+rax*4]
movss xmm1, dword ptr [rax]
mov rcx, [rbx+30h]
mov esi, [rbx+38h]
mov eax, [rbx+3Ch]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+40h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ss:(jpt_64002 - 295FA4h)[rbp+rdx*4]; switch 4 cases
add rdx, rbp
jmp rdx; switch jump
loc_64044:
add rcx, r12; jumptable 0000000000063F12 case 3
movss xmm1, dword ptr [rcx]
mov rcx, [rbx+30h]
mov esi, [rbx+38h]
mov eax, [rbx+3Ch]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+40h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ss:(jpt_64002 - 295FA4h)[rbp+rdx*4]; switch 4 cases
add rdx, rbp
jmp rdx; switch jump
loc_6407A:
imul rdi, r13; jumptable 0000000000063F12 case 1
add rdi, rcx
movss xmm1, dword ptr [rdi]
mov rcx, [rbx+30h]
mov esi, [rbx+38h]
mov eax, [rbx+3Ch]
xor edx, edx
test rax, rax
setz dl
movsxd rdi, dword ptr [rbx+40h]
xor r8d, r8d
cmp rdi, 4
setz r8b
lea edx, [rdx+r8*2]
movsxd rdx, ss:(jpt_64002 - 295FA4h)[rbp+rdx*4]; switch 4 cases
add rdx, rbp
jmp rdx; switch jump
loc_640B4:
add eax, r13d; jumptable 0000000000064002 case 0
cdq
idiv esi
movsxd rax, edx
imul rax, rdi
add rcx, rax
jmp short loc_640E1
loc_640C6:
add eax, r13d; jumptable 0000000000064002 case 2
cdq
idiv esi
movsxd rax, edx
lea rcx, [rcx+rax*4]
jmp short loc_640E1
loc_640D5:
add rcx, r12; jumptable 0000000000064002 case 3
jmp short loc_640E1
loc_640DA:
imul rdi, r13; jumptable 0000000000064002 case 1
add rcx, rdi
loc_640E1:
unpcklps xmm0, xmm1
movss xmm1, dword ptr [rcx]
movlps [rsp+48h+var_40], xmm0
movss [rsp+48h+var_38], xmm1
mov rdi, r14; this
lea rsi, [rsp+48h+var_40]; ImPlot3DPoint *
call _ZN12ImPlot3DPlot9ExtendFitERK13ImPlot3DPoint; ImPlot3DPlot::ExtendFit(ImPlot3DPoint const&)
inc r13
movsxd rax, dword ptr [rbx+48h]
add r12, 4
cmp r13, rax
jl loc_63E9E
loc_64114:
mov al, [rsp+48h+var_41]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ImPlot3D::BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<float>,ImPlot3D::IndexerIdx<float>,ImPlot3D::IndexerIdx<float>>>(
ImPlot3D *a1,
long long *a2,
unsigned int a3,
int a4,
__m128 a5,
__m128 a6)
{
char v6; // r14
ImPlot3DPlot *v8; // r14
long long v9; // r12
long long v10; // r13
long long v11; // rcx
int v12; // esi
long long v13; // rax
long long v14; // rdi
__m128 v15; // xmm0
long long v16; // rcx
int v17; // esi
long long v18; // rax
long long v19; // rdi
__m128 v20; // xmm1
long long v21; // rcx
int v22; // esi
long long v23; // rax
long long v24; // rdi
int *v25; // rcx
__m128 v26; // xmm0
int v27; // xmm1_4
char v29; // [rsp+7h] [rbp-41h]
long long v30; // [rsp+8h] [rbp-40h] BYREF
int v31; // [rsp+10h] [rbp-38h]
v6 = a3;
v29 = ImPlot3D::BeginItem(a1, (const char *)a3, a4, a5, a6);
if ( v29 )
{
if ( (v6 & 2) == 0 )
{
v8 = (ImPlot3DPlot *)*((_QWORD *)ImPlot3D::GImPlot3D + 5);
if ( *((_BYTE *)v8 + 500) )
{
if ( *((int *)a2 + 18) > 0 )
{
v9 = 0LL;
v10 = 0LL;
while ( 2 )
{
v11 = *a2;
v12 = *((_DWORD *)a2 + 2);
v13 = *((unsigned int *)a2 + 3);
v14 = *((int *)a2 + 4);
switch ( (v13 == 0) + 2 * (v14 == 4) )
{
case 0:
v15 = (__m128)*(unsigned int *)(v14 * (((int)v10 + (int)v13) % v12) + v11);
v16 = a2[3];
v17 = *((_DWORD *)a2 + 8);
v18 = *((unsigned int *)a2 + 9);
v19 = *((int *)a2 + 10);
switch ( (v18 == 0) + 2 * (v19 == 4) )
{
case 0:
goto LABEL_11;
case 1:
goto LABEL_14;
case 2:
goto LABEL_12;
case 3:
goto LABEL_13;
}
case 1:
v15 = (__m128)*(unsigned int *)(v10 * v14 + v11);
v16 = a2[3];
v17 = *((_DWORD *)a2 + 8);
v18 = *((unsigned int *)a2 + 9);
v19 = *((int *)a2 + 10);
switch ( (v18 == 0) + 2 * (v19 == 4) )
{
case 0:
goto LABEL_11;
case 1:
goto LABEL_14;
case 2:
goto LABEL_12;
case 3:
goto LABEL_13;
}
case 2:
v15 = (__m128)*(unsigned int *)(v11 + 4LL * (((int)v10 + (int)v13) % v12));
v16 = a2[3];
v17 = *((_DWORD *)a2 + 8);
v18 = *((unsigned int *)a2 + 9);
v19 = *((int *)a2 + 10);
switch ( (v18 == 0) + 2 * (v19 == 4) )
{
case 0:
goto LABEL_11;
case 1:
goto LABEL_14;
case 2:
goto LABEL_12;
case 3:
goto LABEL_13;
}
case 3:
v15 = (__m128)*(unsigned int *)(v9 + v11);
v16 = a2[3];
v17 = *((_DWORD *)a2 + 8);
v18 = *((unsigned int *)a2 + 9);
v19 = *((int *)a2 + 10);
switch ( (v18 == 0) + 2 * (v19 == 4) )
{
case 0:
LABEL_11:
v20 = (__m128)*(unsigned int *)(v16 + v19 * (((int)v10 + (int)v18) % v17));
v21 = a2[6];
v22 = *((_DWORD *)a2 + 14);
v23 = *((unsigned int *)a2 + 15);
v24 = *((int *)a2 + 16);
switch ( (v23 == 0) + 2 * (v24 == 4) )
{
case 0:
goto LABEL_15;
case 1:
goto LABEL_18;
case 2:
goto LABEL_16;
case 3:
goto LABEL_17;
}
case 1:
LABEL_14:
v20 = (__m128)*(unsigned int *)(v16 + v10 * v19);
v21 = a2[6];
v22 = *((_DWORD *)a2 + 14);
v23 = *((unsigned int *)a2 + 15);
v24 = *((int *)a2 + 16);
switch ( (v23 == 0) + 2 * (v24 == 4) )
{
case 0:
goto LABEL_15;
case 1:
goto LABEL_18;
case 2:
goto LABEL_16;
case 3:
goto LABEL_17;
}
case 2:
LABEL_12:
v20 = (__m128)*(unsigned int *)(v16 + 4LL * (((int)v10 + (int)v18) % v17));
v21 = a2[6];
v22 = *((_DWORD *)a2 + 14);
v23 = *((unsigned int *)a2 + 15);
v24 = *((int *)a2 + 16);
switch ( (v23 == 0) + 2 * (v24 == 4) )
{
case 0:
goto LABEL_15;
case 1:
goto LABEL_18;
case 2:
goto LABEL_16;
case 3:
goto LABEL_17;
}
case 3:
LABEL_13:
v20 = (__m128)*(unsigned int *)(v9 + v16);
v21 = a2[6];
v22 = *((_DWORD *)a2 + 14);
v23 = *((unsigned int *)a2 + 15);
v24 = *((int *)a2 + 16);
switch ( (v23 == 0) + 2 * (v24 == 4) )
{
case 0:
LABEL_15:
v25 = (int *)(v24 * (((int)v10 + (int)v23) % v22) + v21);
break;
case 1:
LABEL_18:
v25 = (int *)(v10 * v24 + v21);
break;
case 2:
LABEL_16:
v25 = (int *)(v21 + 4LL * (((int)v10 + (int)v23) % v22));
break;
case 3:
LABEL_17:
v25 = (int *)(v9 + v21);
break;
}
v26 = _mm_unpacklo_ps(v15, v20);
v27 = *v25;
_mm_storel_ps((double *)&v30, v26);
v31 = v27;
ImPlot3DPlot::ExtendFit(v8, (const ImPlot3DPoint *)&v30);
++v10;
v9 += 4LL;
if ( v10 >= *((int *)a2 + 18) )
return v29;
continue;
}
}
}
}
}
}
}
return v29;
}
| BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<float>,ImPlot3D::IndexerIdx<float>,ImPlot3D::IndexerIdx<float>>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14D,EDX
MOV RBX,RSI
MOV ESI,EDX
MOV EDX,ECX
CALL 0x00156858
MOV byte ptr [RSP + 0x7],AL
TEST AL,AL
JZ 0x00164114
TEST R14B,0x2
JNZ 0x00164114
LEA RAX,[0x436c98]
MOV RAX,qword ptr [RAX]
MOV R14,qword ptr [RAX + 0x28]
CMP byte ptr [R14 + 0x1f4],0x0
JZ 0x00164114
CMP dword ptr [RBX + 0x48],0x0
JLE 0x00164114
XOR R12D,R12D
LEA R15,[0x395f94]
LEA RBP,[0x395fa4]
XOR R13D,R13D
MOV RCX,qword ptr [RBX]
MOV ESI,dword ptr [RBX + 0x8]
MOV EAX,dword ptr [RBX + 0xc]
XOR EDX,EDX
TEST RAX,RAX
SETZ DL
MOVSXD RDI,dword ptr [RBX + 0x10]
XOR R8D,R8D
CMP RDI,0x4
SETZ R8B
LEA EDX,[RDX + R8*0x2]
LEA R8,[0x395f84]
MOVSXD RDX,dword ptr [R8 + RDX*0x4]
ADD RDX,R8
JMP RDX
LAB_00164114:
MOV AL,byte ptr [RSP + 0x7]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* bool ImPlot3D::BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<float>,
ImPlot3D::IndexerIdx<float>, ImPlot3D::IndexerIdx<float> > >(char const*,
ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<float>, ImPlot3D::IndexerIdx<float>,
ImPlot3D::IndexerIdx<float> > const&, int, int) */
bool ImPlot3D::
BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<float>,ImPlot3D::IndexerIdx<float>,ImPlot3D::IndexerIdx<float>>>
(char *param_1,GetterXYZ *param_2,int param_3,int param_4)
{
char cVar1;
int1 uVar2;
cVar1 = BeginItem(param_1,param_3,param_4);
if ((((cVar1 != '\0') && ((param_3 & 2U) == 0)) &&
(*(char *)(*(long *)(GImPlot3D + 0x28) + 500) != '\0')) && (0 < *(int *)(param_2 + 0x48))) {
/* WARNING: Could not recover jumptable at 0x00163ed0. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar2 = (*(code *)(&DAT_00395f84 +
*(int *)(&DAT_00395f84 +
(ulong)((uint)(*(int *)(param_2 + 0xc) == 0) +
(uint)((long)*(int *)(param_2 + 0x10) == 4) * 2) * 4)))
((long)*(int *)(param_2 + 0x10),*(int4 *)(param_2 + 8),
&DAT_00395f84 +
*(int *)(&DAT_00395f84 +
(ulong)((uint)(*(int *)(param_2 + 0xc) == 0) +
(uint)((long)*(int *)(param_2 + 0x10) == 4) * 2) * 4),
*(int8 *)param_2);
return (bool)uVar2;
}
return (bool)cVar1;
}
|
|
2,489 | common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)) | llama.cpp/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const std::string & help,
void (*handler)(common_params & params)
) : args(args), help(help), handler_void(handler) {} | O3 | c | common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0xb(%rsp), %rcx
leaq 0xa(%rsp), %r8
movl $0x1, %edx
callq 0x83f90
leaq 0x38(%rbx), %rax
xorl %ecx, %ecx
movq %rcx, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movq %rcx, 0x58(%rbx)
leaq 0x60(%rbx), %r12
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x9(%rsp), %rcx
movq %r12, %rdi
callq 0x84012
leaq 0x90(%rbx), %rdi
leaq 0xa0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movq $0x0, 0x88(%rbx)
movq %rax, 0x90(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x2875c
movb $0x0, 0xb0(%rbx)
movq %r14, 0xb8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rbx)
movq $0x0, 0xd0(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%r12), %rdi
testq %rdi, %rdi
je 0x648e6
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x20180
jmp 0x648e6
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x84058
movq %rbx, %rdi
callq 0x84058
movq %r14, %rdi
callq 0x20ae0
nop
| _ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_2C]
mov dword ptr [rsi], 0
lea rcx, [rsp+38h+var_2D]
lea r8, [rsp+38h+var_2E]
mov edx, 1
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xor ecx, ecx
mov [rbx+40h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
mov [rbx+48h], rax
mov [rbx+50h], rax
mov [rbx+58h], rcx
lea r12, [rbx+60h]
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+38h+var_2F]
mov rdi, r12
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
lea rdi, [rbx+90h]
lea rax, [rbx+0A0h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+78h], xmm0
mov qword ptr [rbx+88h], 0
mov [rbx+90h], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov byte ptr [rbx+0B0h], 0
mov [rbx+0B8h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+0C0h], xmm0
mov qword ptr [rbx+0D0h], 0
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [r12]; void *
test rdi, rdi
jz short loc_648E6
mov rsi, [rbx+70h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_648E6
mov r14, rax
loc_648E6:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4)
{
long long result; // rax
char v7; // [rsp+9h] [rbp-2Fh] BYREF
char v8; // [rsp+Ah] [rbp-2Eh] BYREF
char v9; // [rsp+Bh] [rbp-2Dh] BYREF
_DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v10[0] = 0;
std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8);
*(_QWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7);
*(_OWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
*(_QWORD *)(a1 + 144) = a1 + 160;
result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = a4;
*(_OWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 208) = 0LL;
return result;
}
| common_arg:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],0x0
LEA RCX,[RSP + 0xb]
LEA R8,[RSP + 0xa]
MOV EDX,0x1
CALL 0x00183f90
LEA RAX,[RBX + 0x38]
XOR ECX,ECX
MOV qword ptr [RBX + 0x40],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x58],RCX
LEA R12,[RBX + 0x60]
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LAB_00164855:
LEA RCX,[RSP + 0x9]
MOV RDI,R12
CALL 0x00184012
LEA RDI,[RBX + 0x90]
LEA RAX,[RBX + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x78],XMM0
MOV qword ptr [RBX + 0x88],0x0
MOV qword ptr [RBX + 0x90],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_00164893:
CALL 0x0012875c
LAB_00164898:
MOV byte ptr [RBX + 0xb0],0x0
MOV qword ptr [RBX + 0xb8],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
MOV qword ptr [RBX + 0xd0],0x0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&,
void (*)(common_params&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,string *param_2,
_func_void_common_params_ptr *param_3)
{
int1 local_2f;
int1 local_2e;
int1 local_2d;
int4 local_2c;
local_2c = 0;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&local_2c,1,&local_2d,&local_2e);
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 00164855 to 00164861 has its CatchHandler @ 001648e3 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&local_2f);
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(common_arg **)(this + 0x90) = this + 0xa0;
/* try { // try from 00164893 to 00164897 has its CatchHandler @ 001648c9 */
std::__cxx11::string::_M_construct<char*>
(this + 0x90,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
this[0xb0] = (common_arg)0x0;
*(_func_void_common_params_ptr **)(this + 0xb8) = param_3;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
return;
}
|
|
2,490 | my_coll_rule_parse | eloqsql/strings/ctype-uca.c | static int
my_coll_rule_parse(MY_COLL_RULES *rules,
const char *str, const char *str_end)
{
MY_COLL_RULE_PARSER p;
my_coll_parser_init(&p, rules, str, str_end);
if (!my_coll_parser_exec(&p))
{
my_coll_lexem_print_error(my_coll_parser_curr(&p),
rules->loader->error,
sizeof(rules->loader->error) - 1,
p.errstr);
return 1;
}
return 0;
} | O0 | c | my_coll_rule_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp # imm = 0x1B0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x190(%rbp)
movq %rsi, -0x198(%rbp)
movq %rdx, -0x1a0(%rbp)
movq -0x190(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x1a0(%rbp), %rcx
leaq -0x180(%rbp), %rdi
callq 0x56550
leaq -0x180(%rbp), %rdi
callq 0x56600
cmpl $0x0, %eax
jne 0x561fd
leaq -0x180(%rbp), %rdi
callq 0x56780
movq %rax, %rdi
movq -0x190(%rbp), %rax
movq 0x28(%rax), %rsi
leaq -0x180(%rbp), %rcx
addq $0xf8, %rcx
movl $0x7f, %edx
callq 0x56670
movl $0x1, -0x184(%rbp)
jmp 0x56207
movl $0x0, -0x184(%rbp)
movl -0x184(%rbp), %eax
movl %eax, -0x1a4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x56234
movl -0x1a4(%rbp), %eax
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbp
retq
callq 0x24300
nopl (%rax)
| my_coll_rule_parse:
push rbp
mov rbp, rsp
sub rsp, 1B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_190], rdi
mov [rbp+var_198], rsi
mov [rbp+var_1A0], rdx
mov rsi, [rbp+var_190]
mov rdx, [rbp+var_198]
mov rcx, [rbp+var_1A0]
lea rdi, [rbp+var_180]
call my_coll_parser_init
lea rdi, [rbp+var_180]
call my_coll_parser_exec
cmp eax, 0
jnz short loc_561FD
lea rdi, [rbp+var_180]
call my_coll_parser_curr
mov rdi, rax
mov rax, [rbp+var_190]
mov rsi, [rax+28h]
lea rcx, [rbp+var_180]
add rcx, 0F8h
mov edx, 7Fh
call my_coll_lexem_print_error
mov [rbp+var_184], 1
jmp short loc_56207
loc_561FD:
mov [rbp+var_184], 0
loc_56207:
mov eax, [rbp+var_184]
mov [rbp+var_1A4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_56234
mov eax, [rbp+var_1A4]
add rsp, 1B0h
pop rbp
retn
loc_56234:
call ___stack_chk_fail
| long long my_coll_rule_parse(long long a1, long long a2, long long a3)
{
long long v3; // rax
_BYTE v6[248]; // [rsp+30h] [rbp-180h] BYREF
_QWORD v7[17]; // [rsp+128h] [rbp-88h] BYREF
v7[16] = __readfsqword(0x28u);
my_coll_parser_init(v6, a1, a2, a3);
if ( (unsigned int)my_coll_parser_exec(v6) )
{
return 0;
}
else
{
v3 = my_coll_parser_curr(v6);
my_coll_lexem_print_error(v3, *(_QWORD *)(a1 + 40), 127LL, v7);
return 1;
}
}
| my_coll_rule_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1b0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x190],RDI
MOV qword ptr [RBP + -0x198],RSI
MOV qword ptr [RBP + -0x1a0],RDX
MOV RSI,qword ptr [RBP + -0x190]
MOV RDX,qword ptr [RBP + -0x198]
MOV RCX,qword ptr [RBP + -0x1a0]
LEA RDI,[RBP + -0x180]
CALL 0x00156550
LEA RDI,[RBP + -0x180]
CALL 0x00156600
CMP EAX,0x0
JNZ 0x001561fd
LEA RDI,[RBP + -0x180]
CALL 0x00156780
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x190]
MOV RSI,qword ptr [RAX + 0x28]
LEA RCX,[RBP + -0x180]
ADD RCX,0xf8
MOV EDX,0x7f
CALL 0x00156670
MOV dword ptr [RBP + -0x184],0x1
JMP 0x00156207
LAB_001561fd:
MOV dword ptr [RBP + -0x184],0x0
LAB_00156207:
MOV EAX,dword ptr [RBP + -0x184]
MOV dword ptr [RBP + -0x1a4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00156234
MOV EAX,dword ptr [RBP + -0x1a4]
ADD RSP,0x1b0
POP RBP
RET
LAB_00156234:
CALL 0x00124300
|
bool my_coll_rule_parse(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_188 [248];
int1 auStack_90 [128];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
my_coll_parser_init(local_188,param_1,param_2,param_3);
iVar1 = my_coll_parser_exec(local_188);
if (iVar1 == 0) {
uVar2 = my_coll_parser_curr(local_188);
my_coll_lexem_print_error(uVar2,*(int8 *)(param_1 + 0x28),0x7f,auStack_90);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar1 == 0;
}
|
|
2,491 | read_long_data | eloqsql/storage/maria/ma_blockrec.c | static inline my_bool read_long_data(MARIA_HA *info, uchar *to, ulong length,
MARIA_EXTENT_CURSOR *extent,
uchar **data, uchar **end_of_data)
{
uint left_length= (uint) (*end_of_data - *data);
if (likely(left_length >= length))
{
memcpy(to, *data, length);
(*data)+= length;
return 0;
}
return read_long_data2(info, to, length, extent, data, end_of_data);
} | O0 | c | read_long_data:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpq -0x20(%rbp), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x781ee
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a090
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x7820e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0x80420
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| read_long_data:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov rax, [rax]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
sub rax, rcx
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
cmp rax, [rbp+var_20]
setnb al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_781EE
mov rdi, [rbp+var_18]
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
add rcx, [rax]
mov [rax], rcx
mov [rbp+var_1], 0
jmp short loc_7820E
loc_781EE:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+var_38]
call read_long_data2
mov [rbp+var_1], al
loc_7820E:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char read_long_data(long long a1, long long a2, unsigned long long a3, long long a4, _QWORD *a5, _QWORD *a6)
{
if ( (unsigned int)*a6 - (unsigned int)*a5 < a3 )
return read_long_data2(a1, a2, a3, a4, a5, a6);
memcpy(a2, *a5, a3);
*a5 += a3;
return 0;
}
| read_long_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
CMP RAX,qword ptr [RBP + -0x20]
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001781ee
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017820e
LAB_001781ee:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
CALL 0x00180420
MOV byte ptr [RBP + -0x1],AL
LAB_0017820e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
read_long_data(int8 param_1,void *param_2,ulong param_3,int8 param_4,long *param_5,
int8 *param_6)
{
int1 local_9;
if ((uint)((int)*param_6 - (int)*param_5) < param_3) {
local_9 = read_long_data2(param_1,param_2,param_3,param_4,param_5,param_6);
}
else {
memcpy(param_2,(void *)*param_5,param_3);
*param_5 = param_3 + *param_5;
local_9 = 0;
}
return local_9;
}
|
|
2,492 | js_object_isExtensible | bluesky950520[P]quickjs/quickjs.c | static JSValue js_object_isExtensible(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int reflect)
{
JSValue obj;
int ret;
obj = argv[0];
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) {
if (reflect)
return JS_ThrowTypeErrorNotAnObject(ctx);
else
return JS_FALSE;
}
ret = JS_IsExtensible(ctx, obj);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O2 | c | js_object_isExtensible:
pushq %rax
movq 0x8(%r8), %rdx
cmpl $-0x1, %edx
jne 0x5e789
movq (%r8), %rsi
callq 0x1de0a
testl %eax, %eax
js 0x5e793
setne %al
movzbl %al, %eax
pushq $0x1
popq %rdx
jmp 0x5e79c
testl %r9d, %r9d
je 0x5e797
callq 0x1d5e1
pushq $0x6
jmp 0x5e799
pushq $0x1
popq %rdx
xorl %eax, %eax
popq %rcx
retq
| js_object_isExtensible:
push rax
mov rdx, [r8+8]
cmp edx, 0FFFFFFFFh
jnz short loc_5E789
mov rsi, [r8]
call JS_IsExtensible
test eax, eax
js short loc_5E793
setnz al
movzx eax, al
push 1
pop rdx
jmp short loc_5E79C
loc_5E789:
test r9d, r9d
jz short loc_5E797
call JS_ThrowTypeErrorNotAnObject
loc_5E793:
push 6
jmp short loc_5E799
loc_5E797:
push 1
loc_5E799:
pop rdx
xor eax, eax
loc_5E79C:
pop rcx
retn
| _BOOL8 js_object_isExtensible(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
char v14; // al
long long v15; // rdx
int IsExtensible; // eax
v15 = a13[1];
if ( (_DWORD)v15 == -1 )
{
IsExtensible = JS_IsExtensible(
a1,
*a13,
v15,
a3,
a4,
a5,
a6,
*(double *)a7.m128_u64,
*(double *)a8.m128_u64,
a9,
a10);
if ( IsExtensible >= 0 )
return IsExtensible != 0;
}
else if ( (_DWORD)a14 )
{
JS_ThrowTypeErrorNotAnObject(a1, a3, a4, a5, a6, a7, a8, a9, a10, a2, v15, a12, (long long)a13, a14, v14);
}
return 0LL;
}
| js_object_isExtensible:
PUSH RAX
MOV RDX,qword ptr [R8 + 0x8]
CMP EDX,-0x1
JNZ 0x0015e789
MOV RSI,qword ptr [R8]
CALL 0x0011de0a
TEST EAX,EAX
JS 0x0015e793
SETNZ AL
MOVZX EAX,AL
PUSH 0x1
POP RDX
JMP 0x0015e79c
LAB_0015e789:
TEST R9D,R9D
JZ 0x0015e797
CALL 0x0011d5e1
LAB_0015e793:
PUSH 0x6
JMP 0x0015e799
LAB_0015e797:
PUSH 0x1
LAB_0015e799:
POP RDX
XOR EAX,EAX
LAB_0015e79c:
POP RCX
RET
|
bool js_object_isExtensible(int8 param_1)
{
int iVar1;
int8 *in_R8;
int in_R9D;
if ((int)in_R8[1] == -1) {
iVar1 = JS_IsExtensible(param_1,*in_R8);
if (-1 < iVar1) {
return iVar1 != 0;
}
}
else if (in_R9D != 0) {
JS_ThrowTypeErrorNotAnObject();
}
return false;
}
|
|
2,493 | JS_ReadRegExp | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ReadRegExp(BCReaderState *s)
{
JSContext *ctx = s->ctx;
JSString *pattern;
JSString *bc;
pattern = JS_ReadString(s);
if (!pattern)
return JS_EXCEPTION;
bc = JS_ReadString(s);
if (!bc) {
js_free_string(ctx->rt, pattern);
return JS_EXCEPTION;
}
if (bc->is_wide_char) {
js_free_string(ctx->rt, pattern);
js_free_string(ctx->rt, bc);
return JS_ThrowInternalError(ctx, "bad regexp bytecode");
}
if (is_be())
lre_byte_swap(bc->u.str8, bc->len, /*is_byte_swapped*/TRUE);
return js_regexp_constructor_internal(ctx, JS_UNDEFINED,
JS_MKPTR(JS_TAG_STRING, pattern),
JS_MKPTR(JS_TAG_STRING, bc));
} | O0 | c | JS_ReadRegExp:
subq $0x78, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0x80600
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x82973
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x82ab3
movq 0x60(%rsp), %rdi
callq 0x80600
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x829b3
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x62e60
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x82ab3
movq 0x48(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
je 0x82a10
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x62e60
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x62e60
movq 0x58(%rsp), %rdi
leaq 0x92274(%rip), %rsi # 0x114c6e
movb $0x0, %al
callq 0x337d0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x82ab3
callq 0x32f50
cmpb $0x0, %al
je 0x82a3f
movq 0x48(%rsp), %rdi
addq $0x18, %rdi
movq 0x48(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x106260
movq 0x58(%rsp), %rdi
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $-0x7, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $-0x7, 0x20(%rsp)
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
leaq 0x18(%rsp), %rax
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x6c170
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_ReadRegExp:
sub rsp, 78h
mov [rsp+78h+var_18], rdi
mov rax, [rsp+78h+var_18]
mov rax, [rax]
mov [rsp+78h+var_20], rax
mov rdi, [rsp+78h+var_18]
call JS_ReadString
mov [rsp+78h+var_28], rax
cmp [rsp+78h+var_28], 0
jnz short loc_82973
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp loc_82AB3
loc_82973:
mov rdi, [rsp+78h+var_18]
call JS_ReadString
mov [rsp+78h+var_30], rax
cmp [rsp+78h+var_30], 0
jnz short loc_829B3
mov rax, [rsp+78h+var_20]
mov rdi, [rax+18h]
mov rsi, [rsp+78h+var_28]
call js_free_string
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp loc_82AB3
loc_829B3:
mov rax, [rsp+78h+var_30]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jz short loc_82A10
mov rax, [rsp+78h+var_20]
mov rdi, [rax+18h]
mov rsi, [rsp+78h+var_28]
call js_free_string
mov rax, [rsp+78h+var_20]
mov rdi, [rax+18h]
mov rsi, [rsp+78h+var_30]
call js_free_string
mov rdi, [rsp+78h+var_20]
lea rsi, aBadRegexpBytec; "bad regexp bytecode"
mov al, 0
call JS_ThrowInternalError
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp loc_82AB3
loc_82A10:
call is_be_0
cmp al, 0
jz short loc_82A3F
mov rdi, [rsp+78h+var_30]
add rdi, 18h
mov rax, [rsp+78h+var_30]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
mov esi, eax
mov edx, 1
call lre_byte_swap
loc_82A3F:
mov rdi, [rsp+78h+var_20]
mov dword ptr [rsp+78h+var_40], 0
mov [rsp+78h+var_38], 3
mov rax, [rsp+78h+var_28]
mov [rsp+78h+var_50], rax
mov [rsp+78h+var_48], 0FFFFFFFFFFFFFFF9h
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_58], 0FFFFFFFFFFFFFFF9h
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_38]
mov rcx, [rsp+78h+var_50]
mov r8, [rsp+78h+var_48]
lea rax, [rsp+78h+var_60]
mov r9, [rax]
mov [rsp+78h+var_78], r9
mov rax, [rax+8]
mov [rsp+78h+var_70], rax
call js_regexp_constructor_internal
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
loc_82AB3:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
| long long JS_ReadRegExp(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
long long v12; // r9
__m128 v13; // xmm4
__m128 v14; // xmm5
__m128 v15; // xmm4
__m128 v16; // xmm5
char v18; // [rsp+0h] [rbp-78h]
long long v19; // [rsp+38h] [rbp-40h]
long long v20; // [rsp+48h] [rbp-30h]
long long String; // [rsp+50h] [rbp-28h]
long long v22; // [rsp+58h] [rbp-20h]
long long v23; // [rsp+68h] [rbp-10h]
v22 = *a1;
String = JS_ReadString((long long)a1);
if ( String )
{
v20 = JS_ReadString((long long)a1);
if ( v20 )
{
if ( (*(_QWORD *)(v20 + 4) & 0x80000000LL) != 0 )
{
js_free_string(*(_QWORD *)(v22 + 24), String);
js_free_string(*(_QWORD *)(v22 + 24), v20);
return JS_ThrowInternalError(
v22,
(long long)"bad regexp bytecode",
v9,
v10,
v11,
v12,
a2,
a3,
a4,
a5,
v13,
v14,
a8,
a9,
v18);
}
else
{
if ( is_be_0() )
lre_byte_swap(v20 + 24, *(_DWORD *)(v20 + 4) & 0x7FFFFFFF, 1LL);
LODWORD(v19) = 0;
return js_regexp_constructor_internal(
v22,
v19,
3LL,
String,
-7LL,
v20,
a2,
a3,
a4,
a5,
v15,
v16,
a8,
a9,
v20,
-7LL);
}
}
else
{
js_free_string(*(_QWORD *)(v22 + 24), String);
LODWORD(v23) = 0;
}
}
else
{
LODWORD(v23) = 0;
}
return v23;
}
| JS_ReadRegExp:
SUB RSP,0x78
MOV qword ptr [RSP + 0x60],RDI
MOV RAX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00180600
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x00182973
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00182ab3
LAB_00182973:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00180600
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x001829b3
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00162e60
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00182ab3
LAB_001829b3:
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JZ 0x00182a10
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00162e60
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00162e60
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[0x214c6e]
MOV AL,0x0
CALL 0x001337d0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00182ab3
LAB_00182a10:
CALL 0x00132f50
CMP AL,0x0
JZ 0x00182a3f
MOV RDI,qword ptr [RSP + 0x48]
ADD RDI,0x18
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
MOV ESI,EAX
MOV EDX,0x1
CALL 0x00206260
LAB_00182a3f:
MOV RDI,qword ptr [RSP + 0x58]
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],-0x7
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],-0x7
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
LEA RAX,[RSP + 0x18]
MOV R9,qword ptr [RAX]
MOV qword ptr [RSP],R9
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0016c170
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
LAB_00182ab3:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16] JS_ReadRegExp(long *param_1)
{
long lVar1;
char cVar2;
long lVar3;
long lVar4;
int1 auVar5 [16];
uint uStack_3c;
int4 local_10;
int4 uStack_c;
int8 local_8;
lVar1 = *param_1;
lVar3 = JS_ReadString(param_1);
if (lVar3 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
lVar4 = JS_ReadString(param_1);
if (lVar4 == 0) {
js_free_string(*(int8 *)(lVar1 + 0x18),lVar3);
local_10 = 0;
local_8 = 6;
}
else if ((*(ulong *)(lVar4 + 4) >> 0x1f & 1) == 0) {
cVar2 = is_be();
if (cVar2 != '\0') {
lre_byte_swap(lVar4 + 0x18,(uint)*(int8 *)(lVar4 + 4) & 0x7fffffff,1);
}
auVar5 = js_regexp_constructor_internal
(lVar1,(ulong)uStack_3c << 0x20,3,lVar3,0xfffffffffffffff9,lVar4,lVar4,
0xfffffffffffffff9);
local_8 = auVar5._8_8_;
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
}
else {
js_free_string(*(int8 *)(lVar1 + 0x18),lVar3);
js_free_string(*(int8 *)(lVar1 + 0x18),lVar4);
auVar5 = JS_ThrowInternalError(lVar1,"bad regexp bytecode");
local_8 = auVar5._8_8_;
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
}
}
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
|
|
2,494 | ImageRotateCCW | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | void ImageRotateCCW(Image *image)
{
// Security check to avoid program crash
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
if (image->mipmaps > 1) TRACELOG(LOG_WARNING, "Image manipulation only applied to base mipmap level");
if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats");
else
{
int bytesPerPixel = GetPixelDataSize(1, 1, image->format);
unsigned char *rotatedData = (unsigned char *)RL_MALLOC(image->width*image->height*bytesPerPixel);
for (int y = 0; y < image->height; y++)
{
for (int x = 0; x < image->width; x++)
{
//memcpy(rotatedData + (x*image->height + y))*bytesPerPixel, ((unsigned char *)image->data) + (y*image->width + (image->width - x - 1))*bytesPerPixel, bytesPerPixel);
for (int i = 0; i < bytesPerPixel; i++) rotatedData[(x*image->height + y)*bytesPerPixel + i] = ((unsigned char *)image->data)[(y*image->width + (image->width - x - 1))*bytesPerPixel + i];
}
}
RL_FREE(image->data);
image->data = rotatedData;
int width = image->width;
int height = image-> height;
image->width = height;
image->height = width;
}
} | O0 | c | ImageRotateCCW:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x10565a
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x10565a
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x10565f
jmp 0x1057c0
movq -0x8(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jle 0x10567c
movl $0x4, %edi
leaq 0xbc0ab(%rip), %rsi # 0x1c1720
movb $0x0, %al
callq 0x182c40
movq -0x8(%rbp), %rax
cmpl $0xe, 0x14(%rax)
jl 0x10569e
movl $0x4, %edi
leaq 0xbc0c3(%rip), %rsi # 0x1c1755
movb $0x0, %al
callq 0x182c40
jmp 0x1057c0
movq -0x8(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x1, %esi
movl %esi, %edi
callq 0xfb840
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
imull 0xc(%rcx), %eax
imull -0xc(%rbp), %eax
movslq %eax, %rdi
callq 0xa6e0
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x105781
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x105771
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x105764
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0x8(%rdx), %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl -0x20(%rbp), %edx
subl $0x1, %edx
addl %edx, %ecx
imull -0xc(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rsi
imull 0xc(%rsi), %ecx
addl -0x1c(%rbp), %ecx
imull -0xc(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x105704
jmp 0x105766
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1056f1
jmp 0x105773
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1056da
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xa640
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ImageRotateCCW:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_10565A
mov rax, [rbp+var_8]
cmp dword ptr [rax+8], 0
jz short loc_10565A
mov rax, [rbp+var_8]
cmp dword ptr [rax+0Ch], 0
jnz short loc_10565F
loc_10565A:
jmp loc_1057C0
loc_10565F:
mov rax, [rbp+var_8]
cmp dword ptr [rax+10h], 1
jle short loc_10567C
mov edi, 4
lea rsi, aImageManipulat; "Image manipulation only applied to base"...
mov al, 0
call TraceLog
loc_10567C:
mov rax, [rbp+var_8]
cmp dword ptr [rax+14h], 0Eh
jl short loc_10569E
mov edi, 4
lea rsi, aImageManipulat_0; "Image manipulation not supported for co"...
mov al, 0
call TraceLog
jmp loc_1057C0
loc_10569E:
mov rax, [rbp+var_8]
mov edx, [rax+14h]
mov esi, 1
mov edi, esi
call GetPixelDataSize
mov [rbp+var_C], eax
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov rcx, [rbp+var_8]
imul eax, [rcx+0Ch]
imul eax, [rbp+var_C]
movsxd rdi, eax
call _malloc
mov [rbp+var_18], rax
mov [rbp+var_1C], 0
loc_1056DA:
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jge loc_105781
mov [rbp+var_20], 0
loc_1056F1:
mov eax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jge short loc_105771
mov [rbp+var_24], 0
loc_105704:
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jge short loc_105764
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_1C]
mov rdx, [rbp+var_8]
imul ecx, [rdx+8]
mov rdx, [rbp+var_8]
mov edx, [rdx+8]
sub edx, [rbp+var_20]
sub edx, 1
add ecx, edx
imul ecx, [rbp+var_C]
add ecx, [rbp+var_24]
movsxd rcx, ecx
mov dl, [rax+rcx]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_20]
mov rsi, [rbp+var_8]
imul ecx, [rsi+0Ch]
add ecx, [rbp+var_1C]
imul ecx, [rbp+var_C]
add ecx, [rbp+var_24]
movsxd rcx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_105704
loc_105764:
jmp short $+2
loc_105766:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_1056F1
loc_105771:
jmp short $+2
loc_105773:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp loc_1056DA
loc_105781:
mov rax, [rbp+var_8]
mov rdi, [rax]
call _free
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
mov [rbp+var_2C], eax
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_8]
mov [rax+8], ecx
mov ecx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+0Ch], ecx
loc_1057C0:
add rsp, 30h
pop rbp
retn
| long long ImageRotateCCW(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
long long result; // rax
int v7; // [rsp+8h] [rbp-28h]
int k; // [rsp+Ch] [rbp-24h]
int j; // [rsp+10h] [rbp-20h]
int i; // [rsp+14h] [rbp-1Ch]
long long v11; // [rsp+18h] [rbp-18h]
int PixelDataSize; // [rsp+24h] [rbp-Ch]
result = a1;
if ( *(_QWORD *)a1 )
{
result = a1;
if ( *(_DWORD *)(a1 + 8) )
{
result = a1;
if ( *(_DWORD *)(a1 + 12) )
{
if ( *(int *)(a1 + 16) > 1 )
TraceLog(4, (unsigned int)"Image manipulation only applied to base mipmap level", a3, a4, a5, a6);
if ( *(int *)(a1 + 20) < 14 )
{
PixelDataSize = GetPixelDataSize(1, 1, *(_DWORD *)(a1 + 20));
v11 = malloc(PixelDataSize * *(_DWORD *)(a1 + 12) * *(_DWORD *)(a1 + 8));
for ( i = 0; i < *(_DWORD *)(a1 + 12); ++i )
{
for ( j = 0; j < *(_DWORD *)(a1 + 8); ++j )
{
for ( k = 0; k < PixelDataSize; ++k )
*(_BYTE *)(v11 + k + PixelDataSize * (i + *(_DWORD *)(a1 + 12) * j)) = *(_BYTE *)(*(_QWORD *)a1
+ k
+ PixelDataSize
* (*(_DWORD *)(a1 + 8)
- j
- 1
+ *(_DWORD *)(a1 + 8)
* i));
}
}
free(*(_QWORD *)a1);
*(_QWORD *)a1 = v11;
v7 = *(_DWORD *)(a1 + 8);
*(_DWORD *)(a1 + 8) = *(_DWORD *)(a1 + 12);
result = a1;
*(_DWORD *)(a1 + 12) = v7;
}
else
{
return TraceLog(4, (unsigned int)"Image manipulation not supported for compressed formats", a3, a4, a5, a6);
}
}
}
}
return result;
}
| |||
2,495 | ImageRotateCCW | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | void ImageRotateCCW(Image *image)
{
// Security check to avoid program crash
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
if (image->mipmaps > 1) TRACELOG(LOG_WARNING, "Image manipulation only applied to base mipmap level");
if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats");
else
{
int bytesPerPixel = GetPixelDataSize(1, 1, image->format);
unsigned char *rotatedData = (unsigned char *)RL_MALLOC(image->width*image->height*bytesPerPixel);
for (int y = 0; y < image->height; y++)
{
for (int x = 0; x < image->width; x++)
{
//memcpy(rotatedData + (x*image->height + y))*bytesPerPixel, ((unsigned char *)image->data) + (y*image->width + (image->width - x - 1))*bytesPerPixel, bytesPerPixel);
for (int i = 0; i < bytesPerPixel; i++) rotatedData[(x*image->height + y)*bytesPerPixel + i] = ((unsigned char *)image->data)[(y*image->width + (image->width - x - 1))*bytesPerPixel + i];
}
}
RL_FREE(image->data);
image->data = rotatedData;
int width = image->width;
int height = image-> height;
image->width = height;
image->height = width;
}
} | O2 | c | ImageRotateCCW:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, (%rdi)
je 0x84115
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x84115
cmpl $0x0, 0xc(%rbx)
je 0x84115
cmpl $0x2, 0x10(%rbx)
jl 0x84017
leaq 0x4f0db(%rip), %rsi # 0xd30e8
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa128b
movl 0x14(%rbx), %edx
cmpl $0xe, %edx
jl 0x8403e
leaq 0x4f0f7(%rip), %rsi # 0xd311d
pushq $0x4
popq %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa128b
pushq $0x1
popq %rdi
movl %edi, %esi
callq 0x7df87
movl %eax, %ebp
movl 0x8(%rbx), %r15d
movslq 0xc(%rbx), %r12
movl %r15d, %eax
imull %ebp, %eax
movl %eax, 0x4(%rsp)
imull %r12d, %eax
movslq %eax, %rdi
callq 0x96e0
movq %rax, %r8
xorl %eax, %eax
testl %ebp, %ebp
movl $0x0, %ecx
cmovgl %ebp, %ecx
movslq %ebp, %rdx
testl %r15d, %r15d
movl $0x0, %esi
cmovgl %r15d, %esi
testl %r12d, %r12d
movl $0x0, %edi
cmovgl %r12d, %edi
movq %rdi, 0x10(%rsp)
imulq %rdx, %r12
decl %r15d
movq %rdx, %rdi
imull %edx, %r15d
movq %r8, 0x8(%rsp)
cmpq 0x10(%rsp), %rax
je 0x840f6
incq %rax
movl %r15d, %r9d
movq %r8, %r10
xorl %r11d, %r11d
cmpq %rsi, %r11
je 0x840ec
movslq %r9d, %r14
xorl %r13d, %r13d
cmpq %r13, %rcx
je 0x840e1
movq (%rbx), %rdx
addq %r14, %rdx
movb (%r13,%rdx), %dl
movb %dl, (%r10,%r13)
incq %r13
jmp 0x840c8
incq %r11
addq %r12, %r10
subl %ebp, %r9d
jmp 0x840bd
addq %rdi, %r8
addl 0x4(%rsp), %r15d
jmp 0x840aa
movq (%rbx), %rdi
callq 0x9640
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movq 0x8(%rbx), %xmm0
pshufd $0xe1, %xmm0, %xmm0 # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ImageRotateCCW:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp qword ptr [rdi], 0
jz loc_84115
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz loc_84115
cmp dword ptr [rbx+0Ch], 0
jz loc_84115
cmp dword ptr [rbx+10h], 2
jl short loc_84017
lea rsi, aImageManipulat; "Image manipulation only applied to base"...
push 4
pop rdi
xor eax, eax
call TraceLog
loc_84017:
mov edx, [rbx+14h]
cmp edx, 0Eh
jl short loc_8403E
lea rsi, aImageManipulat_0; "Image manipulation not supported for co"...
push 4
pop rdi
xor eax, eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp TraceLog
loc_8403E:
push 1
pop rdi
mov esi, edi
call GetPixelDataSize
mov ebp, eax
mov r15d, [rbx+8]
movsxd r12, dword ptr [rbx+0Ch]
mov eax, r15d
imul eax, ebp
mov [rsp+48h+var_44], eax
imul eax, r12d
movsxd rdi, eax
call _malloc
mov r8, rax
xor eax, eax
test ebp, ebp
mov ecx, 0
cmovg ecx, ebp
movsxd rdx, ebp
test r15d, r15d
mov esi, 0
cmovg esi, r15d
test r12d, r12d
mov edi, 0
cmovg edi, r12d
mov [rsp+48h+var_38], rdi
imul r12, rdx
dec r15d
mov rdi, rdx
imul r15d, edx
mov [rsp+48h+var_40], r8
loc_840AA:
cmp rax, [rsp+48h+var_38]
jz short loc_840F6
inc rax
mov r9d, r15d
mov r10, r8
xor r11d, r11d
loc_840BD:
cmp r11, rsi
jz short loc_840EC
movsxd r14, r9d
xor r13d, r13d
loc_840C8:
cmp rcx, r13
jz short loc_840E1
mov rdx, [rbx]
add rdx, r14
mov dl, [r13+rdx+0]
mov [r10+r13], dl
inc r13
jmp short loc_840C8
loc_840E1:
inc r11
add r10, r12
sub r9d, ebp
jmp short loc_840BD
loc_840EC:
add r8, rdi
add r15d, [rsp+48h+var_44]
jmp short loc_840AA
loc_840F6:
mov rdi, [rbx]
call _free
mov rax, [rsp+48h+var_40]
mov [rbx], rax
movq xmm0, qword ptr [rbx+8]
pshufd xmm0, xmm0, 0E1h
movq qword ptr [rbx+8], xmm0
loc_84115:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void ImageRotateCCW(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
int v7; // edx
int PixelDataSize; // ebp
int v9; // r15d
long long v10; // r12
long long v11; // r8
long long v12; // rax
long long v13; // rcx
long long v14; // rsi
long long v15; // rdi
long long v16; // r12
int v17; // r15d
int v18; // r9d
long long v19; // r10
long long i; // r11
long long j; // r13
int v22; // [rsp+4h] [rbp-44h]
long long v23; // [rsp+8h] [rbp-40h]
if ( *(_QWORD *)a1 && *(_DWORD *)(a1 + 8) && *(_DWORD *)(a1 + 12) )
{
if ( *(int *)(a1 + 16) >= 2 )
TraceLog(4, (unsigned int)"Image manipulation only applied to base mipmap level", a3, a4, a5, a6);
v7 = *(_DWORD *)(a1 + 20);
if ( v7 < 14 )
{
PixelDataSize = GetPixelDataSize(1, 1, v7);
v9 = *(_DWORD *)(a1 + 8);
v10 = *(int *)(a1 + 12);
v22 = PixelDataSize * v9;
v11 = malloc((int)v10 * PixelDataSize * v9);
v12 = 0LL;
v13 = 0LL;
if ( PixelDataSize > 0 )
v13 = (unsigned int)PixelDataSize;
v14 = 0LL;
if ( v9 > 0 )
v14 = (unsigned int)v9;
v15 = 0LL;
if ( (int)v10 > 0 )
v15 = (unsigned int)v10;
v16 = PixelDataSize * v10;
v17 = PixelDataSize * (v9 - 1);
v23 = v11;
while ( v12 != v15 )
{
++v12;
v18 = v17;
v19 = v11;
for ( i = 0LL; i != v14; ++i )
{
for ( j = 0LL; v13 != j; ++j )
*(_BYTE *)(v19 + j) = *(_BYTE *)(j + v18 + *(_QWORD *)a1);
v19 += v16;
v18 -= PixelDataSize;
}
v11 += PixelDataSize;
v17 += v22;
}
free(*(_QWORD *)a1);
*(_QWORD *)a1 = v23;
*(_QWORD *)(a1 + 8) = _mm_shuffle_epi32(_mm_loadl_epi64((const __m128i *)(a1 + 8)), 225).m128i_u64[0];
}
else
{
TraceLog(4, (unsigned int)"Image manipulation not supported for compressed formats", v7, a4, a5, a6);
}
}
}
| ImageRotateCCW:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP qword ptr [RDI],0x0
JZ 0x00184115
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x00184115
CMP dword ptr [RBX + 0xc],0x0
JZ 0x00184115
CMP dword ptr [RBX + 0x10],0x2
JL 0x00184017
LEA RSI,[0x1d30e8]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a128b
LAB_00184017:
MOV EDX,dword ptr [RBX + 0x14]
CMP EDX,0xe
JL 0x0018403e
LEA RSI,[0x1d311d]
PUSH 0x4
POP RDI
XOR EAX,EAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001a128b
LAB_0018403e:
PUSH 0x1
POP RDI
MOV ESI,EDI
CALL 0x0017df87
MOV EBP,EAX
MOV R15D,dword ptr [RBX + 0x8]
MOVSXD R12,dword ptr [RBX + 0xc]
MOV EAX,R15D
IMUL EAX,EBP
MOV dword ptr [RSP + 0x4],EAX
IMUL EAX,R12D
MOVSXD RDI,EAX
CALL 0x001096e0
MOV R8,RAX
XOR EAX,EAX
TEST EBP,EBP
MOV ECX,0x0
CMOVG ECX,EBP
MOVSXD RDX,EBP
TEST R15D,R15D
MOV ESI,0x0
CMOVG ESI,R15D
TEST R12D,R12D
MOV EDI,0x0
CMOVG EDI,R12D
MOV qword ptr [RSP + 0x10],RDI
IMUL R12,RDX
DEC R15D
MOV RDI,RDX
IMUL R15D,EDX
MOV qword ptr [RSP + 0x8],R8
LAB_001840aa:
CMP RAX,qword ptr [RSP + 0x10]
JZ 0x001840f6
INC RAX
MOV R9D,R15D
MOV R10,R8
XOR R11D,R11D
LAB_001840bd:
CMP R11,RSI
JZ 0x001840ec
MOVSXD R14,R9D
XOR R13D,R13D
LAB_001840c8:
CMP RCX,R13
JZ 0x001840e1
MOV RDX,qword ptr [RBX]
ADD RDX,R14
MOV DL,byte ptr [R13 + RDX*0x1]
MOV byte ptr [R10 + R13*0x1],DL
INC R13
JMP 0x001840c8
LAB_001840e1:
INC R11
ADD R10,R12
SUB R9D,EBP
JMP 0x001840bd
LAB_001840ec:
ADD R8,RDI
ADD R15D,dword ptr [RSP + 0x4]
JMP 0x001840aa
LAB_001840f6:
MOV RDI,qword ptr [RBX]
CALL 0x00109640
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],RAX
MOVQ XMM0,qword ptr [RBX + 0x8]
PSHUFD XMM0,XMM0,0xe1
MOVQ qword ptr [RBX + 0x8],XMM0
LAB_00184115:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ImageRotateCCW(long *param_1)
{
uint uVar1;
uint uVar2;
uint uVar3;
void *pvVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
void *pvVar9;
int iVar10;
void *pvVar11;
ulong uVar12;
ulong uVar13;
int iVar14;
if (((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) {
if (1 < (int)param_1[2]) {
TraceLog(4,"Image manipulation only applied to base mipmap level");
}
if (0xd < *(int *)((long)param_1 + 0x14)) {
TraceLog(4,"Image manipulation not supported for compressed formats");
return;
}
uVar3 = GetPixelDataSize(1,1);
uVar1 = *(uint *)(param_1 + 1);
uVar2 = *(uint *)((long)param_1 + 0xc);
pvVar4 = malloc((long)(int)(uVar1 * uVar3 * uVar2));
uVar5 = 0;
uVar6 = 0;
if (0 < (int)uVar3) {
uVar6 = (ulong)uVar3;
}
uVar7 = 0;
if (0 < (int)uVar1) {
uVar7 = (ulong)uVar1;
}
uVar8 = 0;
if (0 < (int)uVar2) {
uVar8 = (ulong)uVar2;
}
iVar14 = (uVar1 - 1) * uVar3;
pvVar9 = pvVar4;
while (uVar5 != uVar8) {
uVar5 = uVar5 + 1;
pvVar11 = pvVar9;
iVar10 = iVar14;
for (uVar12 = 0; uVar12 != uVar7; uVar12 = uVar12 + 1) {
for (uVar13 = 0; uVar6 != uVar13; uVar13 = uVar13 + 1) {
*(int1 *)((long)pvVar11 + uVar13) =
*(int1 *)(uVar13 + *param_1 + (long)iVar10);
}
pvVar11 = (void *)((long)pvVar11 + (long)(int)uVar2 * (long)(int)uVar3);
iVar10 = iVar10 - uVar3;
}
pvVar9 = (void *)((long)pvVar9 + (long)(int)uVar3);
iVar14 = iVar14 + uVar1 * uVar3;
}
free((void *)*param_1);
*param_1 = (long)pvVar4;
param_1[1] = CONCAT44((int)param_1[1],(int)((ulong)param_1[1] >> 0x20));
}
return;
}
|
|
2,496 | ImageRotateCCW | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | void ImageRotateCCW(Image *image)
{
// Security check to avoid program crash
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
if (image->mipmaps > 1) TRACELOG(LOG_WARNING, "Image manipulation only applied to base mipmap level");
if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats");
else
{
int bytesPerPixel = GetPixelDataSize(1, 1, image->format);
unsigned char *rotatedData = (unsigned char *)RL_MALLOC(image->width*image->height*bytesPerPixel);
for (int y = 0; y < image->height; y++)
{
for (int x = 0; x < image->width; x++)
{
//memcpy(rotatedData + (x*image->height + y))*bytesPerPixel, ((unsigned char *)image->data) + (y*image->width + (image->width - x - 1))*bytesPerPixel, bytesPerPixel);
for (int i = 0; i < bytesPerPixel; i++) rotatedData[(x*image->height + y)*bytesPerPixel + i] = ((unsigned char *)image->data)[(y*image->width + (image->width - x - 1))*bytesPerPixel + i];
}
}
RL_FREE(image->data);
image->data = rotatedData;
int width = image->width;
int height = image-> height;
image->width = height;
image->height = width;
}
} | O3 | c | ImageRotateCCW:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, (%rdi)
je 0x98a1f
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x98a1f
cmpl $0x0, 0xc(%rbx)
je 0x98a1f
cmpl $0x2, 0x10(%rbx)
jl 0x98931
leaq 0x546cb(%rip), %rsi # 0xecff0
movl $0x4, %edi
xorl %eax, %eax
callq 0xb9db7
movl 0x14(%rbx), %edx
cmpl $0xe, %edx
jl 0x9895a
leaq 0x546e5(%rip), %rsi # 0xed025
movl $0x4, %edi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb9db7
movl $0x1, %edi
movl $0x1, %esi
callq 0x9225b
movl %eax, %ebp
movl 0x8(%rbx), %r15d
movslq 0xc(%rbx), %r14
movl %r14d, %eax
imull %r15d, %eax
imull %ebp, %eax
movslq %eax, %rdi
callq 0xa6f0
movq %rax, (%rsp)
movq %r14, 0x8(%rsp)
testq %r14, %r14
jle 0x98a01
movslq %ebp, %rdx
movl %ebp, %ecx
movq %rdx, 0x10(%rsp)
imulq 0x8(%rsp), %rdx
leal -0x1(%r15), %esi
imull %ebp, %esi
movl %ebp, %edi
imull %r15d, %edi
xorl %r8d, %r8d
movq (%rsp), %r9
testl %r15d, %r15d
jle 0x989f0
movl %esi, %r10d
movq %r9, %r11
xorl %r13d, %r13d
testl %ebp, %ebp
jle 0x989e2
movslq %r10d, %r14
addq (%rbx), %r14
xorl %r12d, %r12d
movb (%r14,%r12), %al
movb %al, (%r11,%r12)
incq %r12
cmpq %r12, %rcx
jne 0x989d2
incq %r13
addq %rdx, %r11
subl %ebp, %r10d
cmpq %r15, %r13
jne 0x989c5
incq %r8
addq 0x10(%rsp), %r9
addl %edi, %esi
cmpq 0x8(%rsp), %r8
jne 0x989b7
movq (%rbx), %rdi
callq 0xa650
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x8(%rbx), %xmm0
pshufd $0xe1, %xmm0, %xmm0 # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ImageRotateCCW:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp qword ptr [rdi], 0
jz loc_98A1F
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz loc_98A1F
cmp dword ptr [rbx+0Ch], 0
jz loc_98A1F
cmp dword ptr [rbx+10h], 2
jl short loc_98931
lea rsi, aImageManipulat; "Image manipulation only applied to base"...
mov edi, 4
xor eax, eax
call TraceLog
loc_98931:
mov edx, [rbx+14h]
cmp edx, 0Eh
jl short loc_9895A
lea rsi, aImageManipulat_0; "Image manipulation not supported for co"...
mov edi, 4
xor eax, eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp TraceLog
loc_9895A:
mov edi, 1
mov esi, 1
call GetPixelDataSize
mov ebp, eax
mov r15d, [rbx+8]
movsxd r14, dword ptr [rbx+0Ch]
mov eax, r14d
imul eax, r15d
imul eax, ebp
movsxd rdi, eax
call _malloc
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], r14
test r14, r14
jle short loc_98A01
movsxd rdx, ebp
mov ecx, ebp
mov [rsp+48h+var_38], rdx
imul rdx, [rsp+48h+var_40]
lea esi, [r15-1]
imul esi, ebp
mov edi, ebp
imul edi, r15d
xor r8d, r8d
mov r9, [rsp+48h+var_48]
loc_989B7:
test r15d, r15d
jle short loc_989F0
mov r10d, esi
mov r11, r9
xor r13d, r13d
loc_989C5:
test ebp, ebp
jle short loc_989E2
movsxd r14, r10d
add r14, [rbx]
xor r12d, r12d
loc_989D2:
mov al, [r14+r12]
mov [r11+r12], al
inc r12
cmp rcx, r12
jnz short loc_989D2
loc_989E2:
inc r13
add r11, rdx
sub r10d, ebp
cmp r13, r15
jnz short loc_989C5
loc_989F0:
inc r8
add r9, [rsp+48h+var_38]
add esi, edi
cmp r8, [rsp+48h+var_40]
jnz short loc_989B7
loc_98A01:
mov rdi, [rbx]
call _free
mov rax, [rsp+48h+var_48]
mov [rbx], rax
movq xmm0, qword ptr [rbx+8]
pshufd xmm0, xmm0, 0E1h
movq qword ptr [rbx+8], xmm0
loc_98A1F:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void ImageRotateCCW(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
int v6; // edx
int PixelDataSize; // ebp
long long v8; // r15
long long v9; // r14
int v10; // esi
long long v11; // r8
long long v12; // r9
int v13; // r10d
long long v14; // r11
long long i; // r13
long long v16; // r14
long long j; // r12
long long v18; // [rsp+0h] [rbp-48h]
long long v19; // [rsp+8h] [rbp-40h]
if ( *(_QWORD *)a1 && *(_DWORD *)(a1 + 8) && *(_DWORD *)(a1 + 12) )
{
if ( *(int *)(a1 + 16) >= 2 )
TraceLog(4, (unsigned int)"Image manipulation only applied to base mipmap level", a3, a4, a5, a6);
v6 = *(_DWORD *)(a1 + 20);
if ( v6 < 14 )
{
PixelDataSize = GetPixelDataSize(1, 1, v6);
v8 = *(unsigned int *)(a1 + 8);
v9 = *(int *)(a1 + 12);
v18 = malloc(PixelDataSize * (int)v8 * *(_DWORD *)(a1 + 12));
v19 = v9;
if ( v9 > 0 )
{
v10 = PixelDataSize * (v8 - 1);
v11 = 0LL;
v12 = v18;
do
{
if ( (int)v8 > 0 )
{
v13 = v10;
v14 = v12;
for ( i = 0LL; i != v8; ++i )
{
if ( PixelDataSize > 0 )
{
v16 = *(_QWORD *)a1 + v13;
for ( j = 0LL; j != PixelDataSize; ++j )
*(_BYTE *)(v14 + j) = *(_BYTE *)(v16 + j);
}
v14 += v19 * PixelDataSize;
v13 -= PixelDataSize;
}
}
++v11;
v12 += PixelDataSize;
v10 += v8 * PixelDataSize;
}
while ( v11 != v19 );
}
free(*(_QWORD *)a1);
*(_QWORD *)a1 = v18;
*(_QWORD *)(a1 + 8) = _mm_shuffle_epi32(_mm_loadl_epi64((const __m128i *)(a1 + 8)), 225).m128i_u64[0];
}
else
{
TraceLog(4, (unsigned int)"Image manipulation not supported for compressed formats", v6, a4, a5, a6);
}
}
}
| ImageRotateCCW:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP qword ptr [RDI],0x0
JZ 0x00198a1f
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x00198a1f
CMP dword ptr [RBX + 0xc],0x0
JZ 0x00198a1f
CMP dword ptr [RBX + 0x10],0x2
JL 0x00198931
LEA RSI,[0x1ecff0]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001b9db7
LAB_00198931:
MOV EDX,dword ptr [RBX + 0x14]
CMP EDX,0xe
JL 0x0019895a
LEA RSI,[0x1ed025]
MOV EDI,0x4
XOR EAX,EAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001b9db7
LAB_0019895a:
MOV EDI,0x1
MOV ESI,0x1
CALL 0x0019225b
MOV EBP,EAX
MOV R15D,dword ptr [RBX + 0x8]
MOVSXD R14,dword ptr [RBX + 0xc]
MOV EAX,R14D
IMUL EAX,R15D
IMUL EAX,EBP
MOVSXD RDI,EAX
CALL 0x0010a6f0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],R14
TEST R14,R14
JLE 0x00198a01
MOVSXD RDX,EBP
MOV ECX,EBP
MOV qword ptr [RSP + 0x10],RDX
IMUL RDX,qword ptr [RSP + 0x8]
LEA ESI,[R15 + -0x1]
IMUL ESI,EBP
MOV EDI,EBP
IMUL EDI,R15D
XOR R8D,R8D
MOV R9,qword ptr [RSP]
LAB_001989b7:
TEST R15D,R15D
JLE 0x001989f0
MOV R10D,ESI
MOV R11,R9
XOR R13D,R13D
LAB_001989c5:
TEST EBP,EBP
JLE 0x001989e2
MOVSXD R14,R10D
ADD R14,qword ptr [RBX]
XOR R12D,R12D
LAB_001989d2:
MOV AL,byte ptr [R14 + R12*0x1]
MOV byte ptr [R11 + R12*0x1],AL
INC R12
CMP RCX,R12
JNZ 0x001989d2
LAB_001989e2:
INC R13
ADD R11,RDX
SUB R10D,EBP
CMP R13,R15
JNZ 0x001989c5
LAB_001989f0:
INC R8
ADD R9,qword ptr [RSP + 0x10]
ADD ESI,EDI
CMP R8,qword ptr [RSP + 0x8]
JNZ 0x001989b7
LAB_00198a01:
MOV RDI,qword ptr [RBX]
CALL 0x0010a650
MOV RAX,qword ptr [RSP]
MOV qword ptr [RBX],RAX
MOVQ XMM0,qword ptr [RBX + 0x8]
PSHUFD XMM0,XMM0,0xe1
MOVQ qword ptr [RBX + 0x8],XMM0
LAB_00198a1f:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ImageRotateCCW(long *param_1)
{
uint uVar1;
long lVar2;
uint uVar3;
void *pvVar4;
int iVar5;
long lVar6;
void *pvVar7;
int iVar8;
void *pvVar9;
ulong uVar10;
ulong uVar11;
long lVar12;
if (((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) {
if (1 < (int)param_1[2]) {
TraceLog(4,"Image manipulation only applied to base mipmap level");
}
if (0xd < *(int *)((long)param_1 + 0x14)) {
TraceLog(4,"Image manipulation not supported for compressed formats");
return;
}
uVar3 = GetPixelDataSize(1,1);
uVar1 = *(uint *)(param_1 + 1);
lVar12 = (long)*(int *)((long)param_1 + 0xc);
pvVar4 = malloc((long)(int)(*(int *)((long)param_1 + 0xc) * uVar1 * uVar3));
if (0 < lVar12) {
iVar5 = (uVar1 - 1) * uVar3;
lVar6 = 0;
pvVar7 = pvVar4;
do {
if (0 < (int)uVar1) {
uVar11 = 0;
pvVar9 = pvVar7;
iVar8 = iVar5;
do {
if (0 < (int)uVar3) {
lVar2 = *param_1;
uVar10 = 0;
do {
*(int1 *)((long)pvVar9 + uVar10) = *(int1 *)(iVar8 + lVar2 + uVar10);
uVar10 = uVar10 + 1;
} while (uVar3 != uVar10);
}
uVar11 = uVar11 + 1;
pvVar9 = (void *)((long)pvVar9 + (int)uVar3 * lVar12);
iVar8 = iVar8 - uVar3;
} while (uVar11 != uVar1);
}
lVar6 = lVar6 + 1;
pvVar7 = (void *)((long)pvVar7 + (long)(int)uVar3);
iVar5 = iVar5 + uVar3 * uVar1;
} while (lVar6 != lVar12);
}
free((void *)*param_1);
*param_1 = (long)pvVar4;
param_1[1] = CONCAT44((int)param_1[1],(int)((ulong)param_1[1] >> 0x20));
}
return;
}
|
|
2,497 | plutovg_path_add_path | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c | void plutovg_path_add_path(plutovg_path_t* path, const plutovg_path_t* source, const plutovg_matrix_t* matrix)
{
if(matrix == NULL) {
plutovg_array_append(path->elements, source->elements);
path->start_point = source->start_point;
path->num_points += source->num_points;
path->num_contours += source->num_contours;
path->num_curves += source->num_curves;
return;
}
plutovg_path_iterator_t it;
plutovg_path_iterator_init(&it, source);
plutovg_point_t points[3];
plutovg_array_ensure(path->elements, source->elements.size);
while(plutovg_path_iterator_has_next(&it)) {
switch(plutovg_path_iterator_next(&it, points)) {
case PLUTOVG_PATH_COMMAND_MOVE_TO:
plutovg_matrix_map_points(matrix, points, points, 1);
plutovg_path_move_to(path, points[0].x, points[0].y);
break;
case PLUTOVG_PATH_COMMAND_LINE_TO:
plutovg_matrix_map_points(matrix, points, points, 1);
plutovg_path_line_to(path, points[0].x, points[0].y);
break;
case PLUTOVG_PATH_COMMAND_CUBIC_TO:
plutovg_matrix_map_points(matrix, points, points, 3);
plutovg_path_cubic_to(path, points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y);
break;
case PLUTOVG_PATH_COMMAND_CLOSE:
plutovg_path_close(path);
break;
}
}
} | O1 | c | plutovg_path_add_path:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rsi), %r12
movq %rdx, 0x18(%rsp)
testq %rdx, %rdx
je 0xb604
movl 0x20(%r15), %ebp
movl 0x20(%rbx), %eax
addl %ebp, %eax
movl 0x24(%rbx), %edx
cmpl %edx, %eax
jle 0xb499
testl %edx, %edx
movl $0x8, %ecx
cmovnel %edx, %ecx
movl %ecx, %r14d
leal (%r14,%r14), %ecx
cmpl %eax, %r14d
jl 0xb475
movq 0x18(%rbx), %rdi
movslq %r14d, %rsi
shlq $0x3, %rsi
callq 0x31f0
movq %rax, 0x18(%rbx)
movl %r14d, 0x24(%rbx)
testl %ebp, %ebp
jle 0xb68a
xorl %r14d, %r14d
leaq 0x18899(%rip), %r13 # 0x23d44
movq %rsp, %r15
movslq %r14d, %rax
movl (%r12,%rax,8), %ecx
cmpl $0x2, %ecx
jb 0xb4c1
je 0xb4cc
cmpl $0x3, %ecx
jne 0xb4e9
movq 0x8(%r12,%rax,8), %rcx
movq %rcx, (%rsp)
jmp 0xb4e9
movq 0x8(%r12,%rax,8), %rcx
movq %rcx, (%rsp)
movq 0x10(%r12,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq 0x18(%r12,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movl 0x4(%r12,%rax,8), %r14d
addl %eax, %r14d
movl (%r12,%rax,8), %eax
cmpq $0x3, %rax
ja 0xb5f6
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x8107
movss (%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xa3a7
movss 0x24(%rsp), %xmm0
movss %xmm0, (%rax)
movss 0x20(%rsp), %xmm1
movss %xmm1, 0x4(%rax)
movss %xmm0, 0x10(%rbx)
movss %xmm1, 0x14(%rbx)
incl 0x8(%rbx)
jmp 0xb5f6
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
movl $0x3, %ecx
callq 0x8107
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm3
movss 0x10(%rsp), %xmm4
movss 0x14(%rsp), %xmm5
movq %rbx, %rdi
callq 0xa526
jmp 0xb5f6
cmpl $0x0, 0x20(%rbx)
je 0xb5f6
movq %rbx, %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0xa3a7
movq 0x10(%rbx), %rcx
movq %rcx, (%rax)
jmp 0xb5f6
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x8107
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movq %rbx, %rdi
callq 0xa41d
cmpl %ebp, %r14d
jl 0xb4ae
jmp 0xb68a
testq %r12, %r12
je 0xb66d
movl 0x20(%r15), %eax
testl %eax, %eax
jle 0xb66d
addl 0x20(%rbx), %eax
movl 0x24(%rbx), %edx
cmpl %edx, %eax
jle 0xb649
testl %edx, %edx
movl $0x8, %ecx
cmovnel %edx, %ecx
movl %ecx, %r14d
leal (%r14,%r14), %ecx
cmpl %eax, %r14d
jl 0xb625
movq 0x18(%rbx), %rdi
movslq %r14d, %rsi
shlq $0x3, %rsi
callq 0x31f0
movq %rax, 0x18(%rbx)
movl %r14d, 0x24(%rbx)
movslq 0x20(%rbx), %rdi
shlq $0x3, %rdi
addq 0x18(%rbx), %rdi
movq 0x18(%r15), %rsi
movslq 0x20(%r15), %rdx
shlq $0x3, %rdx
callq 0x3190
movl 0x20(%r15), %eax
addl %eax, 0x20(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
movl 0x4(%r15), %eax
addl %eax, 0x4(%rbx)
movl 0x8(%r15), %eax
addl %eax, 0x8(%rbx)
movl 0xc(%r15), %eax
addl %eax, 0xc(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| plutovg_path_add_path:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rsi
mov rbx, rdi
mov r12, [rsi+18h]
mov [rsp+58h+var_40], rdx
test rdx, rdx
jz loc_B604
mov ebp, [r15+20h]
mov eax, [rbx+20h]
add eax, ebp
mov edx, [rbx+24h]
cmp eax, edx
jle short loc_B499
test edx, edx
mov ecx, 8
cmovnz ecx, edx
loc_B475:
mov r14d, ecx
lea ecx, [r14+r14]
cmp r14d, eax
jl short loc_B475
mov rdi, [rbx+18h]
movsxd rsi, r14d
shl rsi, 3
call _realloc
mov [rbx+18h], rax
mov [rbx+24h], r14d
loc_B499:
test ebp, ebp
jle loc_B68A
xor r14d, r14d
lea r13, jpt_B507
mov r15, rsp
loc_B4AE:
movsxd rax, r14d
mov ecx, [r12+rax*8]
cmp ecx, 2
jb short loc_B4C1
jz short loc_B4CC
cmp ecx, 3
jnz short loc_B4E9
loc_B4C1:
mov rcx, [r12+rax*8+8]
mov [rsp+58h+var_58], rcx
jmp short loc_B4E9
loc_B4CC:
mov rcx, [r12+rax*8+8]
mov [rsp+58h+var_58], rcx
mov rcx, [r12+rax*8+10h]
mov [rsp+58h+var_50], rcx
mov rcx, [r12+rax*8+18h]
mov [rsp+58h+var_48], rcx
loc_B4E9:
mov r14d, [r12+rax*8+4]
add r14d, eax
mov eax, [r12+rax*8]
cmp rax, 3; switch 4 cases
ja def_B507; jumptable 000000000000B507 default case
movsxd rax, ds:(jpt_B507 - 23D44h)[r13+rax*4]
add rax, r13
jmp rax; switch jump
loc_B509:
mov rdi, [rsp+58h+var_40]; jumptable 000000000000B507 case 0
mov rsi, r15
mov rdx, r15
mov ecx, 1
call plutovg_matrix_map_points
movss xmm0, dword ptr [rsp+58h+var_58]
movss [rsp+58h+var_34], xmm0
movss xmm0, dword ptr [rsp+58h+var_58+4]
movss [rsp+58h+var_38], xmm0
mov rdi, rbx
xor esi, esi
mov edx, 1
call plutovg_path_add_command
movss xmm0, [rsp+58h+var_34]
movss dword ptr [rax], xmm0
movss xmm1, [rsp+58h+var_38]
movss dword ptr [rax+4], xmm1
movss dword ptr [rbx+10h], xmm0
movss dword ptr [rbx+14h], xmm1
inc dword ptr [rbx+8]
jmp def_B507; jumptable 000000000000B507 default case
loc_B56B:
mov rdi, [rsp+58h+var_40]; jumptable 000000000000B507 case 2
mov rsi, r15
mov rdx, r15
mov ecx, 3
call plutovg_matrix_map_points
movss xmm0, dword ptr [rsp+58h+var_58]
movss xmm1, dword ptr [rsp+58h+var_58+4]
movss xmm2, dword ptr [rsp+58h+var_50]
movss xmm3, dword ptr [rsp+58h+var_50+4]
movss xmm4, dword ptr [rsp+58h+var_48]
movss xmm5, dword ptr [rsp+58h+var_48+4]
mov rdi, rbx
call plutovg_path_cubic_to
jmp short def_B507; jumptable 000000000000B507 default case
loc_B5AD:
cmp dword ptr [rbx+20h], 0; jumptable 000000000000B507 case 3
jz short def_B507; jumptable 000000000000B507 default case
mov rdi, rbx
mov esi, 3
mov edx, 1
call plutovg_path_add_command
mov rcx, [rbx+10h]
mov [rax], rcx
jmp short def_B507; jumptable 000000000000B507 default case
loc_B5CE:
mov rdi, [rsp+58h+var_40]; jumptable 000000000000B507 case 1
mov rsi, r15
mov rdx, r15
mov ecx, 1
call plutovg_matrix_map_points
movss xmm0, dword ptr [rsp+58h+var_58]
movss xmm1, dword ptr [rsp+58h+var_58+4]
mov rdi, rbx
call plutovg_path_line_to
def_B507:
cmp r14d, ebp; jumptable 000000000000B507 default case
jl loc_B4AE
jmp loc_B68A
loc_B604:
test r12, r12
jz short loc_B66D
mov eax, [r15+20h]
test eax, eax
jle short loc_B66D
add eax, [rbx+20h]
mov edx, [rbx+24h]
cmp eax, edx
jle short loc_B649
test edx, edx
mov ecx, 8
cmovnz ecx, edx
loc_B625:
mov r14d, ecx
lea ecx, [r14+r14]
cmp r14d, eax
jl short loc_B625
mov rdi, [rbx+18h]
movsxd rsi, r14d
shl rsi, 3
call _realloc
mov [rbx+18h], rax
mov [rbx+24h], r14d
loc_B649:
movsxd rdi, dword ptr [rbx+20h]
shl rdi, 3
add rdi, [rbx+18h]
mov rsi, [r15+18h]
movsxd rdx, dword ptr [r15+20h]
shl rdx, 3
call _memcpy
mov eax, [r15+20h]
add [rbx+20h], eax
loc_B66D:
mov rax, [r15+10h]
mov [rbx+10h], rax
mov eax, [r15+4]
add [rbx+4], eax
mov eax, [r15+8]
add [rbx+8], eax
mov eax, [r15+0Ch]
add [rbx+0Ch], eax
loc_B68A:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long plutovg_path_add_path(long long a1, long long a2, float *a3)
{
long long v3; // r12
int v4; // ebp
long long result; // rax
long long v6; // rdx
long long v7; // rcx
int v8; // r14d
int v9; // r14d
long long v10; // rax
unsigned int v11; // ecx
int v12; // xmm0_4
int v13; // xmm1_4
int v14; // eax
int v15; // eax
long long v16; // rdx
long long v17; // rcx
int v18; // r14d
long long v19; // [rsp+0h] [rbp-58h] BYREF
long long v20; // [rsp+8h] [rbp-50h]
long long v21; // [rsp+10h] [rbp-48h]
float *v22; // [rsp+18h] [rbp-40h]
int v23; // [rsp+20h] [rbp-38h]
int v24; // [rsp+24h] [rbp-34h]
v3 = *(_QWORD *)(a2 + 24);
v22 = a3;
if ( a3 )
{
v4 = *(_DWORD *)(a2 + 32);
result = (unsigned int)(v4 + *(_DWORD *)(a1 + 32));
v6 = *(unsigned int *)(a1 + 36);
if ( (int)result > (int)v6 )
{
LODWORD(v7) = 8;
if ( (_DWORD)v6 )
LODWORD(v7) = *(_DWORD *)(a1 + 36);
do
{
v8 = v7;
v7 = (unsigned int)(2 * v7);
}
while ( v8 < (int)result );
result = realloc(*(_QWORD *)(a1 + 24), 8LL * v8, v6, v7);
*(_QWORD *)(a1 + 24) = result;
*(_DWORD *)(a1 + 36) = v8;
}
if ( v4 > 0 )
{
v9 = 0;
do
{
v10 = v9;
v11 = *(_DWORD *)(v3 + 8LL * v9);
if ( v11 < 2 )
goto LABEL_12;
if ( v11 == 2 )
{
v19 = *(_QWORD *)(v3 + 8LL * v9 + 8);
v20 = *(_QWORD *)(v3 + 8LL * v9 + 16);
v21 = *(_QWORD *)(v3 + 8LL * v9 + 24);
goto LABEL_14;
}
if ( v11 == 3 )
LABEL_12:
v19 = *(_QWORD *)(v3 + 8LL * v9 + 8);
LABEL_14:
v9 += *(_DWORD *)(v3 + 8LL * v9 + 4);
result = *(unsigned int *)(v3 + 8 * v10);
switch ( result )
{
case 0LL:
plutovg_matrix_map_points(v22, (long long)&v19, (long long)&v19, 1);
v23 = HIDWORD(v19);
v24 = v19;
result = plutovg_path_add_command(a1, 0, 1);
v12 = v24;
*(_DWORD *)result = v24;
v13 = v23;
*(_DWORD *)(result + 4) = v23;
*(_DWORD *)(a1 + 16) = v12;
*(_DWORD *)(a1 + 20) = v13;
++*(_DWORD *)(a1 + 8);
break;
case 1LL:
plutovg_matrix_map_points(v22, (long long)&v19, (long long)&v19, 1);
result = (long long)plutovg_path_line_to(a1, *(float *)&v19, *((float *)&v19 + 1));
break;
case 2LL:
plutovg_matrix_map_points(v22, (long long)&v19, (long long)&v19, 3);
result = (long long)plutovg_path_cubic_to(
a1,
*(float *)&v19,
*((float *)&v19 + 1),
*(float *)&v20,
*((float *)&v20 + 1),
*(float *)&v21,
*((float *)&v21 + 1));
break;
case 3LL:
if ( *(_DWORD *)(a1 + 32) )
{
result = plutovg_path_add_command(a1, 3, 1);
*(_QWORD *)result = *(_QWORD *)(a1 + 16);
}
break;
default:
break;
}
}
while ( v9 < v4 );
}
}
else
{
if ( v3 )
{
v14 = *(_DWORD *)(a2 + 32);
if ( v14 > 0 )
{
v15 = *(_DWORD *)(a1 + 32) + v14;
v16 = *(unsigned int *)(a1 + 36);
if ( v15 > (int)v16 )
{
LODWORD(v17) = 8;
if ( (_DWORD)v16 )
LODWORD(v17) = *(_DWORD *)(a1 + 36);
do
{
v18 = v17;
v17 = (unsigned int)(2 * v17);
}
while ( v18 < v15 );
*(_QWORD *)(a1 + 24) = realloc(*(_QWORD *)(a1 + 24), 8LL * v18, v16, v17);
*(_DWORD *)(a1 + 36) = v18;
}
memcpy(*(_QWORD *)(a1 + 24) + 8LL * *(int *)(a1 + 32), *(_QWORD *)(a2 + 24), 8LL * *(int *)(a2 + 32));
*(_DWORD *)(a1 + 32) += *(_DWORD *)(a2 + 32);
}
}
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a2 + 16);
*(_DWORD *)(a1 + 4) += *(_DWORD *)(a2 + 4);
*(_DWORD *)(a1 + 8) += *(_DWORD *)(a2 + 8);
result = *(unsigned int *)(a2 + 12);
*(_DWORD *)(a1 + 12) += result;
}
return result;
}
| plutovg_path_add_path:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x18],RDX
TEST RDX,RDX
JZ 0x0010b604
MOV EBP,dword ptr [R15 + 0x20]
MOV EAX,dword ptr [RBX + 0x20]
ADD EAX,EBP
MOV EDX,dword ptr [RBX + 0x24]
CMP EAX,EDX
JLE 0x0010b499
TEST EDX,EDX
MOV ECX,0x8
CMOVNZ ECX,EDX
LAB_0010b475:
MOV R14D,ECX
LEA ECX,[R14 + R14*0x1]
CMP R14D,EAX
JL 0x0010b475
MOV RDI,qword ptr [RBX + 0x18]
MOVSXD RSI,R14D
SHL RSI,0x3
CALL 0x001031f0
MOV qword ptr [RBX + 0x18],RAX
MOV dword ptr [RBX + 0x24],R14D
LAB_0010b499:
TEST EBP,EBP
JLE 0x0010b68a
XOR R14D,R14D
LEA R13,[0x123d44]
MOV R15,RSP
LAB_0010b4ae:
MOVSXD RAX,R14D
MOV ECX,dword ptr [R12 + RAX*0x8]
CMP ECX,0x2
JC 0x0010b4c1
JZ 0x0010b4cc
CMP ECX,0x3
JNZ 0x0010b4e9
LAB_0010b4c1:
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x8]
MOV qword ptr [RSP],RCX
JMP 0x0010b4e9
LAB_0010b4cc:
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x8]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x10]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x18]
MOV qword ptr [RSP + 0x10],RCX
LAB_0010b4e9:
MOV R14D,dword ptr [R12 + RAX*0x8 + 0x4]
ADD R14D,EAX
MOV EAX,dword ptr [R12 + RAX*0x8]
CMP RAX,0x3
JA 0x0010b5f6
MOVSXD RAX,dword ptr [R13 + RAX*0x4]
ADD RAX,R13
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R15
MOV RDX,R15
MOV ECX,0x1
CALL 0x00108107
MOVSS XMM0,dword ptr [RSP]
MOVSS dword ptr [RSP + 0x24],XMM0
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RSP + 0x20],XMM0
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1
CALL 0x0010a3a7
MOVSS XMM0,dword ptr [RSP + 0x24]
MOVSS dword ptr [RAX],XMM0
MOVSS XMM1,dword ptr [RSP + 0x20]
MOVSS dword ptr [RAX + 0x4],XMM1
MOVSS dword ptr [RBX + 0x10],XMM0
MOVSS dword ptr [RBX + 0x14],XMM1
INC dword ptr [RBX + 0x8]
JMP 0x0010b5f6
caseD_2:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R15
MOV RDX,R15
MOV ECX,0x3
CALL 0x00108107
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
MOVSS XMM2,dword ptr [RSP + 0x8]
MOVSS XMM3,dword ptr [RSP + 0xc]
MOVSS XMM4,dword ptr [RSP + 0x10]
MOVSS XMM5,dword ptr [RSP + 0x14]
MOV RDI,RBX
CALL 0x0010a526
JMP 0x0010b5f6
caseD_3:
CMP dword ptr [RBX + 0x20],0x0
JZ 0x0010b5f6
MOV RDI,RBX
MOV ESI,0x3
MOV EDX,0x1
CALL 0x0010a3a7
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0010b5f6
caseD_1:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R15
MOV RDX,R15
MOV ECX,0x1
CALL 0x00108107
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
MOV RDI,RBX
CALL 0x0010a41d
default:
CMP R14D,EBP
JL 0x0010b4ae
JMP 0x0010b68a
LAB_0010b604:
TEST R12,R12
JZ 0x0010b66d
MOV EAX,dword ptr [R15 + 0x20]
TEST EAX,EAX
JLE 0x0010b66d
ADD EAX,dword ptr [RBX + 0x20]
MOV EDX,dword ptr [RBX + 0x24]
CMP EAX,EDX
JLE 0x0010b649
TEST EDX,EDX
MOV ECX,0x8
CMOVNZ ECX,EDX
LAB_0010b625:
MOV R14D,ECX
LEA ECX,[R14 + R14*0x1]
CMP R14D,EAX
JL 0x0010b625
MOV RDI,qword ptr [RBX + 0x18]
MOVSXD RSI,R14D
SHL RSI,0x3
CALL 0x001031f0
MOV qword ptr [RBX + 0x18],RAX
MOV dword ptr [RBX + 0x24],R14D
LAB_0010b649:
MOVSXD RDI,dword ptr [RBX + 0x20]
SHL RDI,0x3
ADD RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [R15 + 0x18]
MOVSXD RDX,dword ptr [R15 + 0x20]
SHL RDX,0x3
CALL 0x00103190
MOV EAX,dword ptr [R15 + 0x20]
ADD dword ptr [RBX + 0x20],EAX
LAB_0010b66d:
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBX + 0x10],RAX
MOV EAX,dword ptr [R15 + 0x4]
ADD dword ptr [RBX + 0x4],EAX
MOV EAX,dword ptr [R15 + 0x8]
ADD dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [R15 + 0xc]
ADD dword ptr [RBX + 0xc],EAX
LAB_0010b68a:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void plutovg_path_add_path(long param_1,long param_2,long param_3)
{
uint uVar1;
long lVar2;
int iVar3;
int iVar4;
void *pvVar5;
long lVar6;
int4 *puVar7;
int8 *puVar8;
int iVar9;
int iVar10;
int8 local_58;
int8 local_50;
int8 local_48;
long local_40;
int4 local_38;
int4 local_34;
lVar2 = *(long *)(param_2 + 0x18);
local_40 = param_3;
if (param_3 == 0) {
if ((lVar2 != 0) && (0 < *(int *)(param_2 + 0x20))) {
iVar10 = *(int *)(param_2 + 0x20) + *(int *)(param_1 + 0x20);
iVar9 = *(int *)(param_1 + 0x24);
if (iVar9 < iVar10) {
iVar4 = 8;
if (iVar9 != 0) {
iVar4 = iVar9;
}
do {
iVar9 = iVar4;
iVar4 = iVar9 * 2;
} while (iVar9 < iVar10);
pvVar5 = realloc(*(void **)(param_1 + 0x18),(long)iVar9 << 3);
*(void **)(param_1 + 0x18) = pvVar5;
*(int *)(param_1 + 0x24) = iVar9;
}
memcpy((void *)((long)*(int *)(param_1 + 0x20) * 8 + *(long *)(param_1 + 0x18)),
*(void **)(param_2 + 0x18),(long)*(int *)(param_2 + 0x20) << 3);
*(int *)(param_1 + 0x20) = *(int *)(param_1 + 0x20) + *(int *)(param_2 + 0x20);
}
*(int8 *)(param_1 + 0x10) = *(int8 *)(param_2 + 0x10);
*(int *)(param_1 + 4) = *(int *)(param_1 + 4) + *(int *)(param_2 + 4);
*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + *(int *)(param_2 + 8);
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + *(int *)(param_2 + 0xc);
}
else {
iVar9 = *(int *)(param_2 + 0x20);
iVar4 = *(int *)(param_1 + 0x20) + iVar9;
iVar10 = *(int *)(param_1 + 0x24);
if (iVar10 < iVar4) {
iVar3 = 8;
if (iVar10 != 0) {
iVar3 = iVar10;
}
do {
iVar10 = iVar3;
iVar3 = iVar10 * 2;
} while (iVar10 < iVar4);
pvVar5 = realloc(*(void **)(param_1 + 0x18),(long)iVar10 << 3);
*(void **)(param_1 + 0x18) = pvVar5;
*(int *)(param_1 + 0x24) = iVar10;
}
if (0 < iVar9) {
iVar10 = 0;
do {
lVar6 = (long)iVar10;
uVar1 = *(uint *)(lVar2 + lVar6 * 8);
if (uVar1 < 2) {
LAB_0010b4c1:
local_58 = *(int8 *)(lVar2 + 8 + lVar6 * 8);
}
else if (uVar1 == 2) {
local_58 = *(int8 *)(lVar2 + 8 + lVar6 * 8);
local_50 = *(int8 *)(lVar2 + 0x10 + lVar6 * 8);
local_48 = *(int8 *)(lVar2 + 0x18 + lVar6 * 8);
}
else if (uVar1 == 3) goto LAB_0010b4c1;
iVar10 = *(int *)(lVar2 + 4 + lVar6 * 8) + iVar10;
switch(*(int4 *)(lVar2 + lVar6 * 8)) {
case 0:
plutovg_matrix_map_points(local_40,&local_58,&local_58,1);
local_34 = (int4)local_58;
local_38 = local_58._4_4_;
puVar7 = (int4 *)plutovg_path_add_command(param_1,0,1);
*puVar7 = local_34;
puVar7[1] = local_38;
*(int4 *)(param_1 + 0x10) = local_34;
*(int4 *)(param_1 + 0x14) = local_38;
*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
break;
case 1:
plutovg_matrix_map_points(local_40,&local_58,&local_58,1);
plutovg_path_line_to((int4)local_58,local_58._4_4_,param_1);
break;
case 2:
plutovg_matrix_map_points(local_40,&local_58,&local_58,3);
plutovg_path_cubic_to
((int4)local_58,local_58._4_4_,(int4)local_50,local_50._4_4_,
(int4)local_48,local_48._4_4_,param_1);
break;
case 3:
if (*(int *)(param_1 + 0x20) != 0) {
puVar8 = (int8 *)plutovg_path_add_command(param_1,3,1);
*puVar8 = *(int8 *)(param_1 + 0x10);
}
}
} while (iVar10 < iVar9);
}
}
return;
}
|
|
2,498 | js_os_sleep | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_sleep(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int64_t delay;
int ret;
if (JS_ToInt64(ctx, &delay, argv[0]))
return JS_EXCEPTION;
if (delay < 0)
delay = 0;
#if defined(_WIN32)
{
if (delay > INT32_MAX)
delay = INT32_MAX;
Sleep(delay);
ret = 0;
}
#else
{
struct timespec ts;
ts.tv_sec = delay / 1000;
ts.tv_nsec = (delay % 1000) * 1000000;
ret = js_get_errno(nanosleep(&ts, NULL));
}
#endif
return JS_NewInt32(ctx, ret);
} | O0 | c | js_os_sleep:
subq $0x88, %rsp
movq %rsi, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movq %r8, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x28(%rsp), %rsi
callq 0x38bf0
cmpl $0x0, %eax
je 0x1b335
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x1b3fe
cmpq $0x0, 0x28(%rsp)
jge 0x1b346
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x7, %rax
addq %rdx, %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
imulq %rcx
movq 0x8(%rsp), %rax
movq %rdx, %rcx
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x7, %rcx
addq %rdx, %rcx
imulq $0x3e8, %rcx, %rcx # imm = 0x3E8
subq %rcx, %rax
imulq $0xf4240, %rax, %rax # imm = 0xF4240
movq %rax, 0x18(%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0x10(%rsp), %rdi
callq 0xe2f0
movslq %eax, %rdi
callq 0x13a50
movl %eax, 0x24(%rsp)
movq 0x40(%rsp), %rcx
movl 0x24(%rsp), %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rdx
addq $0x88, %rsp
retq
| js_os_sleep:
sub rsp, 88h
mov [rsp+88h+var_40], rsi
mov [rsp+88h+var_38], rdx
mov [rsp+88h+var_48], rdi
mov [rsp+88h+var_4C], ecx
mov [rsp+88h+var_58], r8
mov rdi, [rsp+88h+var_48]
mov rax, [rsp+88h+var_58]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+88h+var_60]
call JS_ToInt64
cmp eax, 0
jz short loc_1B335
mov dword ptr [rsp+88h+var_30], 0
mov [rsp+88h+var_28], 6
jmp loc_1B3FE
loc_1B335:
cmp [rsp+88h+var_60], 0
jge short loc_1B346
mov [rsp+88h+var_60], 0
loc_1B346:
mov rax, [rsp+88h+var_60]
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
mov rdx, rax
shr rdx, 3Fh
sar rax, 7
add rax, rdx
mov [rsp+88h+var_78], rax
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_80], rax
imul rcx
mov rax, [rsp+88h+var_80]
mov rcx, rdx
mov rdx, rcx
shr rdx, 3Fh
sar rcx, 7
add rcx, rdx
imul rcx, 3E8h
sub rax, rcx
imul rax, 0F4240h
mov [rsp+88h+var_70], rax
xor eax, eax
mov esi, eax
lea rdi, [rsp+88h+var_78]
call _nanosleep
movsxd rdi, eax
call js_get_errno
mov [rsp+88h+var_64], eax
mov rcx, [rsp+88h+var_48]
mov eax, [rsp+88h+var_64]
mov [rsp+88h+var_18], rcx
mov [rsp+88h+var_1C], eax
mov eax, [rsp+88h+var_1C]
mov dword ptr [rsp+88h+var_10], eax
mov [rsp+88h+var_8], 0
mov rcx, [rsp+88h+var_10]
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_30], rcx
mov [rsp+88h+var_28], rax
loc_1B3FE:
mov rax, [rsp+88h+var_30]
mov rdx, [rsp+88h+var_28]
add rsp, 88h
retn
| long long js_os_sleep(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
int v5; // eax
_QWORD v7[2]; // [rsp+10h] [rbp-78h] BYREF
int errno; // [rsp+24h] [rbp-64h]
_QWORD v9[2]; // [rsp+28h] [rbp-60h] BYREF
int v10; // [rsp+3Ch] [rbp-4Ch]
long long v11; // [rsp+40h] [rbp-48h]
long long v12; // [rsp+48h] [rbp-40h]
long long v13; // [rsp+50h] [rbp-38h]
long long v14; // [rsp+58h] [rbp-30h]
long long v15; // [rsp+60h] [rbp-28h]
int v16; // [rsp+6Ch] [rbp-1Ch]
long long v17; // [rsp+70h] [rbp-18h]
long long v18; // [rsp+78h] [rbp-10h]
long long v19; // [rsp+80h] [rbp-8h]
v12 = a2;
v13 = a3;
v11 = a1;
v10 = a4;
v9[1] = a5;
if ( (unsigned int)JS_ToInt64(a1, v9, *a5, a5[1]) )
{
LODWORD(v14) = 0;
v15 = 6LL;
}
else
{
if ( v9[0] < 0LL )
v9[0] = 0LL;
v7[0] = v9[0] / 1000LL;
v7[1] = 1000000 * (v9[0] % 1000LL);
v5 = nanosleep(v7, 0LL);
errno = js_get_errno(v5);
v17 = v11;
v16 = errno;
LODWORD(v18) = errno;
v19 = 0LL;
v14 = v18;
v15 = 0LL;
}
return v14;
}
| js_os_sleep:
SUB RSP,0x88
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ECX
MOV qword ptr [RSP + 0x30],R8
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x00138bf0
CMP EAX,0x0
JZ 0x0011b335
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x0011b3fe
LAB_0011b335:
CMP qword ptr [RSP + 0x28],0x0
JGE 0x0011b346
MOV qword ptr [RSP + 0x28],0x0
LAB_0011b346:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
MOV RDX,RAX
SHR RDX,0x3f
SAR RAX,0x7
ADD RAX,RDX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
IMUL RCX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RDX
MOV RDX,RCX
SHR RDX,0x3f
SAR RCX,0x7
ADD RCX,RDX
IMUL RCX,RCX,0x3e8
SUB RAX,RCX
IMUL RAX,RAX,0xf4240
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x10]
CALL 0x0010e2f0
MOVSXD RDI,EAX
CALL 0x00113a50
MOV dword ptr [RSP + 0x24],EAX
MOV RCX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RSP + 0x24]
MOV qword ptr [RSP + 0x70],RCX
MOV dword ptr [RSP + 0x6c],EAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV dword ptr [RSP + 0x78],EAX
MOV qword ptr [RSP + 0x80],0x0
MOV RCX,qword ptr [RSP + 0x78]
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x60],RAX
LAB_0011b3fe:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
ADD RSP,0x88
RET
|
int1 [16]
js_os_sleep(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
timespec local_78;
long local_60;
int8 *local_58;
int4 local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
iVar2 = JS_ToInt64(param_1,&local_60,*param_5,param_5[1]);
if (iVar2 == 0) {
if (local_60 < 0) {
local_60 = 0;
}
local_78.tv_sec = local_60 / 1000;
local_78.tv_nsec = (local_60 % 1000) * 1000000;
iVar2 = nanosleep(&local_78,(timespec *)0x0);
local_30 = js_get_errno((long)iVar2);
uStack_2c = uStack_c;
local_28 = 0;
}
else {
local_30 = 0;
local_28 = 6;
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
|
|
2,499 | js_os_sleep | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_sleep(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int64_t delay;
int ret;
if (JS_ToInt64(ctx, &delay, argv[0]))
return JS_EXCEPTION;
if (delay < 0)
delay = 0;
#if defined(_WIN32)
{
if (delay > INT32_MAX)
delay = INT32_MAX;
Sleep(delay);
ret = 0;
}
#else
{
struct timespec ts;
ts.tv_sec = delay / 1000;
ts.tv_nsec = (delay % 1000) * 1000000;
ret = js_get_errno(nanosleep(&ts, NULL));
}
#endif
return JS_NewInt32(ctx, ret);
} | O2 | c | js_os_sleep:
pushq %rbx
subq $0x20, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0x8(%rsp), %rsi
callq 0x214fe
testl %eax, %eax
je 0x1480c
pushq $0x6
popq %rbx
xorl %eax, %eax
jmp 0x1484e
movq 0x8(%rsp), %rax
testq %rax, %rax
jns 0x1481e
andq $0x0, 0x8(%rsp)
xorl %eax, %eax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
imulq $0xf4240, %rdx, %rax # imm = 0xF4240
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0xe300
movslq %eax, %rdi
callq 0x113ab
movl %eax, %eax
movq %rbx, %rdx
addq $0x20, %rsp
popq %rbx
retq
| js_os_sleep:
push rbx
sub rsp, 20h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+28h+var_20]
call JS_ToInt64
test eax, eax
jz short loc_1480C
push 6
pop rbx
xor eax, eax
jmp short loc_1484E
loc_1480C:
mov rax, [rsp+28h+var_20]
test rax, rax
jns short loc_1481E
and [rsp+28h+var_20], 0
xor eax, eax
loc_1481E:
mov ecx, 3E8h
xor edx, edx
div rcx
xor ebx, ebx
lea rdi, [rsp+28h+var_18]
mov [rdi], rax
imul rax, rdx, 0F4240h
mov [rdi+8], rax
xor esi, esi
call _nanosleep
movsxd rdi, eax
call js_get_errno
mov eax, eax
loc_1484E:
mov rdx, rbx
add rsp, 20h
pop rbx
retn
| long long js_os_sleep(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned long long v6; // rax
int v7; // eax
long long v8; // [rsp+8h] [rbp-20h] BYREF
_QWORD v9[3]; // [rsp+10h] [rbp-18h] BYREF
if ( (unsigned int)JS_ToInt64(a1, &v8, *a5, a5[1]) )
return 0LL;
v6 = v8;
if ( v8 < 0 )
{
v8 = 0LL;
v6 = 0LL;
}
v9[0] = v6 / 0x3E8;
v9[1] = 1000000 * (v6 % 0x3E8);
v7 = nanosleep(v9, 0LL);
return (unsigned int)js_get_errno(v7);
}
| js_os_sleep:
PUSH RBX
SUB RSP,0x20
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x001214fe
TEST EAX,EAX
JZ 0x0011480c
PUSH 0x6
POP RBX
XOR EAX,EAX
JMP 0x0011484e
LAB_0011480c:
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
JNS 0x0011481e
AND qword ptr [RSP + 0x8],0x0
XOR EAX,EAX
LAB_0011481e:
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
XOR EBX,EBX
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],RAX
IMUL RAX,RDX,0xf4240
MOV qword ptr [RDI + 0x8],RAX
XOR ESI,ESI
CALL 0x0010e300
MOVSXD RDI,EAX
CALL 0x001113ab
MOV EAX,EAX
LAB_0011484e:
MOV RDX,RBX
ADD RSP,0x20
POP RBX
RET
|
int4 js_os_sleep(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 *in_R8;
ulong local_20;
timespec local_18;
iVar1 = JS_ToInt64(param_1,&local_20,*in_R8,in_R8[1]);
if (iVar1 == 0) {
if ((long)local_20 < 0) {
local_20 = 0;
}
local_18.tv_sec = local_20 / 1000;
local_18.tv_nsec = (local_20 % 1000) * 1000000;
iVar1 = nanosleep(&local_18,(timespec *)0x0);
uVar2 = js_get_errno((long)iVar1);
}
else {
uVar2 = 0;
}
return uVar2;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.