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
|
---|---|---|---|---|---|---|---|---|---|---|---|
65,400 |
nglog::LogMessage::~LogMessage()
|
ng-log[P]ng-log/src/logging.cc
|
LogMessage::~LogMessage() noexcept(false) {
Flush();
bool fail = data_->severity_ == NGLOG_FATAL && exit_on_dfatal;
#ifdef NGLOG_THREAD_LOCAL_STORAGE
if (data_ == static_cast<void*>(&thread_msg_data)) {
data_->~LogMessageData();
thread_data_available = true;
} else {
delete allocated_;
}
#else // !defined(NGLOG_THREAD_LOCAL_STORAGE)
delete allocated_;
#endif // defined(NGLOG_THREAD_LOCAL_STORAGE)
//
if (fail) {
const char* message = "*** Check failure stack trace: ***\n";
if (write(fileno(stderr), message, strlen(message)) < 0) {
// Ignore errors.
}
AlsoErrorWrite(NGLOG_FATAL, tools::ProgramInvocationShortName(), message);
#if defined(__cpp_lib_uncaught_exceptions) && \
(__cpp_lib_uncaught_exceptions >= 201411L)
if (std::uncaught_exceptions() == 0)
#else
if (!std::uncaught_exception())
#endif
{
Fail();
}
}
}
|
O3
|
cpp
|
nglog::LogMessage::~LogMessage():
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0xad12
movq (%r14), %rbx
movq 0x8(%r14), %rax
cmpl $0x3, 0x7698(%rax)
sete %bpl
andb 0x248e1(%rip), %bpl # 0x2f544
testq %rbx, %rbx
je 0xacb2
leaq 0x237a1(%rip), %rax # 0x2e410
leaq 0x18(%rax), %rcx
movq %rcx, 0x7538(%rbx)
leaq 0x7590(%rbx), %r14
addq $0x40, %rax
movq %rax, 0x7590(%rbx)
movq 0x242a5(%rip), %rax # 0x2ef38
addq $0x10, %rax
movq %rax, 0x7540(%rbx)
leaq 0x7578(%rbx), %rdi
callq 0x7760
movq %r14, %rdi
callq 0x7160
movl $0x76f0, %esi # imm = 0x76F0
movq %rbx, %rdi
callq 0x8eac
testb %bpl, %bpl
je 0xad07
movq 0x242cd(%rip), %rax # 0x2ef98
movq (%rax), %rdi
callq 0x7550
leaq 0x178fc(%rip), %rbx # 0x225d6
movl $0x23, %edx
movl %eax, %edi
movq %rbx, %rsi
callq 0x7170
callq 0x2122f
movl $0x3, %edi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x21210
callq 0x7630
testl %eax, %eax
je 0xad0c
popq %rbx
popq %r14
popq %rbp
retq
callq *0x24836(%rip) # 0x2f548
|
_ZN5nglog10LogMessageD2Ev:
push rbp; Alternative name is 'nglog::LogMessage::~LogMessage()'
push r14
push rbx
mov r14, rdi
call _ZN5nglog10LogMessage5FlushEv; nglog::LogMessage::Flush(void)
mov rbx, [r14]
mov rax, [r14+8]
cmp dword ptr [rax+7698h], 3
setz bpl
and bpl, cs:_ZN5nglogL14exit_on_dfatalE; nglog::exit_on_dfatal
test rbx, rbx
jz short loc_ACB2
lea rax, _ZTVN5nglog10LogMessage9LogStreamE; `vtable for'nglog::LogMessage::LogStream
lea rcx, [rax+18h]
mov [rbx+7538h], rcx
lea r14, [rbx+7590h]
add rax, 40h ; '@'
mov [rbx+7590h], rax
mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rax, 10h
mov [rbx+7540h], rax
lea rdi, [rbx+7578h]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_ACB2:
mov esi, 76F0h; unsigned __int64
mov rdi, rbx; void *
call _ZdlPvm; operator delete(void *,ulong)
test bpl, bpl
jz short loc_AD07
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fileno
lea rbx, aCheckFailureSt; "*** Check failure stack trace: ***\n"
mov edx, 23h ; '#'
mov edi, eax; this
mov rsi, rbx
call _write
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
mov edi, 3
mov rsi, rax
mov rdx, rbx
call _ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_; nglog::tools::AlsoErrorWrite(nglog::LogSeverity,char const*,char const*)
call __ZSt19uncaught_exceptionsv; std::uncaught_exceptions(void)
test eax, eax
jz short loc_AD0C
loc_AD07:
pop rbx
pop r14
pop rbp
retn
loc_AD0C:
call cs:_ZN5nglog19g_logging_fail_funcE; nglog::g_logging_fail_func ...
|
void nglog::LogMessage::~LogMessage(nglog::LogMessage *this)
{
_QWORD *v1; // rbx
char v2; // bp
nglog::tools *v3; // rdi
long long v4; // rax
nglog::LogMessage::Flush(this);
v1 = *(_QWORD **)this;
v2 = nglog::exit_on_dfatal & (*(_DWORD *)(*((_QWORD *)this + 1) + 30360LL) == 3);
if ( *(_QWORD *)this )
{
v1[3751] = (char *)&`vtable for'nglog::LogMessage::LogStream + 24;
v1[3762] = (char *)&`vtable for'nglog::LogMessage::LogStream + 64;
v1[3752] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)(v1 + 3759));
std::ios_base::~ios_base((std::ios_base *)(v1 + 3762));
}
operator delete(v1);
if ( v2 )
{
v3 = (nglog::tools *)(unsigned int)fileno(stderr, 30448LL);
write(v3, "*** Check failure stack trace: ***\n", 35LL);
v4 = nglog::tools::ProgramInvocationShortName(v3);
nglog::tools::AlsoErrorWrite(3LL, v4, "*** Check failure stack trace: ***\n");
if ( !(unsigned int)std::uncaught_exceptions() )
nglog::g_logging_fail_func();
}
}
|
~LogMessage:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RDI
CALL 0x0010ad12
MOV RBX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
CMP dword ptr [RAX + 0x7698],0x3
SETZ BPL
AND BPL,byte ptr [0x0012f544]
TEST RBX,RBX
JZ 0x0010acb2
LEA RAX,[0x12e410]
LEA RCX,[RAX + 0x18]
MOV qword ptr [RBX + 0x7538],RCX
LEA R14,[RBX + 0x7590]
ADD RAX,0x40
MOV qword ptr [RBX + 0x7590],RAX
MOV RAX,qword ptr [0x0012ef38]
ADD RAX,0x10
MOV qword ptr [RBX + 0x7540],RAX
LEA RDI,[RBX + 0x7578]
CALL 0x00107760
MOV RDI,R14
CALL 0x00107160
LAB_0010acb2:
MOV ESI,0x76f0
MOV RDI,RBX
CALL 0x00108eac
TEST BPL,BPL
JZ 0x0010ad07
MOV RAX,qword ptr [0x0012ef98]
MOV RDI,qword ptr [RAX]
CALL 0x00107550
LEA RBX,[0x1225d6]
MOV EDX,0x23
MOV EDI,EAX
MOV RSI,RBX
CALL 0x00107170
CALL 0x0012122f
MOV EDI,0x3
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00121210
CALL 0x00107630
TEST EAX,EAX
JZ 0x0010ad0c
LAB_0010ad07:
POP RBX
POP R14
POP RBP
RET
LAB_0010ad0c:
CALL qword ptr [0x0012f548]
|
/* nglog::LogMessage::~LogMessage() */
void __thiscall nglog::LogMessage::~LogMessage(LogMessage *this)
{
void *pvVar1;
int iVar2;
int8 uVar3;
byte bVar4;
Flush(this);
pvVar1 = *(void **)this;
bVar4 = *(int *)(*(long *)(this + 8) + 0x7698) == 3 & exit_on_dfatal;
if (pvVar1 != (void *)0x0) {
*(int ***)((long)pvVar1 + 0x7538) = &PTR__LogStream_0012e428;
*(int ***)((long)pvVar1 + 0x7590) = &PTR__LogStream_0012e450;
*(int **)((long)pvVar1 + 0x7540) = PTR_vtable_0012ef38 + 0x10;
std::locale::~locale((locale *)((long)pvVar1 + 0x7578));
std::ios_base::~ios_base((ios_base *)((long)pvVar1 + 0x7590));
}
operator_delete(pvVar1,0x76f0);
if (bVar4 != 0) {
iVar2 = fileno(*(FILE **)PTR_stderr_0012ef98);
write(iVar2,"*** Check failure stack trace: ***\n",0x23);
uVar3 = tools::ProgramInvocationShortName();
tools::AlsoErrorWrite(3,uVar3,"*** Check failure stack trace: ***\n");
iVar2 = std::uncaught_exceptions();
if (iVar2 == 0) {
(*(code *)g_logging_fail_func)();
return;
}
}
return;
}
|
|
65,401 |
ma_tls_read_async
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
ssize_t ma_tls_read_async(MARIADB_PVIO *pvio,
const unsigned char *buffer,
size_t length)
{
int res;
struct mysql_async_context *b= pvio->mysql->options.extension->async_context;
MARIADB_TLS *ctls= pvio->ctls;
for (;;)
{
res= SSL_read((SSL *)ctls->ssl, (void *)buffer, (int)length);
if (ma_tls_async_check_result(res, b, (SSL *)ctls->ssl))
return res;
}
}
|
O3
|
c
|
ma_tls_read_async:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x38(%rdi), %r13
movq 0x40(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %r15
movq 0x10(%r13), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x13070
movl %eax, %r12d
movq 0x10(%r13), %rdx
movl %eax, %edi
movq %r15, %rsi
callq 0x2b246
testb %al, %al
je 0x2b211
movslq %r12d, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_tls_read_async:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r13, [rdi+38h]
mov rax, [rdi+40h]
mov rax, [rax+480h]
mov r15, [rax+28h]
loc_2B211:
mov rdi, [r13+10h]
mov rsi, r14
mov edx, ebx
call _SSL_read
mov r12d, eax
mov rdx, [r13+10h]
mov edi, eax
mov rsi, r15
call ma_tls_async_check_result
test al, al
jz short loc_2B211
movsxd rax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_tls_read_async(long long a1, long long a2, unsigned int a3)
{
long long v4; // r13
long long v5; // r15
long long v6; // r12
v4 = *(_QWORD *)(a1 + 56);
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL);
do
v6 = (unsigned int)SSL_read(*(_QWORD *)(v4 + 16), a2, a3);
while ( !(unsigned __int8)ma_tls_async_check_result(v6, v5, *(_QWORD *)(v4 + 16)) );
return (int)v6;
}
|
ma_tls_read_async:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R13,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RAX + 0x28]
LAB_0012b211:
MOV RDI,qword ptr [R13 + 0x10]
MOV RSI,R14
MOV EDX,EBX
CALL 0x00113070
MOV R12D,EAX
MOV RDX,qword ptr [R13 + 0x10]
MOV EDI,EAX
MOV RSI,R15
CALL 0x0012b246
TEST AL,AL
JZ 0x0012b211
MOVSXD RAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long ma_tls_read_async(long param_1,void *param_2,int param_3)
{
long lVar1;
int8 uVar2;
char cVar3;
int iVar4;
lVar1 = *(long *)(param_1 + 0x38);
uVar2 = *(int8 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28);
do {
iVar4 = SSL_read(*(SSL **)(lVar1 + 0x10),param_2,param_3);
cVar3 = ma_tls_async_check_result(iVar4,uVar2,*(int8 *)(lVar1 + 0x10));
} while (cVar3 == '\0');
return (long)iVar4;
}
|
|
65,402 |
fmt::v10::detail::bigint::multiply(unsigned int)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
FMT_CONSTEXPR20 void multiply(uint32_t value) {
const double_bigit wide_value = value;
bigit carry = 0;
for (size_t i = 0, n = bigits_.size(); i < n; ++i) {
double_bigit result = bigits_[i] * wide_value + carry;
bigits_[i] = static_cast<bigit>(result);
carry = static_cast<bigit>(result >> bigit_bits);
}
if (carry != 0) bigits_.push_back(carry);
}
|
O0
|
c
|
fmt::v10::detail::bigint::multiply(unsigned int):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl 0x3c(%rsp), %eax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
callq 0xb7120
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0xb8345
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xb7560
movq 0x8(%rsp), %rdi
movl (%rax), %eax
imulq 0x30(%rsp), %rax
movl 0x2c(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rsi
callq 0xb7560
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
shrq $0x20, %rax
movl %eax, 0x2c(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xb82db
cmpl $0x0, 0x2c(%rsp)
je 0xb835b
movq 0x8(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0xb7650
addq $0x48, %rsp
retq
|
_ZN3fmt3v106detail6bigint8multiplyEj:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_40], rdi
mov eax, [rsp+48h+var_C]
mov [rsp+48h+var_18], rax
mov [rsp+48h+var_1C], 0
mov [rsp+48h+var_28], 0
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov [rsp+48h+var_30], rax
loc_B82DB:
mov rax, [rsp+48h+var_28]
cmp rax, [rsp+48h+var_30]
jnb short loc_B8345
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_28]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov rdi, [rsp+48h+var_40]
mov eax, [rax]
imul rax, [rsp+48h+var_18]
mov ecx, [rsp+48h+var_1C]
add rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_44], eax
mov rsi, [rsp+48h+var_28]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov ecx, [rsp+48h+var_44]
mov [rax], ecx
mov rax, [rsp+48h+var_38]
shr rax, 20h
mov [rsp+48h+var_1C], eax
mov rax, [rsp+48h+var_28]
add rax, 1
mov [rsp+48h+var_28], rax
jmp short loc_B82DB
loc_B8345:
cmp [rsp+48h+var_1C], 0
jz short loc_B835B
mov rdi, [rsp+48h+var_40]
lea rsi, [rsp+48h+var_1C]
call _ZN3fmt3v106detail6bufferIjE9push_backERKj; fmt::v10::detail::buffer<uint>::push_back(uint const&)
loc_B835B:
add rsp, 48h
retn
|
unsigned long long fmt::v10::detail::bigint::multiply(fmt::v10::detail::bigint *this, unsigned int a2)
{
unsigned long long result; // rax
long long v3; // rax
long long v4; // [rsp+10h] [rbp-38h]
unsigned long long v5; // [rsp+18h] [rbp-30h]
unsigned long long v6; // [rsp+20h] [rbp-28h]
unsigned int v7; // [rsp+2Ch] [rbp-1Ch] BYREF
long long v8; // [rsp+30h] [rbp-18h]
unsigned int v9; // [rsp+3Ch] [rbp-Ch]
fmt::v10::detail::bigint *v10; // [rsp+40h] [rbp-8h]
v10 = this;
v9 = a2;
v8 = a2;
v7 = 0;
v6 = 0LL;
v5 = fmt::v10::detail::buffer<unsigned int>::size((long long)this);
while ( 1 )
{
result = v6;
if ( v6 >= v5 )
break;
v3 = v8 * *(unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>((long long)this, v6);
v4 = v7 + v3;
*(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>((long long)this, v6) = v7 + v3;
v7 = HIDWORD(v4);
++v6;
}
if ( v7 )
return fmt::v10::detail::buffer<unsigned int>::push_back((long long)this, (int *)&v7);
return result;
}
|
multiply:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ESI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RDI
MOV EAX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x0
MOV qword ptr [RSP + 0x20],0x0
CALL 0x001b7120
MOV qword ptr [RSP + 0x18],RAX
LAB_001b82db:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x18]
JNC 0x001b8345
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001b7560
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
IMUL RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x2c]
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001b7560
MOV ECX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x10]
SHR RAX,0x20
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001b82db
LAB_001b8345:
CMP dword ptr [RSP + 0x2c],0x0
JZ 0x001b835b
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x2c]
CALL 0x001b7650
LAB_001b835b:
ADD RSP,0x48
RET
|
/* fmt::v10::detail::bigint::multiply(unsigned int) */
void __thiscall fmt::v10::detail::bigint::multiply(bigint *this,uint param_1)
{
ulong uVar1;
uint *puVar2;
long lVar3;
ulong local_28;
uint local_1c;
ulong local_18;
uint local_c;
bigint *local_8;
local_18 = (ulong)param_1;
local_1c = 0;
local_28 = 0;
local_c = param_1;
local_8 = this;
uVar1 = buffer<unsigned_int>::size((buffer<unsigned_int> *)this);
for (; local_28 < uVar1; local_28 = local_28 + 1) {
puVar2 = buffer<unsigned_int>::operator[]<unsigned_long>((buffer<unsigned_int> *)this,local_28);
lVar3 = *puVar2 * local_18 + (ulong)local_1c;
puVar2 = buffer<unsigned_int>::operator[]<unsigned_long>((buffer<unsigned_int> *)this,local_28);
*puVar2 = (uint)lVar3;
local_1c = (uint)((ulong)lVar3 >> 0x20);
}
if (local_1c != 0) {
buffer<unsigned_int>::push_back((buffer<unsigned_int> *)this,&local_1c);
}
return;
}
|
|
65,403 |
inline_mysql_file_sync
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_sync(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File fd, myf flags)
{
int result= 0;
#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, fd, PSI_FILE_SYNC);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_sync(fd, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_sync(fd, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_sync:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0x257619(%rip), %rax # 0x2c75a0
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x10, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x70015
leaq 0x2575d6(%rip), %rax # 0x2c75a0
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xfbc10
movl %eax, -0x24(%rbp)
leaq 0x2575a7(%rip), %rax # 0x2c75a0
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7002a
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xfbc10
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
inline_mysql_file_sync_2:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 10h
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz 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_70015
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_30]
xor ecx, ecx
mov esi, ecx
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_7002A
loc_70015:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_sync
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_7002A:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_sync_2(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v7 = 0;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL);
if ( v6 )
{
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10);
v7 = my_sync(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL);
}
else
{
return (unsigned int)my_sync(v9, v8);
}
return v7;
}
|
inline_mysql_file_sync:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
LEA RAX,[0x3c75a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x10
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00170015
LEA RAX,[0x3c75a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001fbc10
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x3c75a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x30]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017002a
LAB_00170015:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001fbc10
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0017002a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_2c = 0;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10);
if (local_38 == 0) {
local_c = my_sync(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c);
local_2c = my_sync(local_20,local_28);
(**(code **)(PSI_server + 0x218))(local_38,0);
local_c = local_2c;
}
return local_c;
}
|
|
65,404 |
mysql_fetch_row_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_fetch_row_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_fetch_row,
(parms->result),
parms->result->handle,
MYSQL_ROW,
r_ptr)
}
|
O3
|
c
|
mysql_fetch_row_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x78(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rbx
callq 0x1b5f8
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_fetch_row_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+78h]
mov rax, [rax+480h]
mov rbx, [rax+28h]
call mysql_fetch_row
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_fetch_row_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v1 + 120) + 1152LL) + 40LL);
result = mysql_fetch_row(v1);
*(_QWORD *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_fetch_row_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0011b5f8
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_fetch_row_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x78) + 0x480) + 0x28);
uVar2 = mysql_fetch_row();
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
65,405 |
my_uca_generate_implicit_page
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_generate_implicit_page(MY_CHARSET_LOADER *loader,
MY_UCA_WEIGHT_LEVEL *dst,
uint page)
{
uint chc, size= 256 * dst->lengths[page] * sizeof(uint16);
if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size)))
return TRUE;
memset(dst->weights[page], 0, size);
for (chc= 0 ; chc < 256; chc++)
{
uint16 *w= dst->weights[page] + chc * dst->lengths[page];
my_uca_implicit_weight_put(w, (page << 8) + chc, dst->levelno);
}
return FALSE;
}
|
O0
|
c
|
my_uca_generate_implicit_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
cltq
shlq %rax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edi
callq *%rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x1c(%rbp), %edx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0xa00cd
movb $0x1, -0x1(%rbp)
jmp 0xa0154
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x362e0
movl $0x0, -0x20(%rbp)
cmpl $0x100, -0x20(%rbp) # imm = 0x100
jae 0xa0150
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rdx
movq 0x8(%rdx), %rdx
movl -0x1c(%rbp), %esi
movzbl (%rdx,%rsi), %edx
imull %edx, %ecx
movl %ecx, %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %eax
shll $0x8, %eax
addl -0x20(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %edx
callq 0xa0160
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xa00ef
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_uca_generate_implicit_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_1C]
movzx eax, byte ptr [rax+rcx]
shl eax, 8
cdqe
shl rax, 1
mov [rbp+var_24], eax
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_24]
mov edi, ecx
call rax
mov rcx, [rbp+var_18]
mov rcx, [rcx+10h]
mov edx, [rbp+var_1C]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_A00CD
mov [rbp+var_1], 1
jmp loc_A0154
loc_A00CD:
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov ecx, [rbp+var_1C]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_24]
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_20], 0
loc_A00EF:
cmp [rbp+var_20], 100h
jnb short loc_A0150
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov ecx, [rbp+var_1C]
mov rax, [rax+rcx*8]
mov ecx, [rbp+var_20]
mov rdx, [rbp+var_18]
mov rdx, [rdx+8]
mov esi, [rbp+var_1C]
movzx edx, byte ptr [rdx+rsi]
imul ecx, edx
mov ecx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov eax, [rbp+var_1C]
shl eax, 8
add eax, [rbp+var_20]
mov eax, eax
mov esi, eax
mov rax, [rbp+var_18]
mov edx, [rax+30h]
call my_uca_implicit_weight_put
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_A00EF
loc_A0150:
mov [rbp+var_1], 0
loc_A0154:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char my_uca_generate_implicit_page(long long a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int v5; // [rsp+Ch] [rbp-24h]
unsigned int i; // [rsp+10h] [rbp-20h]
v5 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a3) << 9;
v3 = (*(long long ( **)(_QWORD))(a1 + 128))(v5);
*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * a3) = v3;
if ( !v3 )
return 1;
memset(*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * a3), 0LL, v5);
for ( i = 0; i < 0x100; ++i )
my_uca_implicit_weight_put(
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a3) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * a3),
i + (a3 << 8),
*(unsigned int *)(a2 + 48));
return 0;
}
|
my_uca_generate_implicit_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x1c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
CDQE
SHL RAX,0x1
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x24]
MOV EDI,ECX
CALL RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x10]
MOV EDX,dword ptr [RBP + -0x1c]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x001a00cd
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a0154
LAB_001a00cd:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x001362e0
MOV dword ptr [RBP + -0x20],0x0
LAB_001a00ef:
CMP dword ptr [RBP + -0x20],0x100
JNC 0x001a0150
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX + 0x8]
MOV ESI,dword ptr [RBP + -0x1c]
MOVZX EDX,byte ptr [RDX + RSI*0x1]
IMUL ECX,EDX
MOV ECX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x8
ADD EAX,dword ptr [RBP + -0x20]
MOV EAX,EAX
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX + 0x30]
CALL 0x001a0160
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001a00ef
LAB_001a0150:
MOV byte ptr [RBP + -0x1],0x0
LAB_001a0154:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_generate_implicit_page(long param_1,long param_2,uint param_3)
{
size_t __n;
long lVar1;
int4 local_28;
int1 local_9;
__n = (long)(int)((uint)*(byte *)(*(long *)(param_2 + 8) + (ulong)param_3) << 8) << 1;
lVar1 = (**(code **)(param_1 + 0x80))(__n);
*(long *)(*(long *)(param_2 + 0x10) + (ulong)param_3 * 8) = lVar1;
if (lVar1 == 0) {
local_9 = 1;
}
else {
memset(*(void **)(*(long *)(param_2 + 0x10) + (ulong)param_3 * 8),0,__n);
for (local_28 = 0; local_28 < 0x100; local_28 = local_28 + 1) {
my_uca_implicit_weight_put
(*(long *)(*(long *)(param_2 + 0x10) + (ulong)param_3 * 8) +
(ulong)(local_28 * *(byte *)(*(long *)(param_2 + 8) + (ulong)param_3)) * 2,
param_3 * 0x100 + local_28,*(int4 *)(param_2 + 0x30));
}
local_9 = 0;
}
return local_9;
}
|
|
65,406 |
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_token_string() const
|
monkey531[P]llama/common/json.hpp
|
std::string get_token_string() const
{
// escape control characters
std::string result;
for (const auto c : token_string)
{
if (static_cast<unsigned char>(c) <= '\x1F')
{
// escape control characters
std::array<char, 9> cs{{}};
static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
result += cs.data();
}
else
{
// add character as is
result.push_back(static_cast<std::string::value_type>(c));
}
}
return result;
}
|
O0
|
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_token_string() const:
subq $0x78, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x67(%rsp)
callq 0x5a610
movq 0x20(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0xa6710
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0xa6740
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xbab10
testb $0x1, %al
jne 0xa9293
jmp 0xa934b
leaq 0x50(%rsp), %rdi
callq 0xbab50
movb (%rax), %al
movb %al, 0x47(%rsp)
movzbl 0x47(%rsp), %eax
cmpl $0x1f, %eax
jg 0xa9327
movb $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xbab60
movq 0x8(%rsp), %rdi
movq %rax, (%rsp)
callq 0xbab70
movq (%rsp), %rdi
movq %rax, %rsi
movzbl 0x47(%rsp), %ecx
leaq 0x165212(%rip), %rdx # 0x20e4fd
xorl %eax, %eax
callq 0x5a910
movq 0x8(%rsp), %rdi
callq 0xbab60
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x5a230
jmp 0xa930b
jmp 0xa933a
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x5b588
jmp 0xa936b
movq 0x10(%rsp), %rdi
movsbl 0x47(%rsp), %esi
callq 0x5b460
jmp 0xa9338
jmp 0xa933a
jmp 0xa933c
leaq 0x50(%rsp), %rdi
callq 0xbab80
jmp 0xa927b
movb $0x1, 0x67(%rsp)
testb $0x1, 0x67(%rsp)
jne 0xa9361
movq 0x10(%rsp), %rdi
callq 0x5b588
movq 0x18(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x5abf0
nopw %cs:(%rax,%rax)
nop
|
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv:
sub rsp, 78h
mov [rsp+78h+var_68], rdi
mov rax, rdi
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rax, [rsp+78h+var_58]
add rax, 38h ; '8'
mov [rsp+78h+var_20], rax
mov rdi, [rsp+78h+var_20]
call _ZNKSt6vectorIcSaIcEE5beginEv; std::vector<char>::begin(void)
mov [rsp+78h+var_28], rax
mov rdi, [rsp+78h+var_20]
call _ZNKSt6vectorIcSaIcEE3endEv; std::vector<char>::end(void)
mov [rsp+78h+var_30], rax
loc_A927B:
lea rdi, [rsp+78h+var_28]
lea rsi, [rsp+78h+var_30]
call _ZN9__gnu_cxxneIPKcSt6vectorIcSaIcEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<char const*,std::vector<char>>(__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&,__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&)
test al, 1
jnz short loc_A9293
jmp loc_A934B
loc_A9293:
lea rdi, [rsp+78h+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*(void)
mov al, [rax]
mov [rsp+78h+var_31], al
movzx eax, [rsp+78h+var_31]
cmp eax, 1Fh
jg short loc_A9327
mov [rsp+78h+var_38], 0
mov [rsp+78h+var_40], 0
lea rdi, [rsp+78h+var_40]
mov [rsp+78h+var_70], rdi
call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void)
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_78], rax
call _ZNKSt5arrayIcLm9EE4sizeEv; std::array<char,9ul>::size(void)
mov rdi, [rsp+78h+var_78]
mov rsi, rax
movzx ecx, [rsp+78h+var_31]
lea rdx, aU4x; "<U+%.4X>"
xor eax, eax
call _snprintf
mov rdi, [rsp+78h+var_70]
call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void)
mov rdi, [rsp+78h+var_68]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_A930B:
jmp short loc_A933A
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_A936B
loc_A9327:
mov rdi, [rsp+78h+var_68]
movsx esi, [rsp+78h+var_31]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_A9338:
jmp short $+2
loc_A933A:
jmp short $+2
loc_A933C:
lea rdi, [rsp+78h+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(void)
jmp loc_A927B
loc_A934B:
mov [rsp+78h+var_11], 1
test [rsp+78h+var_11], 1
jnz short loc_A9361
mov rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A9361:
mov rax, [rsp+78h+var_60]
add rsp, 78h
retn
loc_A936B:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
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_token_string(
long long a1,
long long a2)
{
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+0h] [rbp-78h]
long long v6; // [rsp+38h] [rbp-40h] BYREF
char v7; // [rsp+40h] [rbp-38h]
unsigned __int8 v8; // [rsp+47h] [rbp-31h]
long long v9; // [rsp+48h] [rbp-30h] BYREF
_QWORD v10[2]; // [rsp+50h] [rbp-28h] BYREF
char v11; // [rsp+67h] [rbp-11h]
long long v12; // [rsp+68h] [rbp-10h]
long long v13; // [rsp+70h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = 0;
std::string::basic_string(a1);
v10[1] = a2 + 56;
v10[0] = std::vector<char>::begin(a2 + 56);
v9 = std::vector<char>::end(a2 + 56);
while ( (__gnu_cxx::operator!=<char const*,std::vector<char>>(v10, &v9) & 1) != 0 )
{
v8 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*(v10);
if ( v8 > 0x1Fu )
{
std::string::push_back(a1, (unsigned int)(char)v8);
}
else
{
v7 = 0;
v6 = 0LL;
v5 = ((long long (*)(void))std::array<char,9ul>::data)();
v2 = std::array<char,9ul>::size(&v6);
snprintf(v5, v2, "<U+%.4X>", v8);
v3 = std::array<char,9ul>::data(&v6);
std::string::operator+=(a1, v3);
}
__gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(v10);
}
return a1;
}
|
get_token_string:
SUB RSP,0x78
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x20],RAX
MOV byte ptr [RSP + 0x67],0x0
CALL 0x0015a610
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x38
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001a6710
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001a6740
MOV qword ptr [RSP + 0x48],RAX
LAB_001a927b:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x48]
CALL 0x001bab10
TEST AL,0x1
JNZ 0x001a9293
JMP 0x001a934b
LAB_001a9293:
LEA RDI,[RSP + 0x50]
CALL 0x001bab50
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x47],AL
MOVZX EAX,byte ptr [RSP + 0x47]
CMP EAX,0x1f
JG 0x001a9327
MOV byte ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x38],0x0
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001bab60
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
CALL 0x001bab70
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
MOVZX ECX,byte ptr [RSP + 0x47]
LEA RDX,[0x30e4fd]
XOR EAX,EAX
CALL 0x0015a910
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001bab60
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
LAB_001a9304:
CALL 0x0015a230
JMP 0x001a930b
LAB_001a930b:
JMP 0x001a933a
LAB_001a9327:
MOV RDI,qword ptr [RSP + 0x10]
MOVSX ESI,byte ptr [RSP + 0x47]
CALL 0x0015b460
LAB_001a9336:
JMP 0x001a9338
LAB_001a9338:
JMP 0x001a933a
LAB_001a933a:
JMP 0x001a933c
LAB_001a933c:
LEA RDI,[RSP + 0x50]
CALL 0x001bab80
JMP 0x001a927b
LAB_001a934b:
MOV byte ptr [RSP + 0x67],0x1
TEST byte ptr [RSP + 0x67],0x1
JNZ 0x001a9361
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015b588
LAB_001a9361:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x78
RET
|
/* WARNING: Removing unreachable block (ram,0x001a9357) */
/* 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_token_string() const */
string * 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_token_string(void)
{
bool bVar1;
byte *pbVar2;
char *pcVar3;
size_t __maxlen;
long in_RSI;
string *in_RDI;
int8 local_40;
int1 local_38;
byte local_31;
int8 local_30;
int8 local_28;
vector<char,std::allocator<char>> *local_20;
int1 local_11;
local_11 = 0;
std::__cxx11::string::string(in_RDI);
local_20 = (vector<char,std::allocator<char>> *)(in_RSI + 0x38);
local_28 = std::vector<char,std::allocator<char>>::begin(local_20);
local_30 = std::vector<char,std::allocator<char>>::end(local_20);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_28,(__normal_iterator *)&local_30), bVar1) {
pbVar2 = (byte *)__gnu_cxx::
__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>::
operator*((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>
*)&local_28);
local_31 = *pbVar2;
if (local_31 < 0x20) {
local_38 = 0;
local_40 = 0;
pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40);
__maxlen = std::array<char,9ul>::size();
snprintf(pcVar3,__maxlen,"<U+%.4X>",(ulong)local_31);
pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40);
/* try { // try from 001a9304 to 001a9335 has its CatchHandler @ 001a930d */
std::__cxx11::string::operator+=(in_RDI,pcVar3);
}
else {
std::__cxx11::string::push_back((char)in_RDI);
}
__gnu_cxx::__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>::operator++
((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>> *)&local_28);
}
return in_RDI;
}
|
|
65,407 |
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_token_string() const
|
monkey531[P]llama/common/json.hpp
|
std::string get_token_string() const
{
// escape control characters
std::string result;
for (const auto c : token_string)
{
if (static_cast<unsigned char>(c) <= '\x1F')
{
// escape control characters
std::array<char, 9> cs{{}};
static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
result += cs.data();
}
else
{
// add character as is
result.push_back(static_cast<std::string::value_type>(c));
}
}
return result;
}
|
O1
|
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_token_string() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x38(%rsi), %r13
movq 0x40(%rsi), %rbp
cmpq %rbp, %r13
je 0x5b09b
leaq 0x94f0a(%rip), %r14 # 0xeff56
leaq 0x8(%rsp), %r15
movzbl (%r13), %ecx
cmpl $0x1f, %ecx
ja 0x5b088
movb $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x9, %esi
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1be10
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c110
jmp 0x5b093
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x1b760
incq %r13
cmpq %rbp, %r13
jne 0x5b051
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5b0af
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x5b0c6
movq (%r12), %rsi
incq %rsi
callq 0x1b8d0
movq %r14, %rdi
callq 0x1bfc0
|
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov r13, [rsi+38h]
mov rbp, [rsi+40h]
cmp r13, rbp
jz short loc_5B09B
lea r14, aU4x; "<U+%.4X>"
lea r15, [rsp+48h+var_40]
loc_5B051:
movzx ecx, byte ptr [r13+0]
cmp ecx, 1Fh
ja short loc_5B088
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_40], 0
mov esi, 9
mov rdi, r15
mov rdx, r14
xor eax, eax
call _snprintf
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_5B093
loc_5B088:
movsx esi, cl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_5B093:
inc r13
cmp r13, rbp
jnz short loc_5B051
loc_5B09B:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_5B0AF:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_5B0C6
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5B0C6:
mov rdi, r14
call __Unwind_Resume
|
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_token_string(
long long a1,
long long a2)
{
unsigned __int8 *v2; // r13
unsigned __int8 *i; // rbp
unsigned int v4; // ecx
long long v6; // [rsp+8h] [rbp-40h] BYREF
char v7; // [rsp+10h] [rbp-38h]
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = *(unsigned __int8 **)(a2 + 56);
for ( i = *(unsigned __int8 **)(a2 + 64); v2 != i; ++v2 )
{
v4 = *v2;
if ( v4 > 0x1F )
{
std::string::push_back(a1, (unsigned int)(char)v4);
}
else
{
v7 = 0;
v6 = 0LL;
snprintf(&v6, 9LL, "<U+%.4X>", v4);
std::string::append(a1, &v6);
}
}
return a1;
}
|
get_token_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV R13,qword ptr [RSI + 0x38]
MOV RBP,qword ptr [RSI + 0x40]
CMP R13,RBP
JZ 0x0015b09b
LEA R14,[0x1eff56]
LEA R15,[RSP + 0x8]
LAB_0015b051:
MOVZX ECX,byte ptr [R13]
CMP ECX,0x1f
JA 0x0015b088
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV ESI,0x9
MOV RDI,R15
MOV RDX,R14
XOR EAX,EAX
CALL 0x0011be10
LAB_0015b07b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c110
JMP 0x0015b093
LAB_0015b088:
MOVSX ESI,CL
MOV RDI,RBX
CALL 0x0011b760
LAB_0015b093:
INC R13
CMP R13,RBP
JNZ 0x0015b051
LAB_0015b09b:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* 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_token_string() const */
void 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_token_string(void)
{
byte *pbVar1;
long in_RSI;
long *in_RDI;
byte *pbVar2;
char local_40 [16];
*in_RDI = (long)(in_RDI + 2);
in_RDI[1] = 0;
*(int1 *)(in_RDI + 2) = 0;
pbVar2 = *(byte **)(in_RSI + 0x38);
pbVar1 = *(byte **)(in_RSI + 0x40);
if (pbVar2 != pbVar1) {
do {
if (*pbVar2 < 0x20) {
local_40[8] = 0;
local_40[0] = '\0';
local_40[1] = '\0';
local_40[2] = '\0';
local_40[3] = '\0';
local_40[4] = '\0';
local_40[5] = '\0';
local_40[6] = '\0';
local_40[7] = '\0';
snprintf(local_40,9,"<U+%.4X>");
/* try { // try from 0015b07b to 0015b085 has its CatchHandler @ 0015b0af */
std::__cxx11::string::append((char *)in_RDI);
}
else {
/* try { // try from 0015b088 to 0015b092 has its CatchHandler @ 0015b0ad */
std::__cxx11::string::push_back((char)in_RDI);
}
pbVar2 = pbVar2 + 1;
} while (pbVar2 != pbVar1);
}
return;
}
|
|
65,408 |
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_token_string() const
|
monkey531[P]llama/common/json.hpp
|
std::string get_token_string() const
{
// escape control characters
std::string result;
for (const auto c : token_string)
{
if (static_cast<unsigned char>(c) <= '\x1F')
{
// escape control characters
std::array<char, 9> cs{{}};
static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
result += cs.data();
}
else
{
// add character as is
result.push_back(static_cast<std::string::value_type>(c));
}
}
return result;
}
|
O2
|
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_token_string() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x38(%rsi), %r13
movq 0x40(%rsi), %rbp
leaq 0x7135e(%rip), %r14 # 0xb0f68
leaq 0x8(%rsp), %r15
pushq $0x9
popq %r12
cmpq %rbp, %r13
je 0x3fc5a
movzbl (%r13), %ecx
cmpl $0x1f, %ecx
ja 0x3fc4a
movb $0x0, 0x10(%rsp)
andq $0x0, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x23e30
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24120
jmp 0x3fc55
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x23780
incq %r13
jmp 0x3fc13
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3fc6e
movq %rax, %r14
movq %rbx, %rdi
callq 0x241f8
movq %r14, %rdi
callq 0x23fc0
nop
|
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov r13, [rsi+38h]
mov rbp, [rsi+40h]
lea r14, aU4x; "<U+%.4X>"
lea r15, [rsp+48h+var_40]
push 9
pop r12
loc_3FC13:
cmp r13, rbp
jz short loc_3FC5A
movzx ecx, byte ptr [r13+0]
cmp ecx, 1Fh
ja short loc_3FC4A
mov [rsp+48h+var_38], 0
and [rsp+48h+var_40], 0
mov rdi, r15
mov rsi, r12
mov rdx, r14
xor eax, eax
call _snprintf
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_3FC55
loc_3FC4A:
movsx esi, cl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_3FC55:
inc r13
jmp short loc_3FC13
loc_3FC5A:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_3FC6E:
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
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_token_string(
long long a1,
long long a2)
{
unsigned __int8 *v2; // r13
unsigned __int8 *v3; // rbp
unsigned int v4; // ecx
long long v6; // [rsp+8h] [rbp-40h] BYREF
char v7; // [rsp+10h] [rbp-38h]
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = *(unsigned __int8 **)(a2 + 56);
v3 = *(unsigned __int8 **)(a2 + 64);
while ( v2 != v3 )
{
v4 = *v2;
if ( v4 > 0x1F )
{
std::string::push_back(a1, (unsigned int)(char)v4);
}
else
{
v7 = 0;
v6 = 0LL;
snprintf(&v6, 9LL, "<U+%.4X>", v4);
std::string::append(a1, &v6);
}
++v2;
}
return a1;
}
|
get_token_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV R13,qword ptr [RSI + 0x38]
MOV RBP,qword ptr [RSI + 0x40]
LEA R14,[0x1b0f68]
LEA R15,[RSP + 0x8]
PUSH 0x9
POP R12
LAB_0013fc13:
CMP R13,RBP
JZ 0x0013fc5a
MOVZX ECX,byte ptr [R13]
CMP ECX,0x1f
JA 0x0013fc4a
MOV byte ptr [RSP + 0x10],0x0
AND qword ptr [RSP + 0x8],0x0
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
XOR EAX,EAX
CALL 0x00123e30
LAB_0013fc3d:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00124120
JMP 0x0013fc55
LAB_0013fc4a:
MOVSX ESI,CL
MOV RDI,RBX
CALL 0x00123780
LAB_0013fc55:
INC R13
JMP 0x0013fc13
LAB_0013fc5a:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* 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_token_string() const */
void 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_token_string(void)
{
byte *pbVar1;
long in_RSI;
long *in_RDI;
byte *pbVar2;
char local_40 [16];
*in_RDI = (long)(in_RDI + 2);
in_RDI[1] = 0;
*(int1 *)(in_RDI + 2) = 0;
pbVar1 = *(byte **)(in_RSI + 0x40);
for (pbVar2 = *(byte **)(in_RSI + 0x38); pbVar2 != pbVar1; pbVar2 = pbVar2 + 1) {
if (*pbVar2 < 0x20) {
local_40[8] = 0;
local_40[0] = '\0';
local_40[1] = '\0';
local_40[2] = '\0';
local_40[3] = '\0';
local_40[4] = '\0';
local_40[5] = '\0';
local_40[6] = '\0';
local_40[7] = '\0';
snprintf(local_40,9,"<U+%.4X>");
/* try { // try from 0013fc3d to 0013fc47 has its CatchHandler @ 0013fc6e */
std::__cxx11::string::append((char *)in_RDI);
}
else {
/* try { // try from 0013fc4a to 0013fc54 has its CatchHandler @ 0013fc6c */
std::__cxx11::string::push_back((char)in_RDI);
}
}
return;
}
|
|
65,409 |
thr_lock_delete
|
eloqsql/mysys/thr_lock.c
|
void thr_lock_delete(THR_LOCK *lock)
{
DBUG_ENTER("thr_lock_delete");
mysql_mutex_lock(&THR_LOCK_lock);
thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list);
mysql_mutex_unlock(&THR_LOCK_lock);
mysql_mutex_destroy(&lock->mutex);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
thr_lock_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x37be3d(%rip), %rdi # 0x3ae0d0
leaq 0x55bd4(%rip), %rsi # 0x87e6e
movl $0x1bb, %edx # imm = 0x1BB
callq 0x321b0
leaq 0x37c0d5(%rip), %rax # 0x3ae380
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x2da40
movq %rax, %rcx
leaq 0x37c0bf(%rip), %rax # 0x3ae380
movq %rcx, (%rax)
leaq 0x37be05(%rip), %rdi # 0x3ae0d0
callq 0x32220
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x322f0
jmp 0x322df
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
thr_lock_delete:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
lea rdi, THR_LOCK_lock
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1BBh
call inline_mysql_mutex_lock_4
lea rax, thr_lock_thread_list
mov rdi, [rax]
mov rsi, [rbp+var_8]
call list_delete
mov rcx, rax
lea rax, thr_lock_thread_list
mov [rax], rcx
lea rdi, THR_LOCK_lock
call inline_mysql_mutex_unlock_4
mov rdi, [rbp+var_8]
add rdi, 18h
call inline_mysql_mutex_destroy_0
jmp short $+2
loc_322DF:
add rsp, 10h
pop rbp
retn
|
long long thr_lock_delete(_QWORD *a1)
{
inline_mysql_mutex_lock_4(
(long long)&THR_LOCK_lock,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x1BBu);
thr_lock_thread_list = list_delete(thr_lock_thread_list, a1);
inline_mysql_mutex_unlock_4((long long)&THR_LOCK_lock);
return inline_mysql_mutex_destroy_0(a1 + 3);
}
|
thr_lock_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[0x4ae0d0]
LEA RSI,[0x187e6e]
MOV EDX,0x1bb
CALL 0x001321b0
LEA RAX,[0x4ae380]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x0012da40
MOV RCX,RAX
LEA RAX,[0x4ae380]
MOV qword ptr [RAX],RCX
LEA RDI,[0x4ae0d0]
CALL 0x00132220
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
CALL 0x001322f0
JMP 0x001322df
LAB_001322df:
ADD RSP,0x10
POP RBP
RET
|
void thr_lock_delete(long param_1)
{
inline_mysql_mutex_lock
(THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x1bb);
thr_lock_thread_list = list_delete(thr_lock_thread_list,param_1);
inline_mysql_mutex_unlock(THR_LOCK_lock);
inline_mysql_mutex_destroy(param_1 + 0x18);
return;
}
|
|
65,410 |
SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
llama.cpp/common/json-schema-to-grammar.cpp
|
std::string _visit_pattern(const std::string & pattern, const std::string & name) {
if (!(pattern.front() == '^' && pattern.back() == '$')) {
_errors.push_back("Pattern must start with '^' and end with '$'");
return "";
}
std::string sub_pattern = pattern.substr(1, pattern.length() - 2);
std::unordered_map<std::string, std::string> sub_rule_ids;
size_t i = 0;
size_t length = sub_pattern.length();
using literal_or_rule = std::pair<std::string, bool>;
auto to_rule = [&](const literal_or_rule & ls) {
auto is_literal = ls.second;
auto s = ls.first;
return is_literal ? "\"" + s + "\"" : s;
};
std::function<literal_or_rule()> transform = [&]() -> literal_or_rule {
size_t start = i;
std::vector<literal_or_rule> seq;
auto get_dot = [&]() {
std::string rule;
if (_dotall) {
rule = "[\\U00000000-\\U0010FFFF]";
} else {
rule = "[^\\x0A\\x0D]";
}
return _add_rule("dot", rule);
};
// Joins the sequence, merging consecutive literals together.
auto join_seq = [&]() {
std::vector<literal_or_rule> ret;
std::string literal;
auto flush_literal = [&]() {
if (literal.empty()) {
return false;
}
ret.emplace_back(literal, true);
literal.clear();
return true;
};
for (const auto & item : seq) {
auto is_literal = item.second;
if (is_literal) {
literal += item.first;
} else {
flush_literal();
ret.push_back(item);
}
}
flush_literal();
std::vector<std::string> results;
for (const auto & item : ret) {
results.push_back(to_rule(item));
}
return std::make_pair(string_join(results, " "), false);
};
while (i < length) {
char c = sub_pattern[i];
if (c == '.') {
seq.emplace_back(get_dot(), false);
i++;
} else if (c == '(') {
i++;
if (i < length) {
if (sub_pattern[i] == '?') {
_warnings.push_back("Unsupported pattern syntax");
}
}
seq.emplace_back("(" + to_rule(transform()) + ")", false);
} else if (c == ')') {
i++;
if (start > 0 && sub_pattern[start - 1] != '(') {
_errors.push_back("Unbalanced parentheses");
}
return join_seq();
} else if (c == '[') {
std::string square_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != ']') {
if (sub_pattern[i] == '\\') {
square_brackets += sub_pattern.substr(i, 2);
i += 2;
} else {
square_brackets += sub_pattern[i];
i++;
}
}
if (i >= length) {
_errors.push_back("Unbalanced square brackets");
}
square_brackets += ']';
i++;
seq.emplace_back(square_brackets, false);
} else if (c == '|') {
seq.emplace_back("|", false);
i++;
} else if (c == '*' || c == '+' || c == '?') {
seq.back() = std::make_pair(to_rule(seq.back()) + c, false);
i++;
} else if (c == '{') {
std::string curly_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != '}') {
curly_brackets += sub_pattern[i];
i++;
}
if (i >= length) {
_errors.push_back("Unbalanced curly brackets");
}
curly_brackets += '}';
i++;
auto nums = string_split(curly_brackets.substr(1, curly_brackets.length() - 2), ",");
int min_times = 0;
int max_times = std::numeric_limits<int>::max();
try {
if (nums.size() == 1) {
min_times = max_times = std::stoi(nums[0]);
} else if (nums.size() != 2) {
_errors.push_back("Wrong number of values in curly brackets");
} else {
if (!nums[0].empty()) {
min_times = std::stoi(nums[0]);
}
if (!nums[1].empty()) {
max_times = std::stoi(nums[1]);
}
}
} catch (const std::invalid_argument & e) {
_errors.push_back("Invalid number in curly brackets");
return std::make_pair("", false);
}
auto &last = seq.back();
auto &sub = last.first;
auto sub_is_literal = last.second;
if (!sub_is_literal) {
std::string & sub_id = sub_rule_ids[sub];
if (sub_id.empty()) {
sub_id = _add_rule(name + "-" + std::to_string(sub_rule_ids.size()), sub);
}
sub = sub_id;
}
seq.back().first = build_repetition(
sub_is_literal ? "\"" + sub + "\"" : sub,
min_times,
max_times,
""
);
seq.back().second = false;
} else {
std::string literal;
auto is_non_literal = [&](char c) {
return NON_LITERAL_SET.find(c) != NON_LITERAL_SET.end();
};
while (i < length) {
if (sub_pattern[i] == '\\' && i < length - 1) {
char next = sub_pattern[i + 1];
if (ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.find(next) != ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.end()) {
i++;
literal += sub_pattern[i];
i++;
} else {
literal += sub_pattern.substr(i, 2);
i += 2;
}
} else if (sub_pattern[i] == '"') {
literal += "\\\"";
i++;
} else if (!is_non_literal(sub_pattern[i]) &&
(i == length - 1 || literal.empty() || sub_pattern[i + 1] == '.' || !is_non_literal(sub_pattern[i + 1]))) {
literal += sub_pattern[i];
i++;
} else {
break;
}
}
if (!literal.empty()) {
seq.emplace_back(literal, true);
}
}
}
return join_seq();
};
return _add_rule(name, "\"\\\"\" (" + to_rule(transform()) + ") \"\\\"\" space");
}
|
O3
|
cpp
|
SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdx, %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rdx
cmpb $0x5e, (%rdx)
jne 0x47a26
movq %rcx, %r15
movq 0x8(%rax), %rcx
cmpb $0x24, -0x1(%rdx,%rcx)
jne 0x47a26
addq $-0x2, %rcx
leaq 0x108(%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x17ac0
leaq 0xc0(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq 0x8(%r12), %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0xf0(%rsp)
movl $0x40, %edi
callq 0x17140
leaq 0x60(%rsp), %rcx
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
leaq 0xf(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x58(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq %r12, 0x20(%rax)
leaq 0xe8(%rsp), %rcx
movq %rcx, 0x28(%rax)
leaq 0x90(%rsp), %rdx
movq %rdx, 0x30(%rax)
movq %r15, 0x38(%rax)
movq %rax, (%rcx)
leaq 0x5aad(%rip), %rdx # 0x4d44c
movq %rdx, 0x18(%rcx)
leaq 0x5ab4(%rip), %rdx # 0x4d45e
movq %rdx, 0x10(%rcx)
leaq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0x4d486
leaq 0xc8(%rsp), %rdi
leaq 0xf(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x4d2f8
leaq 0x194cc(%rip), %rcx # 0x60ea5
leaq 0xc8(%rsp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x17170
movq %rax, %r13
leaq 0x20(%rsp), %rdi
movq %rdi, -0x10(%rdi)
movq (%rax), %rax
movq %r13, %rbp
addq $0x10, %rbp
cmpq %rbp, %rax
je 0x47add
movq %rax, 0x10(%rsp)
movq 0x10(%r13), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r13), %r12
jmp 0x47aee
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x68(%rsp), %rsi
movq $0x2c, (%rsi)
leaq 0x90(%rsp), %rdi
xorl %edx, %edx
callq 0x17780
leaq 0x90(%rsp), %rsi
movq %rax, (%rsi)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsi)
movups 0x1942c(%rip), %xmm0 # 0x60e94
movups %xmm0, 0x1c(%rax)
movups 0x19415(%rip), %xmm0 # 0x60e88
movups %xmm0, 0x10(%rax)
movups 0x193fa(%rip), %xmm0 # 0x60e78
movups %xmm0, (%rax)
movq %rcx, 0x8(%rsi)
movb $0x0, (%rax,%rcx)
addq $0xc8, %r14
movq %r14, %rdi
callq 0x49fd4
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x47ab5
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x17100
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r13), %r12
leaq 0x1(%r12), %rdx
movq %rbp, %rsi
callq 0x170b0
leaq 0x10(%rsp), %rdi
movq %r12, 0x8(%rdi)
movq %rbp, (%r13)
movq $0x0, 0x8(%r13)
movb $0x0, 0x10(%r13)
leaq 0x1939d(%rip), %rsi # 0x60eac
callq 0x17740
movq %rax, %rbp
movq %r15, 0x30(%rsp)
leaq 0x48(%rsp), %rdi
movq %rdi, -0x10(%rdi)
movq (%rax), %rax
movq %rbp, %r12
addq $0x10, %r12
cmpq %r12, %rax
je 0x47b4b
movq %rdi, %r15
movq %rax, 0x38(%rsp)
movq 0x10(%rbp), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%rbp), %r13
jmp 0x47b5e
movq 0x8(%rbp), %r13
leaq 0x1(%r13), %rdx
movq %rdi, %r15
movq %r12, %rsi
callq 0x170b0
leaq 0x38(%rsp), %rcx
movq %r13, 0x8(%rcx)
movq %r12, (%rbp)
movq $0x0, 0x8(%rbp)
movb $0x0, 0x10(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
movq 0x30(%rsp), %rdx
callq 0x3f4c6
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x47b9e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x17100
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x47bba
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x17100
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47bdb
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x17100
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47bf6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x17100
movq 0xf8(%rsp), %rax
testq %rax, %rax
je 0x47c15
leaq 0xe8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x90(%rsp), %rdi
callq 0x4caf2
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47ac8
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x47ac8
jmp 0x47d23
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x47c70
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x47c70
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x47c91
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x47c91
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47cb7
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x47cb7
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47cd7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x47cd7
movq %rax, %rbx
movq 0xf8(%rsp), %rax
testq %rax, %rax
je 0x47cfb
leaq 0xe8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x47cfb
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x4caf2
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47d50
movq 0x118(%rsp), %rsi
jmp 0x47d43
movq %rax, %rdi
callq 0x25387
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x47d50
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x47d50
movq %rax, %rbx
movq %rbx, %rdi
callq 0x17710
|
_ZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov rax, rdx
mov r14, rsi
mov rbx, rdi
mov rdx, [rdx]
cmp byte ptr [rdx], 5Eh ; '^'
jnz loc_47A26
mov r15, rcx
mov rcx, [rax+8]
cmp byte ptr [rdx+rcx-1], 24h ; '$'
jnz loc_47A26
add rcx, 0FFFFFFFFFFFFFFFEh
lea r12, [rsp+158h+var_50]
mov edx, 1
mov rdi, r12
mov rsi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rax, [rsp+158h+var_98]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
xor eax, eax
mov [rsp+158h+var_F8], rax
mov rcx, [r12+8]
mov [rsp+158h+var_100], rcx
mov [rsp+158h+var_68], rax
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rsp+158h+var_F8]
mov [rax], rcx
mov [rax+8], r14
lea rcx, [rsp+158h+var_149]
mov [rax+10h], rcx
lea rcx, [rsp+158h+var_100]
mov [rax+18h], rcx
mov [rax+20h], r12
lea rcx, [rsp+158h+var_70]
mov [rax+28h], rcx
lea rdx, [rsp+158h+var_C8]
mov [rax+30h], rdx
mov [rax+38h], r15
mov [rcx], rax
lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&)
mov [rcx+18h], rdx
lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rcx+10h], rdx
lea rdi, [rsp+158h+var_F0]; __int64
mov rsi, rax
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlvE_clB5cxx11Ev; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()(void)
lea rdi, [rsp+158h+var_90]; int
lea rsi, [rsp+158h+var_149]; int
lea rdx, [rsp+158h+var_F0]; int
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlRKSt4pairIS5_bEE_clB5cxx11ESB_; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()(std::pair<std::string,bool> const&)
lea rcx, asc_60EA5; "\"\\\"\" ("
lea rdi, [rsp+158h+var_90]
mov r8d, 6
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov r13, rax
lea rdi, [rsp+158h+var_138]
mov [rdi-10h], rdi
mov rax, [rax]
mov rbp, r13
add rbp, 10h
cmp rax, rbp
jz loc_47ADD
mov [rsp+158h+var_149+1], rax
mov rax, [r13+10h]
mov [rsp+158h+var_138], rax
mov r12, [r13+8]
jmp loc_47AEE
loc_47A26:
lea r15, [rsp+158h+var_B8]
mov [r15-10h], r15
lea rsi, [rsp+158h+var_F0]
mov qword ptr [rsi], 2Ch ; ','
lea rdi, [rsp+158h+var_C8]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm; std::string::_M_create(ulong &,ulong)
lea rsi, [rsp+158h+var_C8]
mov [rsi], rax
mov rcx, [rsp+158h+var_F0]
mov [rsi+10h], rcx
movups xmm0, cs:xmmword_60E88+0Ch
movups xmmword ptr [rax+1Ch], xmm0
movups xmm0, cs:xmmword_60E88
movups xmmword ptr [rax+10h], xmm0
movups xmm0, cs:xmmword_60E78
movups xmmword ptr [rax], xmm0
mov [rsi+8], rcx
mov byte ptr [rax+rcx], 0
add r14, 0C8h
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+158h+var_C8]; void *
cmp rdi, r15
jz short loc_47AB5
mov rsi, [rsp+158h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_47AB5:
lea rax, [rbx+10h]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
loc_47AC8:
mov rax, rbx
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_47ADD:
mov r12, [r13+8]
lea rdx, [r12+1]
mov rsi, rbp
call _memcpy
loc_47AEE:
lea rdi, [rsp+158h+var_149+1]
mov [rdi+8], r12
mov [r13+0], rbp
mov qword ptr [r13+8], 0
mov byte ptr [r13+10h], 0
lea rsi, aSpace; ") \"\\\"\" space"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rbp, rax
mov [rsp+158h+var_128], r15
lea rdi, [rsp+158h+var_110]
mov [rdi-10h], rdi
mov rax, [rax]
mov r12, rbp
add r12, 10h
cmp rax, r12
jz short loc_47B4B
mov r15, rdi
mov [rsp+158h+var_120], rax
mov rax, [rbp+10h]
mov [rsp+158h+var_110], rax
mov r13, [rbp+8]
jmp short loc_47B5E
loc_47B4B:
mov r13, [rbp+8]
lea rdx, [r13+1]
mov r15, rdi
mov rsi, r12
call _memcpy
loc_47B5E:
lea rcx, [rsp+158h+var_120]
mov [rcx+8], r13
mov [rbp+0], r12
mov qword ptr [rbp+8], 0
mov byte ptr [rbp+10h], 0
mov rdi, rbx
mov rsi, r14
mov rdx, [rsp+158h+var_128]
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
mov rdi, [rsp+158h+var_120]; void *
cmp rdi, r15
jz short loc_47B9E
mov rsi, [rsp+158h+var_110]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_47B9E:
mov rdi, [rsp+158h+var_149+1]; void *
lea rax, [rsp+158h+var_138]
cmp rdi, rax
jz short loc_47BBA
mov rsi, [rsp+158h+var_138]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_47BBA:
lea rax, [rsp+158h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_47BDB
mov rsi, [rsp+158h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_47BDB:
lea rax, [rsp+158h+var_E0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_47BF6
mov rsi, [rsp+158h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_47BF6:
mov rax, [rsp+158h+var_60]
test rax, rax
jz short loc_47C15
lea rdi, [rsp+158h+var_70]
mov rsi, rdi
mov edx, 3
call rax
loc_47C15:
lea rdi, [rsp+158h+var_C8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rax, [rsp+158h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz loc_47AC8
mov rsi, [rsp+158h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_47AC8
jmp loc_47D23
mov rbx, rax
mov rdi, [rsp+158h+var_120]; void *
cmp rdi, r15
jz short loc_47C70
mov rsi, [rsp+158h+var_110]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_47C70
mov rbx, rax
loc_47C70:
mov rdi, [rsp+158h+var_149+1]; void *
lea rax, [rsp+158h+var_138]
cmp rdi, rax
jz short loc_47C91
mov rsi, [rsp+158h+var_138]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_47C91
mov rbx, rax
loc_47C91:
lea rax, [rsp+158h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_47CB7
mov rsi, [rsp+158h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_47CB7
mov rbx, rax
loc_47CB7:
lea rax, [rsp+158h+var_E0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_47CD7
mov rsi, [rsp+158h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_47CD7
mov rbx, rax
loc_47CD7:
mov rax, [rsp+158h+var_60]
test rax, rax
jz short loc_47CFB
lea rdi, [rsp+158h+var_70]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_47CFB
mov rbx, rax
loc_47CFB:
lea rdi, [rsp+158h+var_C8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rax, [rsp+158h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_47D50
mov rsi, [rsp+158h+var_40]
jmp short loc_47D43
loc_47D23:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+158h+var_C8]; void *
cmp rdi, r15
jz short loc_47D50
mov rsi, [rsp+158h+var_B8]
loc_47D43:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_47D50
mov rbx, rax
loc_47D50:
mov rdi, rbx
call __Unwind_Resume
|
long long SchemaConverter::_visit_pattern(long long a1, long long a2, long long a3, _QWORD *a4)
{
_BYTE *v5; // rdx
long long v7; // rcx
_QWORD *v8; // rax
int v9; // ecx
int v10; // r8d
int v11; // r9d
_QWORD *v12; // r13
long long v13; // r12
void *v14; // rax
long long v15; // rcx
long long v17; // rbp
char *v18; // r13
void *v19; // [rsp+0h] [rbp-158h]
int v20; // [rsp+8h] [rbp-150h]
_BYTE v21[9]; // [rsp+Fh] [rbp-149h] BYREF
long long v22; // [rsp+18h] [rbp-140h]
long long v23; // [rsp+20h] [rbp-138h] BYREF
int v24; // [rsp+28h] [rbp-130h]
_QWORD *v25; // [rsp+30h] [rbp-128h]
void *v26[2]; // [rsp+38h] [rbp-120h] BYREF
_QWORD v27[2]; // [rsp+48h] [rbp-110h] BYREF
void *v28; // [rsp+58h] [rbp-100h] BYREF
long long v29; // [rsp+60h] [rbp-F8h] BYREF
long long v30[2]; // [rsp+68h] [rbp-F0h] BYREF
long long v31; // [rsp+78h] [rbp-E0h] BYREF
void *v32; // [rsp+90h] [rbp-C8h] BYREF
long long v33; // [rsp+98h] [rbp-C0h]
__int128 v34; // [rsp+A0h] [rbp-B8h] BYREF
int v35; // [rsp+B0h] [rbp-A8h]
__int128 v36; // [rsp+B8h] [rbp-A0h] BYREF
int v37[4]; // [rsp+C8h] [rbp-90h] BYREF
long long v38; // [rsp+D8h] [rbp-80h] BYREF
_QWORD v39[2]; // [rsp+E8h] [rbp-70h] BYREF
long long ( *v40)(); // [rsp+F8h] [rbp-60h]
long long ( *v41)(); // [rsp+100h] [rbp-58h]
void *v42[2]; // [rsp+108h] [rbp-50h] BYREF
long long v43; // [rsp+118h] [rbp-40h] BYREF
v5 = *(_BYTE **)a3;
if ( *v5 == 94 && (v7 = *(_QWORD *)(a3 + 8), v5[v7 - 1] == 36) )
{
std::string::substr(v42, a3, 1LL, v7 - 2);
v32 = (char *)&v36 + 8;
v33 = 1LL;
v34 = 0LL;
v35 = 1065353216;
v36 = 0LL;
v29 = 0LL;
v28 = v42[1];
v39[1] = 0LL;
v8 = (_QWORD *)operator new(0x40uLL);
*v8 = &v29;
v8[1] = a2;
v8[2] = v21;
v8[3] = &v28;
v8[4] = v42;
v8[5] = v39;
v8[6] = &v32;
v8[7] = a4;
v39[0] = v8;
v41 = std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke;
v40 = std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager;
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()[abi:cxx11]((long long)v30);
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()[abi:cxx11](
(int)v37,
(int)v21,
(int)v30,
v9,
v10,
v11,
v19,
v20,
*(long long *)&v21[1],
v22,
v23,
v24,
(long long)v25);
v12 = (_QWORD *)std::string::replace(v37, 0LL, 0LL);
*(_QWORD *)&v21[1] = &v23;
if ( (_QWORD *)*v12 == v12 + 2 )
{
v13 = v12[1];
memcpy(&v23, v12 + 2, v13 + 1);
}
else
{
*(_QWORD *)&v21[1] = *v12;
v23 = v12[2];
v13 = v12[1];
}
v22 = v13;
*v12 = v12 + 2;
v12[1] = 0LL;
*((_BYTE *)v12 + 16) = 0;
v17 = std::string::append(&v21[1], ") \"\\\"\" space");
v25 = a4;
v26[0] = v27;
if ( *(_QWORD *)v17 == v17 + 16 )
{
v18 = *(char **)(v17 + 8);
memcpy(v27, v17 + 16, v18 + 1);
}
else
{
v26[0] = *(void **)v17;
v27[0] = *(_QWORD *)(v17 + 16);
v18 = *(char **)(v17 + 8);
}
v26[1] = v18;
*(_QWORD *)v17 = v17 + 16;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
SchemaConverter::_add_rule((void **)a1, a2, v25, v26);
if ( v26[0] != v27 )
operator delete(v26[0], v27[0] + 1LL);
if ( *(long long **)&v21[1] != &v23 )
operator delete(*(void **)&v21[1], v23 + 1);
if ( *(long long **)v37 != &v38 )
operator delete(*(void **)v37, v38 + 1);
if ( (long long *)v30[0] != &v31 )
operator delete((void *)v30[0], v31 + 1);
if ( v40 )
((void ( *)(_QWORD *, _QWORD *, long long))v40)(v39, v39, 3LL);
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(&v32);
if ( v42[0] != &v43 )
operator delete(v42[0], v43 + 1);
}
else
{
v32 = &v34;
v30[0] = 44LL;
v14 = (void *)std::string::_M_create(&v32, v30, 0LL);
v32 = v14;
v15 = v30[0];
*(_QWORD *)&v34 = v30[0];
qmemcpy(v14, "Pattern must start with '^' and end with '$'", 44);
v33 = v15;
*((_BYTE *)v14 + v15) = 0;
std::vector<std::string>::emplace_back<std::string>(a2 + 200, &v32);
if ( v32 != &v34 )
operator delete(v32, v34 + 1);
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
}
return a1;
}
|
_visit_pattern:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV RAX,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDX,qword ptr [RDX]
CMP byte ptr [RDX],0x5e
JNZ 0x00147a26
MOV R15,RCX
MOV RCX,qword ptr [RAX + 0x8]
CMP byte ptr [RDX + RCX*0x1 + -0x1],0x24
JNZ 0x00147a26
ADD RCX,-0x2
LEA R12,[RSP + 0x108]
MOV EDX,0x1
MOV RDI,R12
MOV RSI,RAX
CALL 0x00117ac0
LEA RAX,[RSP + 0xc0]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
XOR EAX,EAX
MOV qword ptr [RSP + 0x60],RAX
MOV RCX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0xf0],RAX
LAB_0014794d:
MOV EDI,0x40
CALL 0x00117140
LEA RCX,[RSP + 0x60]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R14
LEA RCX,[RSP + 0xf]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RSP + 0x58]
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],R12
LEA RCX,[RSP + 0xe8]
MOV qword ptr [RAX + 0x28],RCX
LEA RDX,[RSP + 0x90]
MOV qword ptr [RAX + 0x30],RDX
MOV qword ptr [RAX + 0x38],R15
MOV qword ptr [RCX],RAX
LEA RDX,[0x14d44c]
MOV qword ptr [RCX + 0x18],RDX
LEA RDX,[0x14d45e]
MOV qword ptr [RCX + 0x10],RDX
LAB_001479ae:
LEA RDI,[RSP + 0x68]
MOV RSI,RAX
CALL 0x0014d486
LAB_001479bb:
LEA RDI,[RSP + 0xc8]
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x68]
CALL 0x0014d2f8
LAB_001479d2:
LEA RCX,[0x160ea5]
LEA RDI,[RSP + 0xc8]
MOV R8D,0x6
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00117170
MOV R13,RAX
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI + -0x10],RDI
MOV RAX,qword ptr [RAX]
MOV RBP,R13
ADD RBP,0x10
CMP RAX,RBP
JZ 0x00147add
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV R12,qword ptr [R13 + 0x8]
JMP 0x00147aee
LAB_00147a26:
LEA R15,[RSP + 0xa0]
MOV qword ptr [R15 + -0x10],R15
LEA RSI,[RSP + 0x68]
MOV qword ptr [RSI],0x2c
LAB_00147a3e:
LEA RDI,[RSP + 0x90]
XOR EDX,EDX
CALL 0x00117780
LEA RSI,[RSP + 0x90]
MOV qword ptr [RSI],RAX
MOV RCX,qword ptr [RSP + 0x68]
MOV qword ptr [RSI + 0x10],RCX
MOVUPS XMM0,xmmword ptr [0x00160e94]
MOVUPS xmmword ptr [RAX + 0x1c],XMM0
MOVUPS XMM0,xmmword ptr [0x00160e88]
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x00160e78]
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSI + 0x8],RCX
MOV byte ptr [RAX + RCX*0x1],0x0
ADD R14,0xc8
LAB_00147a90:
MOV RDI,R14
CALL 0x00149fd4
LAB_00147a98:
MOV RDI,qword ptr [RSP + 0x90]
CMP RDI,R15
JZ 0x00147ab5
MOV RSI,qword ptr [RSP + 0xa0]
INC RSI
CALL 0x00117100
LAB_00147ab5:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LAB_00147ac8:
MOV RAX,RBX
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00147add:
MOV R12,qword ptr [R13 + 0x8]
LEA RDX,[R12 + 0x1]
MOV RSI,RBP
CALL 0x001170b0
LAB_00147aee:
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + 0x8],R12
MOV qword ptr [R13],RBP
MOV qword ptr [R13 + 0x8],0x0
MOV byte ptr [R13 + 0x10],0x0
LAB_00147b08:
LEA RSI,[0x160eac]
CALL 0x00117740
LAB_00147b14:
MOV RBP,RAX
MOV qword ptr [RSP + 0x30],R15
LEA RDI,[RSP + 0x48]
MOV qword ptr [RDI + -0x10],RDI
MOV RAX,qword ptr [RAX]
MOV R12,RBP
ADD R12,0x10
CMP RAX,R12
JZ 0x00147b4b
MOV R15,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
MOV R13,qword ptr [RBP + 0x8]
JMP 0x00147b5e
LAB_00147b4b:
MOV R13,qword ptr [RBP + 0x8]
LEA RDX,[R13 + 0x1]
MOV R15,RDI
MOV RSI,R12
CALL 0x001170b0
LAB_00147b5e:
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX + 0x8],R13
MOV qword ptr [RBP],R12
MOV qword ptr [RBP + 0x8],0x0
MOV byte ptr [RBP + 0x10],0x0
LAB_00147b77:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x0013f4c6
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R15
JZ 0x00147b9e
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00117100
LAB_00147b9e:
MOV RDI,qword ptr [RSP + 0x10]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x00147bba
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00117100
LAB_00147bba:
LEA RAX,[RSP + 0xd8]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00147bdb
MOV RSI,qword ptr [RSP + 0xd8]
INC RSI
CALL 0x00117100
LAB_00147bdb:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00147bf6
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00117100
LAB_00147bf6:
MOV RAX,qword ptr [RSP + 0xf8]
TEST RAX,RAX
JZ 0x00147c15
LAB_00147c03:
LEA RDI,[RSP + 0xe8]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00147c15:
LEA RDI,[RSP + 0x90]
CALL 0x0014caf2
LEA RAX,[RSP + 0x118]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00147ac8
MOV RSI,qword ptr [RSP + 0x118]
INC RSI
CALL 0x00117100
JMP 0x00147ac8
|
/* SchemaConverter::_visit_pattern(std::__cxx11::string const&, std::__cxx11::string const&) */
string * SchemaConverter::_visit_pattern(string *param_1,string *param_2)
{
int8 uVar1;
int8 *puVar2;
long in_RCX;
int8 *in_RDX;
long *plVar3;
long lVar4;
int1 local_149;
long *local_148;
long local_140;
long local_138 [3];
long *local_120;
long local_118;
long local_110 [2];
int8 local_100;
int8 local_f8;
long *local_f0 [2];
long local_e0 [3];
int8 **local_c8;
long *local_c0;
long *local_b8;
int8 uStack_b0;
int4 local_a8;
int8 local_a0;
long lStack_98;
long *local_90 [2];
long local_80 [2];
long *local_70;
int8 local_68;
code *local_60;
code *local_58;
long *local_50;
int8 local_48;
long local_40 [2];
if ((*(char *)*in_RDX == '^') && (((char *)*in_RDX)[in_RDX[1] + -1] == '$')) {
std::__cxx11::string::substr((ulong)&local_50,(ulong)in_RDX);
local_c8 = (int8 **)&lStack_98;
local_c0 = (long *)0x1;
local_b8 = (long *)0x0;
uStack_b0 = 0;
local_a8 = 0x3f800000;
local_a0 = 0;
lStack_98 = 0;
local_f8 = 0;
local_100 = local_48;
local_68 = 0;
/* try { // try from 0014794d to 00147956 has its CatchHandler @ 00147cf8 */
local_70 = (long *)operator_new(0x40);
*local_70 = (long)&local_f8;
local_70[1] = (long)param_2;
local_70[2] = (long)&local_149;
local_70[3] = (long)&local_100;
local_70[4] = (long)&local_50;
local_70[5] = (long)&local_70;
local_70[6] = (long)&local_c8;
local_70[7] = in_RCX;
local_58 = std::
_Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>
::_M_invoke;
local_60 = std::
_Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>
::_M_manager;
/* try { // try from 001479ae to 001479ba has its CatchHandler @ 00147cd4 */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}::
operator()[abi_cxx11_();
/* try { // try from 001479bb to 001479d1 has its CatchHandler @ 00147cb4 */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::
{lambda(std::pair<std::__cxx11::string,bool>const&)#1}::operator()::string_bool>_const___const
(local_90,&local_149,local_f0);
/* try { // try from 001479d2 to 001479ef has its CatchHandler @ 00147c8e */
puVar2 = (int8 *)std::__cxx11::string::replace((ulong)local_90,0,(char *)0x0,0x160ea5);
local_148 = local_138;
plVar3 = puVar2 + 2;
if ((long *)*puVar2 == plVar3) {
lVar4 = puVar2[1];
memcpy(local_148,plVar3,lVar4 + 1);
}
else {
local_138[0] = puVar2[2];
lVar4 = puVar2[1];
local_148 = (long *)*puVar2;
}
*puVar2 = plVar3;
puVar2[1] = 0;
*(int1 *)(puVar2 + 2) = 0;
local_140 = lVar4;
/* try { // try from 00147b08 to 00147b13 has its CatchHandler @ 00147c6d */
puVar2 = (int8 *)std::__cxx11::string::append((char *)&local_148);
local_120 = (long *)*puVar2;
plVar3 = puVar2 + 2;
if (local_120 == plVar3) {
lVar4 = puVar2[1];
local_120 = local_110;
memcpy(local_110,plVar3,lVar4 + 1);
}
else {
local_110[0] = puVar2[2];
lVar4 = puVar2[1];
}
*puVar2 = plVar3;
puVar2[1] = 0;
*(int1 *)(puVar2 + 2) = 0;
local_118 = lVar4;
/* try { // try from 00147b77 to 00147b86 has its CatchHandler @ 00147c51 */
_add_rule(param_1,param_2);
if (local_120 != local_110) {
operator_delete(local_120,local_110[0] + 1);
}
if (local_148 != local_138) {
operator_delete(local_148,local_138[0] + 1);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0],local_80[0] + 1);
}
if (local_f0[0] != local_e0) {
operator_delete(local_f0[0],local_e0[0] + 1);
}
if (local_60 != (code *)0x0) {
/* try { // try from 00147c03 to 00147c14 has its CatchHandler @ 00147c4c */
(*local_60)(&local_70,&local_70,3);
}
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)&local_c8);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
}
else {
local_f0[0] = (long *)0x2c;
/* try { // try from 00147a3e to 00147a4c has its CatchHandler @ 00147d4d */
local_c8 = &local_b8;
local_c8 = (int8 **)std::__cxx11::string::_M_create((ulong *)&local_c8,(ulong)local_f0);
uVar1 = s_Pattern_must_start_with_____and_e_00160e78._36_8_;
local_b8 = local_f0[0];
*(ulong *)((long)local_c8 + 0x1c) =
CONCAT44(s_Pattern_must_start_with_____and_e_00160e78._32_4_,
s_Pattern_must_start_with_____and_e_00160e78._28_4_);
*(int8 *)((long)local_c8 + 0x24) = uVar1;
plVar3 = (long *)CONCAT44(s_Pattern_must_start_with_____and_e_00160e78._28_4_,
s_Pattern_must_start_with_____and_e_00160e78._24_4_);
local_c8[2] = (int8 *)s_Pattern_must_start_with_____and_e_00160e78._16_8_;
local_c8[3] = plVar3;
uVar1 = s_Pattern_must_start_with_____and_e_00160e78._8_8_;
*local_c8 = (int8 *)s_Pattern_must_start_with_____and_e_00160e78._0_8_;
local_c8[1] = (int8 *)uVar1;
local_c0 = local_f0[0];
*(char *)((long)local_c8 + (long)local_f0[0]) = '\0';
/* try { // try from 00147a90 to 00147a97 has its CatchHandler @ 00147d2b */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(param_2 + 200),
(string *)&local_c8);
if (local_c8 != &local_b8) {
operator_delete(local_c8,(long)local_b8 + 1);
}
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
}
return param_1;
}
|
|
65,411 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> minja::Value::get<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
|
llama.cpp/common/minja/minja.hpp
|
inline json Value::get<json>() const {
if (is_primitive()) return primitive_;
if (is_null()) return json();
if (array_) {
std::vector<json> res;
for (const auto& item : *array_) {
res.push_back(item.get<json>());
}
return res;
}
if (object_) {
json res = json::object();
for (const auto& [key, value] : *object_) {
if (key.is_string()) {
res[key.get<std::string>()] = value.get<json>();
} else if (key.is_primitive()) {
res[key.dump()] = value.get<json>();
} else {
throw std::runtime_error("Invalid key type for conversion to JSON: " + key.dump());
}
}
if (is_callable()) {
res["__callable__"] = true;
}
return res;
}
throw std::runtime_error("get<json> not defined for this value type: " + dump());
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq 0x20(%rsi), %rcx
movq %rax, %rsi
orq %rcx, %rsi
movq 0x30(%r14), %rdx
orq %rdx, %rsi
jne 0xd1eb0
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d2fe
jmp 0xd2110
testq %rdx, %rdx
sete %dl
movq %rax, %rsi
orq %rcx, %rsi
sete %sil
cmpb $0x0, 0x40(%r14)
sete %dil
andb %sil, %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0xd1eff
movb $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9524a
movq %rbx, %rdi
movl $0x1, %esi
callq 0x9524a
jmp 0xd2110
testq %rax, %rax
je 0xd1f71
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rax), %r14
movq 0x8(%rax), %r13
cmpq %r13, %r14
je 0xd1f59
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0xd1e6e
movq %r12, %rdi
movq %r15, %rsi
callq 0x3392c
movq %r15, %rdi
xorl %esi, %esi
callq 0x9524a
movq %r15, %rdi
callq 0x3488a
addq $0x50, %r14
cmpq %r13, %r14
jne 0xd1f28
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xd2ad4
movq %rsp, %rdi
callq 0x34c66
jmp 0xd2110
testq %rcx, %rcx
je 0xd218b
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x46738
movq 0x20(%r14), %rax
movq (%rax), %r15
movq 0x8(%rax), %r13
cmpq %r13, %r15
je 0xd20ac
leaq 0xa8(%rsp), %rbp
leaq 0x40(%rsp), %r12
leaq 0x10(%r15), %rsi
movzbl (%r15), %eax
testl %eax, %eax
je 0xd202d
cmpl $0x4, %eax
je 0xd202d
cmpl $0x3, %eax
jne 0xd2023
leaq 0x60(%rsp), %rdi
callq 0xd1e6e
leaq 0x70(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f0aa
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2e47a
movq %rax, %rdi
leaq 0x60(%rsp), %r12
movq %r12, %rsi
callq 0x971aa
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xd2088
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21180
leaq 0x60(%rsp), %r12
jmp 0xd2088
addb $-0x5, %al
cmpb $0x3, %al
ja 0xd2125
movq %rbp, %rdi
callq 0xd1e6e
movq %r12, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xba10a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2e47a
movq %rax, %rdi
movq %rbp, %rsi
callq 0x971aa
movq 0x40(%rsp), %rdi
movq %rbp, %r12
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xd2088
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21180
movq %rbp, %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x9524a
movq %r12, %rdi
callq 0x3488a
addq $0x60, %r15
cmpq %r13, %r15
leaq 0x40(%rsp), %r12
jne 0xd1faf
cmpq $0x0, 0x30(%r14)
je 0xd2110
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x35282
movq %r14, %rdi
movl $0x1, %esi
callq 0x9524a
leaq 0x57f15(%rip), %rsi # 0x129ff8
movq %rbx, %rdi
callq 0x2e404
leaq 0x90(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x971aa
movq %r14, %rdi
xorl %esi, %esi
callq 0x9524a
movq %r14, %rdi
callq 0x3488a
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x21660
movq %rax, %r12
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xba10a
leaq 0x57e78(%rip), %rsi # 0x129fce
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xba080
movb $0x1, %bpl
movq %rsp, %rsi
movq %r12, %rdi
callq 0x21480
xorl %ebp, %ebp
movq 0x9be46(%rip), %rsi # 0x16dfc0
movq 0x9bdff(%rip), %rdx # 0x16df80
movq %r12, %rdi
callq 0x21a80
jmp 0xd21e6
movl $0x10, %edi
callq 0x21660
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xc030c
leaq 0x57e52(%rip), %rsi # 0x12a005
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xba080
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x21480
xorl %ebp, %ebp
movq 0x9bde9(%rip), %rsi # 0x16dfc0
movq 0x9bda2(%rip), %rdx # 0x16df80
movq %rbx, %rdi
callq 0x21a80
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd2204
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21180
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd221f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
testb %bpl, %bpl
jne 0xd224c
jmp 0xd238d
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd224c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xd224c
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f50
jmp 0xd238d
movq %rax, %r14
leaq 0x90(%rsp), %r15
jmp 0xd233b
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd2287
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21180
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd22a2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
testb %bpl, %bpl
jne 0xd22d4
jmp 0xd2352
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd22d4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xd22d4
jmp 0xd2366
movq %rax, %r14
movq %r12, %rdi
callq 0x21f50
jmp 0xd2352
movq %rax, %r14
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xd2308
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xd2308
movq %rax, %r14
leaq 0x60(%rsp), %r15
jmp 0xd233b
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xd2333
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21180
jmp 0xd2333
movq %rax, %r14
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x9524a
movq %r15, %rdi
callq 0x3488a
jmp 0xd2352
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9524a
movq %rbx, %rdi
callq 0x3488a
jmp 0xd238d
movq %rax, %r14
jmp 0xd2385
movq %rax, %r14
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9524a
movq %rbx, %rdi
callq 0x3488a
movq %rsp, %rdi
callq 0x34c66
movq %r14, %rdi
callq 0x21b20
|
_ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+10h]
mov rcx, [rsi+20h]
mov rsi, rax
or rsi, rcx
mov rdx, [r14+30h]
or rsi, rdx
jnz short loc_D1EB0
add r14, 40h ; '@'
mov rdi, rbx
mov rsi, r14
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&)
jmp loc_D2110
loc_D1EB0:
test rdx, rdx
setz dl
mov rsi, rax
or rsi, rcx
setz sil
cmp byte ptr [r14+40h], 0
setz dil
and dil, sil
and dil, dl
cmp dil, 1
jnz short loc_D1EFF
mov byte ptr [rbx], 0
mov qword ptr [rbx+8], 0
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp loc_D2110
loc_D1EFF:
test rax, rax
jz short loc_D1F71
xorps xmm0, xmm0
movaps [rsp+0E8h+var_E8], xmm0
mov [rsp+0E8h+var_D8], 0
mov r14, [rax]
mov r13, [rax+8]
cmp r14, r13
jz short loc_D1F59
lea r15, [rsp+0E8h+var_C8]
mov r12, rsp
loc_D1F28:
mov rdi, r15
mov rsi, r14
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void)
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add r14, 50h ; 'P'
cmp r14, r13
jnz short loc_D1F28
loc_D1F59:
mov rsi, rsp
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector()
jmp loc_D2110
loc_D1F71:
test rcx, rcx
jz loc_D218B
mov rdi, rbx
xor esi, esi
xor edx, edx
xor ecx, ecx
mov r8d, 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
mov rax, [r14+20h]
mov r15, [rax]
mov r13, [rax+8]
cmp r15, r13
jz loc_D20AC
lea rbp, [rsp+0E8h+var_40]
lea r12, [rsp+0E8h+var_A8]
loc_D1FAF:
lea rsi, [r15+10h]
movzx eax, byte ptr [r15]
test eax, eax
jz short loc_D202D
cmp eax, 4
jz short loc_D202D
cmp eax, 3
jnz short loc_D2023
lea rdi, [rsp+0E8h+var_88]
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void)
lea r12, [rsp+0E8h+var_78]
mov rdi, r12
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; 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[](std::string)
mov rdi, rax
lea r12, [rsp+0E8h+var_88]
mov rsi, r12
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, [rsp+0E8h+var_78]; void *
lea rax, [rsp+0E8h+var_68]
cmp rdi, rax
jz short loc_D2088
mov rsi, [rsp+0E8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
lea r12, [rsp+0E8h+var_88]
jmp short loc_D2088
loc_D2023:
add al, 0FBh
cmp al, 3
ja loc_D2125
loc_D202D:
mov rdi, rbp
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void)
mov rdi, r12
mov rsi, r15
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; 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[](std::string)
mov rdi, rax
mov rsi, rbp
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, [rsp+0E8h+var_A8]; void *
mov r12, rbp
lea rax, [rsp+0E8h+var_98]
cmp rdi, rax
jz short loc_D2088
mov rsi, [rsp+0E8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov r12, rbp
loc_D2088:
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()
add r15, 60h ; '`'
cmp r15, r13
lea r12, [rsp+0E8h+var_A8]
jnz loc_D1FAF
loc_D20AC:
cmp qword ptr [r14+30h], 0
jz short loc_D2110
xorps xmm0, xmm0
lea r14, [rsp+0E8h+var_58]
movaps xmmword ptr [r14], xmm0
mov rdi, r14
mov esi, 1
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t)
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 rsi, aCallable; "__callable__"
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_; 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[]<char const>(char const *)
lea r14, [rsp+0E8h+var_58]
mov rdi, rax
mov rsi, r14
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, 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()
loc_D2110:
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D2125:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r12, rax
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r15
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
lea rsi, aInvalidKeyType; "Invalid key type for conversion to JSON"...
mov rdi, rsp
lea rdx, [rsp+0E8h+var_C8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, r12
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, r12; void *
call ___cxa_throw
jmp short loc_D21E6
loc_D218B:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetJsonNotDefi; "get<json> not defined for this value ty"...
mov rdi, rsp
lea rdx, [rsp+0E8h+var_C8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
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_D21E6:
mov r14, rax
lea rax, [rsp+0E8h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D2204
mov rsi, [rsp+0E8h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D2204:
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D221F
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D221F:
test bpl, bpl
jnz short loc_D224C
jmp loc_D238D
mov r14, rax
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D224C
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D224C
mov r14, rax
loc_D224C:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp loc_D238D
mov r14, rax
lea r15, [rsp+0E8h+var_58]
jmp loc_D233B
mov r14, rax
lea rax, [rsp+0E8h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D2287
mov rsi, [rsp+0E8h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D2287:
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D22A2
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D22A2:
test bpl, bpl
jnz short loc_D22D4
jmp loc_D2352
mov r14, rax
lea rax, [rsp+0E8h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D22D4
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D22D4
jmp loc_D2366
mov r14, rax
loc_D22D4:
mov rdi, r12; void *
call ___cxa_free_exception
jmp short loc_D2352
mov r14, rax
mov rdi, [rsp+0E8h+var_78]; void *
lea rax, [rsp+0E8h+var_68]
cmp rdi, rax
jz short loc_D2308
mov rsi, [rsp+0E8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D2308
mov r14, rax
loc_D2308:
lea r15, [rsp+0E8h+var_88]
jmp short loc_D233B
mov r14, rax
mov rdi, [rsp+0E8h+var_A8]; void *
lea rax, [rsp+0E8h+var_98]
cmp rdi, rax
jz short loc_D2333
mov rsi, [rsp+0E8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D2333
mov r14, rax
loc_D2333:
lea r15, [rsp+0E8h+var_40]
loc_D233B:
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()
jmp short loc_D2352
mov r14, rax
loc_D2352:
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()
jmp short loc_D238D
loc_D2366:
mov r14, rax
jmp short loc_D2385
mov r14, rax
lea rbx, [rsp+0E8h+var_C8]
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_D2385:
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector()
loc_D238D:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
unsigned long long v3; // rax
long long v4; // rcx
long long v5; // rdx
long long v6; // r14
long long v7; // r13
long long v8; // rax
_BYTE *v9; // r15
_BYTE *v10; // r13
_BYTE *v11; // rsi
int v12; // eax
long long v13; // rax
char *v14; // r12
long long v15; // rax
long long v16; // rax
void *v18; // r12
void *exception; // rbx
__int128 v20; // [rsp+0h] [rbp-E8h] BYREF
long long v21; // [rsp+10h] [rbp-D8h]
char v22[16]; // [rsp+20h] [rbp-C8h] BYREF
void *v23[2]; // [rsp+40h] [rbp-A8h] BYREF
long long v24; // [rsp+50h] [rbp-98h] BYREF
_BYTE v25[16]; // [rsp+60h] [rbp-88h] BYREF
void *v26[2]; // [rsp+70h] [rbp-78h] BYREF
long long v27; // [rsp+80h] [rbp-68h] BYREF
char v28[24]; // [rsp+90h] [rbp-58h] BYREF
_BYTE v29[64]; // [rsp+A8h] [rbp-40h] BYREF
v3 = *(_QWORD *)(a2 + 16);
v4 = *(_QWORD *)(a2 + 32);
v5 = *(_QWORD *)(a2 + 48);
if ( !(v5 | v4 | v3) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
a1,
(unsigned __int8 *)(a2 + 64));
return a1;
}
if ( v5 == 0 && (v4 | v3) == 0 && *(_BYTE *)(a2 + 64) == 0 )
{
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return a1;
}
if ( v3 )
{
v20 = 0LL;
v21 = 0LL;
v6 = *(_QWORD *)v3;
v7 = *(_QWORD *)(v3 + 8);
if ( *(_QWORD *)v3 != v7 )
{
do
{
minja::Value::get<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>>(
v22,
v6);
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v20,
(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(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>::data::~data(v22);
v6 += 80LL;
}
while ( v6 != v7 );
}
((void ( *)(long long, __int128 *))ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_)(
a1,
&v20);
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector((char **)&v20);
return a1;
}
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v22, a2, 0xFFFFFFFF, 0);
std::operator+<char>(&v20, (long long)"get<json> not defined for this value type: ", (long long)v22);
std::runtime_error::runtime_error(exception, &v20);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
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(
a1,
0LL,
0LL,
0LL,
1LL);
v8 = *(_QWORD *)(a2 + 32);
v9 = *(_BYTE **)v8;
v10 = *(_BYTE **)(v8 + 8);
if ( *(_BYTE **)v8 != v10 )
{
while ( 1 )
{
v11 = v9 + 16;
v12 = (unsigned __int8)*v9;
if ( !*v9 || v12 == 4 )
goto LABEL_17;
if ( v12 != 3 )
break;
minja::Value::get<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>>(
v25,
v11);
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v26,
(long long)v9);
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>::operator[](
a1,
v26);
v14 = v25;
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=(
v13,
(long long)v25);
if ( v26[0] != &v27 )
{
operator delete(v26[0], v27 + 1);
v14 = v25;
}
LABEL_19:
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);
v9 += 96;
if ( v9 == v10 )
goto LABEL_20;
}
if ( (unsigned __int8)(v12 - 5) > 3u )
{
v18 = __cxa_allocate_exception(0x10uLL);
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>::dump(
(long long)v22,
(long long)v9,
-1,
32,
0,
0);
std::operator+<char>(&v20, (long long)"Invalid key type for conversion to JSON: ", (long long)v22);
std::runtime_error::runtime_error(v18, &v20);
__cxa_throw(
v18,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
LABEL_17:
minja::Value::get<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>>(
v29,
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>::dump(
(long long)v23,
(long long)v9,
-1,
32,
0,
0);
v15 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
a1,
v23);
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=(
v15,
(long long)v29);
v14 = v29;
if ( v23[0] != &v24 )
{
operator delete(v23[0], v24 + 1);
v14 = v29;
}
goto LABEL_19;
}
LABEL_20:
if ( *(_QWORD *)(a2 + 48) )
{
*(_OWORD *)v28 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)v28,
1u);
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(v28);
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>::operator[]<char const>(
a1,
(long long)"__callable__");
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=(
v16,
(long long)v28);
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(v28);
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(v28);
}
return a1;
}
|
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x10]
MOV RCX,qword ptr [RSI + 0x20]
MOV RSI,RAX
OR RSI,RCX
MOV RDX,qword ptr [R14 + 0x30]
OR RSI,RDX
JNZ 0x001d1eb0
ADD R14,0x40
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012d2fe
JMP 0x001d2110
LAB_001d1eb0:
TEST RDX,RDX
SETZ DL
MOV RSI,RAX
OR RSI,RCX
SETZ SIL
CMP byte ptr [R14 + 0x40],0x0
SETZ DIL
AND DIL,SIL
AND DIL,DL
CMP DIL,0x1
JNZ 0x001d1eff
MOV byte ptr [RBX],0x0
MOV qword ptr [RBX + 0x8],0x0
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0019524a
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0019524a
JMP 0x001d2110
LAB_001d1eff:
TEST RAX,RAX
JZ 0x001d1f71
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV R14,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
CMP R14,R13
JZ 0x001d1f59
LEA R15,[RSP + 0x20]
MOV R12,RSP
LAB_001d1f28:
MOV RDI,R15
MOV RSI,R14
CALL 0x001d1e6e
LAB_001d1f33:
MOV RDI,R12
MOV RSI,R15
CALL 0x0013392c
MOV RDI,R15
XOR ESI,ESI
CALL 0x0019524a
MOV RDI,R15
CALL 0x0013488a
ADD R14,0x50
CMP R14,R13
JNZ 0x001d1f28
LAB_001d1f59:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001d2ad4
LAB_001d1f64:
MOV RDI,RSP
CALL 0x00134c66
JMP 0x001d2110
LAB_001d1f71:
TEST RCX,RCX
JZ 0x001d218b
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x1
CALL 0x00146738
MOV RAX,qword ptr [R14 + 0x20]
MOV R15,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
CMP R15,R13
JZ 0x001d20ac
LEA RBP,[RSP + 0xa8]
LEA R12,[RSP + 0x40]
LAB_001d1faf:
LEA RSI,[R15 + 0x10]
MOVZX EAX,byte ptr [R15]
TEST EAX,EAX
JZ 0x001d202d
CMP EAX,0x4
JZ 0x001d202d
CMP EAX,0x3
JNZ 0x001d2023
LAB_001d1fc5:
LEA RDI,[RSP + 0x60]
CALL 0x001d1e6e
LAB_001d1fcf:
LEA R12,[RSP + 0x70]
MOV RDI,R12
MOV RSI,R15
CALL 0x0012f0aa
LAB_001d1fdf:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0012e47a
MOV RDI,RAX
LEA R12,[RSP + 0x60]
MOV RSI,R12
CALL 0x001971aa
MOV RDI,qword ptr [RSP + 0x70]
LEA RAX,[RSP + 0x80]
CMP RDI,RAX
JZ 0x001d2088
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x00121180
LEA R12,[RSP + 0x60]
JMP 0x001d2088
LAB_001d2023:
ADD AL,0xfb
CMP AL,0x3
JA 0x001d2125
LAB_001d202d:
MOV RDI,RBP
CALL 0x001d1e6e
LAB_001d2035:
MOV RDI,R12
MOV RSI,R15
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001ba10a
LAB_001d2050:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0012e47a
MOV RDI,RAX
MOV RSI,RBP
CALL 0x001971aa
MOV RDI,qword ptr [RSP + 0x40]
MOV R12,RBP
LEA RAX,[RSP + 0x50]
CMP RDI,RAX
JZ 0x001d2088
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x00121180
MOV R12,RBP
LAB_001d2088:
MOV RDI,R12
XOR ESI,ESI
CALL 0x0019524a
MOV RDI,R12
CALL 0x0013488a
ADD R15,0x60
CMP R15,R13
LEA R12,[RSP + 0x40]
JNZ 0x001d1faf
LAB_001d20ac:
CMP qword ptr [R14 + 0x30],0x0
JZ 0x001d2110
XORPS XMM0,XMM0
LEA R14,[RSP + 0x90]
MOVAPS xmmword ptr [R14],XMM0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00135282
MOV RDI,R14
MOV ESI,0x1
CALL 0x0019524a
LAB_001d20dc:
LEA RSI,[0x229ff8]
MOV RDI,RBX
CALL 0x0012e404
LAB_001d20eb:
LEA R14,[RSP + 0x90]
MOV RDI,RAX
MOV RSI,R14
CALL 0x001971aa
MOV RDI,R14
XOR ESI,ESI
CALL 0x0019524a
MOV RDI,R14
CALL 0x0013488a
LAB_001d2110:
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d2125:
MOV EDI,0x10
CALL 0x00121660
MOV R12,RAX
LAB_001d2132:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001ba10a
LAB_001d214f:
LEA RSI,[0x229fce]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001ba080
MOV BPL,0x1
LAB_001d2166:
MOV RSI,RSP
MOV RDI,R12
CALL 0x00121480
XOR EBP,EBP
MOV RSI,qword ptr [0x0026dfc0]
MOV RDX,qword ptr [0x0026df80]
MOV RDI,R12
CALL 0x00121a80
LAB_001d218b:
MOV EDI,0x10
CALL 0x00121660
MOV RBX,RAX
LAB_001d2198:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001c030c
LAB_001d21ac:
LEA RSI,[0x22a005]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001ba080
MOV BPL,0x1
LAB_001d21c3:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00121480
XOR EBP,EBP
MOV RSI,qword ptr [0x0026dfc0]
MOV RDX,qword ptr [0x0026df80]
MOV RDI,RBX
CALL 0x00121a80
|
/* 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::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >() const */
void minja::Value::
get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(void)
{
char cVar1;
long *plVar2;
long lVar3;
char *pcVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*pbVar5;
basic_json *pbVar6;
runtime_error *prVar7;
long in_RSI;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*in_RDI;
data *this;
long lVar8;
char *pcVar9;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
data local_c8 [32];
long *local_a8 [2];
long local_98 [2];
data local_88 [16];
long *local_78 [2];
long local_68 [2];
int8 local_58;
int8 uStack_50;
data local_40 [16];
plVar2 = *(long **)(in_RSI + 0x10);
lVar8 = *(long *)(in_RSI + 0x20);
if ((plVar2 == (long *)0x0 && lVar8 == 0) && *(long *)(in_RSI + 0x30) == 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>
::basic_json(in_RDI,(basic_json *)(in_RSI + 0x40));
}
else if ((*(char *)(in_RSI + 0x40) == '\0' && (plVar2 == (long *)0x0 && lVar8 == 0)) &&
*(long *)(in_RSI + 0x30) == 0) {
*in_RDI = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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;
*(int8 *)(in_RDI + 8) = 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(in_RDI,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(in_RDI,0));
}
else if (plVar2 == (long *)0x0) {
if (lVar8 == 0) {
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001d2198 to 001d21ab has its CatchHandler @ 001d2249 */
dump_abi_cxx11_((int)local_c8,SUB81(in_RSI,0));
/* try { // try from 001d21ac to 001d21bf has its CatchHandler @ 001d2229 */
std::operator+((char *)&local_e8,(string *)"get<json> not defined for this value type: ");
/* try { // try from 001d21c3 to 001d21e5 has its CatchHandler @ 001d21e6 */
std::runtime_error::runtime_error(prVar7,(string *)&local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_0026dfc0,PTR__runtime_error_0026df80);
}
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();
pcVar9 = (char *)**(int8 **)(in_RSI + 0x20);
pcVar4 = (char *)(*(int8 **)(in_RSI + 0x20))[1];
if (pcVar9 != pcVar4) {
do {
cVar1 = *pcVar9;
if ((cVar1 == '\0') || (cVar1 == '\x04')) {
LAB_001d202d:
/* try { // try from 001d202d to 001d2034 has its CatchHandler @ 001d234f */
get<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>>
();
/* try { // try from 001d2035 to 001d204f has its CatchHandler @ 001d2330 */
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>
::dump(local_a8,pcVar9,0xffffffff,0x20,0,0);
/* try { // try from 001d2050 to 001d205a has its CatchHandler @ 001d230f */
pbVar5 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]();
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(pbVar5,local_40);
this = local_40;
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
}
else {
if (cVar1 != '\x03') {
if (3 < (byte)(cVar1 - 5U)) {
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10,pcVar9 + 0x10);
/* try { // try from 001d2132 to 001d214e has its CatchHandler @ 001d22d1 */
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>
::dump(local_c8,pcVar9,0xffffffff,0x20,0,0);
/* try { // try from 001d214f to 001d2162 has its CatchHandler @ 001d22ac */
std::operator+((char *)&local_e8,(string *)"Invalid key type for conversion to JSON: "
);
/* try { // try from 001d2166 to 001d2188 has its CatchHandler @ 001d2269 */
std::runtime_error::runtime_error(prVar7,(string *)&local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_0026dfc0,PTR__runtime_error_0026df80);
}
goto LAB_001d202d;
}
/* try { // try from 001d1fc5 to 001d1fce has its CatchHandler @ 001d234f */
get<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>>
();
/* try { // try from 001d1fcf to 001d1fde has its CatchHandler @ 001d2305 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_78,pcVar9);
/* try { // try from 001d1fdf to 001d1fe9 has its CatchHandler @ 001d22de */
pbVar5 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]();
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(pbVar5,local_88);
this = local_88;
if (local_78[0] != local_68) {
operator_delete(local_78[0],local_68[0] + 1);
this = local_88;
}
}
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(this,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(this);
pcVar9 = pcVar9 + 0x60;
} while (pcVar9 != pcVar4);
}
if (*(long *)(in_RSI + 0x30) != 0) {
local_58 = 0;
uStack_50 = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,1);
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_58,0));
/* try { // try from 001d20dc to 001d20ea has its CatchHandler @ 001d2259 */
pbVar6 = 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[]<char_const>(in_RDI,"__callable__");
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>
*)pbVar6,(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(SUB81((data *)&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>
::data::~data((data *)&local_58);
}
}
else {
local_e8 = 0;
uStack_e0 = 0;
local_d8 = 0;
lVar8 = *plVar2;
lVar3 = plVar2[1];
if (lVar8 != lVar3) {
do {
/* try { // try from 001d1f28 to 001d1f32 has its CatchHandler @ 001d2366 */
get<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>>
();
/* try { // try from 001d1f33 to 001d1f3d has its CatchHandler @ 001d236b */
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_e8,(basic_json *)local_c8);
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_c8,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_c8);
lVar8 = lVar8 + 0x50;
} while (lVar8 != lVar3);
}
/* try { // try from 001d1f59 to 001d1f63 has its CatchHandler @ 001d22cc */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS3_ISD_SaISD_EESG_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_
();
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::~vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_e8);
}
return;
}
|
|
65,412 |
linked_add_head
|
qoraal-tictactoe/build_O0/_deps/qoraal-src/include/qoraal/common/lists_inline.h
|
USE_INLINE void
linked_add_head (linked_t* ll, plists_t add, unsigned int offsetof_next)
{
LISTS_ASSERT(add, ("linked_next")) ;
if (ll->head == NULL_LLO) {
ll->tail = add ;
*LISTS_NEXT_REF(add, offsetof_next) = NULL_LLO ;
} else {
*LISTS_NEXT_REF(add, offsetof_next) = ll->head ;
}
ll->head = add ;
}
|
O0
|
c
|
linked_add_head:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x24308
leaq 0x1baeb(%rip), %rdi # 0x3fdec
movb $0x0, %al
callq 0x1bb90
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x24331
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0x24345
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %edx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
linked_add_head:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
cmp [rbp+var_10], 0
jnz short loc_24308
lea rdi, aLinkedNext; "linked_next"
mov al, 0
call debug_assert
loc_24308:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jnz short loc_24331
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov ecx, [rbp+var_14]
add rax, rcx
mov qword ptr [rax], 0
jmp short loc_24345
loc_24331:
mov rax, [rbp+var_8]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov edx, [rbp+var_14]
add rax, rdx
mov [rax], rcx
loc_24345:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax], rcx
add rsp, 20h
pop rbp
retn
|
_QWORD * linked_add_head(
_QWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_QWORD *result; // rax
char v15; // [rsp+0h] [rbp-20h]
unsigned int v16; // [rsp+Ch] [rbp-14h]
v16 = a3;
if ( !a2 )
debug_assert((long long)aLinkedNext, 0LL, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v15);
if ( *a1 )
{
*(_QWORD *)(v16 + a2) = *a1;
}
else
{
a1[1] = a2;
*(_QWORD *)(v16 + a2) = 0LL;
}
result = a1;
*a1 = a2;
return result;
}
|
linked_add_head:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00124308
LEA RDI,[0x13fdec]
MOV AL,0x0
CALL 0x0011bb90
LAB_00124308:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JNZ 0x00124331
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
ADD RAX,RCX
MOV qword ptr [RAX],0x0
JMP 0x00124345
LAB_00124331:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
ADD RAX,RDX
MOV qword ptr [RAX],RCX
LAB_00124345:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
ADD RSP,0x20
POP RBP
RET
|
void linked_add_head(long *param_1,long param_2,uint param_3)
{
if (param_2 == 0) {
debug_assert(s_linked_next_0013fdec);
}
if (*param_1 == 0) {
param_1[1] = param_2;
*(int8 *)(param_2 + (ulong)param_3) = 0;
}
else {
*(long *)(param_2 + (ulong)param_3) = *param_1;
}
*param_1 = param_2;
return;
}
|
|
65,413 |
lre_byte_swap
|
bluesky950520[P]quickjs/libregexp.c
|
void lre_byte_swap(uint8_t *buf, size_t len, BOOL is_byte_swapped)
{
uint8_t *p, *pe;
uint32_t n, r, nw;
p = buf;
if (len < RE_HEADER_LEN)
abort();
// format is:
// <header>
// <bytecode>
// <capture group name 1>
// <capture group name 2>
// etc.
inplace_bswap16(&p[RE_HEADER_FLAGS]);
n = get_u32(&p[RE_HEADER_BYTECODE_LEN]);
inplace_bswap32(&p[RE_HEADER_BYTECODE_LEN]);
if (is_byte_swapped)
n = bswap32(n);
if (n > len - RE_HEADER_LEN)
abort();
p = &buf[RE_HEADER_LEN];
pe = &p[n];
while (p < pe) {
n = reopcode_info[*p].size;
switch (n) {
case 1:
case 2:
break;
case 3:
switch (*p) {
case REOP_save_reset: // has two 8 bit arguments
break;
case REOP_range32: // variable length
nw = get_u16(&p[1]); // number of pairs of uint32_t
if (is_byte_swapped)
n = bswap16(n);
for (r = 3 + 8 * nw; n < r; n += 4)
inplace_bswap32(&p[n]);
goto doswap16;
case REOP_range: // variable length
nw = get_u16(&p[1]); // number of pairs of uint16_t
if (is_byte_swapped)
n = bswap16(n);
for (r = 3 + 4 * nw; n < r; n += 2)
inplace_bswap16(&p[n]);
goto doswap16;
default:
doswap16:
inplace_bswap16(&p[1]);
break;
}
break;
case 5:
inplace_bswap32(&p[1]);
break;
case 17:
assert(*p == REOP_simple_greedy_quant);
inplace_bswap32(&p[1]);
inplace_bswap32(&p[5]);
inplace_bswap32(&p[9]);
inplace_bswap32(&p[13]);
break;
default:
abort();
}
p = &p[n];
}
}
|
O1
|
c
|
lre_byte_swap:
pushq %rax
cmpq $0x7, %rsi
jbe 0x95294
rolw $0x8, (%rdi)
movl 0x4(%rdi), %ecx
movl %ecx, %eax
bswapl %eax
movl %eax, 0x4(%rdi)
testl %edx, %edx
cmovel %ecx, %eax
addq $-0x8, %rsi
cmpq %rax, %rsi
jb 0x95294
testq %rax, %rax
je 0x95292
addq %rdi, %rax
addq $0x8, %rax
addq $0x8, %rdi
testl %edx, %edx
movl $0x3, %edx
movl $0x300, %ecx # imm = 0x300
cmovel %edx, %ecx
leaq 0xcb1f(%rip), %rdx # 0xa1cb0
pxor %xmm0, %xmm0
movzbl (%rdi), %r8d
movzbl (%r8,%rdx), %esi
cmpl $0x4, %esi
jg 0x9520d
leal -0x1(%rsi), %r9d
cmpl $0x2, %r9d
jb 0x95284
cmpl $0x3, %esi
jne 0x95294
movl $0x3, %esi
cmpl $0xe, %r8d
je 0x95284
cmpl $0x16, %r8d
je 0x9525b
cmpl $0x17, %r8d
jne 0x9527f
movzwl 0x1(%rdi), %esi
leaq 0x3(,%rsi,8), %r8
movl %ecx, %esi
cmpl %r8d, %ecx
jae 0x9527f
movq %rcx, %rsi
movl (%rdi,%rsi), %r9d
bswapl %r9d
movl %r9d, (%rdi,%rsi)
addq $0x4, %rsi
cmpq %r8, %rsi
jb 0x951f7
jmp 0x9527f
cmpl $0x5, %esi
je 0x9524c
cmpl $0x11, %esi
jne 0x95294
movdqu 0x1(%rdi), %xmm1
movdqa %xmm1, %xmm2
punpckhbw %xmm0, %xmm2 # xmm2 = xmm2[8],xmm0[8],xmm2[9],xmm0[9],xmm2[10],xmm0[10],xmm2[11],xmm0[11],xmm2[12],xmm0[12],xmm2[13],xmm0[13],xmm2[14],xmm0[14],xmm2[15],xmm0[15]
pshuflw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[0,1,2,3,7,6,5,4]
punpcklbw %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
pshuflw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[0,1,2,3,7,6,5,4]
packuswb %xmm2, %xmm1
movdqu %xmm1, 0x1(%rdi)
movl $0x11, %esi
jmp 0x95284
movl 0x1(%rdi), %esi
bswapl %esi
movl %esi, 0x1(%rdi)
movl $0x5, %esi
jmp 0x95284
movzwl 0x1(%rdi), %esi
leaq 0x3(,%rsi,4), %r8
movl %ecx, %esi
cmpl %r8d, %ecx
jae 0x9527f
movq %rcx, %rsi
rolw $0x8, (%rdi,%rsi)
addq $0x2, %rsi
cmpq %r8, %rsi
jb 0x95271
rolw $0x8, 0x1(%rdi)
movl %esi, %esi
addq %rsi, %rdi
cmpq %rax, %rdi
jb 0x95195
popq %rax
retq
callq 0xe090
|
lre_byte_swap:
push rax
cmp rsi, 7
jbe loc_95294
rol word ptr [rdi], 8
mov ecx, [rdi+4]
mov eax, ecx
bswap eax
mov [rdi+4], eax
test edx, edx
cmovz eax, ecx
add rsi, 0FFFFFFFFFFFFFFF8h
cmp rsi, rax
jb loc_95294
test rax, rax
jz loc_95292
add rax, rdi
add rax, 8
add rdi, 8
test edx, edx
mov edx, 3
mov ecx, 300h
cmovz ecx, edx
lea rdx, reopcode_info
pxor xmm0, xmm0
loc_95195:
movzx r8d, byte ptr [rdi]
movzx esi, byte ptr [r8+rdx]
cmp esi, 4
jg short loc_9520D
lea r9d, [rsi-1]
cmp r9d, 2
jb loc_95284
cmp esi, 3
jnz loc_95294
mov esi, 3
cmp r8d, 0Eh
jz loc_95284
cmp r8d, 16h
jz loc_9525B
cmp r8d, 17h
jnz loc_9527F
movzx esi, word ptr [rdi+1]
lea r8, ds:3[rsi*8]
mov esi, ecx
cmp ecx, r8d
jnb loc_9527F
mov rsi, rcx
loc_951F7:
mov r9d, [rdi+rsi]
bswap r9d
mov [rdi+rsi], r9d
add rsi, 4
cmp rsi, r8
jb short loc_951F7
jmp short loc_9527F
loc_9520D:
cmp esi, 5
jz short loc_9524C
cmp esi, 11h
jnz short loc_95294
movdqu xmm1, xmmword ptr [rdi+1]
movdqa xmm2, xmm1
punpckhbw xmm2, xmm0
pshuflw xmm2, xmm2, 1Bh
pshufhw xmm2, xmm2, 1Bh
punpcklbw xmm1, xmm0
pshuflw xmm1, xmm1, 1Bh
pshufhw xmm1, xmm1, 1Bh
packuswb xmm1, xmm2
movdqu xmmword ptr [rdi+1], xmm1
mov esi, 11h
jmp short loc_95284
loc_9524C:
mov esi, [rdi+1]
bswap esi
mov [rdi+1], esi
mov esi, 5
jmp short loc_95284
loc_9525B:
movzx esi, word ptr [rdi+1]
lea r8, ds:3[rsi*4]
mov esi, ecx
cmp ecx, r8d
jnb short loc_9527F
mov rsi, rcx
loc_95271:
rol word ptr [rdi+rsi], 8
add rsi, 2
cmp rsi, r8
jb short loc_95271
loc_9527F:
rol word ptr [rdi+1], 8
loc_95284:
mov esi, esi
add rdi, rsi
cmp rdi, rax
jb loc_95195
loc_95292:
pop rax
retn
loc_95294:
call _abort
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> lre_byte_swap(
unsigned __int8 *a1,
unsigned long long a2,
int a3)
{
unsigned int v3; // ecx
unsigned long long v4; // rax
unsigned long long v5; // rax
long long v6; // rcx
long long v7; // r8
unsigned long long v8; // rsi
unsigned long long v9; // r8
__m128i v10; // xmm1
unsigned long long v11; // r8
if ( a2 <= 7 )
goto LABEL_28;
*(_WORD *)a1 = __ROL2__(*(_WORD *)a1, 8);
v3 = *((_DWORD *)a1 + 1);
v4 = _byteswap_ulong(v3);
*((_DWORD *)a1 + 1) = v4;
if ( !a3 )
v4 = v3;
if ( a2 - 8 < v4 )
LABEL_28:
abort((const char *)a1);
if ( v4 )
{
v5 = (unsigned long long)&a1[v4 + 8];
a1 += 8;
v6 = 768LL;
if ( !a3 )
v6 = 3LL;
do
{
v7 = *a1;
LODWORD(v8) = reopcode_info[v7];
if ( (unsigned int)v8 > 4 )
{
if ( (_DWORD)v8 == 5 )
{
*(_DWORD *)(a1 + 1) = _byteswap_ulong(*(_DWORD *)(a1 + 1));
LODWORD(v8) = 5;
}
else
{
if ( (_DWORD)v8 != 17 )
goto LABEL_28;
v10 = _mm_loadu_si128((const __m128i *)(a1 + 1));
*(__m128i *)(a1 + 1) = _mm_packus_epi16(
_mm_shufflehi_epi16(
_mm_shufflelo_epi16(_mm_unpacklo_epi8(v10, (__m128i)0LL), 27),
27),
_mm_shufflehi_epi16(
_mm_shufflelo_epi16(_mm_unpackhi_epi8(v10, (__m128i)0LL), 27),
27));
LODWORD(v8) = 17;
}
}
else if ( (unsigned int)(v8 - 1) >= 2 )
{
if ( (_DWORD)v8 != 3 )
goto LABEL_28;
LODWORD(v8) = 3;
if ( (_DWORD)v7 != 14 )
{
if ( (_DWORD)v7 == 22 )
{
v11 = 4LL * *(unsigned __int16 *)(a1 + 1) + 3;
LODWORD(v8) = v6;
if ( (unsigned int)v6 < (unsigned int)v11 )
{
v8 = v6;
do
{
*(_WORD *)&a1[v8] = __ROL2__(*(_WORD *)&a1[v8], 8);
v8 += 2LL;
}
while ( v8 < v11 );
}
}
else if ( (_DWORD)v7 == 23 )
{
v9 = 8LL * *(unsigned __int16 *)(a1 + 1) + 3;
LODWORD(v8) = v6;
if ( (unsigned int)v6 < (unsigned int)v9 )
{
v8 = v6;
do
{
*(_DWORD *)&a1[v8] = _byteswap_ulong(*(_DWORD *)&a1[v8]);
v8 += 4LL;
}
while ( v8 < v9 );
}
}
*(_WORD *)(a1 + 1) = __ROL2__(*(_WORD *)(a1 + 1), 8);
}
}
a1 += (unsigned int)v8;
}
while ( (unsigned long long)a1 < v5 );
}
}
|
lre_byte_swap:
PUSH RAX
CMP RSI,0x7
JBE 0x00195294
ROL word ptr [RDI],0x8
MOV ECX,dword ptr [RDI + 0x4]
MOV EAX,ECX
BSWAP EAX
MOV dword ptr [RDI + 0x4],EAX
TEST EDX,EDX
CMOVZ EAX,ECX
ADD RSI,-0x8
CMP RSI,RAX
JC 0x00195294
TEST RAX,RAX
JZ 0x00195292
ADD RAX,RDI
ADD RAX,0x8
ADD RDI,0x8
TEST EDX,EDX
MOV EDX,0x3
MOV ECX,0x300
CMOVZ ECX,EDX
LEA RDX,[0x1a1cb0]
PXOR XMM0,XMM0
LAB_00195195:
MOVZX R8D,byte ptr [RDI]
MOVZX ESI,byte ptr [R8 + RDX*0x1]
CMP ESI,0x4
JG 0x0019520d
LEA R9D,[RSI + -0x1]
CMP R9D,0x2
JC 0x00195284
CMP ESI,0x3
JNZ 0x00195294
MOV ESI,0x3
CMP R8D,0xe
JZ 0x00195284
CMP R8D,0x16
JZ 0x0019525b
CMP R8D,0x17
JNZ 0x0019527f
MOVZX ESI,word ptr [RDI + 0x1]
LEA R8,[0x3 + RSI*0x8]
MOV ESI,ECX
CMP ECX,R8D
JNC 0x0019527f
MOV RSI,RCX
LAB_001951f7:
MOV R9D,dword ptr [RDI + RSI*0x1]
BSWAP R9D
MOV dword ptr [RDI + RSI*0x1],R9D
ADD RSI,0x4
CMP RSI,R8
JC 0x001951f7
JMP 0x0019527f
LAB_0019520d:
CMP ESI,0x5
JZ 0x0019524c
CMP ESI,0x11
JNZ 0x00195294
MOVDQU XMM1,xmmword ptr [RDI + 0x1]
MOVDQA XMM2,XMM1
PUNPCKHBW XMM2,XMM0
PSHUFLW XMM2,XMM2,0x1b
PSHUFHW XMM2,XMM2,0x1b
PUNPCKLBW XMM1,XMM0
PSHUFLW XMM1,XMM1,0x1b
PSHUFHW XMM1,XMM1,0x1b
PACKUSWB XMM1,XMM2
MOVDQU xmmword ptr [RDI + 0x1],XMM1
MOV ESI,0x11
JMP 0x00195284
LAB_0019524c:
MOV ESI,dword ptr [RDI + 0x1]
BSWAP ESI
MOV dword ptr [RDI + 0x1],ESI
MOV ESI,0x5
JMP 0x00195284
LAB_0019525b:
MOVZX ESI,word ptr [RDI + 0x1]
LEA R8,[0x3 + RSI*0x4]
MOV ESI,ECX
CMP ECX,R8D
JNC 0x0019527f
MOV RSI,RCX
LAB_00195271:
ROL word ptr [RDI + RSI*0x1],0x8
ADD RSI,0x2
CMP RSI,R8
JC 0x00195271
LAB_0019527f:
ROL word ptr [RDI + 0x1],0x8
LAB_00195284:
MOV ESI,ESI
ADD RDI,RSI
CMP RDI,RAX
JC 0x00195195
LAB_00195292:
POP RAX
RET
LAB_00195294:
CALL 0x0010e090
|
int8 lre_byte_swap(ushort *param_1,ulong param_2,int param_3)
{
ushort *puVar1;
ulong uVar2;
byte bVar3;
byte bVar4;
short sVar5;
short sVar6;
short sVar7;
short sVar8;
short sVar9;
short sVar10;
short sVar11;
short sVar12;
short sVar13;
short sVar14;
short sVar15;
short sVar16;
short sVar17;
short sVar18;
short sVar19;
short sVar20;
int1 auVar21 [15];
int1 auVar22 [15];
int1 auVar23 [15];
int1 auVar24 [15];
int1 auVar25 [15];
int1 auVar26 [15];
int1 auVar27 [15];
int1 auVar28 [15];
int1 auVar29 [15];
int1 auVar30 [15];
uint uVar31;
int8 in_RAX;
ulong uVar32;
ulong uVar33;
uint uVar34;
ulong uVar35;
ushort *puVar36;
int1 auVar37 [16];
int1 auVar38 [16];
if (7 < param_2) {
*param_1 = *param_1 << 8 | *param_1 >> 8;
uVar34 = *(uint *)(param_1 + 2);
uVar31 = uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18;
*(uint *)(param_1 + 2) = uVar31;
if (param_3 == 0) {
uVar31 = uVar34;
}
uVar32 = (ulong)uVar31;
if (uVar32 <= param_2 - 8) {
if (uVar32 != 0) {
puVar36 = param_1 + 4;
uVar33 = 0x300;
if (param_3 == 0) {
uVar33 = 3;
}
do {
bVar3 = (byte)*puVar36;
bVar4 = reopcode_info[bVar3];
uVar34 = (uint)bVar4;
if (bVar4 < 5) {
if (1 < bVar4 - 1) {
if (bVar4 != 3) goto LAB_00195294;
uVar34 = 3;
if (bVar3 != 0xe) {
uVar35 = uVar33;
if (bVar3 == 0x16) {
uVar2 = (ulong)*(ushort *)((long)puVar36 + 1) * 4 + 3;
if ((uint)uVar33 < (uint)uVar2) {
do {
puVar1 = (ushort *)((long)puVar36 + uVar35);
*puVar1 = *puVar1 << 8 | *puVar1 >> 8;
uVar35 = uVar35 + 2;
} while (uVar35 < uVar2);
}
}
else {
uVar35 = 3;
if ((bVar3 == 0x17) &&
(uVar2 = (ulong)*(ushort *)((long)puVar36 + 1) * 8 + 3, uVar35 = uVar33,
(uint)uVar33 < (uint)uVar2)) {
do {
uVar34 = *(uint *)((long)puVar36 + uVar35);
*(uint *)((long)puVar36 + uVar35) =
uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 |
uVar34 << 0x18;
uVar35 = uVar35 + 4;
} while (uVar35 < uVar2);
}
}
uVar34 = (uint)uVar35;
puVar1 = (ushort *)((long)puVar36 + 1);
*puVar1 = *puVar1 << 8 | *puVar1 >> 8;
}
}
}
else if (bVar4 == 5) {
uVar34 = *(uint *)((long)puVar36 + 1);
*(uint *)((long)puVar36 + 1) =
uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18
;
uVar34 = 5;
}
else {
if (bVar4 != 0x11) goto LAB_00195294;
auVar37 = *(int1 (*) [16])((long)puVar36 + 1);
auVar38[1] = 0;
auVar38[0] = auVar37[8];
auVar38[2] = auVar37[9];
auVar38[3] = 0;
auVar38[4] = auVar37[10];
auVar38[5] = 0;
auVar38[6] = auVar37[0xb];
auVar38[7] = 0;
auVar38[8] = auVar37[0xc];
auVar38[9] = 0;
auVar38[10] = auVar37[0xd];
auVar38[0xb] = 0;
auVar38[0xc] = auVar37[0xe];
auVar38[0xd] = 0;
auVar38[0xe] = auVar37[0xf];
auVar38[0xf] = 0;
auVar38 = pshuflw(auVar38,auVar38,0x1b);
auVar38 = pshufhw(auVar38,auVar38,0x1b);
auVar21[0xd] = 0;
auVar21._0_13_ = auVar37._0_13_;
auVar21[0xe] = auVar37[7];
auVar22[0xc] = auVar37[6];
auVar22._0_12_ = auVar37._0_12_;
auVar22._13_2_ = auVar21._13_2_;
auVar23[0xb] = 0;
auVar23._0_11_ = auVar37._0_11_;
auVar23._12_3_ = auVar22._12_3_;
auVar24[10] = auVar37[5];
auVar24._0_10_ = auVar37._0_10_;
auVar24._11_4_ = auVar23._11_4_;
auVar25[9] = 0;
auVar25._0_9_ = auVar37._0_9_;
auVar25._10_5_ = auVar24._10_5_;
auVar26[8] = auVar37[4];
auVar26._0_8_ = auVar37._0_8_;
auVar26._9_6_ = auVar25._9_6_;
auVar28._7_8_ = 0;
auVar28._0_7_ = auVar26._8_7_;
auVar29._1_8_ = SUB158(auVar28 << 0x40,7);
auVar29[0] = auVar37[3];
auVar29._9_6_ = 0;
auVar30._1_10_ = SUB1510(auVar29 << 0x30,5);
auVar30[0] = auVar37[2];
auVar30._11_4_ = 0;
auVar27[2] = auVar37[1];
auVar27._0_2_ = auVar37._0_2_;
auVar27._3_12_ = SUB1512(auVar30 << 0x20,3);
auVar37._0_2_ = auVar37._0_2_ & 0xff;
auVar37._2_13_ = auVar27._2_13_;
auVar37[0xf] = 0;
auVar37 = pshuflw(auVar37,auVar37,0x1b);
auVar37 = pshufhw(auVar37,auVar37,0x1b);
sVar5 = auVar37._0_2_;
sVar6 = auVar37._2_2_;
sVar7 = auVar37._4_2_;
sVar8 = auVar37._6_2_;
sVar9 = auVar37._8_2_;
sVar10 = auVar37._10_2_;
sVar11 = auVar37._12_2_;
sVar12 = auVar37._14_2_;
sVar13 = auVar38._0_2_;
sVar14 = auVar38._2_2_;
sVar15 = auVar38._4_2_;
sVar16 = auVar38._6_2_;
sVar17 = auVar38._8_2_;
sVar18 = auVar38._10_2_;
sVar19 = auVar38._12_2_;
sVar20 = auVar38._14_2_;
*(char *)((long)puVar36 + 1) =
(0 < sVar5) * (sVar5 < 0x100) * auVar37[0] - (0xff < sVar5);
*(char *)(puVar36 + 1) = (0 < sVar6) * (sVar6 < 0x100) * auVar37[2] - (0xff < sVar6);
*(char *)((long)puVar36 + 3) =
(0 < sVar7) * (sVar7 < 0x100) * auVar37[4] - (0xff < sVar7);
*(char *)(puVar36 + 2) = (0 < sVar8) * (sVar8 < 0x100) * auVar37[6] - (0xff < sVar8);
*(char *)((long)puVar36 + 5) =
(0 < sVar9) * (sVar9 < 0x100) * auVar37[8] - (0xff < sVar9);
*(char *)(puVar36 + 3) = (0 < sVar10) * (sVar10 < 0x100) * auVar37[10] - (0xff < sVar10)
;
*(char *)((long)puVar36 + 7) =
(0 < sVar11) * (sVar11 < 0x100) * auVar37[0xc] - (0xff < sVar11);
*(char *)(puVar36 + 4) =
(0 < sVar12) * (sVar12 < 0x100) * auVar37[0xe] - (0xff < sVar12);
*(char *)((long)puVar36 + 9) =
(0 < sVar13) * (sVar13 < 0x100) * auVar38[0] - (0xff < sVar13);
*(char *)(puVar36 + 5) = (0 < sVar14) * (sVar14 < 0x100) * auVar38[2] - (0xff < sVar14);
*(char *)((long)puVar36 + 0xb) =
(0 < sVar15) * (sVar15 < 0x100) * auVar38[4] - (0xff < sVar15);
*(char *)(puVar36 + 6) = (0 < sVar16) * (sVar16 < 0x100) * auVar38[6] - (0xff < sVar16);
*(char *)((long)puVar36 + 0xd) =
(0 < sVar17) * (sVar17 < 0x100) * auVar38[8] - (0xff < sVar17);
*(char *)(puVar36 + 7) = (0 < sVar18) * (sVar18 < 0x100) * auVar38[10] - (0xff < sVar18)
;
*(char *)((long)puVar36 + 0xf) =
(0 < sVar19) * (sVar19 < 0x100) * auVar38[0xc] - (0xff < sVar19);
*(char *)(puVar36 + 8) =
(0 < sVar20) * (sVar20 < 0x100) * auVar38[0xe] - (0xff < sVar20);
uVar34 = 0x11;
}
puVar36 = (ushort *)((long)puVar36 + (ulong)uVar34);
} while (puVar36 < (ushort *)((long)param_1 + uVar32 + 8));
}
return in_RAX;
}
}
LAB_00195294:
/* WARNING: Subroutine does not return */
abort();
}
|
|
65,414 |
lre_byte_swap
|
bluesky950520[P]quickjs/libregexp.c
|
void lre_byte_swap(uint8_t *buf, size_t len, BOOL is_byte_swapped)
{
uint8_t *p, *pe;
uint32_t n, r, nw;
p = buf;
if (len < RE_HEADER_LEN)
abort();
// format is:
// <header>
// <bytecode>
// <capture group name 1>
// <capture group name 2>
// etc.
inplace_bswap16(&p[RE_HEADER_FLAGS]);
n = get_u32(&p[RE_HEADER_BYTECODE_LEN]);
inplace_bswap32(&p[RE_HEADER_BYTECODE_LEN]);
if (is_byte_swapped)
n = bswap32(n);
if (n > len - RE_HEADER_LEN)
abort();
p = &buf[RE_HEADER_LEN];
pe = &p[n];
while (p < pe) {
n = reopcode_info[*p].size;
switch (n) {
case 1:
case 2:
break;
case 3:
switch (*p) {
case REOP_save_reset: // has two 8 bit arguments
break;
case REOP_range32: // variable length
nw = get_u16(&p[1]); // number of pairs of uint32_t
if (is_byte_swapped)
n = bswap16(n);
for (r = 3 + 8 * nw; n < r; n += 4)
inplace_bswap32(&p[n]);
goto doswap16;
case REOP_range: // variable length
nw = get_u16(&p[1]); // number of pairs of uint16_t
if (is_byte_swapped)
n = bswap16(n);
for (r = 3 + 4 * nw; n < r; n += 2)
inplace_bswap16(&p[n]);
goto doswap16;
default:
doswap16:
inplace_bswap16(&p[1]);
break;
}
break;
case 5:
inplace_bswap32(&p[1]);
break;
case 17:
assert(*p == REOP_simple_greedy_quant);
inplace_bswap32(&p[1]);
inplace_bswap32(&p[5]);
inplace_bswap32(&p[9]);
inplace_bswap32(&p[13]);
break;
default:
abort();
}
p = &p[n];
}
}
|
O2
|
c
|
lre_byte_swap:
pushq %rbx
cmpq $0x7, %rsi
jbe 0x7c60c
rolw $0x8, (%rdi)
movl 0x4(%rdi), %eax
movl %eax, %ecx
bswapl %ecx
movl %ecx, 0x4(%rdi)
testl %edx, %edx
cmovel %eax, %ecx
addq $-0x8, %rsi
cmpq %rcx, %rsi
jb 0x7c60c
leaq 0x8(%rdi), %rax
testl %edx, %edx
leaq 0x8(%rdi,%rcx), %rcx
pushq $0x3
popq %rsi
movl $0x300, %edx # imm = 0x300
cmoveq %rsi, %rdx
leaq 0xc6e7(%rip), %rsi # 0x88bf0
pxor %xmm0, %xmm0
pushq $0x11
popq %rdi
pushq $0x5
popq %r8
pushq $0x3
popq %r9
cmpq %rcx, %rax
jae 0x7c60a
movzbl (%rax), %r11d
movzbl (%r11,%rsi), %r10d
leal -0x1(%r10), %ebx
cmpl $0x2, %ebx
jb 0x7c5ff
cmpl $0x11, %r10d
je 0x7c596
cmpl $0x5, %r10d
je 0x7c5c9
cmpl $0x3, %r10d
jne 0x7c60c
movl %r9d, %r10d
cmpl $0xe, %r11d
je 0x7c5ff
cmpl $0x16, %r11d
je 0x7c5d9
movl %r9d, %r10d
cmpl $0x17, %r11d
jne 0x7c5fa
movzwl 0x1(%rax), %r10d
leaq 0x3(,%r10,8), %r11
movq %rdx, %r10
cmpq %r11, %r10
jae 0x7c5fa
movl (%rax,%r10), %ebx
bswapl %ebx
movl %ebx, (%rax,%r10)
addq $0x4, %r10
jmp 0x7c581
movdqu 0x1(%rax), %xmm1
movdqa %xmm1, %xmm2
punpckhbw %xmm0, %xmm2 # xmm2 = xmm2[8],xmm0[8],xmm2[9],xmm0[9],xmm2[10],xmm0[10],xmm2[11],xmm0[11],xmm2[12],xmm0[12],xmm2[13],xmm0[13],xmm2[14],xmm0[14],xmm2[15],xmm0[15]
pshuflw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[0,1,2,3,7,6,5,4]
punpcklbw %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
pshuflw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[0,1,2,3,7,6,5,4]
packuswb %xmm2, %xmm1
movdqu %xmm1, 0x1(%rax)
movl %edi, %r10d
jmp 0x7c5ff
movl 0x1(%rax), %r10d
bswapl %r10d
movl %r10d, 0x1(%rax)
movl %r8d, %r10d
jmp 0x7c5ff
movzwl 0x1(%rax), %r10d
leaq 0x3(,%r10,4), %r11
movq %rdx, %r10
cmpq %r11, %r10
jae 0x7c5fa
rolw $0x8, (%rax,%r10)
addq $0x2, %r10
jmp 0x7c5e9
rolw $0x8, 0x1(%rax)
movl %r10d, %r10d
addq %r10, %rax
jmp 0x7c518
popq %rbx
retq
callq 0xe090
|
lre_byte_swap:
push rbx
cmp rsi, 7
jbe loc_7C60C
rol word ptr [rdi], 8
mov eax, [rdi+4]
mov ecx, eax
bswap ecx
mov [rdi+4], ecx
test edx, edx
cmovz ecx, eax
add rsi, 0FFFFFFFFFFFFFFF8h
cmp rsi, rcx
jb loc_7C60C
lea rax, [rdi+8]
test edx, edx
lea rcx, [rdi+rcx+8]
push 3
pop rsi
mov edx, 300h
cmovz rdx, rsi
lea rsi, reopcode_info
pxor xmm0, xmm0
push 11h
pop rdi
push 5
pop r8
push 3
pop r9
loc_7C518:
cmp rax, rcx
jnb loc_7C60A
movzx r11d, byte ptr [rax]
movzx r10d, byte ptr [r11+rsi]
lea ebx, [r10-1]
cmp ebx, 2
jb loc_7C5FF
cmp r10d, 11h
jz short loc_7C596
cmp r10d, 5
jz loc_7C5C9
cmp r10d, 3
jnz loc_7C60C
mov r10d, r9d
cmp r11d, 0Eh
jz loc_7C5FF
cmp r11d, 16h
jz short loc_7C5D9
mov r10d, r9d
cmp r11d, 17h
jnz loc_7C5FA
movzx r10d, word ptr [rax+1]
lea r11, ds:3[r10*8]
mov r10, rdx
loc_7C581:
cmp r10, r11
jnb short loc_7C5FA
mov ebx, [rax+r10]
bswap ebx
mov [rax+r10], ebx
add r10, 4
jmp short loc_7C581
loc_7C596:
movdqu xmm1, xmmword ptr [rax+1]
movdqa xmm2, xmm1
punpckhbw xmm2, xmm0
pshuflw xmm2, xmm2, 1Bh
pshufhw xmm2, xmm2, 1Bh
punpcklbw xmm1, xmm0
pshuflw xmm1, xmm1, 1Bh
pshufhw xmm1, xmm1, 1Bh
packuswb xmm1, xmm2
movdqu xmmword ptr [rax+1], xmm1
mov r10d, edi
jmp short loc_7C5FF
loc_7C5C9:
mov r10d, [rax+1]
bswap r10d
mov [rax+1], r10d
mov r10d, r8d
jmp short loc_7C5FF
loc_7C5D9:
movzx r10d, word ptr [rax+1]
lea r11, ds:3[r10*4]
mov r10, rdx
loc_7C5E9:
cmp r10, r11
jnb short loc_7C5FA
rol word ptr [rax+r10], 8
add r10, 2
jmp short loc_7C5E9
loc_7C5FA:
rol word ptr [rax+1], 8
loc_7C5FF:
mov r10d, r10d
add rax, r10
jmp loc_7C518
loc_7C60A:
pop rbx
retn
loc_7C60C:
call _abort
|
unsigned __int8 * lre_byte_swap(char *a1, unsigned long long a2, int a3)
{
unsigned int v3; // eax
unsigned long long v4; // rcx
unsigned __int8 *result; // rax
bool v6; // zf
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // r11
unsigned long long i; // r10
unsigned long long v11; // r11
__m128i v12; // xmm1
unsigned long long v13; // r11
if ( a2 <= 7 )
goto LABEL_27;
*(_WORD *)a1 = __ROL2__(*(_WORD *)a1, 8);
v3 = *((_DWORD *)a1 + 1);
v4 = _byteswap_ulong(v3);
*((_DWORD *)a1 + 1) = v4;
if ( !a3 )
v4 = v3;
if ( a2 - 8 < v4 )
LABEL_27:
abort(a1);
result = (unsigned __int8 *)(a1 + 8);
v6 = a3 == 0;
v7 = (unsigned long long)&a1[v4 + 8];
v8 = 768LL;
if ( v6 )
v8 = 3LL;
a1 = (_BYTE *)(&word_10 + 1);
while ( (unsigned long long)result < v7 )
{
v9 = *result;
LODWORD(i) = reopcode_info[v9];
if ( (unsigned int)(i - 1) >= 2 )
{
switch ( (_DWORD)i )
{
case 0x11:
v12 = _mm_loadu_si128((const __m128i *)(result + 1));
*(__m128i *)(result + 1) = _mm_packus_epi16(
_mm_shufflehi_epi16(
_mm_shufflelo_epi16(_mm_unpacklo_epi8(v12, (__m128i)0LL), 27),
27),
_mm_shufflehi_epi16(
_mm_shufflelo_epi16(_mm_unpackhi_epi8(v12, (__m128i)0LL), 27),
27));
LODWORD(i) = 17;
break;
case 5:
*(_DWORD *)(result + 1) = _byteswap_ulong(*(_DWORD *)(result + 1));
LODWORD(i) = 5;
break;
case 3:
LODWORD(i) = 3;
if ( (_DWORD)v9 != 14 )
{
if ( (_DWORD)v9 == 22 )
{
v13 = 4LL * *(unsigned __int16 *)(result + 1) + 3;
for ( i = v8; i < v13; i += 2LL )
*(_WORD *)&result[i] = __ROL2__(*(_WORD *)&result[i], 8);
}
else
{
LODWORD(i) = 3;
if ( (_DWORD)v9 == 23 )
{
v11 = 8LL * *(unsigned __int16 *)(result + 1) + 3;
for ( i = v8; i < v11; i += 4LL )
*(_DWORD *)&result[i] = _byteswap_ulong(*(_DWORD *)&result[i]);
}
}
*(_WORD *)(result + 1) = __ROL2__(*(_WORD *)(result + 1), 8);
}
break;
default:
goto LABEL_27;
}
}
result += (unsigned int)i;
}
return result;
}
|
lre_byte_swap:
PUSH RBX
CMP RSI,0x7
JBE 0x0017c60c
ROL word ptr [RDI],0x8
MOV EAX,dword ptr [RDI + 0x4]
MOV ECX,EAX
BSWAP ECX
MOV dword ptr [RDI + 0x4],ECX
TEST EDX,EDX
CMOVZ ECX,EAX
ADD RSI,-0x8
CMP RSI,RCX
JC 0x0017c60c
LEA RAX,[RDI + 0x8]
TEST EDX,EDX
LEA RCX,[RDI + RCX*0x1 + 0x8]
PUSH 0x3
POP RSI
MOV EDX,0x300
CMOVZ RDX,RSI
LEA RSI,[0x188bf0]
PXOR XMM0,XMM0
PUSH 0x11
POP RDI
PUSH 0x5
POP R8
PUSH 0x3
POP R9
LAB_0017c518:
CMP RAX,RCX
JNC 0x0017c60a
MOVZX R11D,byte ptr [RAX]
MOVZX R10D,byte ptr [R11 + RSI*0x1]
LEA EBX,[R10 + -0x1]
CMP EBX,0x2
JC 0x0017c5ff
CMP R10D,0x11
JZ 0x0017c596
CMP R10D,0x5
JZ 0x0017c5c9
CMP R10D,0x3
JNZ 0x0017c60c
MOV R10D,R9D
CMP R11D,0xe
JZ 0x0017c5ff
CMP R11D,0x16
JZ 0x0017c5d9
MOV R10D,R9D
CMP R11D,0x17
JNZ 0x0017c5fa
MOVZX R10D,word ptr [RAX + 0x1]
LEA R11,[0x3 + R10*0x8]
MOV R10,RDX
LAB_0017c581:
CMP R10,R11
JNC 0x0017c5fa
MOV EBX,dword ptr [RAX + R10*0x1]
BSWAP EBX
MOV dword ptr [RAX + R10*0x1],EBX
ADD R10,0x4
JMP 0x0017c581
LAB_0017c596:
MOVDQU XMM1,xmmword ptr [RAX + 0x1]
MOVDQA XMM2,XMM1
PUNPCKHBW XMM2,XMM0
PSHUFLW XMM2,XMM2,0x1b
PSHUFHW XMM2,XMM2,0x1b
PUNPCKLBW XMM1,XMM0
PSHUFLW XMM1,XMM1,0x1b
PSHUFHW XMM1,XMM1,0x1b
PACKUSWB XMM1,XMM2
MOVDQU xmmword ptr [RAX + 0x1],XMM1
MOV R10D,EDI
JMP 0x0017c5ff
LAB_0017c5c9:
MOV R10D,dword ptr [RAX + 0x1]
BSWAP R10D
MOV dword ptr [RAX + 0x1],R10D
MOV R10D,R8D
JMP 0x0017c5ff
LAB_0017c5d9:
MOVZX R10D,word ptr [RAX + 0x1]
LEA R11,[0x3 + R10*0x4]
MOV R10,RDX
LAB_0017c5e9:
CMP R10,R11
JNC 0x0017c5fa
ROL word ptr [RAX + R10*0x1],0x8
ADD R10,0x2
JMP 0x0017c5e9
LAB_0017c5fa:
ROL word ptr [RAX + 0x1],0x8
LAB_0017c5ff:
MOV R10D,R10D
ADD RAX,R10
JMP 0x0017c518
LAB_0017c60a:
POP RBX
RET
LAB_0017c60c:
CALL 0x0010e090
|
void lre_byte_swap(ushort *param_1,ulong param_2,int param_3)
{
ushort *puVar1;
byte bVar2;
byte bVar3;
ushort uVar4;
short sVar5;
short sVar6;
short sVar7;
short sVar8;
short sVar9;
short sVar10;
short sVar11;
short sVar12;
short sVar13;
short sVar14;
short sVar15;
short sVar16;
short sVar17;
short sVar18;
short sVar19;
short sVar20;
int1 auVar21 [15];
int1 auVar22 [15];
int1 auVar23 [15];
int1 auVar24 [15];
int1 auVar25 [15];
int1 auVar26 [15];
int1 auVar27 [15];
int1 auVar28 [15];
int1 auVar29 [15];
int1 auVar30 [15];
ushort *puVar31;
uint uVar32;
ulong uVar33;
uint uVar34;
ulong uVar35;
int1 auVar36 [16];
int1 auVar37 [16];
if (7 < param_2) {
*param_1 = *param_1 << 8 | *param_1 >> 8;
uVar34 = *(uint *)(param_1 + 2);
uVar32 = uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18;
*(uint *)(param_1 + 2) = uVar32;
if (param_3 == 0) {
uVar32 = uVar34;
}
if ((ulong)uVar32 <= param_2 - 8) {
puVar31 = param_1 + 4;
uVar33 = 0x300;
if (param_3 == 0) {
uVar33 = 3;
}
do {
if ((ushort *)((long)param_1 + (ulong)uVar32 + 8) <= puVar31) {
return;
}
bVar2 = (byte)*puVar31;
bVar3 = reopcode_info[bVar2];
uVar34 = (uint)bVar3;
if (1 < bVar3 - 1) {
if (bVar3 == 0x11) {
auVar36 = *(int1 (*) [16])((long)puVar31 + 1);
auVar37[1] = 0;
auVar37[0] = auVar36[8];
auVar37[2] = auVar36[9];
auVar37[3] = 0;
auVar37[4] = auVar36[10];
auVar37[5] = 0;
auVar37[6] = auVar36[0xb];
auVar37[7] = 0;
auVar37[8] = auVar36[0xc];
auVar37[9] = 0;
auVar37[10] = auVar36[0xd];
auVar37[0xb] = 0;
auVar37[0xc] = auVar36[0xe];
auVar37[0xd] = 0;
auVar37[0xe] = auVar36[0xf];
auVar37[0xf] = 0;
auVar37 = pshuflw(auVar37,auVar37,0x1b);
auVar37 = pshufhw(auVar37,auVar37,0x1b);
auVar21[0xd] = 0;
auVar21._0_13_ = auVar36._0_13_;
auVar21[0xe] = auVar36[7];
auVar22[0xc] = auVar36[6];
auVar22._0_12_ = auVar36._0_12_;
auVar22._13_2_ = auVar21._13_2_;
auVar23[0xb] = 0;
auVar23._0_11_ = auVar36._0_11_;
auVar23._12_3_ = auVar22._12_3_;
auVar24[10] = auVar36[5];
auVar24._0_10_ = auVar36._0_10_;
auVar24._11_4_ = auVar23._11_4_;
auVar25[9] = 0;
auVar25._0_9_ = auVar36._0_9_;
auVar25._10_5_ = auVar24._10_5_;
auVar26[8] = auVar36[4];
auVar26._0_8_ = auVar36._0_8_;
auVar26._9_6_ = auVar25._9_6_;
auVar28._7_8_ = 0;
auVar28._0_7_ = auVar26._8_7_;
auVar29._1_8_ = SUB158(auVar28 << 0x40,7);
auVar29[0] = auVar36[3];
auVar29._9_6_ = 0;
auVar30._1_10_ = SUB1510(auVar29 << 0x30,5);
auVar30[0] = auVar36[2];
auVar30._11_4_ = 0;
auVar27[2] = auVar36[1];
auVar27._0_2_ = auVar36._0_2_;
auVar27._3_12_ = SUB1512(auVar30 << 0x20,3);
auVar36._0_2_ = auVar36._0_2_ & 0xff;
auVar36._2_13_ = auVar27._2_13_;
auVar36[0xf] = 0;
auVar36 = pshuflw(auVar36,auVar36,0x1b);
auVar36 = pshufhw(auVar36,auVar36,0x1b);
sVar5 = auVar36._0_2_;
sVar6 = auVar36._2_2_;
sVar7 = auVar36._4_2_;
sVar8 = auVar36._6_2_;
sVar9 = auVar36._8_2_;
sVar10 = auVar36._10_2_;
sVar11 = auVar36._12_2_;
sVar12 = auVar36._14_2_;
sVar13 = auVar37._0_2_;
sVar14 = auVar37._2_2_;
sVar15 = auVar37._4_2_;
sVar16 = auVar37._6_2_;
sVar17 = auVar37._8_2_;
sVar18 = auVar37._10_2_;
sVar19 = auVar37._12_2_;
sVar20 = auVar37._14_2_;
*(char *)((long)puVar31 + 1) =
(0 < sVar5) * (sVar5 < 0x100) * auVar36[0] - (0xff < sVar5);
*(char *)(puVar31 + 1) = (0 < sVar6) * (sVar6 < 0x100) * auVar36[2] - (0xff < sVar6);
*(char *)((long)puVar31 + 3) =
(0 < sVar7) * (sVar7 < 0x100) * auVar36[4] - (0xff < sVar7);
*(char *)(puVar31 + 2) = (0 < sVar8) * (sVar8 < 0x100) * auVar36[6] - (0xff < sVar8);
*(char *)((long)puVar31 + 5) =
(0 < sVar9) * (sVar9 < 0x100) * auVar36[8] - (0xff < sVar9);
*(char *)(puVar31 + 3) = (0 < sVar10) * (sVar10 < 0x100) * auVar36[10] - (0xff < sVar10)
;
*(char *)((long)puVar31 + 7) =
(0 < sVar11) * (sVar11 < 0x100) * auVar36[0xc] - (0xff < sVar11);
*(char *)(puVar31 + 4) =
(0 < sVar12) * (sVar12 < 0x100) * auVar36[0xe] - (0xff < sVar12);
*(char *)((long)puVar31 + 9) =
(0 < sVar13) * (sVar13 < 0x100) * auVar37[0] - (0xff < sVar13);
*(char *)(puVar31 + 5) = (0 < sVar14) * (sVar14 < 0x100) * auVar37[2] - (0xff < sVar14);
*(char *)((long)puVar31 + 0xb) =
(0 < sVar15) * (sVar15 < 0x100) * auVar37[4] - (0xff < sVar15);
*(char *)(puVar31 + 6) = (0 < sVar16) * (sVar16 < 0x100) * auVar37[6] - (0xff < sVar16);
*(char *)((long)puVar31 + 0xd) =
(0 < sVar17) * (sVar17 < 0x100) * auVar37[8] - (0xff < sVar17);
*(char *)(puVar31 + 7) = (0 < sVar18) * (sVar18 < 0x100) * auVar37[10] - (0xff < sVar18)
;
*(char *)((long)puVar31 + 0xf) =
(0 < sVar19) * (sVar19 < 0x100) * auVar37[0xc] - (0xff < sVar19);
*(char *)(puVar31 + 8) =
(0 < sVar20) * (sVar20 < 0x100) * auVar37[0xe] - (0xff < sVar20);
uVar34 = 0x11;
}
else if (bVar3 == 5) {
uVar34 = *(uint *)((long)puVar31 + 1);
*(uint *)((long)puVar31 + 1) =
uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18
;
uVar34 = 5;
}
else {
if (bVar3 != 3) break;
uVar34 = 3;
if (bVar2 != 0xe) {
if (bVar2 == 0x16) {
uVar4 = *(ushort *)((long)puVar31 + 1);
for (uVar35 = uVar33; uVar35 < (ulong)uVar4 * 4 + 3; uVar35 = uVar35 + 2) {
puVar1 = (ushort *)((long)puVar31 + uVar35);
*puVar1 = *puVar1 << 8 | *puVar1 >> 8;
}
}
else {
uVar35 = 3;
if (bVar2 == 0x17) {
uVar4 = *(ushort *)((long)puVar31 + 1);
for (uVar35 = uVar33; uVar35 < (ulong)uVar4 * 8 + 3; uVar35 = uVar35 + 4) {
uVar34 = *(uint *)((long)puVar31 + uVar35);
*(uint *)((long)puVar31 + uVar35) =
uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 |
uVar34 << 0x18;
}
}
}
uVar34 = (uint)uVar35;
puVar1 = (ushort *)((long)puVar31 + 1);
*puVar1 = *puVar1 << 8 | *puVar1 >> 8;
}
}
}
puVar31 = (ushort *)((long)puVar31 + (ulong)uVar34);
} while( true );
}
}
/* WARNING: Subroutine does not return */
abort();
}
|
|
65,415 |
lre_byte_swap
|
bluesky950520[P]quickjs/libregexp.c
|
void lre_byte_swap(uint8_t *buf, size_t len, BOOL is_byte_swapped)
{
uint8_t *p, *pe;
uint32_t n, r, nw;
p = buf;
if (len < RE_HEADER_LEN)
abort();
// format is:
// <header>
// <bytecode>
// <capture group name 1>
// <capture group name 2>
// etc.
inplace_bswap16(&p[RE_HEADER_FLAGS]);
n = get_u32(&p[RE_HEADER_BYTECODE_LEN]);
inplace_bswap32(&p[RE_HEADER_BYTECODE_LEN]);
if (is_byte_swapped)
n = bswap32(n);
if (n > len - RE_HEADER_LEN)
abort();
p = &buf[RE_HEADER_LEN];
pe = &p[n];
while (p < pe) {
n = reopcode_info[*p].size;
switch (n) {
case 1:
case 2:
break;
case 3:
switch (*p) {
case REOP_save_reset: // has two 8 bit arguments
break;
case REOP_range32: // variable length
nw = get_u16(&p[1]); // number of pairs of uint32_t
if (is_byte_swapped)
n = bswap16(n);
for (r = 3 + 8 * nw; n < r; n += 4)
inplace_bswap32(&p[n]);
goto doswap16;
case REOP_range: // variable length
nw = get_u16(&p[1]); // number of pairs of uint16_t
if (is_byte_swapped)
n = bswap16(n);
for (r = 3 + 4 * nw; n < r; n += 2)
inplace_bswap16(&p[n]);
goto doswap16;
default:
doswap16:
inplace_bswap16(&p[1]);
break;
}
break;
case 5:
inplace_bswap32(&p[1]);
break;
case 17:
assert(*p == REOP_simple_greedy_quant);
inplace_bswap32(&p[1]);
inplace_bswap32(&p[5]);
inplace_bswap32(&p[9]);
inplace_bswap32(&p[13]);
break;
default:
abort();
}
p = &p[n];
}
}
|
O3
|
c
|
lre_byte_swap:
pushq %rax
cmpq $0x7, %rsi
jbe 0x97cfc
rolw $0x8, (%rdi)
movl 0x4(%rdi), %ecx
movl %ecx, %eax
bswapl %eax
movl %eax, 0x4(%rdi)
testl %edx, %edx
cmovel %ecx, %eax
addq $-0x8, %rsi
cmpq %rax, %rsi
jb 0x97cfc
testq %rax, %rax
je 0x97cfa
addq %rdi, %rax
addq $0x8, %rax
addq $0x8, %rdi
testl %edx, %edx
movl $0x3, %edx
movl $0x300, %ecx # imm = 0x300
cmovel %edx, %ecx
leaq 0xd067(%rip), %rdx # 0xa4c60
pxor %xmm0, %xmm0
movzbl (%rdi), %r8d
movzbl (%r8,%rdx), %esi
cmpl $0x4, %esi
jg 0x97c75
leal -0x1(%rsi), %r9d
cmpl $0x2, %r9d
jb 0x97cec
cmpl $0x3, %esi
jne 0x97cfc
movl $0x3, %esi
cmpl $0xe, %r8d
je 0x97cec
cmpl $0x16, %r8d
je 0x97cc3
cmpl $0x17, %r8d
jne 0x97ce7
movzwl 0x1(%rdi), %esi
leaq 0x3(,%rsi,8), %r8
movl %ecx, %esi
cmpl %r8d, %ecx
jae 0x97ce7
movq %rcx, %rsi
movl (%rdi,%rsi), %r9d
bswapl %r9d
movl %r9d, (%rdi,%rsi)
addq $0x4, %rsi
cmpq %r8, %rsi
jb 0x97c5f
jmp 0x97ce7
cmpl $0x5, %esi
je 0x97cb4
cmpl $0x11, %esi
jne 0x97cfc
movdqu 0x1(%rdi), %xmm1
movdqa %xmm1, %xmm2
punpckhbw %xmm0, %xmm2 # xmm2 = xmm2[8],xmm0[8],xmm2[9],xmm0[9],xmm2[10],xmm0[10],xmm2[11],xmm0[11],xmm2[12],xmm0[12],xmm2[13],xmm0[13],xmm2[14],xmm0[14],xmm2[15],xmm0[15]
pshuflw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[0,1,2,3,7,6,5,4]
punpcklbw %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
pshuflw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[3,2,1,0,4,5,6,7]
pshufhw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[0,1,2,3,7,6,5,4]
packuswb %xmm2, %xmm1
movdqu %xmm1, 0x1(%rdi)
movl $0x11, %esi
jmp 0x97cec
movl 0x1(%rdi), %esi
bswapl %esi
movl %esi, 0x1(%rdi)
movl $0x5, %esi
jmp 0x97cec
movzwl 0x1(%rdi), %esi
leaq 0x3(,%rsi,4), %r8
movl %ecx, %esi
cmpl %r8d, %ecx
jae 0x97ce7
movq %rcx, %rsi
rolw $0x8, (%rdi,%rsi)
addq $0x2, %rsi
cmpq %r8, %rsi
jb 0x97cd9
rolw $0x8, 0x1(%rdi)
movl %esi, %esi
addq %rsi, %rdi
cmpq %rax, %rdi
jb 0x97bfd
popq %rax
retq
callq 0xe090
|
lre_byte_swap:
push rax
cmp rsi, 7
jbe loc_97CFC
rol word ptr [rdi], 8
mov ecx, [rdi+4]
mov eax, ecx
bswap eax
mov [rdi+4], eax
test edx, edx
cmovz eax, ecx
add rsi, 0FFFFFFFFFFFFFFF8h
cmp rsi, rax
jb loc_97CFC
test rax, rax
jz loc_97CFA
add rax, rdi
add rax, 8
add rdi, 8
test edx, edx
mov edx, 3
mov ecx, 300h
cmovz ecx, edx
lea rdx, reopcode_info
pxor xmm0, xmm0
loc_97BFD:
movzx r8d, byte ptr [rdi]
movzx esi, byte ptr [r8+rdx]
cmp esi, 4
jg short loc_97C75
lea r9d, [rsi-1]
cmp r9d, 2
jb loc_97CEC
cmp esi, 3
jnz loc_97CFC
mov esi, 3
cmp r8d, 0Eh
jz loc_97CEC
cmp r8d, 16h
jz loc_97CC3
cmp r8d, 17h
jnz loc_97CE7
movzx esi, word ptr [rdi+1]
lea r8, ds:3[rsi*8]
mov esi, ecx
cmp ecx, r8d
jnb loc_97CE7
mov rsi, rcx
loc_97C5F:
mov r9d, [rdi+rsi]
bswap r9d
mov [rdi+rsi], r9d
add rsi, 4
cmp rsi, r8
jb short loc_97C5F
jmp short loc_97CE7
loc_97C75:
cmp esi, 5
jz short loc_97CB4
cmp esi, 11h
jnz short loc_97CFC
movdqu xmm1, xmmword ptr [rdi+1]
movdqa xmm2, xmm1
punpckhbw xmm2, xmm0
pshuflw xmm2, xmm2, 1Bh
pshufhw xmm2, xmm2, 1Bh
punpcklbw xmm1, xmm0
pshuflw xmm1, xmm1, 1Bh
pshufhw xmm1, xmm1, 1Bh
packuswb xmm1, xmm2
movdqu xmmword ptr [rdi+1], xmm1
mov esi, 11h
jmp short loc_97CEC
loc_97CB4:
mov esi, [rdi+1]
bswap esi
mov [rdi+1], esi
mov esi, 5
jmp short loc_97CEC
loc_97CC3:
movzx esi, word ptr [rdi+1]
lea r8, ds:3[rsi*4]
mov esi, ecx
cmp ecx, r8d
jnb short loc_97CE7
mov rsi, rcx
loc_97CD9:
rol word ptr [rdi+rsi], 8
add rsi, 2
cmp rsi, r8
jb short loc_97CD9
loc_97CE7:
rol word ptr [rdi+1], 8
loc_97CEC:
mov esi, esi
add rdi, rsi
cmp rdi, rax
jb loc_97BFD
loc_97CFA:
pop rax
retn
loc_97CFC:
call _abort
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> lre_byte_swap(
unsigned __int8 *a1,
unsigned long long a2,
int a3)
{
unsigned int v3; // ecx
unsigned long long v4; // rax
unsigned long long v5; // rax
long long v6; // rcx
long long v7; // r8
unsigned long long v8; // rsi
unsigned long long v9; // r8
__m128i v10; // xmm1
unsigned long long v11; // r8
if ( a2 <= 7 )
goto LABEL_28;
*(_WORD *)a1 = __ROL2__(*(_WORD *)a1, 8);
v3 = *((_DWORD *)a1 + 1);
v4 = _byteswap_ulong(v3);
*((_DWORD *)a1 + 1) = v4;
if ( !a3 )
v4 = v3;
if ( a2 - 8 < v4 )
LABEL_28:
abort((const char *)a1);
if ( v4 )
{
v5 = (unsigned long long)&a1[v4 + 8];
a1 += 8;
v6 = 768LL;
if ( !a3 )
v6 = 3LL;
do
{
v7 = *a1;
LODWORD(v8) = reopcode_info[v7];
if ( (unsigned int)v8 > 4 )
{
if ( (_DWORD)v8 == 5 )
{
*(_DWORD *)(a1 + 1) = _byteswap_ulong(*(_DWORD *)(a1 + 1));
LODWORD(v8) = 5;
}
else
{
if ( (_DWORD)v8 != 17 )
goto LABEL_28;
v10 = _mm_loadu_si128((const __m128i *)(a1 + 1));
*(__m128i *)(a1 + 1) = _mm_packus_epi16(
_mm_shufflehi_epi16(
_mm_shufflelo_epi16(_mm_unpacklo_epi8(v10, (__m128i)0LL), 27),
27),
_mm_shufflehi_epi16(
_mm_shufflelo_epi16(_mm_unpackhi_epi8(v10, (__m128i)0LL), 27),
27));
LODWORD(v8) = 17;
}
}
else if ( (unsigned int)(v8 - 1) >= 2 )
{
if ( (_DWORD)v8 != 3 )
goto LABEL_28;
LODWORD(v8) = 3;
if ( (_DWORD)v7 != 14 )
{
if ( (_DWORD)v7 == 22 )
{
v11 = 4LL * *(unsigned __int16 *)(a1 + 1) + 3;
LODWORD(v8) = v6;
if ( (unsigned int)v6 < (unsigned int)v11 )
{
v8 = v6;
do
{
*(_WORD *)&a1[v8] = __ROL2__(*(_WORD *)&a1[v8], 8);
v8 += 2LL;
}
while ( v8 < v11 );
}
}
else if ( (_DWORD)v7 == 23 )
{
v9 = 8LL * *(unsigned __int16 *)(a1 + 1) + 3;
LODWORD(v8) = v6;
if ( (unsigned int)v6 < (unsigned int)v9 )
{
v8 = v6;
do
{
*(_DWORD *)&a1[v8] = _byteswap_ulong(*(_DWORD *)&a1[v8]);
v8 += 4LL;
}
while ( v8 < v9 );
}
}
*(_WORD *)(a1 + 1) = __ROL2__(*(_WORD *)(a1 + 1), 8);
}
}
a1 += (unsigned int)v8;
}
while ( (unsigned long long)a1 < v5 );
}
}
|
lre_byte_swap:
PUSH RAX
CMP RSI,0x7
JBE 0x00197cfc
ROL word ptr [RDI],0x8
MOV ECX,dword ptr [RDI + 0x4]
MOV EAX,ECX
BSWAP EAX
MOV dword ptr [RDI + 0x4],EAX
TEST EDX,EDX
CMOVZ EAX,ECX
ADD RSI,-0x8
CMP RSI,RAX
JC 0x00197cfc
TEST RAX,RAX
JZ 0x00197cfa
ADD RAX,RDI
ADD RAX,0x8
ADD RDI,0x8
TEST EDX,EDX
MOV EDX,0x3
MOV ECX,0x300
CMOVZ ECX,EDX
LEA RDX,[0x1a4c60]
PXOR XMM0,XMM0
LAB_00197bfd:
MOVZX R8D,byte ptr [RDI]
MOVZX ESI,byte ptr [R8 + RDX*0x1]
CMP ESI,0x4
JG 0x00197c75
LEA R9D,[RSI + -0x1]
CMP R9D,0x2
JC 0x00197cec
CMP ESI,0x3
JNZ 0x00197cfc
MOV ESI,0x3
CMP R8D,0xe
JZ 0x00197cec
CMP R8D,0x16
JZ 0x00197cc3
CMP R8D,0x17
JNZ 0x00197ce7
MOVZX ESI,word ptr [RDI + 0x1]
LEA R8,[0x3 + RSI*0x8]
MOV ESI,ECX
CMP ECX,R8D
JNC 0x00197ce7
MOV RSI,RCX
LAB_00197c5f:
MOV R9D,dword ptr [RDI + RSI*0x1]
BSWAP R9D
MOV dword ptr [RDI + RSI*0x1],R9D
ADD RSI,0x4
CMP RSI,R8
JC 0x00197c5f
JMP 0x00197ce7
LAB_00197c75:
CMP ESI,0x5
JZ 0x00197cb4
CMP ESI,0x11
JNZ 0x00197cfc
MOVDQU XMM1,xmmword ptr [RDI + 0x1]
MOVDQA XMM2,XMM1
PUNPCKHBW XMM2,XMM0
PSHUFLW XMM2,XMM2,0x1b
PSHUFHW XMM2,XMM2,0x1b
PUNPCKLBW XMM1,XMM0
PSHUFLW XMM1,XMM1,0x1b
PSHUFHW XMM1,XMM1,0x1b
PACKUSWB XMM1,XMM2
MOVDQU xmmword ptr [RDI + 0x1],XMM1
MOV ESI,0x11
JMP 0x00197cec
LAB_00197cb4:
MOV ESI,dword ptr [RDI + 0x1]
BSWAP ESI
MOV dword ptr [RDI + 0x1],ESI
MOV ESI,0x5
JMP 0x00197cec
LAB_00197cc3:
MOVZX ESI,word ptr [RDI + 0x1]
LEA R8,[0x3 + RSI*0x4]
MOV ESI,ECX
CMP ECX,R8D
JNC 0x00197ce7
MOV RSI,RCX
LAB_00197cd9:
ROL word ptr [RDI + RSI*0x1],0x8
ADD RSI,0x2
CMP RSI,R8
JC 0x00197cd9
LAB_00197ce7:
ROL word ptr [RDI + 0x1],0x8
LAB_00197cec:
MOV ESI,ESI
ADD RDI,RSI
CMP RDI,RAX
JC 0x00197bfd
LAB_00197cfa:
POP RAX
RET
LAB_00197cfc:
CALL 0x0010e090
|
int8 lre_byte_swap(ushort *param_1,ulong param_2,int param_3)
{
ushort *puVar1;
ulong uVar2;
byte bVar3;
byte bVar4;
short sVar5;
short sVar6;
short sVar7;
short sVar8;
short sVar9;
short sVar10;
short sVar11;
short sVar12;
short sVar13;
short sVar14;
short sVar15;
short sVar16;
short sVar17;
short sVar18;
short sVar19;
short sVar20;
int1 auVar21 [15];
int1 auVar22 [15];
int1 auVar23 [15];
int1 auVar24 [15];
int1 auVar25 [15];
int1 auVar26 [15];
int1 auVar27 [15];
int1 auVar28 [15];
int1 auVar29 [15];
int1 auVar30 [15];
uint uVar31;
int8 in_RAX;
ulong uVar32;
ulong uVar33;
uint uVar34;
ulong uVar35;
ushort *puVar36;
int1 auVar37 [16];
int1 auVar38 [16];
if (7 < param_2) {
*param_1 = *param_1 << 8 | *param_1 >> 8;
uVar34 = *(uint *)(param_1 + 2);
uVar31 = uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18;
*(uint *)(param_1 + 2) = uVar31;
if (param_3 == 0) {
uVar31 = uVar34;
}
uVar32 = (ulong)uVar31;
if (uVar32 <= param_2 - 8) {
if (uVar32 != 0) {
puVar36 = param_1 + 4;
uVar33 = 0x300;
if (param_3 == 0) {
uVar33 = 3;
}
do {
bVar3 = (byte)*puVar36;
bVar4 = reopcode_info[bVar3];
uVar34 = (uint)bVar4;
if (bVar4 < 5) {
if (1 < bVar4 - 1) {
if (bVar4 != 3) goto LAB_00197cfc;
uVar34 = 3;
if (bVar3 != 0xe) {
uVar35 = uVar33;
if (bVar3 == 0x16) {
uVar2 = (ulong)*(ushort *)((long)puVar36 + 1) * 4 + 3;
if ((uint)uVar33 < (uint)uVar2) {
do {
puVar1 = (ushort *)((long)puVar36 + uVar35);
*puVar1 = *puVar1 << 8 | *puVar1 >> 8;
uVar35 = uVar35 + 2;
} while (uVar35 < uVar2);
}
}
else {
uVar35 = 3;
if ((bVar3 == 0x17) &&
(uVar2 = (ulong)*(ushort *)((long)puVar36 + 1) * 8 + 3, uVar35 = uVar33,
(uint)uVar33 < (uint)uVar2)) {
do {
uVar34 = *(uint *)((long)puVar36 + uVar35);
*(uint *)((long)puVar36 + uVar35) =
uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 |
uVar34 << 0x18;
uVar35 = uVar35 + 4;
} while (uVar35 < uVar2);
}
}
uVar34 = (uint)uVar35;
puVar1 = (ushort *)((long)puVar36 + 1);
*puVar1 = *puVar1 << 8 | *puVar1 >> 8;
}
}
}
else if (bVar4 == 5) {
uVar34 = *(uint *)((long)puVar36 + 1);
*(uint *)((long)puVar36 + 1) =
uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18
;
uVar34 = 5;
}
else {
if (bVar4 != 0x11) goto LAB_00197cfc;
auVar37 = *(int1 (*) [16])((long)puVar36 + 1);
auVar38[1] = 0;
auVar38[0] = auVar37[8];
auVar38[2] = auVar37[9];
auVar38[3] = 0;
auVar38[4] = auVar37[10];
auVar38[5] = 0;
auVar38[6] = auVar37[0xb];
auVar38[7] = 0;
auVar38[8] = auVar37[0xc];
auVar38[9] = 0;
auVar38[10] = auVar37[0xd];
auVar38[0xb] = 0;
auVar38[0xc] = auVar37[0xe];
auVar38[0xd] = 0;
auVar38[0xe] = auVar37[0xf];
auVar38[0xf] = 0;
auVar38 = pshuflw(auVar38,auVar38,0x1b);
auVar38 = pshufhw(auVar38,auVar38,0x1b);
auVar21[0xd] = 0;
auVar21._0_13_ = auVar37._0_13_;
auVar21[0xe] = auVar37[7];
auVar22[0xc] = auVar37[6];
auVar22._0_12_ = auVar37._0_12_;
auVar22._13_2_ = auVar21._13_2_;
auVar23[0xb] = 0;
auVar23._0_11_ = auVar37._0_11_;
auVar23._12_3_ = auVar22._12_3_;
auVar24[10] = auVar37[5];
auVar24._0_10_ = auVar37._0_10_;
auVar24._11_4_ = auVar23._11_4_;
auVar25[9] = 0;
auVar25._0_9_ = auVar37._0_9_;
auVar25._10_5_ = auVar24._10_5_;
auVar26[8] = auVar37[4];
auVar26._0_8_ = auVar37._0_8_;
auVar26._9_6_ = auVar25._9_6_;
auVar28._7_8_ = 0;
auVar28._0_7_ = auVar26._8_7_;
auVar29._1_8_ = SUB158(auVar28 << 0x40,7);
auVar29[0] = auVar37[3];
auVar29._9_6_ = 0;
auVar30._1_10_ = SUB1510(auVar29 << 0x30,5);
auVar30[0] = auVar37[2];
auVar30._11_4_ = 0;
auVar27[2] = auVar37[1];
auVar27._0_2_ = auVar37._0_2_;
auVar27._3_12_ = SUB1512(auVar30 << 0x20,3);
auVar37._0_2_ = auVar37._0_2_ & 0xff;
auVar37._2_13_ = auVar27._2_13_;
auVar37[0xf] = 0;
auVar37 = pshuflw(auVar37,auVar37,0x1b);
auVar37 = pshufhw(auVar37,auVar37,0x1b);
sVar5 = auVar37._0_2_;
sVar6 = auVar37._2_2_;
sVar7 = auVar37._4_2_;
sVar8 = auVar37._6_2_;
sVar9 = auVar37._8_2_;
sVar10 = auVar37._10_2_;
sVar11 = auVar37._12_2_;
sVar12 = auVar37._14_2_;
sVar13 = auVar38._0_2_;
sVar14 = auVar38._2_2_;
sVar15 = auVar38._4_2_;
sVar16 = auVar38._6_2_;
sVar17 = auVar38._8_2_;
sVar18 = auVar38._10_2_;
sVar19 = auVar38._12_2_;
sVar20 = auVar38._14_2_;
*(char *)((long)puVar36 + 1) =
(0 < sVar5) * (sVar5 < 0x100) * auVar37[0] - (0xff < sVar5);
*(char *)(puVar36 + 1) = (0 < sVar6) * (sVar6 < 0x100) * auVar37[2] - (0xff < sVar6);
*(char *)((long)puVar36 + 3) =
(0 < sVar7) * (sVar7 < 0x100) * auVar37[4] - (0xff < sVar7);
*(char *)(puVar36 + 2) = (0 < sVar8) * (sVar8 < 0x100) * auVar37[6] - (0xff < sVar8);
*(char *)((long)puVar36 + 5) =
(0 < sVar9) * (sVar9 < 0x100) * auVar37[8] - (0xff < sVar9);
*(char *)(puVar36 + 3) = (0 < sVar10) * (sVar10 < 0x100) * auVar37[10] - (0xff < sVar10)
;
*(char *)((long)puVar36 + 7) =
(0 < sVar11) * (sVar11 < 0x100) * auVar37[0xc] - (0xff < sVar11);
*(char *)(puVar36 + 4) =
(0 < sVar12) * (sVar12 < 0x100) * auVar37[0xe] - (0xff < sVar12);
*(char *)((long)puVar36 + 9) =
(0 < sVar13) * (sVar13 < 0x100) * auVar38[0] - (0xff < sVar13);
*(char *)(puVar36 + 5) = (0 < sVar14) * (sVar14 < 0x100) * auVar38[2] - (0xff < sVar14);
*(char *)((long)puVar36 + 0xb) =
(0 < sVar15) * (sVar15 < 0x100) * auVar38[4] - (0xff < sVar15);
*(char *)(puVar36 + 6) = (0 < sVar16) * (sVar16 < 0x100) * auVar38[6] - (0xff < sVar16);
*(char *)((long)puVar36 + 0xd) =
(0 < sVar17) * (sVar17 < 0x100) * auVar38[8] - (0xff < sVar17);
*(char *)(puVar36 + 7) = (0 < sVar18) * (sVar18 < 0x100) * auVar38[10] - (0xff < sVar18)
;
*(char *)((long)puVar36 + 0xf) =
(0 < sVar19) * (sVar19 < 0x100) * auVar38[0xc] - (0xff < sVar19);
*(char *)(puVar36 + 8) =
(0 < sVar20) * (sVar20 < 0x100) * auVar38[0xe] - (0xff < sVar20);
uVar34 = 0x11;
}
puVar36 = (ushort *)((long)puVar36 + (ulong)uVar34);
} while (puVar36 < (ushort *)((long)param_1 + uVar32 + 8));
}
return in_RAX;
}
}
LAB_00197cfc:
/* WARNING: Subroutine does not return */
abort();
}
|
|
65,416 |
unicode_normalize
|
bluesky950520[P]quickjs/libunicode.c
|
int unicode_normalize(uint32_t **pdst, const uint32_t *src, int src_len,
UnicodeNormalizationEnum n_type,
void *opaque, DynBufReallocFunc *realloc_func)
{
int *buf, buf_len, i, p, starter_pos, cc, last_cc, out_len;
BOOL is_compat;
DynBuf dbuf_s, *dbuf = &dbuf_s;
is_compat = n_type >> 1;
dbuf_init2(dbuf, opaque, realloc_func);
if (dbuf_realloc(dbuf, sizeof(int) * src_len))
goto fail;
/* common case: latin1 is unaffected by NFC */
if (n_type == UNICODE_NFC) {
for(i = 0; i < src_len; i++) {
if (src[i] >= 0x100)
goto not_latin1;
}
buf = (int *)dbuf->buf;
memcpy(buf, src, src_len * sizeof(int));
*pdst = (uint32_t *)buf;
return src_len;
not_latin1: ;
}
to_nfd_rec(dbuf, (const int *)src, src_len, is_compat);
if (dbuf_error(dbuf)) {
fail:
*pdst = NULL;
return -1;
}
buf = (int *)dbuf->buf;
buf_len = dbuf->size / sizeof(int);
sort_cc(buf, buf_len);
if (buf_len <= 1 || (n_type & 1) != 0) {
/* NFD / NFKD */
*pdst = (uint32_t *)buf;
return buf_len;
}
i = 1;
out_len = 1;
while (i < buf_len) {
/* find the starter character and test if it is blocked from
the character at 'i' */
last_cc = unicode_get_cc(buf[i]);
starter_pos = out_len - 1;
while (starter_pos >= 0) {
cc = unicode_get_cc(buf[starter_pos]);
if (cc == 0)
break;
if (cc >= last_cc)
goto next;
last_cc = 256;
starter_pos--;
}
if (starter_pos >= 0 &&
(p = compose_pair(buf[starter_pos], buf[i])) != 0) {
buf[starter_pos] = p;
i++;
} else {
next:
buf[out_len++] = buf[i++];
}
}
*pdst = (uint32_t *)buf;
return out_len;
}
|
O1
|
c
|
unicode_normalize:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %ebp
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %r14
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r8, %rsi
movq %r9, %rdx
callq 0x1a717
movslq %r13d, %rbx
shlq $0x2, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1a761
testl %eax, %eax
jne 0x97e10
movq %r13, %r15
testl %ebp, %ebp
je 0x97e31
movl %ebp, %ecx
shrl %ecx
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x98153
cmpl $0x0, 0x18(%rbx)
je 0x97e62
xorl %r13d, %r13d
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movq %r13, (%r14)
movl %r15d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
jle 0x97e4d
movl %r15d, %eax
xorl %ecx, %ecx
cmpl $0xff, (%r12,%rcx,4)
ja 0x97df3
incq %rcx
cmpq %rcx, %rax
jne 0x97e3b
movq 0x58(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xe5a0
jmp 0x97e19
movl %ebp, 0x30(%rsp)
movq 0x58(%rsp), %r13
movq 0x60(%rsp), %r15
shrq $0x2, %r15
testl %r15d, %r15d
movq %r14, 0x18(%rsp)
jle 0x97f83
movl %r15d, %ebp
andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
xorl %ebx, %ebx
movq %r15, 0x10(%rsp)
movq %rbp, 0x38(%rsp)
movslq %ebx, %rax
movq %rax, 0x8(%rsp)
movl (%r13,%rax,4), %edi
callq 0x982ef
testl %eax, %eax
je 0x97f78
leal 0x1(%rbx), %eax
cmpl %r15d, %eax
jge 0x97f67
leal -0x1(%rbx), %ecx
movl %ecx, 0x34(%rsp)
movslq %eax, %r14
movq %rbx, 0x20(%rsp)
movl (%r13,%r14,4), %r15d
movl %r15d, %edi
callq 0x982ef
testl %eax, %eax
je 0x97f6b
movl %r15d, 0x28(%rsp)
movl %ebx, %r15d
cmpl 0x20(%rsp), %ebx
jl 0x97f3e
movl %eax, %r12d
movq %r14, 0x40(%rsp)
movslq %ebx, %r14
incq %r14
movl %ebx, %r15d
movq %r13, %rbp
movl -0x4(%r13,%r14,4), %r13d
movl %r13d, %edi
callq 0x982ef
cmpl %r12d, %eax
jle 0x97f31
movl %r13d, (%rbp,%r14,4)
decl %r15d
decq %r14
cmpq 0x8(%rsp), %r14
movq %rbp, %r13
jg 0x97f00
movl 0x34(%rsp), %r15d
jmp 0x97f34
movq %rbp, %r13
movq 0x38(%rsp), %rbp
movq 0x40(%rsp), %r14
movslq %r15d, %rax
movl 0x28(%rsp), %ecx
movl %ecx, 0x4(%r13,%rax,4)
incq %r14
incl %ebx
cmpq %rbp, %r14
jne 0x97ecc
movq 0x10(%rsp), %r15
movl %r15d, %ebx
movq 0x18(%rsp), %r14
jmp 0x97f78
movl %eax, %ebx
jmp 0x97f78
movl %r14d, %ebx
movq 0x18(%rsp), %r14
movq 0x10(%rsp), %r15
incl %ebx
cmpl %r15d, %ebx
jl 0x97e97
testb $0x1, 0x30(%rsp)
jne 0x97e19
cmpl $0x2, %r15d
jl 0x97e19
movl %r15d, %r12d
andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
movl $0x1, %r15d
movl $0x1, %eax
movq %r13, 0x50(%rsp)
movq %r12, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl (%r13,%rax,4), %edi
movq %rdi, 0x8(%rsp)
callq 0x982ef
movl %eax, %ebx
movl %r15d, %r14d
testl %r14d, %r14d
jle 0x98128
movl -0x4(%r13,%r14,4), %ebp
movl %ebp, %edi
callq 0x982ef
testl %eax, %eax
je 0x97ffa
decq %r14
cmpl %ebx, %eax
movl $0x100, %ebx # imm = 0x100
jl 0x97fd0
jmp 0x98128
movq 0x8(%rsp), %rax
addl $0xffffee9f, %eax # imm = 0xFFFFEE9F
cmpl $0x14, %eax
ja 0x98035
leal -0x1100(%rbp), %eax
cmpl $0x12, %eax
ja 0x98035
imull $0x24c, %ebp, %eax # imm = 0x24C
movq 0x8(%rsp), %rdx
leal (%rdx,%rdx,8), %ecx
leal (%rcx,%rcx,2), %ecx
addl %edx, %ecx
leal (%rax,%rcx), %ebx
addl $0xffd7b964, %ebx # imm = 0xFFD7B964
jmp 0x9811d
leal -0xac00(%rbp), %eax
cmpl $0x2ba3, %eax # imm = 0x2BA3
ja 0x98077
movq 0x8(%rsp), %rcx
addl $0xffffee59, %ecx # imm = 0xFFFFEE59
cmpl $0x1b, %ecx
ja 0x98077
movl %eax, %edx
shrl $0x2, %edx
imulq $0x24924925, %rdx, %rdx # imm = 0x24924925
shrq $0x20, %rdx
leal (%rdx,%rdx,8), %esi
leal (%rsi,%rsi,2), %esi
addl %edx, %esi
subl %esi, %eax
jne 0x98077
addl %ecx, %ebp
movl %ebp, %ebx
jmp 0x9811d
movq %r15, 0x10(%rsp)
xorl %r12d, %r12d
movl $0x3c4, %r13d # imm = 0x3C4
leal (%r12,%r13), %eax
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
movslq %r15d, %rax
leaq 0x10f40(%rip), %rcx # 0xa8fe0
movzwl (%rcx,%rax,2), %ebx
movl %ebx, %edx
shrl $0x6, %edx
andl $0x3f, %ebx
leaq 0xd58d(%rip), %rax # 0xa5640
movl (%rax,%rdx,4), %r9d
movl %r9d, %ecx
shrl $0xe, %ecx
movl %r9d, %r8d
shrl $0x7, %r8d
andl $0x7f, %r8d
shrl %r9d
andl $0x3f, %r9d
addl %ecx, %ebx
leaq 0x48(%rsp), %rdi
movl %ebx, %esi
callq 0x999fa
movq 0x8(%rsp), %rax
subl 0x4c(%rsp), %eax
movl %ebp, %ecx
subl 0x48(%rsp), %ecx
cmovel %eax, %ecx
testl %ecx, %ecx
js 0x980fd
je 0x9810e
incl %r15d
movl %r15d, %r12d
jmp 0x98103
decl %r15d
movl %r15d, %r13d
cmpl %r13d, %r12d
jle 0x98085
xorl %ebx, %ebx
movq 0x10(%rsp), %r15
movq 0x50(%rsp), %r13
movq 0x20(%rsp), %r12
testl %ebx, %ebx
je 0x98128
movl %ebx, -0x4(%r13,%r14,4)
jmp 0x98138
movslq %r15d, %rax
incl %r15d
movq 0x8(%rsp), %rcx
movl %ecx, (%r13,%rax,4)
movq 0x28(%rsp), %rax
incq %rax
cmpq %r12, %rax
jne 0x97fb7
movq 0x18(%rsp), %r14
jmp 0x97e19
|
unicode_normalize:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov ebp, ecx
mov r13d, edx
mov r12, rsi
mov r14, rdi
lea r15, [rsp+0B8h+var_60]
mov rdi, r15
mov rsi, r8
mov rdx, r9
call dbuf_init2
movsxd rbx, r13d
shl rbx, 2
mov rdi, r15
mov rsi, rbx
call dbuf_realloc
test eax, eax
jnz short loc_97E10
mov r15, r13
test ebp, ebp
jz short loc_97E31
loc_97DF3:
mov ecx, ebp
shr ecx, 1
lea rbx, [rsp+0B8h+var_60]
mov rdi, rbx
mov rsi, r12
mov edx, r15d
call to_nfd_rec
cmp dword ptr [rbx+18h], 0
jz short loc_97E62
loc_97E10:
xor r13d, r13d
mov r15d, 0FFFFFFFFh
loc_97E19:
mov [r14], r13
mov eax, r15d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_97E31:
test r15d, r15d
jle short loc_97E4D
mov eax, r15d
xor ecx, ecx
loc_97E3B:
cmp dword ptr [r12+rcx*4], 0FFh
ja short loc_97DF3
inc rcx
cmp rax, rcx
jnz short loc_97E3B
loc_97E4D:
mov r13, [rsp+0B8h+var_60]
mov rdi, r13
mov rsi, r12
mov rdx, rbx
call _memcpy
jmp short loc_97E19
loc_97E62:
mov [rsp+0B8h+var_88], ebp
mov r13, [rsp+0B8h+var_60]
mov r15, [rsp+0B8h+var_58]
shr r15, 2
test r15d, r15d
mov [rsp+0B8h+var_A0], r14
jle loc_97F83
mov ebp, r15d
and ebp, 7FFFFFFFh
xor ebx, ebx
mov [rsp+0B8h+var_A8], r15
mov [rsp+0B8h+var_80], rbp
loc_97E97:
movsxd rax, ebx
mov [rsp+0B8h+var_B0], rax
mov edi, [r13+rax*4+0]
call unicode_get_cc
test eax, eax
jz loc_97F78
lea eax, [rbx+1]
cmp eax, r15d
jge loc_97F67
lea ecx, [rbx-1]
mov [rsp+0B8h+var_84], ecx
movsxd r14, eax
mov [rsp+0B8h+var_98], rbx
loc_97ECC:
mov r15d, [r13+r14*4+0]
mov edi, r15d
call unicode_get_cc
test eax, eax
jz loc_97F6B
mov dword ptr [rsp+0B8h+var_90], r15d
mov r15d, ebx
cmp ebx, dword ptr [rsp+0B8h+var_98]
jl short loc_97F3E
mov r12d, eax
mov [rsp+0B8h+var_78], r14
movsxd r14, ebx
inc r14
mov r15d, ebx
loc_97F00:
mov rbp, r13
mov r13d, [r13+r14*4-4]
mov edi, r13d
call unicode_get_cc
cmp eax, r12d
jle short loc_97F31
mov [rbp+r14*4+0], r13d
dec r15d
dec r14
cmp r14, [rsp+0B8h+var_B0]
mov r13, rbp
jg short loc_97F00
mov r15d, [rsp+0B8h+var_84]
jmp short loc_97F34
loc_97F31:
mov r13, rbp
loc_97F34:
mov rbp, [rsp+0B8h+var_80]
mov r14, [rsp+0B8h+var_78]
loc_97F3E:
movsxd rax, r15d
mov ecx, dword ptr [rsp+0B8h+var_90]
mov [r13+rax*4+4], ecx
inc r14
inc ebx
cmp r14, rbp
jnz loc_97ECC
mov r15, [rsp+0B8h+var_A8]
mov ebx, r15d
mov r14, [rsp+0B8h+var_A0]
jmp short loc_97F78
loc_97F67:
mov ebx, eax
jmp short loc_97F78
loc_97F6B:
mov ebx, r14d
mov r14, [rsp+0B8h+var_A0]
mov r15, [rsp+0B8h+var_A8]
loc_97F78:
inc ebx
cmp ebx, r15d
jl loc_97E97
loc_97F83:
test byte ptr [rsp+0B8h+var_88], 1
jnz loc_97E19
cmp r15d, 2
jl loc_97E19
mov r12d, r15d
and r12d, 7FFFFFFFh
mov r15d, 1
mov eax, 1
mov [rsp+0B8h+var_68], r13
mov [rsp+0B8h+var_98], r12
loc_97FB7:
mov [rsp+0B8h+var_90], rax
mov edi, [r13+rax*4+0]
mov [rsp+0B8h+var_B0], rdi
call unicode_get_cc
mov ebx, eax
mov r14d, r15d
loc_97FD0:
test r14d, r14d
jle loc_98128
mov ebp, [r13+r14*4-4]
mov edi, ebp
call unicode_get_cc
test eax, eax
jz short loc_97FFA
dec r14
cmp eax, ebx
mov ebx, 100h
jl short loc_97FD0
jmp loc_98128
loc_97FFA:
mov rax, [rsp+0B8h+var_B0]
add eax, 0FFFFEE9Fh
cmp eax, 14h
ja short loc_98035
lea eax, [rbp-1100h]
cmp eax, 12h
ja short loc_98035
imul eax, ebp, 24Ch
mov rdx, [rsp+0B8h+var_B0]
lea ecx, [rdx+rdx*8]
lea ecx, [rcx+rcx*2]
add ecx, edx
lea ebx, [rax+rcx]
add ebx, 0FFD7B964h
jmp loc_9811D
loc_98035:
lea eax, [rbp-0AC00h]
cmp eax, 2BA3h
ja short loc_98077
mov rcx, [rsp+0B8h+var_B0]
add ecx, 0FFFFEE59h
cmp ecx, 1Bh
ja short loc_98077
mov edx, eax
shr edx, 2
imul rdx, 24924925h
shr rdx, 20h
lea esi, [rdx+rdx*8]
lea esi, [rsi+rsi*2]
add esi, edx
sub eax, esi
jnz short loc_98077
add ebp, ecx
mov ebx, ebp
jmp loc_9811D
loc_98077:
mov [rsp+0B8h+var_A8], r15
xor r12d, r12d
mov r13d, 3C4h
loc_98085:
lea eax, [r12+r13]
mov r15d, eax
shr r15d, 1Fh
add r15d, eax
sar r15d, 1
movsxd rax, r15d
lea rcx, unicode_comp_table
movzx ebx, word ptr [rcx+rax*2]
mov edx, ebx
shr edx, 6
and ebx, 3Fh
lea rax, unicode_decomp_table1
mov r9d, [rax+rdx*4]
mov ecx, r9d
shr ecx, 0Eh
mov r8d, r9d
shr r8d, 7
and r8d, 7Fh
shr r9d, 1
and r9d, 3Fh
add ebx, ecx
lea rdi, [rsp+0B8h+var_70]
mov esi, ebx
call unicode_decomp_entry
mov rax, [rsp+0B8h+var_B0]
sub eax, [rsp+0B8h+var_6C]
mov ecx, ebp
sub ecx, [rsp+0B8h+var_70]
cmovz ecx, eax
test ecx, ecx
js short loc_980FD
jz short loc_9810E
inc r15d
mov r12d, r15d
jmp short loc_98103
loc_980FD:
dec r15d
mov r13d, r15d
loc_98103:
cmp r12d, r13d
jle loc_98085
xor ebx, ebx
loc_9810E:
mov r15, [rsp+0B8h+var_A8]
mov r13, [rsp+0B8h+var_68]
mov r12, [rsp+0B8h+var_98]
loc_9811D:
test ebx, ebx
jz short loc_98128
mov [r13+r14*4-4], ebx
jmp short loc_98138
loc_98128:
movsxd rax, r15d
inc r15d
mov rcx, [rsp+0B8h+var_B0]
mov [r13+rax*4+0], ecx
loc_98138:
mov rax, [rsp+0B8h+var_90]
inc rax
cmp rax, r12
jnz loc_97FB7
mov r14, [rsp+0B8h+var_A0]
jmp loc_97E19
|
long long unicode_normalize(
_QWORD *a1,
long long a2,
int a3,
unsigned int a4,
long long a5,
long long ( *a6)())
{
_QWORD *v8; // r14
unsigned long long v9; // rbx
long long v10; // r15
long long v11; // r13
long long v13; // rcx
long long v14; // rbp
int v15; // ebx
long long v16; // r14
unsigned int v17; // r15d
int cc; // eax
int v19; // r15d
int v20; // r12d
long long v21; // r14
long long v22; // rbp
unsigned int v23; // r13d
long long v24; // r12
long long v25; // rax
int v26; // ebx
long long v27; // r14
unsigned int v28; // ebp
int v29; // eax
bool v30; // cc
unsigned int v31; // ebx
int v32; // r12d
int v33; // r13d
int v34; // r15d
long long v35; // rdx
long long v36; // rcx
int v37; // ecx
long long v38; // rax
long long v39; // [rsp+8h] [rbp-B0h]
unsigned int v40; // [rsp+8h] [rbp-B0h]
unsigned long long v41; // [rsp+10h] [rbp-A8h]
long long v42; // [rsp+10h] [rbp-A8h]
int v43; // [rsp+20h] [rbp-98h]
long long v44; // [rsp+20h] [rbp-98h]
unsigned int v45; // [rsp+28h] [rbp-90h]
long long v46; // [rsp+28h] [rbp-90h]
char v47; // [rsp+30h] [rbp-88h]
int v48; // [rsp+34h] [rbp-84h]
long long v49; // [rsp+38h] [rbp-80h]
long long v50; // [rsp+40h] [rbp-78h]
_DWORD v51[2]; // [rsp+48h] [rbp-70h] BYREF
long long v52; // [rsp+50h] [rbp-68h]
long long v53; // [rsp+58h] [rbp-60h] BYREF
unsigned long long v54; // [rsp+60h] [rbp-58h]
int v55; // [rsp+70h] [rbp-48h]
v8 = a1;
dbuf_init2((long long)&v53, a5, a6);
v9 = 4LL * a3;
if ( (unsigned int)dbuf_realloc((long long)&v53, v9) )
goto LABEL_4;
LODWORD(v10) = a3;
if ( !a4 )
{
if ( a3 <= 0 )
{
LABEL_10:
v11 = v53;
memcpy(v53, a2, v9);
goto LABEL_5;
}
v13 = 0LL;
while ( *(_DWORD *)(a2 + 4 * v13) <= 0xFFu )
{
if ( a3 == ++v13 )
goto LABEL_10;
}
}
to_nfd_rec(&v53, a2, (unsigned int)a3, a4 >> 1);
if ( v55 )
{
LABEL_4:
v11 = 0LL;
LODWORD(v10) = -1;
}
else
{
v47 = a4;
v11 = v53;
v10 = v54 >> 2;
if ( (int)(v54 >> 2) > 0 )
{
v14 = (v54 >> 2) & 0x7FFFFFFF;
v15 = 0;
v41 = v54 >> 2;
v49 = v14;
do
{
v39 = v15;
if ( (unsigned int)unicode_get_cc(*(unsigned int *)(v11 + 4LL * v15)) )
{
if ( v15 + 1 >= (int)v10 )
{
++v15;
}
else
{
v48 = v15 - 1;
v16 = v15 + 1;
v43 = v15;
while ( 1 )
{
v17 = *(_DWORD *)(v11 + 4 * v16);
cc = unicode_get_cc(v17);
if ( !cc )
break;
v45 = v17;
v19 = v15;
if ( v15 >= v43 )
{
v20 = cc;
v50 = v16;
v21 = v15 + 1LL;
v19 = v15;
while ( 1 )
{
v22 = v11;
v23 = *(_DWORD *)(v11 + 4 * v21 - 4);
if ( (int)unicode_get_cc(v23) <= v20 )
break;
*(_DWORD *)(v22 + 4 * v21) = v23;
--v19;
--v21;
v11 = v22;
if ( v21 <= v39 )
{
v19 = v48;
goto LABEL_23;
}
}
v11 = v22;
LABEL_23:
v14 = v49;
v16 = v50;
}
*(_DWORD *)(v11 + 4LL * v19 + 4) = v45;
++v16;
++v15;
if ( v16 == v14 )
{
LODWORD(v10) = v41;
v15 = v41;
v8 = a1;
goto LABEL_28;
}
}
v15 = v16;
v8 = a1;
LODWORD(v10) = v41;
}
}
LABEL_28:
++v15;
}
while ( v15 < (int)v10 );
}
if ( (v47 & 1) == 0 && (int)v10 >= 2 )
{
v24 = v10 & 0x7FFFFFFF;
v10 = 1LL;
v25 = 1LL;
v52 = v11;
v44 = v24;
do
{
v46 = v25;
v40 = *(_DWORD *)(v11 + 4 * v25);
v26 = unicode_get_cc(v40);
v27 = (unsigned int)v10;
while ( (int)v27 > 0 )
{
v28 = *(_DWORD *)(v11 + 4 * v27 - 4);
v29 = unicode_get_cc(v28);
if ( !v29 )
{
if ( v40 - 4449 > 0x14 || v28 - 4352 > 0x12 )
{
if ( v28 - 44032 > 0x2BA3 || v40 - 4519 > 0x1B || (v28 - 44032) % 0x1C )
{
v42 = v10;
v32 = 0;
v33 = 964;
do
{
v34 = (v32 + v33) / 2;
v35 = unicode_comp_table[v34] >> 6;
v36 = unicode_decomp_table1[v35] >> 14;
v31 = v36 + (unicode_comp_table[v34] & 0x3F);
unicode_decomp_entry(
v51,
v31,
v35,
v36,
(unicode_decomp_table1[v35] >> 7) & 0x7F,
(unicode_decomp_table1[v35] >> 1) & 0x3F);
v37 = v28 - v51[0];
if ( v28 == v51[0] )
v37 = v40 - v51[1];
if ( v37 < 0 )
{
v33 = v34 - 1;
}
else
{
if ( !v37 )
goto LABEL_53;
v32 = v34 + 1;
}
}
while ( v32 <= v33 );
v31 = 0;
LABEL_53:
v10 = v42;
v11 = v52;
v24 = v44;
}
else
{
v31 = v40 - 4519 + v28;
}
}
else
{
v31 = 588 * v28 + 28 * v40 - 2639516;
}
if ( v31 )
{
*(_DWORD *)(v11 + 4 * v27 - 4) = v31;
goto LABEL_57;
}
break;
}
--v27;
v30 = v29 < v26;
v26 = 256;
if ( !v30 )
break;
}
v38 = (int)v10;
v10 = (unsigned int)(v10 + 1);
*(_DWORD *)(v11 + 4 * v38) = v40;
LABEL_57:
v25 = v46 + 1;
}
while ( v46 + 1 != v24 );
v8 = a1;
}
}
LABEL_5:
*v8 = v11;
return (unsigned int)v10;
}
|
unicode_normalize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV EBP,ECX
MOV R13D,EDX
MOV R12,RSI
MOV R14,RDI
LEA R15,[RSP + 0x58]
MOV RDI,R15
MOV RSI,R8
MOV RDX,R9
CALL 0x0011a717
MOVSXD RBX,R13D
SHL RBX,0x2
MOV RDI,R15
MOV RSI,RBX
CALL 0x0011a761
TEST EAX,EAX
JNZ 0x00197e10
MOV R15,R13
TEST EBP,EBP
JZ 0x00197e31
LAB_00197df3:
MOV ECX,EBP
SHR ECX,0x1
LEA RBX,[RSP + 0x58]
MOV RDI,RBX
MOV RSI,R12
MOV EDX,R15D
CALL 0x00198153
CMP dword ptr [RBX + 0x18],0x0
JZ 0x00197e62
LAB_00197e10:
XOR R13D,R13D
MOV R15D,0xffffffff
LAB_00197e19:
MOV qword ptr [R14],R13
MOV EAX,R15D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00197e31:
TEST R15D,R15D
JLE 0x00197e4d
MOV EAX,R15D
XOR ECX,ECX
LAB_00197e3b:
CMP dword ptr [R12 + RCX*0x4],0xff
JA 0x00197df3
INC RCX
CMP RAX,RCX
JNZ 0x00197e3b
LAB_00197e4d:
MOV R13,qword ptr [RSP + 0x58]
MOV RDI,R13
MOV RSI,R12
MOV RDX,RBX
CALL 0x0010e5a0
JMP 0x00197e19
LAB_00197e62:
MOV dword ptr [RSP + 0x30],EBP
MOV R13,qword ptr [RSP + 0x58]
MOV R15,qword ptr [RSP + 0x60]
SHR R15,0x2
TEST R15D,R15D
MOV qword ptr [RSP + 0x18],R14
JLE 0x00197f83
MOV EBP,R15D
AND EBP,0x7fffffff
XOR EBX,EBX
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x38],RBP
LAB_00197e97:
MOVSXD RAX,EBX
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,dword ptr [R13 + RAX*0x4]
CALL 0x001982ef
TEST EAX,EAX
JZ 0x00197f78
LEA EAX,[RBX + 0x1]
CMP EAX,R15D
JGE 0x00197f67
LEA ECX,[RBX + -0x1]
MOV dword ptr [RSP + 0x34],ECX
MOVSXD R14,EAX
MOV qword ptr [RSP + 0x20],RBX
LAB_00197ecc:
MOV R15D,dword ptr [R13 + R14*0x4]
MOV EDI,R15D
CALL 0x001982ef
TEST EAX,EAX
JZ 0x00197f6b
MOV dword ptr [RSP + 0x28],R15D
MOV R15D,EBX
CMP EBX,dword ptr [RSP + 0x20]
JL 0x00197f3e
MOV R12D,EAX
MOV qword ptr [RSP + 0x40],R14
MOVSXD R14,EBX
INC R14
MOV R15D,EBX
LAB_00197f00:
MOV RBP,R13
MOV R13D,dword ptr [R13 + R14*0x4 + -0x4]
MOV EDI,R13D
CALL 0x001982ef
CMP EAX,R12D
JLE 0x00197f31
MOV dword ptr [RBP + R14*0x4],R13D
DEC R15D
DEC R14
CMP R14,qword ptr [RSP + 0x8]
MOV R13,RBP
JG 0x00197f00
MOV R15D,dword ptr [RSP + 0x34]
JMP 0x00197f34
LAB_00197f31:
MOV R13,RBP
LAB_00197f34:
MOV RBP,qword ptr [RSP + 0x38]
MOV R14,qword ptr [RSP + 0x40]
LAB_00197f3e:
MOVSXD RAX,R15D
MOV ECX,dword ptr [RSP + 0x28]
MOV dword ptr [R13 + RAX*0x4 + 0x4],ECX
INC R14
INC EBX
CMP R14,RBP
JNZ 0x00197ecc
MOV R15,qword ptr [RSP + 0x10]
MOV EBX,R15D
MOV R14,qword ptr [RSP + 0x18]
JMP 0x00197f78
LAB_00197f67:
MOV EBX,EAX
JMP 0x00197f78
LAB_00197f6b:
MOV EBX,R14D
MOV R14,qword ptr [RSP + 0x18]
MOV R15,qword ptr [RSP + 0x10]
LAB_00197f78:
INC EBX
CMP EBX,R15D
JL 0x00197e97
LAB_00197f83:
TEST byte ptr [RSP + 0x30],0x1
JNZ 0x00197e19
CMP R15D,0x2
JL 0x00197e19
MOV R12D,R15D
AND R12D,0x7fffffff
MOV R15D,0x1
MOV EAX,0x1
MOV qword ptr [RSP + 0x50],R13
MOV qword ptr [RSP + 0x20],R12
LAB_00197fb7:
MOV qword ptr [RSP + 0x28],RAX
MOV EDI,dword ptr [R13 + RAX*0x4]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001982ef
MOV EBX,EAX
MOV R14D,R15D
LAB_00197fd0:
TEST R14D,R14D
JLE 0x00198128
MOV EBP,dword ptr [R13 + R14*0x4 + -0x4]
MOV EDI,EBP
CALL 0x001982ef
TEST EAX,EAX
JZ 0x00197ffa
DEC R14
CMP EAX,EBX
MOV EBX,0x100
JL 0x00197fd0
JMP 0x00198128
LAB_00197ffa:
MOV RAX,qword ptr [RSP + 0x8]
ADD EAX,0xffffee9f
CMP EAX,0x14
JA 0x00198035
LEA EAX,[RBP + -0x1100]
CMP EAX,0x12
JA 0x00198035
IMUL EAX,EBP,0x24c
MOV RDX,qword ptr [RSP + 0x8]
LEA ECX,[RDX + RDX*0x8]
LEA ECX,[RCX + RCX*0x2]
ADD ECX,EDX
LEA EBX,[RAX + RCX*0x1]
ADD EBX,0xffd7b964
JMP 0x0019811d
LAB_00198035:
LEA EAX,[RBP + -0xac00]
CMP EAX,0x2ba3
JA 0x00198077
MOV RCX,qword ptr [RSP + 0x8]
ADD ECX,0xffffee59
CMP ECX,0x1b
JA 0x00198077
MOV EDX,EAX
SHR EDX,0x2
IMUL RDX,RDX,0x24924925
SHR RDX,0x20
LEA ESI,[RDX + RDX*0x8]
LEA ESI,[RSI + RSI*0x2]
ADD ESI,EDX
SUB EAX,ESI
JNZ 0x00198077
ADD EBP,ECX
MOV EBX,EBP
JMP 0x0019811d
LAB_00198077:
MOV qword ptr [RSP + 0x10],R15
XOR R12D,R12D
MOV R13D,0x3c4
LAB_00198085:
LEA EAX,[R12 + R13*0x1]
MOV R15D,EAX
SHR R15D,0x1f
ADD R15D,EAX
SAR R15D,0x1
MOVSXD RAX,R15D
LEA RCX,[0x1a8fe0]
MOVZX EBX,word ptr [RCX + RAX*0x2]
MOV EDX,EBX
SHR EDX,0x6
AND EBX,0x3f
LEA RAX,[0x1a5640]
MOV R9D,dword ptr [RAX + RDX*0x4]
MOV ECX,R9D
SHR ECX,0xe
MOV R8D,R9D
SHR R8D,0x7
AND R8D,0x7f
SHR R9D,0x1
AND R9D,0x3f
ADD EBX,ECX
LEA RDI,[RSP + 0x48]
MOV ESI,EBX
CALL 0x001999fa
MOV RAX,qword ptr [RSP + 0x8]
SUB EAX,dword ptr [RSP + 0x4c]
MOV ECX,EBP
SUB ECX,dword ptr [RSP + 0x48]
CMOVZ ECX,EAX
TEST ECX,ECX
JS 0x001980fd
JZ 0x0019810e
INC R15D
MOV R12D,R15D
JMP 0x00198103
LAB_001980fd:
DEC R15D
MOV R13D,R15D
LAB_00198103:
CMP R12D,R13D
JLE 0x00198085
XOR EBX,EBX
LAB_0019810e:
MOV R15,qword ptr [RSP + 0x10]
MOV R13,qword ptr [RSP + 0x50]
MOV R12,qword ptr [RSP + 0x20]
LAB_0019811d:
TEST EBX,EBX
JZ 0x00198128
MOV dword ptr [R13 + R14*0x4 + -0x4],EBX
JMP 0x00198138
LAB_00198128:
MOVSXD RAX,R15D
INC R15D
MOV RCX,qword ptr [RSP + 0x8]
MOV dword ptr [R13 + RAX*0x4],ECX
LAB_00198138:
MOV RAX,qword ptr [RSP + 0x28]
INC RAX
CMP RAX,R12
JNZ 0x00197fb7
MOV R14,qword ptr [RSP + 0x18]
JMP 0x00197e19
|
ulong unicode_normalize(long *param_1,void *param_2,uint param_3,uint param_4,int8 param_5,
int8 param_6)
{
int4 uVar1;
int4 uVar2;
int iVar3;
bool bVar4;
int iVar5;
uint uVar6;
int iVar7;
int iVar8;
int iVar9;
ulong uVar10;
uint uVar11;
uint uVar12;
void *pvVar13;
ulong uVar14;
long lVar15;
ulong uVar16;
uint uVar17;
uint uVar18;
int iVar19;
int iVar20;
ulong uVar21;
int local_70;
int local_6c;
void *local_68;
void *local_60;
ulong local_58;
int local_48;
uVar21 = (ulong)param_3;
dbuf_init2(&local_60,param_5,param_6);
iVar5 = dbuf_realloc(&local_60,(long)(int)param_3 << 2);
if (iVar5 == 0) {
if (param_4 == 0) {
if (0 < (int)param_3) {
uVar14 = 0;
do {
if (0xff < *(uint *)((long)param_2 + uVar14 * 4)) goto LAB_00197df3;
uVar14 = uVar14 + 1;
} while (uVar21 != uVar14);
}
memcpy(local_60,param_2,(long)(int)param_3 << 2);
pvVar13 = local_60;
goto LAB_00197e19;
}
LAB_00197df3:
to_nfd_rec(&local_60,param_2,uVar21,param_4 >> 1);
if (local_48 == 0) {
uVar21 = local_58 >> 2;
uVar17 = (uint)uVar21;
if (0 < (int)uVar17) {
uVar12 = 0;
do {
iVar5 = unicode_get_cc(*(int4 *)((long)local_60 + (long)(int)uVar12 * 4));
uVar6 = uVar12;
if ((iVar5 != 0) && (uVar6 = uVar12 + 1, (int)uVar6 < (int)uVar17)) {
uVar14 = (ulong)(int)uVar6;
uVar11 = uVar12;
do {
uVar1 = *(int4 *)((long)local_60 + uVar14 * 4);
iVar5 = unicode_get_cc(uVar1);
if (iVar5 == 0) {
uVar6 = (uint)uVar14;
break;
}
uVar6 = uVar11;
if ((int)uVar12 <= (int)uVar11) {
lVar15 = (long)(int)uVar11 + 1;
uVar18 = uVar11;
do {
uVar2 = *(int4 *)((long)local_60 + lVar15 * 4 + -4);
iVar7 = unicode_get_cc(uVar2);
uVar6 = uVar18;
if (iVar7 <= iVar5) break;
*(int4 *)((long)local_60 + lVar15 * 4) = uVar2;
uVar18 = uVar18 - 1;
lVar15 = lVar15 + -1;
uVar6 = uVar12 - 1;
} while ((int)uVar12 < lVar15);
}
*(int4 *)((long)local_60 + (long)(int)uVar6 * 4 + 4) = uVar1;
uVar14 = uVar14 + 1;
uVar11 = uVar11 + 1;
uVar6 = uVar17;
} while (uVar14 != (uVar17 & 0x7fffffff));
}
uVar12 = uVar6 + 1;
} while ((int)uVar12 < (int)uVar17);
}
pvVar13 = local_60;
if (((param_4 & 1) == 0) && (1 < (int)uVar17)) {
uVar21 = 1;
uVar14 = 1;
local_68 = local_60;
LAB_00197fb7:
iVar5 = *(int *)((long)pvVar13 + uVar14 * 4);
iVar7 = unicode_get_cc();
uVar16 = uVar21;
do {
if ((int)uVar16 < 1) break;
iVar3 = *(int *)((long)pvVar13 + uVar16 * 4 + -4);
iVar8 = unicode_get_cc(iVar3);
if (iVar8 == 0) {
if ((iVar5 - 0x1161U < 0x15) && (iVar3 - 0x1100U < 0x13)) {
iVar7 = iVar3 * 0x24c + iVar5 * 0x1c + -0x28469c;
goto LAB_0019811d;
}
uVar12 = iVar3 - 0xac00;
if (((0x2ba3 < uVar12) || (0x1b < iVar5 - 0x11a7U)) ||
(uVar12 != (uVar12 / 0x1c) * 0x1c)) {
iVar8 = 0;
iVar20 = 0x3c4;
goto LAB_00198085;
}
iVar7 = iVar3 + (iVar5 - 0x11a7U);
goto LAB_0019811d;
}
uVar16 = uVar16 - 1;
bVar4 = iVar8 < iVar7;
iVar7 = 0x100;
} while (bVar4);
goto LAB_00198128;
}
goto LAB_00197e19;
}
}
uVar21 = 0xffffffff;
pvVar13 = (void *)0x0;
LAB_00197e19:
*param_1 = (long)pvVar13;
return uVar21 & 0xffffffff;
LAB_00198085:
do {
iVar19 = (iVar8 + iVar20) / 2;
uVar10 = (ulong)(*(ushort *)(unicode_comp_table + (long)iVar19 * 2) >> 6);
uVar12 = *(uint *)(unicode_decomp_table1 + uVar10 * 4);
iVar7 = (*(ushort *)(unicode_comp_table + (long)iVar19 * 2) & 0x3f) + (uVar12 >> 0xe);
unicode_decomp_entry(&local_70,iVar7,uVar10,uVar12 >> 0xe,uVar12 >> 7 & 0x7f,uVar12 >> 1 & 0x3f)
;
iVar9 = iVar3 - local_70;
if (iVar3 - local_70 == 0) {
iVar9 = iVar5 - local_6c;
}
pvVar13 = local_68;
if (iVar9 < 0) {
iVar20 = iVar19 + -1;
}
else {
if (iVar9 == 0) goto LAB_0019811d;
iVar8 = iVar19 + 1;
}
} while (iVar8 <= iVar20);
iVar7 = 0;
LAB_0019811d:
if (iVar7 == 0) {
LAB_00198128:
iVar7 = (int)uVar21;
uVar21 = (ulong)(iVar7 + 1);
*(int *)((long)pvVar13 + (long)iVar7 * 4) = iVar5;
}
else {
*(int *)((long)pvVar13 + uVar16 * 4 + -4) = iVar7;
}
uVar14 = uVar14 + 1;
if (uVar14 == (uVar17 & 0x7fffffff)) goto LAB_00197e19;
goto LAB_00197fb7;
}
|
|
65,417 |
unicode_normalize
|
bluesky950520[P]quickjs/libunicode.c
|
int unicode_normalize(uint32_t **pdst, const uint32_t *src, int src_len,
UnicodeNormalizationEnum n_type,
void *opaque, DynBufReallocFunc *realloc_func)
{
int *buf, buf_len, i, p, starter_pos, cc, last_cc, out_len;
BOOL is_compat;
DynBuf dbuf_s, *dbuf = &dbuf_s;
is_compat = n_type >> 1;
dbuf_init2(dbuf, opaque, realloc_func);
if (dbuf_realloc(dbuf, sizeof(int) * src_len))
goto fail;
/* common case: latin1 is unaffected by NFC */
if (n_type == UNICODE_NFC) {
for(i = 0; i < src_len; i++) {
if (src[i] >= 0x100)
goto not_latin1;
}
buf = (int *)dbuf->buf;
memcpy(buf, src, src_len * sizeof(int));
*pdst = (uint32_t *)buf;
return src_len;
not_latin1: ;
}
to_nfd_rec(dbuf, (const int *)src, src_len, is_compat);
if (dbuf_error(dbuf)) {
fail:
*pdst = NULL;
return -1;
}
buf = (int *)dbuf->buf;
buf_len = dbuf->size / sizeof(int);
sort_cc(buf, buf_len);
if (buf_len <= 1 || (n_type & 1) != 0) {
/* NFD / NFKD */
*pdst = (uint32_t *)buf;
return buf_len;
}
i = 1;
out_len = 1;
while (i < buf_len) {
/* find the starter character and test if it is blocked from
the character at 'i' */
last_cc = unicode_get_cc(buf[i]);
starter_pos = out_len - 1;
while (starter_pos >= 0) {
cc = unicode_get_cc(buf[starter_pos]);
if (cc == 0)
break;
if (cc >= last_cc)
goto next;
last_cc = 256;
starter_pos--;
}
if (starter_pos >= 0 &&
(p = compose_pair(buf[starter_pos], buf[i])) != 0) {
buf[starter_pos] = p;
i++;
} else {
next:
buf[out_len++] = buf[i++];
}
}
*pdst = (uint32_t *)buf;
return out_len;
}
|
O3
|
c
|
unicode_normalize:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %ebp
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %r14
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r8, %rsi
movq %r9, %rdx
callq 0x1b01f
movslq %r13d, %rbx
shlq $0x2, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1b069
testl %eax, %eax
jne 0x9a6fb
testl %ebp, %ebp
je 0x9a71c
movl %ebp, %ecx
shrl %ecx
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x9aa5e
cmpl $0x0, 0x18(%rbx)
je 0x9a74d
xorl %r15d, %r15d
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
movq %r15, (%r14)
movl %r13d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r13d, %r13d
jle 0x9a738
movl %r13d, %eax
xorl %ecx, %ecx
cmpl $0xff, (%r12,%rcx,4)
ja 0x9a6de
incq %rcx
cmpq %rcx, %rax
jne 0x9a726
movq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xe5a0
jmp 0x9a704
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %r13
shrq $0x2, %r13
testl %r13d, %r13d
jle 0x9aa55
movl %r13d, %r15d
andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
xorl %ebx, %ebx
movq %r14, 0x28(%rsp)
movq %r13, 0x10(%rsp)
movl %ebp, 0x1c(%rsp)
movq %r15, 0x48(%rsp)
movslq %ebx, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movl (%rax,%rcx,4), %edi
callq 0x9ac02
testl %eax, %eax
je 0x9a874
leal 0x1(%rbx), %eax
cmpl %r13d, %eax
jge 0x9a860
leal -0x1(%rbx), %ecx
movl %ecx, 0x3c(%rsp)
movslq %eax, %rbp
movl %ebx, %r12d
movq (%rsp), %r13
movq %rbx, %r14
movq %rbx, 0x50(%rsp)
movl (%r13,%rbp,4), %edi
movl %edi, 0x30(%rsp)
callq 0x9ac02
testl %eax, %eax
je 0x9a864
movl %eax, %ebx
movl %r12d, %eax
movslq %r12d, %r12
cmpl %r14d, %r12d
movl %eax, 0x20(%rsp)
jl 0x9a834
incq %r12
movl %eax, %r15d
movq %r13, %r14
movl -0x4(%r13,%r12,4), %r13d
movl %r13d, %edi
callq 0x9ac02
cmpl %ebx, %eax
jle 0x9a824
movl %r13d, (%r14,%r12,4)
decl %r15d
decq %r12
cmpq 0x8(%rsp), %r12
movq %r14, %r13
jg 0x9a7f5
movl 0x3c(%rsp), %r15d
jmp 0x9a827
movq %r14, %r13
movslq %r15d, %r12
movq 0x48(%rsp), %r15
movq 0x50(%rsp), %r14
movl 0x30(%rsp), %eax
movl %eax, 0x4(%r13,%r12,4)
incq %rbp
movl 0x20(%rsp), %r12d
incl %r12d
cmpq %r15, %rbp
jne 0x9a7c8
movq 0x10(%rsp), %r13
movl %r13d, %ebx
movq 0x28(%rsp), %r14
jmp 0x9a870
movl %eax, %ebx
jmp 0x9a874
movl %ebp, %ebx
movq 0x28(%rsp), %r14
movq 0x10(%rsp), %r13
movl 0x1c(%rsp), %ebp
incl %ebx
cmpl %r13d, %ebx
jl 0x9a787
testb $0x1, %bpl
jne 0x9aa55
cmpl $0x1, %r13d
je 0x9aa55
movl %r13d, %r12d
andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
movl $0x1, %r13d
movl $0x1, %eax
movq %r12, 0x20(%rsp)
movq (%rsp), %r15
movq %rax, 0x30(%rsp)
movl (%r15,%rax,4), %edi
movq %rdi, 0x8(%rsp)
callq 0x9ac02
movl %eax, %ebx
movq %r13, 0x10(%rsp)
movl %r13d, %r14d
testl %r14d, %r14d
jle 0x9a8ef
movl -0x4(%r15,%r14,4), %ebp
movl %ebp, %edi
callq 0x9ac02
testl %eax, %eax
je 0x9a905
decq %r14
cmpl %ebx, %eax
movl $0x100, %ebx # imm = 0x100
jl 0x9a8ce
movq 0x10(%rsp), %r13
movslq %r13d, %rax
incl %r13d
movq 0x8(%rsp), %rcx
movl %ecx, (%r15,%rax,4)
jmp 0x9a945
movq 0x8(%rsp), %rax
addl $0xffffee9f, %eax # imm = 0xFFFFEE9F
cmpl $0x14, %eax
ja 0x9a95b
leal -0x1100(%rbp), %eax
cmpl $0x12, %eax
ja 0x9a95b
imull $0x24c, %ebp, %eax # imm = 0x24C
movq 0x8(%rsp), %rdx
leal (%rdx,%rdx,8), %ecx
leal (%rcx,%rcx,2), %ecx
addl %edx, %ecx
leal (%rax,%rcx), %ebx
addl $0xffd7b964, %ebx # imm = 0xFFD7B964
movl %ebx, -0x4(%r15,%r14,4)
movq 0x10(%rsp), %r13
movq 0x30(%rsp), %rax
incq %rax
cmpq %r12, %rax
jne 0x9a8ad
jmp 0x9aa50
leal -0xac00(%rbp), %eax
cmpl $0x2ba3, %eax # imm = 0x2BA3
ja 0x9a99c
movq 0x8(%rsp), %rcx
addl $0xffffee59, %ecx # imm = 0xFFFFEE59
cmpl $0x1b, %ecx
ja 0x9a99c
movzwl %ax, %edx
shrl $0x2, %edx
imull $0x4925, %edx, %edx # imm = 0x4925
shrl $0x11, %edx
leal (%rdx,%rdx,8), %esi
leal (%rsi,%rsi,2), %esi
addl %edx, %esi
subl %esi, %eax
testw %ax, %ax
jne 0x9a99c
addl %ecx, %ebp
movl %ebp, %ebx
jmp 0x9a93b
xorl %r12d, %r12d
movl $0x3c4, %r13d # imm = 0x3C4
leal (%r12,%r13), %eax
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
movslq %r15d, %rax
leaq 0x115d0(%rip), %rcx # 0xabf90
movzwl (%rcx,%rax,2), %ebx
movl %ebx, %edx
shrl $0x6, %edx
andl $0x3f, %ebx
leaq 0xdc1d(%rip), %rax # 0xa85f0
movl (%rax,%rdx,4), %r9d
movl %r9d, %ecx
shrl $0xe, %ecx
movl %r9d, %r8d
shrl $0x7, %r8d
andl $0x7f, %r8d
shrl %r9d
andl $0x3f, %r9d
addl %ecx, %ebx
leaq 0x40(%rsp), %rdi
movl %ebx, %esi
callq 0x9c335
movq 0x8(%rsp), %rax
subl 0x44(%rsp), %eax
movl %ebp, %ecx
subl 0x40(%rsp), %ecx
cmovel %eax, %ecx
testl %ecx, %ecx
js 0x9aa1d
je 0x9aa3a
incl %r15d
movl %r15d, %r12d
jmp 0x9aa23
decl %r15d
movl %r15d, %r13d
cmpl %r13d, %r12d
jle 0x9a9a5
movq (%rsp), %r15
movq 0x20(%rsp), %r12
jmp 0x9a8ef
testl %ebx, %ebx
movq (%rsp), %r15
movq 0x20(%rsp), %r12
jne 0x9a93b
jmp 0x9a8ef
movq 0x28(%rsp), %r14
movq (%rsp), %r15
jmp 0x9a704
|
unicode_normalize:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov ebp, ecx
mov r13d, edx
mov r12, rsi
mov r14, rdi
lea r15, [rsp+0B8h+var_60]
mov rdi, r15
mov rsi, r8
mov rdx, r9
call dbuf_init2
movsxd rbx, r13d
shl rbx, 2
mov rdi, r15
mov rsi, rbx
call dbuf_realloc
test eax, eax
jnz short loc_9A6FB
test ebp, ebp
jz short loc_9A71C
loc_9A6DE:
mov ecx, ebp
shr ecx, 1
lea rbx, [rsp+0B8h+var_60]
mov rdi, rbx
mov rsi, r12
mov edx, r13d
call to_nfd_rec
cmp dword ptr [rbx+18h], 0
jz short loc_9A74D
loc_9A6FB:
xor r15d, r15d
mov r13d, 0FFFFFFFFh
loc_9A704:
mov [r14], r15
mov eax, r13d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A71C:
test r13d, r13d
jle short loc_9A738
mov eax, r13d
xor ecx, ecx
loc_9A726:
cmp dword ptr [r12+rcx*4], 0FFh
ja short loc_9A6DE
inc rcx
cmp rax, rcx
jnz short loc_9A726
loc_9A738:
mov r15, [rsp+0B8h+var_60]
mov rdi, r15
mov rsi, r12
mov rdx, rbx
call _memcpy
jmp short loc_9A704
loc_9A74D:
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_B8], rax
mov r13, [rsp+0B8h+var_58]
shr r13, 2
test r13d, r13d
jle loc_9AA55
mov r15d, r13d
and r15d, 7FFFFFFFh
xor ebx, ebx
mov [rsp+0B8h+var_90], r14
mov [rsp+0B8h+var_A8], r13
mov [rsp+0B8h+var_9C], ebp
mov [rsp+0B8h+var_70], r15
loc_9A787:
movsxd rcx, ebx
mov rax, [rsp+0B8h+var_B8]
mov [rsp+0B8h+var_B0], rcx
mov edi, [rax+rcx*4]
call unicode_get_cc
test eax, eax
jz loc_9A874
lea eax, [rbx+1]
cmp eax, r13d
jge loc_9A860
lea ecx, [rbx-1]
mov [rsp+0B8h+var_7C], ecx
movsxd rbp, eax
mov r12d, ebx
mov r13, [rsp+0B8h+var_B8]
mov r14, rbx
mov [rsp+0B8h+var_68], rbx
loc_9A7C8:
mov edi, [r13+rbp*4+0]
mov dword ptr [rsp+0B8h+var_88], edi
call unicode_get_cc
test eax, eax
jz loc_9A864
mov ebx, eax
mov eax, r12d
movsxd r12, r12d
cmp r12d, r14d
mov dword ptr [rsp+0B8h+var_98], eax
jl short loc_9A834
inc r12
mov r15d, eax
loc_9A7F5:
mov r14, r13
mov r13d, [r13+r12*4-4]
mov edi, r13d
call unicode_get_cc
cmp eax, ebx
jle short loc_9A824
mov [r14+r12*4], r13d
dec r15d
dec r12
cmp r12, [rsp+0B8h+var_B0]
mov r13, r14
jg short loc_9A7F5
mov r15d, [rsp+0B8h+var_7C]
jmp short loc_9A827
loc_9A824:
mov r13, r14
loc_9A827:
movsxd r12, r15d
mov r15, [rsp+0B8h+var_70]
mov r14, [rsp+0B8h+var_68]
loc_9A834:
mov eax, dword ptr [rsp+0B8h+var_88]
mov [r13+r12*4+4], eax
inc rbp
mov r12d, dword ptr [rsp+0B8h+var_98]
inc r12d
cmp rbp, r15
jnz loc_9A7C8
mov r13, [rsp+0B8h+var_A8]
mov ebx, r13d
mov r14, [rsp+0B8h+var_90]
jmp short loc_9A870
loc_9A860:
mov ebx, eax
jmp short loc_9A874
loc_9A864:
mov ebx, ebp
mov r14, [rsp+0B8h+var_90]
mov r13, [rsp+0B8h+var_A8]
loc_9A870:
mov ebp, [rsp+0B8h+var_9C]
loc_9A874:
inc ebx
cmp ebx, r13d
jl loc_9A787
test bpl, 1
jnz loc_9AA55
cmp r13d, 1
jz loc_9AA55
mov r12d, r13d
and r12d, 7FFFFFFFh
mov r13d, 1
mov eax, 1
mov [rsp+0B8h+var_98], r12
loc_9A8AD:
mov r15, [rsp+0B8h+var_B8]
mov [rsp+0B8h+var_88], rax
mov edi, [r15+rax*4]
mov [rsp+0B8h+var_B0], rdi
call unicode_get_cc
mov ebx, eax
mov [rsp+0B8h+var_A8], r13
mov r14d, r13d
loc_9A8CE:
test r14d, r14d
jle short loc_9A8EF
mov ebp, [r15+r14*4-4]
mov edi, ebp
call unicode_get_cc
test eax, eax
jz short loc_9A905
dec r14
cmp eax, ebx
mov ebx, 100h
jl short loc_9A8CE
loc_9A8EF:
mov r13, [rsp+0B8h+var_A8]
movsxd rax, r13d
inc r13d
mov rcx, [rsp+0B8h+var_B0]
mov [r15+rax*4], ecx
jmp short loc_9A945
loc_9A905:
mov rax, [rsp+0B8h+var_B0]
add eax, 0FFFFEE9Fh
cmp eax, 14h
ja short loc_9A95B
lea eax, [rbp-1100h]
cmp eax, 12h
ja short loc_9A95B
imul eax, ebp, 24Ch
mov rdx, [rsp+0B8h+var_B0]
lea ecx, [rdx+rdx*8]
lea ecx, [rcx+rcx*2]
add ecx, edx
lea ebx, [rax+rcx]
add ebx, 0FFD7B964h
loc_9A93B:
mov [r15+r14*4-4], ebx
mov r13, [rsp+0B8h+var_A8]
loc_9A945:
mov rax, [rsp+0B8h+var_88]
inc rax
cmp rax, r12
jnz loc_9A8AD
jmp loc_9AA50
loc_9A95B:
lea eax, [rbp-0AC00h]
cmp eax, 2BA3h
ja short loc_9A99C
mov rcx, [rsp+0B8h+var_B0]
add ecx, 0FFFFEE59h
cmp ecx, 1Bh
ja short loc_9A99C
movzx edx, ax
shr edx, 2
imul edx, 4925h
shr edx, 11h
lea esi, [rdx+rdx*8]
lea esi, [rsi+rsi*2]
add esi, edx
sub eax, esi
test ax, ax
jnz short loc_9A99C
add ebp, ecx
mov ebx, ebp
jmp short loc_9A93B
loc_9A99C:
xor r12d, r12d
mov r13d, 3C4h
loc_9A9A5:
lea eax, [r12+r13]
mov r15d, eax
shr r15d, 1Fh
add r15d, eax
sar r15d, 1
movsxd rax, r15d
lea rcx, unicode_comp_table
movzx ebx, word ptr [rcx+rax*2]
mov edx, ebx
shr edx, 6
and ebx, 3Fh
lea rax, unicode_decomp_table1
mov r9d, [rax+rdx*4]
mov ecx, r9d
shr ecx, 0Eh
mov r8d, r9d
shr r8d, 7
and r8d, 7Fh
shr r9d, 1
and r9d, 3Fh
add ebx, ecx
lea rdi, [rsp+0B8h+var_78]
mov esi, ebx
call unicode_decomp_entry
mov rax, [rsp+0B8h+var_B0]
sub eax, [rsp+0B8h+var_74]
mov ecx, ebp
sub ecx, [rsp+0B8h+var_78]
cmovz ecx, eax
test ecx, ecx
js short loc_9AA1D
jz short loc_9AA3A
inc r15d
mov r12d, r15d
jmp short loc_9AA23
loc_9AA1D:
dec r15d
mov r13d, r15d
loc_9AA23:
cmp r12d, r13d
jle loc_9A9A5
mov r15, [rsp+0B8h+var_B8]
mov r12, [rsp+0B8h+var_98]
jmp loc_9A8EF
loc_9AA3A:
test ebx, ebx
mov r15, [rsp+0B8h+var_B8]
mov r12, [rsp+0B8h+var_98]
jnz loc_9A93B
jmp loc_9A8EF
loc_9AA50:
mov r14, [rsp+0B8h+var_90]
loc_9AA55:
mov r15, [rsp+0B8h+var_B8]
jmp loc_9A704
|
long long unicode_normalize(
_QWORD *a1,
long long a2,
int a3,
unsigned int a4,
long long a5,
long long ( *a6)())
{
long long v7; // r13
_QWORD *v8; // r14
long long v9; // r15
long long v11; // rcx
long long v12; // r15
long long v13; // rbx
long long v14; // rbp
long long v15; // r12
long long v16; // r13
int v17; // r14d
int cc; // eax
int v19; // ebx
int v20; // eax
long long v21; // r12
int v22; // r15d
long long v23; // r14
unsigned int v24; // r13d
long long v25; // r12
long long v26; // rax
long long v27; // r15
int v28; // ebx
long long v29; // r14
unsigned int v30; // ebp
int v31; // eax
bool v32; // cc
unsigned int v33; // ebx
int v34; // r12d
int v35; // r13d
int v36; // r15d
long long v37; // rdx
long long v38; // rcx
int v39; // ecx
long long v40; // [rsp+0h] [rbp-B8h]
long long v41; // [rsp+8h] [rbp-B0h]
unsigned int v42; // [rsp+8h] [rbp-B0h]
unsigned long long v43; // [rsp+10h] [rbp-A8h]
long long v44; // [rsp+10h] [rbp-A8h]
char v45; // [rsp+1Ch] [rbp-9Ch]
int v46; // [rsp+20h] [rbp-98h]
long long v47; // [rsp+20h] [rbp-98h]
unsigned int v48; // [rsp+30h] [rbp-88h]
long long v49; // [rsp+30h] [rbp-88h]
int v50; // [rsp+3Ch] [rbp-7Ch]
_DWORD v51[2]; // [rsp+40h] [rbp-78h] BYREF
long long v52; // [rsp+48h] [rbp-70h]
long long v53; // [rsp+50h] [rbp-68h]
long long v54; // [rsp+58h] [rbp-60h] BYREF
unsigned long long v55; // [rsp+60h] [rbp-58h]
int v56; // [rsp+70h] [rbp-48h]
LODWORD(v7) = a3;
v8 = a1;
dbuf_init2((long long)&v54, a5, a6);
if ( !(unsigned int)dbuf_realloc((long long)&v54, 4LL * (int)v7) )
{
if ( !a4 )
{
if ( (int)v7 <= 0 )
{
LABEL_10:
v9 = v54;
memcpy(v54, a2, 4LL * (int)v7);
goto LABEL_5;
}
v11 = 0LL;
while ( *(_DWORD *)(a2 + 4 * v11) <= 0xFFu )
{
if ( (unsigned int)v7 == ++v11 )
goto LABEL_10;
}
}
to_nfd_rec(&v54, a2, (unsigned int)v7, a4 >> 1);
if ( !v56 )
{
v40 = v54;
v7 = v55 >> 2;
if ( (int)(v55 >> 2) <= 0 )
goto LABEL_59;
v12 = (v55 >> 2) & 0x7FFFFFFF;
v13 = 0LL;
v43 = v55 >> 2;
v45 = a4;
v52 = v12;
do
{
v41 = (int)v13;
if ( (unsigned int)unicode_get_cc(*(unsigned int *)(v40 + 4LL * (int)v13)) )
{
if ( (int)v13 + 1 >= (int)v7 )
{
LODWORD(v13) = v13 + 1;
}
else
{
v50 = v13 - 1;
v14 = (int)v13 + 1;
LODWORD(v15) = v13;
v16 = v40;
v17 = v13;
v53 = v13;
while ( 1 )
{
v48 = *(_DWORD *)(v16 + 4 * v14);
cc = unicode_get_cc(v48);
if ( !cc )
break;
v19 = cc;
v20 = v15;
v15 = (int)v15;
v46 = v15;
if ( (int)v15 >= v17 )
{
v21 = (int)v15 + 1LL;
v22 = v20;
while ( 1 )
{
v23 = v16;
v24 = *(_DWORD *)(v16 + 4 * v21 - 4);
if ( (int)unicode_get_cc(v24) <= v19 )
break;
*(_DWORD *)(v23 + 4 * v21) = v24;
--v22;
--v21;
v16 = v23;
if ( v21 <= v41 )
{
v22 = v50;
goto LABEL_23;
}
}
v16 = v23;
LABEL_23:
v15 = v22;
v12 = v52;
v17 = v53;
}
*(_DWORD *)(v16 + 4 * v15 + 4) = v48;
++v14;
LODWORD(v15) = v46 + 1;
if ( v14 == v12 )
{
LODWORD(v7) = v43;
LODWORD(v13) = v43;
v8 = a1;
goto LABEL_28;
}
}
LODWORD(v13) = v14;
v8 = a1;
LODWORD(v7) = v43;
LABEL_28:
LOBYTE(a4) = v45;
}
}
v13 = (unsigned int)(v13 + 1);
}
while ( (int)v13 < (int)v7 );
if ( (a4 & 1) != 0 || (_DWORD)v7 == 1 )
{
LABEL_59:
v9 = v40;
goto LABEL_5;
}
v25 = v7 & 0x7FFFFFFF;
v7 = 1LL;
v26 = 1LL;
v47 = v25;
LABEL_33:
v27 = v40;
v49 = v26;
v42 = *(_DWORD *)(v40 + 4 * v26);
v28 = unicode_get_cc(v42);
v44 = v7;
v29 = (unsigned int)v7;
while ( 1 )
{
if ( (int)v29 <= 0 )
goto LABEL_37;
v30 = *(_DWORD *)(v40 + 4 * v29 - 4);
v31 = unicode_get_cc(v30);
if ( !v31 )
break;
--v29;
v32 = v31 < v28;
v28 = 256;
if ( !v32 )
goto LABEL_37;
}
if ( v42 - 4449 <= 0x14 && v30 - 4352 <= 0x12 )
{
v33 = 588 * v30 + 28 * v42 - 2639516;
goto LABEL_41;
}
if ( v30 - 44032 <= 0x2BA3 && v42 - 4519 <= 0x1B && !((unsigned __int16)(v30 + 21504) % 0x1Cu) )
{
v33 = v42 - 4519 + v30;
goto LABEL_41;
}
v34 = 0;
v35 = 964;
while ( 1 )
{
v36 = (v34 + v35) / 2;
v37 = unicode_comp_table[v36] >> 6;
v38 = unicode_decomp_table1[v37] >> 14;
v33 = v38 + (unicode_comp_table[v36] & 0x3F);
unicode_decomp_entry(
v51,
v33,
v37,
v38,
(unicode_decomp_table1[v37] >> 7) & 0x7F,
(unicode_decomp_table1[v37] >> 1) & 0x3F);
v39 = v30 - v51[0];
if ( v30 == v51[0] )
v39 = v42 - v51[1];
if ( v39 < 0 )
{
v35 = v36 - 1;
}
else
{
if ( !v39 )
{
v27 = v40;
v25 = v47;
if ( !v33 )
{
LABEL_37:
v7 = (unsigned int)(v44 + 1);
*(_DWORD *)(v27 + 4LL * (int)v44) = v42;
goto LABEL_42;
}
LABEL_41:
*(_DWORD *)(v27 + 4 * v29 - 4) = v33;
v7 = v44;
LABEL_42:
v26 = v49 + 1;
if ( v49 + 1 == v25 )
{
v8 = a1;
goto LABEL_59;
}
goto LABEL_33;
}
v34 = v36 + 1;
}
if ( v34 > v35 )
{
v27 = v40;
v25 = v47;
goto LABEL_37;
}
}
}
}
v9 = 0LL;
LODWORD(v7) = -1;
LABEL_5:
*v8 = v9;
return (unsigned int)v7;
}
|
unicode_normalize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV EBP,ECX
MOV R13D,EDX
MOV R12,RSI
MOV R14,RDI
LEA R15,[RSP + 0x58]
MOV RDI,R15
MOV RSI,R8
MOV RDX,R9
CALL 0x0011b01f
MOVSXD RBX,R13D
SHL RBX,0x2
MOV RDI,R15
MOV RSI,RBX
CALL 0x0011b069
TEST EAX,EAX
JNZ 0x0019a6fb
TEST EBP,EBP
JZ 0x0019a71c
LAB_0019a6de:
MOV ECX,EBP
SHR ECX,0x1
LEA RBX,[RSP + 0x58]
MOV RDI,RBX
MOV RSI,R12
MOV EDX,R13D
CALL 0x0019aa5e
CMP dword ptr [RBX + 0x18],0x0
JZ 0x0019a74d
LAB_0019a6fb:
XOR R15D,R15D
MOV R13D,0xffffffff
LAB_0019a704:
MOV qword ptr [R14],R15
MOV EAX,R13D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a71c:
TEST R13D,R13D
JLE 0x0019a738
MOV EAX,R13D
XOR ECX,ECX
LAB_0019a726:
CMP dword ptr [R12 + RCX*0x4],0xff
JA 0x0019a6de
INC RCX
CMP RAX,RCX
JNZ 0x0019a726
LAB_0019a738:
MOV R15,qword ptr [RSP + 0x58]
MOV RDI,R15
MOV RSI,R12
MOV RDX,RBX
CALL 0x0010e5a0
JMP 0x0019a704
LAB_0019a74d:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP],RAX
MOV R13,qword ptr [RSP + 0x60]
SHR R13,0x2
TEST R13D,R13D
JLE 0x0019aa55
MOV R15D,R13D
AND R15D,0x7fffffff
XOR EBX,EBX
MOV qword ptr [RSP + 0x28],R14
MOV qword ptr [RSP + 0x10],R13
MOV dword ptr [RSP + 0x1c],EBP
MOV qword ptr [RSP + 0x48],R15
LAB_0019a787:
MOVSXD RCX,EBX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV EDI,dword ptr [RAX + RCX*0x4]
CALL 0x0019ac02
TEST EAX,EAX
JZ 0x0019a874
LEA EAX,[RBX + 0x1]
CMP EAX,R13D
JGE 0x0019a860
LEA ECX,[RBX + -0x1]
MOV dword ptr [RSP + 0x3c],ECX
MOVSXD RBP,EAX
MOV R12D,EBX
MOV R13,qword ptr [RSP]
MOV R14,RBX
MOV qword ptr [RSP + 0x50],RBX
LAB_0019a7c8:
MOV EDI,dword ptr [R13 + RBP*0x4]
MOV dword ptr [RSP + 0x30],EDI
CALL 0x0019ac02
TEST EAX,EAX
JZ 0x0019a864
MOV EBX,EAX
MOV EAX,R12D
MOVSXD R12,R12D
CMP R12D,R14D
MOV dword ptr [RSP + 0x20],EAX
JL 0x0019a834
INC R12
MOV R15D,EAX
LAB_0019a7f5:
MOV R14,R13
MOV R13D,dword ptr [R13 + R12*0x4 + -0x4]
MOV EDI,R13D
CALL 0x0019ac02
CMP EAX,EBX
JLE 0x0019a824
MOV dword ptr [R14 + R12*0x4],R13D
DEC R15D
DEC R12
CMP R12,qword ptr [RSP + 0x8]
MOV R13,R14
JG 0x0019a7f5
MOV R15D,dword ptr [RSP + 0x3c]
JMP 0x0019a827
LAB_0019a824:
MOV R13,R14
LAB_0019a827:
MOVSXD R12,R15D
MOV R15,qword ptr [RSP + 0x48]
MOV R14,qword ptr [RSP + 0x50]
LAB_0019a834:
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [R13 + R12*0x4 + 0x4],EAX
INC RBP
MOV R12D,dword ptr [RSP + 0x20]
INC R12D
CMP RBP,R15
JNZ 0x0019a7c8
MOV R13,qword ptr [RSP + 0x10]
MOV EBX,R13D
MOV R14,qword ptr [RSP + 0x28]
JMP 0x0019a870
LAB_0019a860:
MOV EBX,EAX
JMP 0x0019a874
LAB_0019a864:
MOV EBX,EBP
MOV R14,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RSP + 0x10]
LAB_0019a870:
MOV EBP,dword ptr [RSP + 0x1c]
LAB_0019a874:
INC EBX
CMP EBX,R13D
JL 0x0019a787
TEST BPL,0x1
JNZ 0x0019aa55
CMP R13D,0x1
JZ 0x0019aa55
MOV R12D,R13D
AND R12D,0x7fffffff
MOV R13D,0x1
MOV EAX,0x1
MOV qword ptr [RSP + 0x20],R12
LAB_0019a8ad:
MOV R15,qword ptr [RSP]
MOV qword ptr [RSP + 0x30],RAX
MOV EDI,dword ptr [R15 + RAX*0x4]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0019ac02
MOV EBX,EAX
MOV qword ptr [RSP + 0x10],R13
MOV R14D,R13D
LAB_0019a8ce:
TEST R14D,R14D
JLE 0x0019a8ef
MOV EBP,dword ptr [R15 + R14*0x4 + -0x4]
MOV EDI,EBP
CALL 0x0019ac02
TEST EAX,EAX
JZ 0x0019a905
DEC R14
CMP EAX,EBX
MOV EBX,0x100
JL 0x0019a8ce
LAB_0019a8ef:
MOV R13,qword ptr [RSP + 0x10]
MOVSXD RAX,R13D
INC R13D
MOV RCX,qword ptr [RSP + 0x8]
MOV dword ptr [R15 + RAX*0x4],ECX
JMP 0x0019a945
LAB_0019a905:
MOV RAX,qword ptr [RSP + 0x8]
ADD EAX,0xffffee9f
CMP EAX,0x14
JA 0x0019a95b
LEA EAX,[RBP + -0x1100]
CMP EAX,0x12
JA 0x0019a95b
IMUL EAX,EBP,0x24c
MOV RDX,qword ptr [RSP + 0x8]
LEA ECX,[RDX + RDX*0x8]
LEA ECX,[RCX + RCX*0x2]
ADD ECX,EDX
LEA EBX,[RAX + RCX*0x1]
ADD EBX,0xffd7b964
LAB_0019a93b:
MOV dword ptr [R15 + R14*0x4 + -0x4],EBX
MOV R13,qword ptr [RSP + 0x10]
LAB_0019a945:
MOV RAX,qword ptr [RSP + 0x30]
INC RAX
CMP RAX,R12
JNZ 0x0019a8ad
JMP 0x0019aa50
LAB_0019a95b:
LEA EAX,[RBP + -0xac00]
CMP EAX,0x2ba3
JA 0x0019a99c
MOV RCX,qword ptr [RSP + 0x8]
ADD ECX,0xffffee59
CMP ECX,0x1b
JA 0x0019a99c
MOVZX EDX,AX
SHR EDX,0x2
IMUL EDX,EDX,0x4925
SHR EDX,0x11
LEA ESI,[RDX + RDX*0x8]
LEA ESI,[RSI + RSI*0x2]
ADD ESI,EDX
SUB EAX,ESI
TEST AX,AX
JNZ 0x0019a99c
ADD EBP,ECX
MOV EBX,EBP
JMP 0x0019a93b
LAB_0019a99c:
XOR R12D,R12D
MOV R13D,0x3c4
LAB_0019a9a5:
LEA EAX,[R12 + R13*0x1]
MOV R15D,EAX
SHR R15D,0x1f
ADD R15D,EAX
SAR R15D,0x1
MOVSXD RAX,R15D
LEA RCX,[0x1abf90]
MOVZX EBX,word ptr [RCX + RAX*0x2]
MOV EDX,EBX
SHR EDX,0x6
AND EBX,0x3f
LEA RAX,[0x1a85f0]
MOV R9D,dword ptr [RAX + RDX*0x4]
MOV ECX,R9D
SHR ECX,0xe
MOV R8D,R9D
SHR R8D,0x7
AND R8D,0x7f
SHR R9D,0x1
AND R9D,0x3f
ADD EBX,ECX
LEA RDI,[RSP + 0x40]
MOV ESI,EBX
CALL 0x0019c335
MOV RAX,qword ptr [RSP + 0x8]
SUB EAX,dword ptr [RSP + 0x44]
MOV ECX,EBP
SUB ECX,dword ptr [RSP + 0x40]
CMOVZ ECX,EAX
TEST ECX,ECX
JS 0x0019aa1d
JZ 0x0019aa3a
INC R15D
MOV R12D,R15D
JMP 0x0019aa23
LAB_0019aa1d:
DEC R15D
MOV R13D,R15D
LAB_0019aa23:
CMP R12D,R13D
JLE 0x0019a9a5
MOV R15,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x20]
JMP 0x0019a8ef
LAB_0019aa3a:
TEST EBX,EBX
MOV R15,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x20]
JNZ 0x0019a93b
JMP 0x0019a8ef
LAB_0019aa50:
MOV R14,qword ptr [RSP + 0x28]
LAB_0019aa55:
MOV R15,qword ptr [RSP]
JMP 0x0019a704
|
ulong unicode_normalize(int8 *param_1,void *param_2,uint param_3,uint param_4,
int8 param_5,int8 param_6)
{
int4 uVar1;
int4 uVar2;
bool bVar3;
ulong uVar4;
int iVar5;
uint uVar6;
int iVar7;
int iVar8;
int iVar9;
ulong uVar10;
int iVar11;
uint uVar12;
ulong uVar13;
ulong uVar14;
int iVar15;
long lVar16;
uint uVar17;
ulong uVar18;
ulong uVar19;
int iVar20;
int local_78;
int local_74;
ulong local_70;
ulong local_68;
void *local_60;
ulong local_58;
int local_48;
uVar18 = (ulong)param_3;
dbuf_init2(&local_60,param_5,param_6);
iVar5 = dbuf_realloc(&local_60,(long)(int)param_3 << 2);
if (iVar5 == 0) {
if (param_4 == 0) {
if (0 < (int)param_3) {
uVar10 = 0;
do {
if (0xff < *(uint *)((long)param_2 + uVar10 * 4)) goto LAB_0019a6de;
uVar10 = uVar10 + 1;
} while (uVar18 != uVar10);
}
memcpy(local_60,param_2,(long)(int)param_3 << 2);
goto LAB_0019a704;
}
LAB_0019a6de:
to_nfd_rec(&local_60,param_2,uVar18,param_4 >> 1);
if (local_48 == 0) {
uVar18 = local_58 >> 2;
uVar17 = (uint)uVar18;
if (0 < (int)uVar17) {
uVar10 = (ulong)(uVar17 & 0x7fffffff);
uVar19 = 0;
local_70 = uVar10;
do {
iVar8 = (int)uVar19;
iVar5 = unicode_get_cc(*(int4 *)((long)local_60 + (long)iVar8 * 4));
if (iVar5 != 0) {
uVar6 = iVar8 + 1;
if ((int)uVar6 < (int)uVar17) {
uVar14 = (ulong)(int)uVar6;
uVar13 = uVar19;
local_68 = uVar19;
do {
uVar1 = *(int4 *)((long)local_60 + uVar14 * 4);
iVar5 = unicode_get_cc();
uVar4 = uVar14;
if (iVar5 == 0) break;
iVar15 = (int)uVar19;
lVar16 = (long)iVar15;
if ((int)uVar13 <= iVar15) {
lVar16 = lVar16 + 1;
do {
uVar2 = *(int4 *)((long)local_60 + lVar16 * 4 + -4);
iVar7 = unicode_get_cc(uVar2);
iVar9 = (int)uVar19;
if (iVar7 <= iVar5) break;
*(int4 *)((long)local_60 + lVar16 * 4) = uVar2;
uVar19 = (ulong)((int)uVar19 - 1);
lVar16 = lVar16 + -1;
iVar9 = iVar8 + -1;
} while (iVar8 < lVar16);
lVar16 = (long)iVar9;
uVar13 = local_68;
uVar10 = local_70;
}
*(int4 *)((long)local_60 + lVar16 * 4 + 4) = uVar1;
uVar14 = uVar14 + 1;
uVar19 = (ulong)(iVar15 + 1);
uVar4 = uVar18;
} while (uVar14 != uVar10);
uVar19 = uVar4 & 0xffffffff;
}
else {
uVar19 = (ulong)uVar6;
}
}
uVar6 = (int)uVar19 + 1;
uVar19 = (ulong)uVar6;
} while ((int)uVar6 < (int)uVar17);
if (((param_4 & 1) == 0) && (uVar17 != 1)) {
uVar18 = 1;
uVar10 = 1;
LAB_0019a8ad:
iVar5 = *(int *)((long)local_60 + uVar10 * 4);
iVar8 = unicode_get_cc();
uVar19 = uVar18;
do {
if ((int)uVar19 < 1) break;
iVar15 = *(int *)((long)local_60 + uVar19 * 4 + -4);
iVar9 = unicode_get_cc(iVar15);
if (iVar9 == 0) {
if ((iVar5 - 0x1161U < 0x15) && (iVar15 - 0x1100U < 0x13)) {
iVar8 = iVar15 * 0x24c + iVar5 * 0x1c + -0x28469c;
goto LAB_0019a93b;
}
uVar6 = iVar15 - 0xac00;
if (((0x2ba3 < uVar6) || (0x1b < iVar5 - 0x11a7U)) ||
(uVar12 = (uVar6 & 0xffff) >> 2,
(short)uVar6 != (short)((short)(uVar12 / 7) * 0x1b + (short)(uVar12 / 7)))) {
iVar9 = 0;
iVar7 = 0x3c4;
goto LAB_0019a9a5;
}
iVar8 = iVar15 + (iVar5 - 0x11a7U);
goto LAB_0019a93b;
}
uVar19 = uVar19 - 1;
bVar3 = iVar9 < iVar8;
iVar8 = 0x100;
} while (bVar3);
goto LAB_0019a8ef;
}
}
goto LAB_0019a704;
}
}
local_60 = (void *)0x0;
uVar18 = 0xffffffff;
LAB_0019a704:
*param_1 = local_60;
return uVar18 & 0xffffffff;
LAB_0019a9a5:
do {
iVar20 = (iVar9 + iVar7) / 2;
uVar13 = (ulong)(*(ushort *)(unicode_comp_table + (long)iVar20 * 2) >> 6);
uVar6 = *(uint *)(unicode_decomp_table1 + uVar13 * 4);
iVar8 = (*(ushort *)(unicode_comp_table + (long)iVar20 * 2) & 0x3f) + (uVar6 >> 0xe);
unicode_decomp_entry(&local_78,iVar8,uVar13,uVar6 >> 0xe,uVar6 >> 7 & 0x7f,uVar6 >> 1 & 0x3f);
iVar11 = iVar15 - local_78;
if (iVar15 - local_78 == 0) {
iVar11 = iVar5 - local_74;
}
if (iVar11 < 0) {
iVar7 = iVar20 + -1;
}
else {
if (iVar11 == 0) {
if (iVar8 != 0) goto LAB_0019a93b;
break;
}
iVar9 = iVar20 + 1;
}
} while (iVar9 <= iVar7);
LAB_0019a8ef:
iVar8 = (int)uVar18;
uVar18 = (ulong)(iVar8 + 1);
*(int *)((long)local_60 + (long)iVar8 * 4) = iVar5;
LAB_0019a945:
uVar10 = uVar10 + 1;
if (uVar10 == (uVar17 & 0x7fffffff)) goto LAB_0019a704;
goto LAB_0019a8ad;
LAB_0019a93b:
*(int *)((long)local_60 + uVar19 * 4 + -4) = iVar8;
goto LAB_0019a945;
}
|
|
65,418 |
my_fprintf
|
eloqsql/strings/my_vsnprintf.c
|
int my_fprintf(FILE *stream, const char* format, ...)
{
int result;
va_list args;
va_start(args, format);
result= my_vfprintf(stream, format, args);
va_end(args);
return result;
}
|
O0
|
c
|
my_fprintf:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xc64f8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xc6310
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
|
my_fprintf:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_C64F8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_C64F8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_E0]
mov [rbp+var_20], rax
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
mov [rbp+var_2C], 30h ; '0'
mov [rbp+var_30], 10h
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call my_vfprintf
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
add rsp, 0E0h
pop rbp
retn
|
long long my_fprintf(
long long a1,
char *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
int v29[2]; // [rsp+B0h] [rbp-30h] BYREF
char *v30; // [rsp+B8h] [rbp-28h]
char *v31; // [rsp+C0h] [rbp-20h]
char *v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v33 = a1;
v32 = a2;
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 16;
return (unsigned int)my_vfprintf(a1, a2, v29);
}
|
my_fprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x001c64f8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001c64f8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0xe0]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x2c],0x30
MOV dword ptr [RBP + -0x30],0x10
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x001c6310
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0xe0
POP RBP
RET
|
int4
my_fprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int4 uVar1;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vfprintf(param_9,param_10,&local_38);
return uVar1;
}
|
|
65,419 |
my_init
|
eloqsql/mysys/my_init.c
|
my_bool my_init(void)
{
char *str;
if (my_init_done)
return 0;
my_init_done= 1;
mysys_usage_id++;
my_umask= 0660; /* Default umask for new files */
my_umask_dir= 0700; /* Default umask for new directories */
my_global_flags= 0;
/* Default creation of new files */
if ((str= getenv("UMASK")) != 0)
my_umask= (int) (atoi_octal(str) | 0600);
/* Default creation of new dir's */
if ((str= getenv("UMASK_DIR")) != 0)
my_umask_dir= (int) (atoi_octal(str) | 0700);
init_glob_errs();
instrumented_stdin.m_file= stdin;
instrumented_stdin.m_psi= NULL; /* not yet instrumented */
mysql_stdin= & instrumented_stdin;
my_progname_short= "unknown";
if (my_progname)
my_progname_short= my_progname + dirname_length(my_progname);
/* Initialize our mutex handling */
my_mutex_init();
if (my_thread_global_init())
return 1;
#if defined(SAFEMALLOC) && !defined(DBUG_OFF)
dbug_sanity= sf_sanity;
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
{
DBUG_ENTER("my_init");
DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown"));
my_time_init();
my_win_init();
DBUG_PRINT("exit", ("home: '%s'", home_dir));
#ifdef _WIN32
if (win32_init_tcp_ip())
DBUG_RETURN(1);
#endif
#ifdef CHECK_UNLIKELY
init_my_likely();
#endif
DBUG_RETURN(0);
}
}
|
O3
|
c
|
my_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x38d3e6(%rip), %rax # 0x3d24e0
cmpb $0x0, (%rax)
je 0x45106
xorl %eax, %eax
jmp 0x451ee
leaq 0x38d3d7(%rip), %rcx # 0x3d24e4
incl (%rcx)
movb $0x1, (%rax)
leaq 0x2d28ff(%rip), %r14 # 0x317a18
movl $0x1b0, (%r14) # imm = 0x1B0
leaq 0x2d28f5(%rip), %rbx # 0x317a1c
movl $0x1c0, (%rbx) # imm = 0x1C0
leaq 0x38d884(%rip), %rax # 0x3d29b8
movq $0x0, (%rax)
leaq 0x3728a(%rip), %rdi # 0x7c3cc
callq 0x26440
testq %rax, %rax
je 0x4515c
movq %rax, %rdi
callq 0x4522a
orl $0x180, %eax # imm = 0x180
movl %eax, (%r14)
leaq 0x3726f(%rip), %rdi # 0x7c3d2
callq 0x26440
testq %rax, %rax
je 0x4517c
movq %rax, %rdi
callq 0x4522a
orl $0x1c0, %eax # imm = 0x1C0
movl %eax, (%rbx)
callq 0x4a068
movq 0x2d1e38(%rip), %rax # 0x316fc0
movq (%rax), %rax
movq %rax, 0x38d35e(%rip) # 0x3d24f0
leaq 0x38d357(%rip), %rax # 0x3d24f0
movq $0x0, 0x38d354(%rip) # 0x3d24f8
leaq 0x38d33d(%rip), %rcx # 0x3d24e8
movq %rax, (%rcx)
leaq 0x37227(%rip), %rax # 0x7c3dc
leaq 0x38d3dc(%rip), %r14 # 0x3d2598
movq %rax, (%r14)
leaq 0x38d3ca(%rip), %rax # 0x3d2590
movq (%rax), %rbx
testq %rbx, %rbx
je 0x451dc
movq %rbx, %rdi
callq 0x44f54
addq %rbx, %rax
movq %rax, (%r14)
callq 0x46a60
callq 0x46628
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x451f3
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x371ea(%rip), %rdi # 0x7c3e4
callq 0x26440
leaq 0x38d382(%rip), %rbx # 0x3d2588
movq %rax, (%rbx)
testq %rax, %rax
je 0x45220
leaq 0x38d58b(%rip), %rdi # 0x3d27a0
movq %rax, %rsi
callq 0x4b065
movq %rax, (%rbx)
callq 0x45098
jmp 0x450ff
|
my_init:
push rbp
mov rbp, rsp
push r14
push rbx
lea rax, my_init_done
cmp byte ptr [rax], 0
jz short loc_45106
loc_450FF:
xor eax, eax
jmp loc_451EE
loc_45106:
lea rcx, mysys_usage_id
inc dword ptr [rcx]
mov byte ptr [rax], 1
lea r14, my_umask
mov dword ptr [r14], 1B0h
lea rbx, my_umask_dir
mov dword ptr [rbx], 1C0h
lea rax, my_global_flags
mov qword ptr [rax], 0
lea rdi, aUmask; "UMASK"
call _getenv
test rax, rax
jz short loc_4515C
mov rdi, rax
call atoi_octal
or eax, 180h
mov [r14], eax
loc_4515C:
lea rdi, aUmaskDir; "UMASK_DIR"
call _getenv
test rax, rax
jz short loc_4517C
mov rdi, rax
call atoi_octal
or eax, 1C0h
mov [rbx], eax
loc_4517C:
call init_glob_errs
mov rax, cs:stdin_ptr
mov rax, [rax]
mov cs:instrumented_stdin, rax
lea rax, instrumented_stdin
mov cs:qword_3D24F8, 0
lea rcx, mysql_stdin
mov [rcx], rax
lea rax, aUnknown; "unknown"
lea r14, my_progname_short
mov [r14], rax
lea rax, my_progname
mov rbx, [rax]
test rbx, rbx
jz short loc_451DC
mov rdi, rbx
call dirname_length
add rax, rbx
mov [r14], rax
loc_451DC:
call my_mutex_init
call my_thread_global_init
mov ecx, eax
mov al, 1
test cl, cl
jz short loc_451F3
loc_451EE:
pop rbx
pop r14
pop rbp
retn
loc_451F3:
lea rdi, aHome; "HOME"
call _getenv
lea rbx, home_dir
mov [rbx], rax
test rax, rax
jz short loc_45220
lea rdi, home_dir_buff
mov rsi, rax
call intern_filename
mov [rbx], rax
loc_45220:
call my_time_init
jmp loc_450FF
|
char my_init()
{
char result; // al
long long v1; // rax
long long v2; // rax
_BYTE *v3; // rbx
char v4; // cl
long long v5; // rax
if ( my_init_done )
return 0;
++mysys_usage_id;
my_init_done = 1;
my_umask = 432;
my_umask_dir = 448;
my_global_flags = 0LL;
v1 = getenv("UMASK");
if ( v1 )
my_umask = atoi_octal(v1) | 0x180;
v2 = getenv("UMASK_DIR");
if ( v2 )
my_umask_dir = atoi_octal(v2) | 0x1C0;
init_glob_errs();
instrumented_stdin = stdin;
qword_3D24F8 = 0LL;
mysql_stdin = &instrumented_stdin;
my_progname_short = "unknown";
v3 = my_progname;
if ( my_progname )
my_progname_short = &v3[dirname_length(my_progname)];
my_mutex_init();
v4 = my_thread_global_init();
result = 1;
if ( !v4 )
{
v5 = getenv("HOME");
home_dir = v5;
if ( v5 )
home_dir = intern_filename(&home_dir_buff, v5);
my_time_init();
return 0;
}
return result;
}
|
my_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RAX,[0x4d24e0]
CMP byte ptr [RAX],0x0
JZ 0x00145106
LAB_001450ff:
XOR EAX,EAX
JMP 0x001451ee
LAB_00145106:
LEA RCX,[0x4d24e4]
INC dword ptr [RCX]
MOV byte ptr [RAX],0x1
LEA R14,[0x417a18]
MOV dword ptr [R14],0x1b0
LEA RBX,[0x417a1c]
MOV dword ptr [RBX],0x1c0
LEA RAX,[0x4d29b8]
MOV qword ptr [RAX],0x0
LEA RDI,[0x17c3cc]
CALL 0x00126440
TEST RAX,RAX
JZ 0x0014515c
MOV RDI,RAX
CALL 0x0014522a
OR EAX,0x180
MOV dword ptr [R14],EAX
LAB_0014515c:
LEA RDI,[0x17c3d2]
CALL 0x00126440
TEST RAX,RAX
JZ 0x0014517c
MOV RDI,RAX
CALL 0x0014522a
OR EAX,0x1c0
MOV dword ptr [RBX],EAX
LAB_0014517c:
CALL 0x0014a068
MOV RAX,qword ptr [0x00416fc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x004d24f0],RAX
LEA RAX,[0x4d24f0]
MOV qword ptr [0x004d24f8],0x0
LEA RCX,[0x4d24e8]
MOV qword ptr [RCX],RAX
LEA RAX,[0x17c3dc]
LEA R14,[0x4d2598]
MOV qword ptr [R14],RAX
LEA RAX,[0x4d2590]
MOV RBX,qword ptr [RAX]
TEST RBX,RBX
JZ 0x001451dc
MOV RDI,RBX
CALL 0x00144f54
ADD RAX,RBX
MOV qword ptr [R14],RAX
LAB_001451dc:
CALL 0x00146a60
CALL 0x00146628
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JZ 0x001451f3
LAB_001451ee:
POP RBX
POP R14
POP RBP
RET
LAB_001451f3:
LEA RDI,[0x17c3e4]
CALL 0x00126440
LEA RBX,[0x4d2588]
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x00145220
LEA RDI,[0x4d27a0]
MOV RSI,RAX
CALL 0x0014b065
MOV qword ptr [RBX],RAX
LAB_00145220:
CALL 0x00145098
JMP 0x001450ff
|
int8 my_init(void)
{
long lVar1;
char cVar2;
uint uVar3;
char *pcVar4;
long lVar5;
if (my_init_done == '\0') {
mysys_usage_id = mysys_usage_id + 1;
my_init_done = '\x01';
my_umask = 0x1b0;
my_umask_dir = 0x1c0;
my_global_flags = 0;
pcVar4 = getenv("UMASK");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask = uVar3 | 0x180;
}
pcVar4 = getenv("UMASK_DIR");
if (pcVar4 != (char *)0x0) {
uVar3 = atoi_octal(pcVar4);
my_umask_dir = uVar3 | 0x1c0;
}
init_glob_errs();
lVar1 = my_progname;
instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_00416fc0;
instrumented_stdin._8_8_ = 0;
mysql_stdin = instrumented_stdin;
my_progname_short = "unknown";
if (my_progname != 0) {
lVar5 = dirname_length(my_progname);
my_progname_short = (char *)(lVar5 + lVar1);
}
my_mutex_init();
cVar2 = my_thread_global_init();
if (cVar2 != '\0') {
return 1;
}
home_dir = getenv("HOME");
if (home_dir != (char *)0x0) {
home_dir = (char *)intern_filename(home_dir_buff,home_dir);
}
my_time_init();
}
return 0;
}
|
|
65,420 |
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp
|
void
QuadRefinement::populateVertexFacesFromParentVertices() {
for (int pVert = 0; pVert < _parent->getNumVertices(); ++pVert) {
int cVert = _vertChildVertIndex[pVert];
if (!IndexIsValid(cVert)) continue;
ConstIndexArray pVertFaces = _parent->getVertexFaces(pVert);
ConstLocalIndexArray pVertInFace = _parent->getVertexFaceLocalIndices(pVert);
//
// Reserve enough vert-faces, populate and trim to the actual size:
//
_child->resizeVertexFaces(cVert, pVertFaces.size());
IndexArray cVertFaces = _child->getVertexFaces(cVert);
LocalIndexArray cVertInFace = _child->getVertexFaceLocalIndices(cVert);
//
// Inspect each of the faces incident the parent vertex and add those that
// spawned a child face corresponding to (and so incident) this child vertex:
//
int cVertFaceCount = 0;
for (int i = 0; i < pVertFaces.size(); ++i) {
Index pFace = pVertFaces[i];
LocalIndex vertInFace = pVertInFace[i];
ConstIndexArray pFaceChildren = getFaceChildFaces(pFace);
if (IndexIsValid(pFaceChildren[vertInFace])) {
int pFaceSize = pFaceChildren.size();
// Note orientation wrt incident parent faces -- quad vs non-quad...
cVertFaces[cVertFaceCount] = pFaceChildren[vertInFace];
cVertInFace[cVertFaceCount] = (LocalIndex)((pFaceSize == 4) ? vertInFace : 0);
cVertFaceCount++;
}
}
_child->trimVertexFaces(cVert, cVertFaceCount);
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rdx
cmpl $0x0, 0x8(%rdx)
jle 0x478f7
movq 0xf0(%rdi), %rax
movq %rax, -0x8(%rsp)
movq 0x10(%rdi), %rax
movq %rax, -0x18(%rsp)
movq 0x58(%rdi), %rsi
movq 0x78(%rdi), %rdi
xorl %r9d, %r9d
movq %rdx, -0x10(%rsp)
movq -0x8(%rsp), %rax
movslq (%rax,%r9,4), %r10
cmpq $-0x1, %r10
je 0x478e7
movl %r10d, %ecx
movq 0x108(%rdx), %rax
movslq 0x4(%rax,%r9,8), %r11
leaq (,%r11,4), %rbx
addq 0x120(%rdx), %rbx
movl (%rax,%r9,8), %r14d
addq %r11, %r11
addq 0x138(%rdx), %r11
movq -0x18(%rsp), %rax
movq 0x108(%rax), %r15
movl %r14d, (%r15,%r10,8)
addq %r10, %r10
xorl %r12d, %r12d
movl $0x0, %eax
testl %ecx, %ecx
je 0x4785d
movl -0x4(%r15,%r10,4), %eax
addl -0x8(%r15,%r10,4), %eax
movl %eax, 0x4(%r15,%r10,4)
testl %r14d, %r14d
jle 0x478de
movl %r10d, %eax
orl $0x1, %eax
cltq
movslq (%r15,%rax,4), %r13
leaq (,%r13,4), %rbp
movq -0x18(%rsp), %rax
addq 0x120(%rax), %rbp
addq %r13, %r13
addq 0x138(%rax), %r13
xorl %ecx, %ecx
xorl %r12d, %r12d
movslq (%rbx,%rcx,4), %rax
movzwl (%r11,%rcx,2), %edx
movslq 0x4(%rsi,%rax,8), %r8
leaq (%rdi,%r8,4), %r8
movl (%r8,%rdx,4), %r8d
cmpl $-0x1, %r8d
je 0x478d6
addq %rax, %rax
cltq
movl (%rsi,%rax,4), %eax
movslq %r12d, %r12
movl %r8d, (%rbp,%r12,4)
cmpl $0x4, %eax
movl $0x0, %eax
cmovnel %eax, %edx
movw %dx, (%r13,%r12,2)
incl %r12d
incq %rcx
cmpq %rcx, %r14
jne 0x47896
movl %r12d, (%r15,%r10,4)
movq -0x10(%rsp), %rdx
incq %r9
movslq 0x8(%rdx), %rax
cmpq %rax, %r9
jl 0x477f5
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement37populateVertexFacesFromParentVerticesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov rdx, [rdi+8]
cmp dword ptr [rdx+8], 0
jle loc_478F7
mov rax, [rdi+0F0h]
mov [rsp+30h+var_38], rax
mov rax, [rdi+10h]
mov [rsp+30h+var_48], rax
mov rsi, [rdi+58h]
mov rdi, [rdi+78h]
xor r9d, r9d
mov [rsp+30h+var_40], rdx
loc_477F5:
mov rax, [rsp+30h+var_38]
movsxd r10, dword ptr [rax+r9*4]
cmp r10, 0FFFFFFFFFFFFFFFFh
jz loc_478E7
mov ecx, r10d
mov rax, [rdx+108h]
movsxd r11, dword ptr [rax+r9*8+4]
lea rbx, ds:0[r11*4]
add rbx, [rdx+120h]
mov r14d, [rax+r9*8]
add r11, r11
add r11, [rdx+138h]
mov rax, [rsp+30h+var_48]
mov r15, [rax+108h]
mov [r15+r10*8], r14d
add r10, r10
xor r12d, r12d
mov eax, 0
test ecx, ecx
jz short loc_4785D
mov eax, [r15+r10*4-4]
add eax, [r15+r10*4-8]
loc_4785D:
mov [r15+r10*4+4], eax
test r14d, r14d
jle short loc_478DE
mov eax, r10d
or eax, 1
cdqe
movsxd r13, dword ptr [r15+rax*4]
lea rbp, ds:0[r13*4]
mov rax, [rsp+30h+var_48]
add rbp, [rax+120h]
add r13, r13
add r13, [rax+138h]
xor ecx, ecx
xor r12d, r12d
loc_47896:
movsxd rax, dword ptr [rbx+rcx*4]
movzx edx, word ptr [r11+rcx*2]
movsxd r8, dword ptr [rsi+rax*8+4]
lea r8, [rdi+r8*4]
mov r8d, [r8+rdx*4]
cmp r8d, 0FFFFFFFFh
jz short loc_478D6
add rax, rax
cdqe
mov eax, [rsi+rax*4]
movsxd r12, r12d
mov [rbp+r12*4+0], r8d
cmp eax, 4
mov eax, 0
cmovnz edx, eax
mov [r13+r12*2+0], dx
inc r12d
loc_478D6:
inc rcx
cmp r14, rcx
jnz short loc_47896
loc_478DE:
mov [r15+r10*4], r12d
mov rdx, [rsp+30h+var_40]
loc_478E7:
inc r9
movsxd rax, dword ptr [rdx+8]
cmp r9, rax
jl loc_477F5
loc_478F7:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
void OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long v1; // rdx
long long v2; // rsi
long long v3; // rdi
long long v4; // r9
long long v5; // r10
int v6; // ecx
long long v7; // rax
long long v8; // r11
long long v9; // rbx
long long v10; // r14
long long v11; // r11
long long v12; // r15
long long v13; // r10
int v14; // r12d
int v15; // eax
long long v16; // r13
long long v17; // rbp
long long v18; // r13
long long v19; // rcx
long long v20; // rax
long long v21; // rdx
int v22; // r8d
int v23; // eax
_QWORD *v24; // [rsp+0h] [rbp-48h]
long long v25; // [rsp+8h] [rbp-40h]
long long v26; // [rsp+10h] [rbp-38h]
v1 = *((_QWORD *)this + 1);
if ( *(int *)(v1 + 8) > 0 )
{
v26 = *((_QWORD *)this + 30);
v24 = (_QWORD *)*((_QWORD *)this + 2);
v2 = *((_QWORD *)this + 11);
v3 = *((_QWORD *)this + 15);
v4 = 0LL;
v25 = v1;
do
{
v5 = *(int *)(v26 + 4 * v4);
if ( v5 != -1 )
{
v6 = *(_DWORD *)(v26 + 4 * v4);
v7 = *(_QWORD *)(v1 + 264);
v8 = *(int *)(v7 + 8 * v4 + 4);
v9 = *(_QWORD *)(v1 + 288) + 4 * v8;
v10 = *(unsigned int *)(v7 + 8 * v4);
v11 = *(_QWORD *)(v1 + 312) + 2 * v8;
v12 = v24[33];
*(_DWORD *)(v12 + 8 * v5) = v10;
v13 = 2 * v5;
v14 = 0;
v15 = 0;
if ( v6 )
v15 = *(_DWORD *)(v12 + 4 * v13 - 8) + *(_DWORD *)(v12 + 4 * v13 - 4);
*(_DWORD *)(v12 + 4 * v13 + 4) = v15;
if ( (int)v10 > 0 )
{
v16 = *(int *)(v12 + 4LL * (int)(v13 | 1));
v17 = v24[36] + 4 * v16;
v18 = v24[39] + 2 * v16;
v19 = 0LL;
v14 = 0;
do
{
v20 = *(int *)(v9 + 4 * v19);
v21 = *(unsigned __int16 *)(v11 + 2 * v19);
v22 = *(_DWORD *)(v3 + 4LL * *(int *)(v2 + 8 * v20 + 4) + 4 * v21);
if ( v22 != -1 )
{
v23 = *(_DWORD *)(v2 + 8LL * (_DWORD)v20);
*(_DWORD *)(v17 + 4LL * v14) = v22;
if ( v23 != 4 )
LOWORD(v21) = 0;
*(_WORD *)(v18 + 2LL * v14++) = v21;
}
++v19;
}
while ( v10 != v19 );
}
*(_DWORD *)(v12 + 4 * v13) = v14;
v1 = v25;
}
++v4;
}
while ( v4 < *(int *)(v1 + 8) );
}
}
|
populateVertexFacesFromParentVertices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RDX,qword ptr [RDI + 0x8]
CMP dword ptr [RDX + 0x8],0x0
JLE 0x001478f7
MOV RAX,qword ptr [RDI + 0xf0]
MOV qword ptr [RSP + -0x8],RAX
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + -0x18],RAX
MOV RSI,qword ptr [RDI + 0x58]
MOV RDI,qword ptr [RDI + 0x78]
XOR R9D,R9D
MOV qword ptr [RSP + -0x10],RDX
LAB_001477f5:
MOV RAX,qword ptr [RSP + -0x8]
MOVSXD R10,dword ptr [RAX + R9*0x4]
CMP R10,-0x1
JZ 0x001478e7
MOV ECX,R10D
MOV RAX,qword ptr [RDX + 0x108]
MOVSXD R11,dword ptr [RAX + R9*0x8 + 0x4]
LEA RBX,[R11*0x4]
ADD RBX,qword ptr [RDX + 0x120]
MOV R14D,dword ptr [RAX + R9*0x8]
ADD R11,R11
ADD R11,qword ptr [RDX + 0x138]
MOV RAX,qword ptr [RSP + -0x18]
MOV R15,qword ptr [RAX + 0x108]
MOV dword ptr [R15 + R10*0x8],R14D
ADD R10,R10
XOR R12D,R12D
MOV EAX,0x0
TEST ECX,ECX
JZ 0x0014785d
MOV EAX,dword ptr [R15 + R10*0x4 + -0x4]
ADD EAX,dword ptr [R15 + R10*0x4 + -0x8]
LAB_0014785d:
MOV dword ptr [R15 + R10*0x4 + 0x4],EAX
TEST R14D,R14D
JLE 0x001478de
MOV EAX,R10D
OR EAX,0x1
CDQE
MOVSXD R13,dword ptr [R15 + RAX*0x4]
LEA RBP,[R13*0x4]
MOV RAX,qword ptr [RSP + -0x18]
ADD RBP,qword ptr [RAX + 0x120]
ADD R13,R13
ADD R13,qword ptr [RAX + 0x138]
XOR ECX,ECX
XOR R12D,R12D
LAB_00147896:
MOVSXD RAX,dword ptr [RBX + RCX*0x4]
MOVZX EDX,word ptr [R11 + RCX*0x2]
MOVSXD R8,dword ptr [RSI + RAX*0x8 + 0x4]
LEA R8,[RDI + R8*0x4]
MOV R8D,dword ptr [R8 + RDX*0x4]
CMP R8D,-0x1
JZ 0x001478d6
ADD RAX,RAX
CDQE
MOV EAX,dword ptr [RSI + RAX*0x4]
MOVSXD R12,R12D
MOV dword ptr [RBP + R12*0x4],R8D
CMP EAX,0x4
MOV EAX,0x0
CMOVNZ EDX,EAX
MOV word ptr [R13 + R12*0x2],DX
INC R12D
LAB_001478d6:
INC RCX
CMP R14,RCX
JNZ 0x00147896
LAB_001478de:
MOV dword ptr [R15 + R10*0x4],R12D
MOV RDX,qword ptr [RSP + -0x10]
LAB_001478e7:
INC R9
MOVSXD RAX,dword ptr [RDX + 0x8]
CMP R9,RAX
JL 0x001477f5
LAB_001478f7:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices
(QuadRefinement *this)
{
int iVar1;
uint uVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
int iVar13;
ulong uVar14;
ushort uVar15;
long lVar16;
long lVar17;
long lVar18;
int iVar19;
long lVar20;
lVar3 = *(long *)(this + 8);
if (0 < *(int *)(lVar3 + 8)) {
lVar4 = *(long *)(this + 0xf0);
lVar5 = *(long *)(this + 0x10);
lVar6 = *(long *)(this + 0x58);
lVar7 = *(long *)(this + 0x78);
lVar16 = 0;
do {
iVar1 = *(int *)(lVar4 + lVar16 * 4);
lVar17 = (long)iVar1;
if (lVar17 != -1) {
lVar18 = (long)*(int *)(*(long *)(lVar3 + 0x108) + 4 + lVar16 * 8);
lVar8 = *(long *)(lVar3 + 0x120);
uVar2 = *(uint *)(*(long *)(lVar3 + 0x108) + lVar16 * 8);
lVar9 = *(long *)(lVar3 + 0x138);
lVar10 = *(long *)(lVar5 + 0x108);
*(uint *)(lVar10 + lVar17 * 8) = uVar2;
iVar19 = 0;
iVar13 = 0;
if (iVar1 != 0) {
iVar13 = *(int *)(lVar10 + -4 + lVar17 * 8) + *(int *)(lVar10 + -8 + lVar17 * 8);
}
*(int *)(lVar10 + 4 + lVar17 * 8) = iVar13;
if (0 < (int)uVar2) {
lVar20 = (long)*(int *)(lVar10 + (long)(int)(iVar1 * 2 | 1) * 4);
lVar11 = *(long *)(lVar5 + 0x120);
lVar12 = *(long *)(lVar5 + 0x138);
uVar14 = 0;
iVar19 = 0;
do {
iVar1 = *(int *)(lVar18 * 4 + lVar8 + uVar14 * 4);
uVar15 = *(ushort *)(lVar18 * 2 + lVar9 + uVar14 * 2);
iVar13 = *(int *)(lVar7 + (long)*(int *)(lVar6 + 4 + (long)iVar1 * 8) * 4 +
(ulong)uVar15 * 4);
if (iVar13 != -1) {
iVar1 = *(int *)(lVar6 + (long)(iVar1 * 2) * 4);
*(int *)(lVar20 * 4 + lVar11 + (long)iVar19 * 4) = iVar13;
if (iVar1 != 4) {
uVar15 = 0;
}
*(ushort *)(lVar20 * 2 + lVar12 + (long)iVar19 * 2) = uVar15;
iVar19 = iVar19 + 1;
}
uVar14 = uVar14 + 1;
} while (uVar2 != uVar14);
}
*(int *)(lVar10 + lVar17 * 8) = iVar19;
}
lVar16 = lVar16 + 1;
} while (lVar16 < *(int *)(lVar3 + 8));
}
return;
}
|
|
65,421 |
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp
|
void
QuadRefinement::populateVertexFacesFromParentVertices() {
for (int pVert = 0; pVert < _parent->getNumVertices(); ++pVert) {
int cVert = _vertChildVertIndex[pVert];
if (!IndexIsValid(cVert)) continue;
ConstIndexArray pVertFaces = _parent->getVertexFaces(pVert);
ConstLocalIndexArray pVertInFace = _parent->getVertexFaceLocalIndices(pVert);
//
// Reserve enough vert-faces, populate and trim to the actual size:
//
_child->resizeVertexFaces(cVert, pVertFaces.size());
IndexArray cVertFaces = _child->getVertexFaces(cVert);
LocalIndexArray cVertInFace = _child->getVertexFaceLocalIndices(cVert);
//
// Inspect each of the faces incident the parent vertex and add those that
// spawned a child face corresponding to (and so incident) this child vertex:
//
int cVertFaceCount = 0;
for (int i = 0; i < pVertFaces.size(); ++i) {
Index pFace = pVertFaces[i];
LocalIndex vertInFace = pVertInFace[i];
ConstIndexArray pFaceChildren = getFaceChildFaces(pFace);
if (IndexIsValid(pFaceChildren[vertInFace])) {
int pFaceSize = pFaceChildren.size();
// Note orientation wrt incident parent faces -- quad vs non-quad...
cVertFaces[cVertFaceCount] = pFaceChildren[vertInFace];
cVertInFace[cVertFaceCount] = (LocalIndex)((pFaceSize == 4) ? vertInFace : 0);
cVertFaceCount++;
}
}
_child->trimVertexFaces(cVert, cVertFaceCount);
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rdx
movl 0x8(%rdx), %ecx
testl %ecx, %ecx
jle 0x48faf
movq 0xf0(%rdi), %rax
movq %rax, -0x8(%rsp)
movq 0x10(%rdi), %rax
movq %rax, -0x18(%rsp)
movq 0x58(%rdi), %rsi
movq 0x78(%rdi), %rdi
xorl %r9d, %r9d
movq %rdx, -0x10(%rsp)
movq -0x8(%rsp), %rax
movslq (%rax,%r9,4), %r10
cmpq $-0x1, %r10
je 0x48fa0
movl %r10d, %eax
movq 0x108(%rdx), %rcx
movslq 0x4(%rcx,%r9,8), %r11
leaq (,%r11,4), %rbx
addq 0x120(%rdx), %rbx
movl (%rcx,%r9,8), %r14d
addq %r11, %r11
addq 0x138(%rdx), %r11
movq -0x18(%rsp), %rcx
movq 0x108(%rcx), %r15
movl %r14d, (%r15,%r10,8)
addq %r10, %r10
xorl %r12d, %r12d
movl $0x0, %ecx
testl %eax, %eax
je 0x48f1c
movl -0x4(%r15,%r10,4), %ecx
addl -0x8(%r15,%r10,4), %ecx
movl %ecx, 0x4(%r15,%r10,4)
testl %r14d, %r14d
jle 0x48f94
movslq %ecx, %r13
leaq (,%r13,4), %rbp
movq -0x18(%rsp), %rax
addq 0x120(%rax), %rbp
addq %r13, %r13
addq 0x138(%rax), %r13
xorl %ecx, %ecx
xorl %r12d, %r12d
movslq (%rbx,%rcx,4), %rax
movzwl (%r11,%rcx,2), %edx
movslq 0x4(%rsi,%rax,8), %r8
leaq (%rdi,%r8,4), %r8
movl (%r8,%rdx,4), %r8d
cmpl $-0x1, %r8d
je 0x48f8c
addq %rax, %rax
cltq
movl (%rsi,%rax,4), %eax
movslq %r12d, %r12
movl %r8d, (%rbp,%r12,4)
cmpl $0x4, %eax
movl $0x0, %eax
cmovnel %eax, %edx
movw %dx, (%r13,%r12,2)
incl %r12d
incq %rcx
cmpq %rcx, %r14
jne 0x48f4c
movl %r12d, (%r15,%r10,4)
movq -0x10(%rsp), %rdx
movl 0x8(%rdx), %ecx
incq %r9
movslq %ecx, %rax
cmpq %rax, %r9
jl 0x48eb4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement37populateVertexFacesFromParentVerticesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov rdx, [rdi+8]
mov ecx, [rdx+8]
test ecx, ecx
jle loc_48FAF
mov rax, [rdi+0F0h]
mov [rsp+30h+var_38], rax
mov rax, [rdi+10h]
mov [rsp+30h+var_48], rax
mov rsi, [rdi+58h]
mov rdi, [rdi+78h]
xor r9d, r9d
mov [rsp+30h+var_40], rdx
loc_48EB4:
mov rax, [rsp+30h+var_38]
movsxd r10, dword ptr [rax+r9*4]
cmp r10, 0FFFFFFFFFFFFFFFFh
jz loc_48FA0
mov eax, r10d
mov rcx, [rdx+108h]
movsxd r11, dword ptr [rcx+r9*8+4]
lea rbx, ds:0[r11*4]
add rbx, [rdx+120h]
mov r14d, [rcx+r9*8]
add r11, r11
add r11, [rdx+138h]
mov rcx, [rsp+30h+var_48]
mov r15, [rcx+108h]
mov [r15+r10*8], r14d
add r10, r10
xor r12d, r12d
mov ecx, 0
test eax, eax
jz short loc_48F1C
mov ecx, [r15+r10*4-4]
add ecx, [r15+r10*4-8]
loc_48F1C:
mov [r15+r10*4+4], ecx
test r14d, r14d
jle short loc_48F94
movsxd r13, ecx
lea rbp, ds:0[r13*4]
mov rax, [rsp+30h+var_48]
add rbp, [rax+120h]
add r13, r13
add r13, [rax+138h]
xor ecx, ecx
xor r12d, r12d
loc_48F4C:
movsxd rax, dword ptr [rbx+rcx*4]
movzx edx, word ptr [r11+rcx*2]
movsxd r8, dword ptr [rsi+rax*8+4]
lea r8, [rdi+r8*4]
mov r8d, [r8+rdx*4]
cmp r8d, 0FFFFFFFFh
jz short loc_48F8C
add rax, rax
cdqe
mov eax, [rsi+rax*4]
movsxd r12, r12d
mov [rbp+r12*4+0], r8d
cmp eax, 4
mov eax, 0
cmovnz edx, eax
mov [r13+r12*2+0], dx
inc r12d
loc_48F8C:
inc rcx
cmp r14, rcx
jnz short loc_48F4C
loc_48F94:
mov [r15+r10*4], r12d
mov rdx, [rsp+30h+var_40]
mov ecx, [rdx+8]
loc_48FA0:
inc r9
movsxd rax, ecx
cmp r9, rax
jl loc_48EB4
loc_48FAF:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
void OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long v1; // rdx
int v2; // ecx
long long v3; // rsi
long long v4; // rdi
long long v5; // r9
long long v6; // r10
int v7; // eax
long long v8; // rcx
long long v9; // r11
long long v10; // rbx
long long v11; // r14
long long v12; // r11
long long v13; // r15
long long v14; // r10
int v15; // r12d
int v16; // ecx
long long v17; // rbp
long long v18; // r13
long long v19; // rcx
long long v20; // rax
long long v21; // rdx
int v22; // r8d
int v23; // eax
_QWORD *v24; // [rsp+0h] [rbp-48h]
long long v25; // [rsp+8h] [rbp-40h]
long long v26; // [rsp+10h] [rbp-38h]
v1 = *((_QWORD *)this + 1);
v2 = *(_DWORD *)(v1 + 8);
if ( v2 > 0 )
{
v26 = *((_QWORD *)this + 30);
v24 = (_QWORD *)*((_QWORD *)this + 2);
v3 = *((_QWORD *)this + 11);
v4 = *((_QWORD *)this + 15);
v5 = 0LL;
v25 = v1;
do
{
v6 = *(int *)(v26 + 4 * v5);
if ( v6 != -1 )
{
v7 = *(_DWORD *)(v26 + 4 * v5);
v8 = *(_QWORD *)(v1 + 264);
v9 = *(int *)(v8 + 8 * v5 + 4);
v10 = *(_QWORD *)(v1 + 288) + 4 * v9;
v11 = *(unsigned int *)(v8 + 8 * v5);
v12 = *(_QWORD *)(v1 + 312) + 2 * v9;
v13 = v24[33];
*(_DWORD *)(v13 + 8 * v6) = v11;
v14 = 2 * v6;
v15 = 0;
v16 = 0;
if ( v7 )
v16 = *(_DWORD *)(v13 + 4 * v14 - 8) + *(_DWORD *)(v13 + 4 * v14 - 4);
*(_DWORD *)(v13 + 4 * v14 + 4) = v16;
if ( (int)v11 > 0 )
{
v17 = v24[36] + 4LL * v16;
v18 = v24[39] + 2LL * v16;
v19 = 0LL;
v15 = 0;
do
{
v20 = *(int *)(v10 + 4 * v19);
v21 = *(unsigned __int16 *)(v12 + 2 * v19);
v22 = *(_DWORD *)(v4 + 4LL * *(int *)(v3 + 8 * v20 + 4) + 4 * v21);
if ( v22 != -1 )
{
v23 = *(_DWORD *)(v3 + 8LL * (_DWORD)v20);
*(_DWORD *)(v17 + 4LL * v15) = v22;
if ( v23 != 4 )
LOWORD(v21) = 0;
*(_WORD *)(v18 + 2LL * v15++) = v21;
}
++v19;
}
while ( v11 != v19 );
}
*(_DWORD *)(v13 + 4 * v14) = v15;
v1 = v25;
v2 = *(_DWORD *)(v25 + 8);
}
++v5;
}
while ( v5 < v2 );
}
}
|
populateVertexFacesFromParentVertices:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RDX,qword ptr [RDI + 0x8]
MOV ECX,dword ptr [RDX + 0x8]
TEST ECX,ECX
JLE 0x00148faf
MOV RAX,qword ptr [RDI + 0xf0]
MOV qword ptr [RSP + -0x8],RAX
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + -0x18],RAX
MOV RSI,qword ptr [RDI + 0x58]
MOV RDI,qword ptr [RDI + 0x78]
XOR R9D,R9D
MOV qword ptr [RSP + -0x10],RDX
LAB_00148eb4:
MOV RAX,qword ptr [RSP + -0x8]
MOVSXD R10,dword ptr [RAX + R9*0x4]
CMP R10,-0x1
JZ 0x00148fa0
MOV EAX,R10D
MOV RCX,qword ptr [RDX + 0x108]
MOVSXD R11,dword ptr [RCX + R9*0x8 + 0x4]
LEA RBX,[R11*0x4]
ADD RBX,qword ptr [RDX + 0x120]
MOV R14D,dword ptr [RCX + R9*0x8]
ADD R11,R11
ADD R11,qword ptr [RDX + 0x138]
MOV RCX,qword ptr [RSP + -0x18]
MOV R15,qword ptr [RCX + 0x108]
MOV dword ptr [R15 + R10*0x8],R14D
ADD R10,R10
XOR R12D,R12D
MOV ECX,0x0
TEST EAX,EAX
JZ 0x00148f1c
MOV ECX,dword ptr [R15 + R10*0x4 + -0x4]
ADD ECX,dword ptr [R15 + R10*0x4 + -0x8]
LAB_00148f1c:
MOV dword ptr [R15 + R10*0x4 + 0x4],ECX
TEST R14D,R14D
JLE 0x00148f94
MOVSXD R13,ECX
LEA RBP,[R13*0x4]
MOV RAX,qword ptr [RSP + -0x18]
ADD RBP,qword ptr [RAX + 0x120]
ADD R13,R13
ADD R13,qword ptr [RAX + 0x138]
XOR ECX,ECX
XOR R12D,R12D
LAB_00148f4c:
MOVSXD RAX,dword ptr [RBX + RCX*0x4]
MOVZX EDX,word ptr [R11 + RCX*0x2]
MOVSXD R8,dword ptr [RSI + RAX*0x8 + 0x4]
LEA R8,[RDI + R8*0x4]
MOV R8D,dword ptr [R8 + RDX*0x4]
CMP R8D,-0x1
JZ 0x00148f8c
ADD RAX,RAX
CDQE
MOV EAX,dword ptr [RSI + RAX*0x4]
MOVSXD R12,R12D
MOV dword ptr [RBP + R12*0x4],R8D
CMP EAX,0x4
MOV EAX,0x0
CMOVNZ EDX,EAX
MOV word ptr [R13 + R12*0x2],DX
INC R12D
LAB_00148f8c:
INC RCX
CMP R14,RCX
JNZ 0x00148f4c
LAB_00148f94:
MOV dword ptr [R15 + R10*0x4],R12D
MOV RDX,qword ptr [RSP + -0x10]
MOV ECX,dword ptr [RDX + 0x8]
LAB_00148fa0:
INC R9
MOVSXD RAX,ECX
CMP R9,RAX
JL 0x00148eb4
LAB_00148faf:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexFacesFromParentVertices
(QuadRefinement *this)
{
int iVar1;
uint uVar2;
int iVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
int iVar14;
ulong uVar15;
ushort uVar16;
long lVar17;
long lVar18;
long lVar19;
int iVar20;
lVar4 = *(long *)(this + 8);
iVar14 = *(int *)(lVar4 + 8);
if (0 < iVar14) {
lVar5 = *(long *)(this + 0xf0);
lVar6 = *(long *)(this + 0x10);
lVar7 = *(long *)(this + 0x58);
lVar8 = *(long *)(this + 0x78);
lVar17 = 0;
do {
iVar1 = *(int *)(lVar5 + lVar17 * 4);
lVar18 = (long)iVar1;
if (lVar18 != -1) {
lVar19 = (long)*(int *)(*(long *)(lVar4 + 0x108) + 4 + lVar17 * 8);
lVar9 = *(long *)(lVar4 + 0x120);
uVar2 = *(uint *)(*(long *)(lVar4 + 0x108) + lVar17 * 8);
lVar10 = *(long *)(lVar4 + 0x138);
lVar11 = *(long *)(lVar6 + 0x108);
*(uint *)(lVar11 + lVar18 * 8) = uVar2;
iVar20 = 0;
iVar14 = 0;
if (iVar1 != 0) {
iVar14 = *(int *)(lVar11 + -4 + lVar18 * 8) + *(int *)(lVar11 + -8 + lVar18 * 8);
}
*(int *)(lVar11 + 4 + lVar18 * 8) = iVar14;
if (0 < (int)uVar2) {
lVar12 = *(long *)(lVar6 + 0x120);
lVar13 = *(long *)(lVar6 + 0x138);
uVar15 = 0;
iVar20 = 0;
do {
iVar1 = *(int *)(lVar19 * 4 + lVar9 + uVar15 * 4);
uVar16 = *(ushort *)(lVar19 * 2 + lVar10 + uVar15 * 2);
iVar3 = *(int *)(lVar8 + (long)*(int *)(lVar7 + 4 + (long)iVar1 * 8) * 4 +
(ulong)uVar16 * 4);
if (iVar3 != -1) {
iVar1 = *(int *)(lVar7 + (long)(iVar1 * 2) * 4);
*(int *)((long)iVar14 * 4 + lVar12 + (long)iVar20 * 4) = iVar3;
if (iVar1 != 4) {
uVar16 = 0;
}
*(ushort *)((long)iVar14 * 2 + lVar13 + (long)iVar20 * 2) = uVar16;
iVar20 = iVar20 + 1;
}
uVar15 = uVar15 + 1;
} while (uVar2 != uVar15);
}
*(int *)(lVar11 + lVar18 * 8) = iVar20;
iVar14 = *(int *)(lVar4 + 8);
}
lVar17 = lVar17 + 1;
} while (lVar17 < iVar14);
}
return;
}
|
|
65,422 |
ma_pvio_has_data
|
eloqsql/libmariadb/libmariadb/ma_pvio.c
|
my_bool ma_pvio_has_data(MARIADB_PVIO *pvio, ssize_t *data_len)
{
/* check if we still have unread data in cache */
if (pvio && pvio->cache)
if (pvio->cache_pos > pvio->cache)
return test(pvio->cache_pos - pvio->cache);
if (pvio && pvio->methods->has_data)
return pvio->methods->has_data(pvio, data_len);
return 1;
}
|
O0
|
c
|
ma_pvio_has_data:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2409c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2409c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x2409a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movb %al, -0x1(%rbp)
jmp 0x240d1
jmp 0x2409c
cmpq $0x0, -0x10(%rbp)
je 0x240cd
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x78(%rax)
je 0x240cd
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movb %al, -0x1(%rbp)
jmp 0x240d1
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ma_pvio_has_data:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_2409C
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_2409C
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jbe short loc_2409A
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rdx, rax
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_1], al
jmp short loc_240D1
loc_2409A:
jmp short $+2
loc_2409C:
cmp [rbp+var_10], 0
jz short loc_240CD
mov rax, [rbp+var_10]
mov rax, [rax+48h]
cmp qword ptr [rax+78h], 0
jz short loc_240CD
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rax, [rax+78h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rax
mov [rbp+var_1], al
jmp short loc_240D1
loc_240CD:
mov [rbp+var_1], 1
loc_240D1:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char ma_pvio_has_data(_QWORD *a1, long long a2)
{
if ( a1 && a1[1] && a1[2] > a1[1] )
return a1[2] != a1[1];
if ( a1 && *(_QWORD *)(a1[9] + 120LL) )
return (*(long long ( **)(_QWORD *, long long))(a1[9] + 120LL))(a1, a2);
return 1;
}
|
ma_pvio_has_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0012409c
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0012409c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JBE 0x0012409a
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RDX,RAX
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x1],AL
JMP 0x001240d1
LAB_0012409a:
JMP 0x0012409c
LAB_0012409c:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001240cd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x001240cd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x78]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL RAX
MOV byte ptr [RBP + -0x1],AL
JMP 0x001240d1
LAB_001240cd:
MOV byte ptr [RBP + -0x1],0x1
LAB_001240d1:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 ma_pvio_has_data(long param_1,int8 param_2)
{
int1 local_9;
if (((param_1 == 0) || (*(long *)(param_1 + 8) == 0)) ||
(*(ulong *)(param_1 + 0x10) <= *(ulong *)(param_1 + 8))) {
if ((param_1 == 0) || (*(long *)(*(long *)(param_1 + 0x48) + 0x78) == 0)) {
local_9 = 1;
}
else {
local_9 = (**(code **)(*(long *)(param_1 + 0x48) + 0x78))(param_1,param_2);
}
}
else {
local_9 = *(long *)(param_1 + 0x10) != *(long *)(param_1 + 8);
}
return local_9;
}
|
|
65,423 |
wt_resource_init
|
eloqsql/mysys/waiting_threads.c
|
static void wt_resource_init(LF_HASH *hash __attribute__((unused)),
WT_RESOURCE *rc, WT_RESOURCE_ID *id)
{
DBUG_ENTER("wt_resource_init");
rc->id= *id;
rc->waiter_count= 0;
rc->state= ACTIVE;
#ifndef DBUG_OFF
rc->cond_mutex= 0;
#endif
DBUG_VOID_RETURN;
}
|
O0
|
c
|
wt_resource_init:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
jmp 0xff11e
popq %rbp
retq
|
wt_resource_init:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+14h], 0
jmp short $+2
loc_FF11E:
pop rbp
retn
|
long long wt_resource_init(long long a1, long long a2, _QWORD *a3)
{
long long result; // rax
*(_QWORD *)a2 = *a3;
*(_QWORD *)(a2 + 8) = a3[1];
*(_DWORD *)(a2 + 16) = 0;
result = a2;
*(_DWORD *)(a2 + 20) = 0;
return result;
}
|
wt_resource_init:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],0x0
JMP 0x001ff11e
LAB_001ff11e:
POP RBP
RET
|
void wt_resource_init(int8 param_1,int8 *param_2,int8 *param_3)
{
*param_2 = *param_3;
param_2[1] = param_3[1];
*(int4 *)(param_2 + 2) = 0;
*(int4 *)((long)param_2 + 0x14) = 0;
return;
}
|
|
65,424 |
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>::update(nlohmann::json_abi_v3_11_3::detail::iter_impl<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> const>, nlohmann::json_abi_v3_11_3::detail::iter_impl<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> const>, bool)
|
llama.cpp/common/json.hpp
|
void update(const_iterator first, const_iterator last, bool merge_objects = false)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(312, detail::concat("cannot use update() with ", type_name()), this));
}
// check if range iterators belong to the same JSON object
if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))
{
JSON_THROW(invalid_iterator::create(210, "iterators do not fit", this));
}
// passed iterators must belong to objects
if (JSON_HEDLEY_UNLIKELY(!first.m_object->is_object()))
{
JSON_THROW(type_error::create(312, detail::concat("cannot use update() with ", first.m_object->type_name()), first.m_object));
}
for (auto it = first; it != last; ++it)
{
if (merge_objects && it.value().is_object())
{
auto it2 = m_data.m_value.object->find(it.key());
if (it2 != m_data.m_value.object->end())
{
it2->second.update(it.value(), true);
continue;
}
}
m_data.m_value.object->operator[](it.key()) = it.value();
#if JSON_DIAGNOSTICS
m_data.m_value.object->operator[](it.key()).m_parent = this;
#endif
}
}
|
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>::update(nlohmann::json_abi_v3_11_3::detail::iter_impl<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> const>, nlohmann::json_abi_v3_11_3::detail::iter_impl<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> const>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb (%rdi), %al
testb %al, %al
jne 0x83c6f
movb $0x1, (%rbx)
movl $0x30, %edi
callq 0x20220
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %edx, %edx
movq %rdx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rdx, 0x28(%rax)
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x772be
movb (%rbx), %al
cmpb $0x1, %al
jne 0x83d83
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x83de2
cmpb $0x1, (%rax)
jne 0x83e3e
movq %rsp, %rdi
movq %rax, (%rdi)
movups 0x8(%r15), %xmm0
movups %xmm0, 0x8(%rdi)
movq 0x18(%r15), %rax
movq %rax, 0x18(%rdi)
movq %r14, %rsi
callq 0x840c2
testb %al, %al
jne 0x83d74
movq %rsp, %r15
leaq 0x28(%rsp), %r12
testb %bpl, %bpl
je 0x83d12
movq %r15, %rdi
callq 0x843a2
cmpb $0x1, (%rax)
jne 0x83d12
movq 0x8(%rbx), %r13
movq %r15, %rdi
callq 0x83f88
movq %r13, %rdi
movq %rax, %rsi
callq 0x84566
movq %rax, %r13
movq 0x8(%rbx), %rax
addq $0x8, %rax
cmpq %rax, %r13
je 0x83d12
addq $0x40, %r13
movq %r15, %rdi
callq 0x843a2
movq %r13, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x77068
jmp 0x83d59
movq %r15, %rdi
callq 0x843a2
movq %r12, %rdi
movq %rax, %rsi
callq 0x7c8b8
movq 0x8(%rbx), %r13
movq %r15, %rdi
callq 0x83f88
movq %r13, %rdi
movq %rax, %rsi
callq 0x7e020
movq %rax, %rdi
movq %r12, %rsi
callq 0x7a01c
movq %r12, %rdi
xorl %esi, %esi
callq 0x772be
movq %r12, %rdi
callq 0x7cd98
movq %r15, %rdi
callq 0x84068
movq %r15, %rdi
movq %r14, %rsi
callq 0x840c2
testb %al, %al
je 0x83cbb
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x20680
movq %rax, %r14
movq %rbx, %rdi
callq 0x7de80
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x9a82a(%rip), %rsi # 0x11e5d1
movq %rsp, %rdi
callq 0x83f00
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x138, %esi # imm = 0x138
movq %rbx, %rcx
callq 0x7dc20
xorl %ebp, %ebp
leaq 0xe0272(%rip), %rsi # 0x164040
leaq -0x9ddd(%rip), %rdx # 0x79ff8
movq %r14, %rdi
callq 0x20ab0
jmp 0x83e98
movl $0x20, %edi
callq 0x20680
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9a7ec(%rip), %rsi # 0x11e5eb
leaq 0x9a7f9(%rip), %rdx # 0x11e5ff
movq %rsp, %rdi
callq 0x2a262
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0xd2, %esi
movq %rbx, %rcx
callq 0x7d9b0
xorl %ebp, %ebp
leaq 0xe01d3(%rip), %rsi # 0x164000
leaq -0x9e3c(%rip), %rdx # 0x79ff8
movq %r14, %rdi
callq 0x20ab0
jmp 0x83e98
movl $0x20, %edi
callq 0x20680
movq %rax, %r14
movq (%r15), %rdi
callq 0x7de80
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x9a76f(%rip), %rsi # 0x11e5d1
movq %rsp, %rdi
callq 0x83f00
movq (%r15), %rcx
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x138, %esi # imm = 0x138
callq 0x838dc
xorl %ebp, %ebp
leaq 0xe01b7(%rip), %rsi # 0x164040
leaq -0x9e98(%rip), %rdx # 0x79ff8
movq %r14, %rdi
callq 0x20ab0
movq %rax, %rbx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x772be
movq %r14, %rdi
callq 0x7cd98
jmp 0x83ef8
jmp 0x83ec8
jmp 0x83eed
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x83ed9
jmp 0x83ee6
jmp 0x83eed
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x83ee6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0x83ef0
jmp 0x83ef8
movq %rax, %rbx
movq %r14, %rdi
callq 0x20f60
movq %rbx, %rdi
callq 0x20b50
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6updateENS0_6detail9iter_implIKSD_EESH_b:
push rbp; void *
push r15; int
push r14; __int64
push r13; int
push r12; void *
push rbx; int
sub rsp, 38h
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov al, [rdi]
test al, al
jnz short loc_83C6F
mov byte ptr [rbx], 1
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rax+8]
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
xor edx, edx
mov [rax+10h], rdx
mov [rax+18h], rcx
mov [rax+20h], rcx
mov [rax+28h], rdx
mov [rbx+8], rax
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov al, [rbx]
loc_83C6F:
cmp al, 1
jnz loc_83D83
mov rax, [r15]
cmp rax, [r14]
jnz loc_83DE2
cmp byte ptr [rax], 1
jnz loc_83E3E
mov rdi, rsp
mov [rdi], rax
movups xmm0, xmmword ptr [r15+8]
movups xmmword ptr [rdi+8], xmm0
mov rax, [r15+18h]
mov [rdi+18h], rax
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_83D74
mov r15, rsp
lea r12, [rsp+68h+var_40]
loc_83CBB:
test bpl, bpl
jz short loc_83D12
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
cmp byte ptr [rax], 1
jnz short loc_83D12
mov r13, [rbx+8]
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void)
mov rdi, r13
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::_Select1st<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&)
mov r13, rax
mov rax, [rbx+8]
add rax, 8
cmp r13, rax
jz short loc_83D12
add r13, 40h ; '@'
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rdi, r13
mov rsi, rax
mov edx, 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6updateERKSD_b; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::update(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
jmp short loc_83D59
loc_83D12:
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rdi, r12
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<std::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<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov r13, [rbx+8]
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void)
mov rdi, r13
mov rsi, rax
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonIS_St6vectorS5_blmdSaNS7_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS5_SD_EEEixERSH_; std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](std::string const&)
mov rdi, rax
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::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_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::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_83D59:
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator++(void)
mov rdi, r15
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_83CBB
loc_83D74:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_83D83:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseUpdat; "cannot use update() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 138h; int
mov rcx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__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, r14; void *
call ___cxa_throw
jmp loc_83E98
loc_83DE2:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea r15, [rsp+68h+var_58]
mov [r15-10h], r15
lea rsi, aIteratorsDoNot; "iterators do not fit"
lea rdx, aIteratorsDoNot+14h; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 0D2h; int
mov rcx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_83E98
loc_83E3E:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, [r15]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseUpdat; "cannot use update() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&)
mov rcx, [r15]
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 138h; int
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_83E98:
mov rbx, rax
lea r14, [rsp+68h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::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_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_83EF8
jmp short loc_83EC8
jmp short loc_83EED
mov rbx, rax
mov rdi, [rsp+68h+var_68]
cmp rdi, r15
jnz short loc_83ED9
jmp short loc_83EE6
jmp short loc_83EED
loc_83EC8:
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_83EE6
loc_83ED9:
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_83EE6:
test bpl, bpl
jnz short loc_83EF0
jmp short loc_83EF8
loc_83EED:
mov rbx, rax
loc_83EF0:
mov rdi, r14; void *
call ___cxa_free_exception
loc_83EF8:
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::update(
long long a1,
long long a2,
_QWORD *a3,
char a4)
{
char v6; // al
long long v7; // rax
long long result; // rax
long long v9; // r13
long long v10; // rax
long long v11; // r13
long long v12; // rsi
unsigned __int8 *v13; // rax
long long v14; // r13
long long v15; // rax
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
int v19; // r9d
long long v20; // rax
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14
nlohmann::json_abi_v3_11_3::detail::exception *v26; // r14
nlohmann::json_abi_v3_11_3::detail::exception *v27; // r14
unsigned __int8 *v28; // [rsp+0h] [rbp-68h] BYREF
__int128 v29; // [rsp+8h] [rbp-60h] BYREF
long long v30; // [rsp+18h] [rbp-50h]
const char *v31; // [rsp+20h] [rbp-48h]
unsigned __int8 v32[64]; // [rsp+28h] [rbp-40h] BYREF
v6 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
v7 = operator new(0x30uLL);
*(_OWORD *)v7 = 0LL;
*(_QWORD *)(v7 + 16) = 0LL;
*(_QWORD *)(v7 + 24) = v7 + 8;
*(_QWORD *)(v7 + 32) = v7 + 8;
*(_QWORD *)(v7 + 40) = 0LL;
*(_QWORD *)(a1 + 8) = v7;
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v6 = *(_BYTE *)a1;
}
if ( v6 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v31 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
&v28,
"cannot use update() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
312,
&v28);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if ( *(_QWORD *)a2 != *a3 )
{
v26 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v28 = (unsigned __int8 *)&v29 + 8;
std::string::_M_construct<char const*>((long long)&v28, "iterators do not fit", (long long)"");
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v26,
210,
&v28);
__cxa_throw(
v26,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if ( **(_BYTE **)a2 != 1 )
{
v27 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v31 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(unsigned __int8 **)a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
&v28,
"cannot use update() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v27,
312,
&v28);
__cxa_throw(
v27,
(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);
}
v28 = *(unsigned __int8 **)a2;
v29 = *(_OWORD *)(a2 + 8);
v30 = *(_QWORD *)(a2 + 24);
for ( result = ((long long ( *)(unsigned __int8 **, _QWORD *))ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_)(
&v28,
a3);
!(_BYTE)result;
result = ((long long ( *)(unsigned __int8 **, _QWORD *, long long, long long, long long, long long))ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_)(
&v28,
a3,
v21,
v22,
v23,
v24) )
{
if ( a4
&& *(_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v28) == 1
&& (v9 = *(_QWORD *)(a1 + 8),
v10 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::key(&v28),
v11 = std::_Rb_tree<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::_Select1st<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(
v9,
v10),
v11 != *(_QWORD *)(a1 + 8) + 8LL) )
{
v12 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v28);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::update(
v11 + 64,
v12,
1u);
}
else
{
v13 = (unsigned __int8 *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v28);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v32,
v13);
v14 = *(_QWORD *)(a1 + 8);
v15 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::key(&v28);
v20 = std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[](
v14,
v15,
v16,
v17,
v18,
v19);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
v20,
(long long)v32);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v32);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32);
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(&v28);
}
return result;
}
|
update:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x00183c6f
MOV byte ptr [RBX],0x1
MOV EDI,0x30
CALL 0x00120220
LEA RCX,[RAX + 0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
XOR EDX,EDX
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],RCX
MOV qword ptr [RAX + 0x28],RDX
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001772be
MOV AL,byte ptr [RBX]
LAB_00183c6f:
CMP AL,0x1
JNZ 0x00183d83
MOV RAX,qword ptr [R15]
CMP RAX,qword ptr [R14]
JNZ 0x00183de2
CMP byte ptr [RAX],0x1
JNZ 0x00183e3e
MOV RDI,RSP
MOV qword ptr [RDI],RAX
MOVUPS XMM0,xmmword ptr [R15 + 0x8]
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV RAX,qword ptr [R15 + 0x18]
MOV qword ptr [RDI + 0x18],RAX
MOV RSI,R14
CALL 0x001840c2
TEST AL,AL
JNZ 0x00183d74
MOV R15,RSP
LEA R12,[RSP + 0x28]
LAB_00183cbb:
TEST BPL,BPL
JZ 0x00183d12
MOV RDI,R15
CALL 0x001843a2
CMP byte ptr [RAX],0x1
JNZ 0x00183d12
MOV R13,qword ptr [RBX + 0x8]
MOV RDI,R15
CALL 0x00183f88
MOV RDI,R13
MOV RSI,RAX
CALL 0x00184566
MOV R13,RAX
MOV RAX,qword ptr [RBX + 0x8]
ADD RAX,0x8
CMP R13,RAX
JZ 0x00183d12
ADD R13,0x40
MOV RDI,R15
CALL 0x001843a2
MOV RDI,R13
MOV RSI,RAX
MOV EDX,0x1
CALL 0x00177068
JMP 0x00183d59
LAB_00183d12:
MOV RDI,R15
CALL 0x001843a2
MOV RDI,R12
MOV RSI,RAX
CALL 0x0017c8b8
MOV R13,qword ptr [RBX + 0x8]
LAB_00183d29:
MOV RDI,R15
CALL 0x00183f88
MOV RDI,R13
MOV RSI,RAX
CALL 0x0017e020
LAB_00183d3c:
MOV RDI,RAX
MOV RSI,R12
CALL 0x0017a01c
MOV RDI,R12
XOR ESI,ESI
CALL 0x001772be
MOV RDI,R12
CALL 0x0017cd98
LAB_00183d59:
MOV RDI,R15
CALL 0x00184068
MOV RDI,R15
MOV RSI,R14
CALL 0x001840c2
TEST AL,AL
JZ 0x00183cbb
LAB_00183d74:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00183d83:
MOV EDI,0x20
CALL 0x00120680
MOV R14,RAX
MOV RDI,RBX
CALL 0x0017de80
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_00183da0:
LEA RSI,[0x21e5d1]
MOV RDI,RSP
CALL 0x00183f00
MOV BPL,0x1
LAB_00183db2:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x138
MOV RCX,RBX
CALL 0x0017dc20
XOR EBP,EBP
LEA RSI,[0x264040]
LEA RDX,[0x179ff8]
MOV RDI,R14
CALL 0x00120ab0
LAB_00183de2:
MOV EDI,0x20
CALL 0x00120680
MOV R14,RAX
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
LAB_00183df8:
LEA RSI,[0x21e5eb]
LEA RDX,[0x21e5ff]
MOV RDI,RSP
CALL 0x0012a262
MOV BPL,0x1
LAB_00183e11:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0xd2
MOV RCX,RBX
CALL 0x0017d9b0
XOR EBP,EBP
LEA RSI,[0x264000]
LEA RDX,[0x179ff8]
MOV RDI,R14
CALL 0x00120ab0
LAB_00183e3e:
MOV EDI,0x20
CALL 0x00120680
MOV R14,RAX
MOV RDI,qword ptr [R15]
CALL 0x0017de80
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_00183e5b:
LEA RSI,[0x21e5d1]
MOV RDI,RSP
CALL 0x00183f00
MOV RCX,qword ptr [R15]
MOV BPL,0x1
LAB_00183e70:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x138
CALL 0x001838dc
XOR EBP,EBP
LEA RSI,[0x264040]
LEA RDX,[0x179ff8]
MOV RDI,R14
CALL 0x00120ab0
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >,
void>::update(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>,
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::update(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,int8 *param_2,int8 *param_3,char param_4)
{
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this_00;
map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this_01;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
char cVar2;
int8 *puVar3;
char *pcVar4;
string *psVar5;
long lVar6;
basic_json *pbVar7;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*pbVar8;
int8 uVar9;
char *local_68;
int4 local_60;
int4 uStack_5c;
int4 uStack_58;
int4 uStack_54;
int8 local_50;
char *local_48;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_40 [16];
bVar1 = *this;
if (bVar1 == (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar3 = (int8 *)operator_new(0x30);
*puVar3 = 0;
puVar3[1] = 0;
puVar3[2] = 0;
puVar3[3] = puVar3 + 1;
puVar3[4] = puVar3 + 1;
puVar3[5] = 0;
*(int8 **)(this + 8) = puVar3;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 != (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar9 = __cxa_allocate_exception(0x20);
local_48 = (char *)type_name(this);
/* try { // try from 00183da0 to 00183dae has its CatchHandler @ 00183eed */
detail::concat<std::__cxx11::string,char_const(&)[26],char_const*>
((detail *)&local_68,"cannot use update() with ",&local_48);
/* try { // try from 00183db2 to 00183ddc has its CatchHandler @ 00183ec8 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar9,0x138,&local_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar9,&detail::type_error::typeinfo,detail::exception::~exception);
}
local_68 = (char *)*param_2;
if (local_68 != (char *)*param_3) {
uVar9 = __cxa_allocate_exception(0x20);
local_68 = (char *)&uStack_58;
/* try { // try from 00183df8 to 00183e0d has its CatchHandler @ 00183ec6 */
std::__cxx11::string::_M_construct<char_const*>(&local_68,"iterators do not fit","");
/* try { // try from 00183e11 to 00183e3b has its CatchHandler @ 00183eb8 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar9,0xd2,&local_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar9,&detail::invalid_iterator::typeinfo,detail::exception::~exception);
}
if (*local_68 != '\x01') {
uVar9 = __cxa_allocate_exception(0x20);
local_48 = (char *)type_name((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)*param_2);
/* try { // try from 00183e5b to 00183e69 has its CatchHandler @ 00183eb6 */
detail::concat<std::__cxx11::string,char_const(&)[26],char_const*>
((detail *)&local_68,"cannot use update() with ",&local_48);
/* try { // try from 00183e70 to 00183e97 has its CatchHandler @ 00183eb4 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar9,0x138,&local_68,*param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar9,&detail::type_error::typeinfo,detail::exception::~exception);
}
local_60 = *(int4 *)(param_2 + 1);
uStack_5c = *(int4 *)((long)param_2 + 0xc);
uStack_58 = *(int4 *)(param_2 + 2);
uStack_54 = *(int4 *)((long)param_2 + 0x14);
local_50 = param_2[3];
cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_68,param_3);
if (cVar2 == '\0') {
do {
if (param_4 == '\0') {
LAB_00183d12:
pbVar7 = (basic_json *)
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_68);
basic_json(local_40,pbVar7);
this_01 = *(map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8);
/* try { // try from 00183d29 to 00183d3b has its CatchHandler @ 00183e98 */
psVar5 = (string *)
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_68);
pbVar8 = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)std::
map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::operator[](this_01,psVar5);
operator=(pbVar8,local_40);
assert_invariant(SUB81(local_40,0));
data::~data((data *)local_40);
}
else {
pcVar4 = (char *)detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_68);
if (*pcVar4 != '\x01') goto LAB_00183d12;
this_00 = *(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8);
psVar5 = (string *)
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_68);
lVar6 = std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::find(this_00,psVar5);
if (lVar6 == *(long *)(this + 8) + 8) goto LAB_00183d12;
pbVar7 = (basic_json *)
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_68);
update((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)(lVar6 + 0x40),pbVar7,true);
}
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_68);
cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_68,param_3);
} while (cVar2 == '\0');
}
return;
}
|
|
65,425 |
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
|
monkey531[P]llama/common/common.cpp
|
std::string string_repeat(const std::string & str, size_t n) {
if (n == 0) {
return "";
}
std::string result;
result.reserve(str.length() * n);
for (size_t i = 0; i < n; ++i) {
result += str;
}
return result;
}
|
O0
|
cpp
|
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x57dcb
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4fd90
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x15c77a(%rip), %rsi # 0x1b4512
callq 0x55120
jmp 0x57d9f
leaq 0x3f(%rsp), %rdi
callq 0x500e0
jmp 0x57e66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x3f(%rsp), %rdi
callq 0x500e0
jmp 0x57e70
movq 0x10(%rsp), %rdi
movb $0x0, 0x2b(%rsp)
callq 0x4f4e0
movq 0x48(%rsp), %rdi
callq 0x4f880
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x40(%rsp), %rax
imulq %rax, %rsi
callq 0x4fbb0
jmp 0x57dfc
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x57e4e
movq 0x10(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x4f130
jmp 0x57e22
jmp 0x57e24
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x57e05
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x50100
jmp 0x57e70
movb $0x1, 0x2b(%rsp)
testb $0x1, 0x2b(%rsp)
jne 0x57e64
movq 0x10(%rsp), %rdi
callq 0x50100
jmp 0x57e66
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x4f990
nopw (%rax,%rax)
|
_Z13string_repeatRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm:
sub rsp, 58h
mov [rsp+58h+var_48], rdi
mov rax, rdi
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
cmp [rsp+58h+var_18], 0
jnz short loc_57DCB
lea rdi, [rsp+58h+var_19]
mov [rsp+58h+var_50], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+58h+var_48]
mov rdx, [rsp+58h+var_50]
lea rsi, aToControlTheBe+2Bh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_57D9F:
lea rdi, [rsp+58h+var_19]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_57E66
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_37]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_57E70
loc_57DCB:
mov rdi, [rsp+58h+var_48]
mov [rsp+58h+var_2D], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+58h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rdi, [rsp+58h+var_48]
mov rsi, rax
mov rax, [rsp+58h+var_18]
imul rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
jmp short $+2
loc_57DFC:
mov [rsp+58h+var_38], 0
loc_57E05:
mov rax, [rsp+58h+var_38]
cmp rax, [rsp+58h+var_18]
jnb short loc_57E4E
mov rdi, [rsp+58h+var_48]
mov rsi, [rsp+58h+var_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_57E22:
jmp short $+2
loc_57E24:
mov rax, [rsp+58h+var_38]
add rax, 1
mov [rsp+58h+var_38], rax
jmp short loc_57E05
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_57E70
loc_57E4E:
mov [rsp+58h+var_2D], 1
test [rsp+58h+var_2D], 1
jnz short loc_57E64
mov rdi, [rsp+58h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_57E64:
jmp short $+2
loc_57E66:
mov rax, [rsp+58h+var_40]
add rsp, 58h
retn
loc_57E70:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
long long string_repeat(long long a1, long long a2, unsigned long long a3)
{
long long v3; // rax
unsigned long long i; // [rsp+20h] [rbp-38h]
char v6; // [rsp+3Fh] [rbp-19h] BYREF
unsigned long long v7; // [rsp+40h] [rbp-18h]
long long v8; // [rsp+48h] [rbp-10h]
long long v9; // [rsp+50h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
if ( a3 )
{
std::string::basic_string(a1);
v3 = std::string::length(v8);
std::string::reserve(a1, v7 * v3);
for ( i = 0LL; i < v7; ++i )
std::string::operator+=(a1, v8);
}
else
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v6);
std::allocator<char>::~allocator(&v6);
}
return a1;
}
|
string_repeat:
SUB RSP,0x58
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x00157dcb
LEA RDI,[RSP + 0x3f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0014fd90
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
LAB_00157d91:
LEA RSI,[0x2b4512]
CALL 0x00155120
JMP 0x00157d9f
LAB_00157d9f:
LEA RDI,[RSP + 0x3f]
CALL 0x001500e0
JMP 0x00157e66
LAB_00157dcb:
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x2b],0x0
CALL 0x0014f4e0
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0014f880
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x40]
IMUL RSI,RAX
LAB_00157df5:
CALL 0x0014fbb0
JMP 0x00157dfc
LAB_00157dfc:
MOV qword ptr [RSP + 0x20],0x0
LAB_00157e05:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x40]
JNC 0x00157e4e
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x0014f130
LAB_00157e20:
JMP 0x00157e22
LAB_00157e22:
JMP 0x00157e24
LAB_00157e24:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00157e05
LAB_00157e4e:
MOV byte ptr [RSP + 0x2b],0x1
TEST byte ptr [RSP + 0x2b],0x1
JNZ 0x00157e64
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00150100
LAB_00157e64:
JMP 0x00157e66
LAB_00157e66:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x58
RET
|
/* WARNING: Removing unreachable block (ram,0x00157e5a) */
/* string_repeat(std::__cxx11::string const&, unsigned long) */
string * string_repeat(string *param_1,ulong param_2)
{
ulong in_RDX;
ulong local_38;
allocator local_19;
ulong local_18;
string *local_10;
string *local_8;
local_10 = (string *)param_2;
local_8 = param_1;
if (in_RDX == 0) {
std::allocator<char>::allocator();
/* try { // try from 00157d91 to 00157d9c has its CatchHandler @ 00157dae */
std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_19);
std::allocator<char>::~allocator((allocator<char> *)&local_19);
}
else {
local_18 = in_RDX;
std::__cxx11::string::string(param_1);
std::__cxx11::string::length();
/* try { // try from 00157df5 to 00157e1f has its CatchHandler @ 00157e34 */
std::__cxx11::string::reserve((ulong)param_1);
for (local_38 = 0; local_38 < local_18; local_38 = local_38 + 1) {
std::__cxx11::string::operator+=(param_1,local_10);
}
}
return param_1;
}
|
|
65,426 |
nglog::FlushLogFilesUnsafe(nglog::LogSeverity)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::FlushLogFilesUnsafe(int min_severity) {
// assume we have the log_mutex or we simply don't care
// about it
std::for_each(std::next(std::begin(log_destinations_), min_severity),
std::end(log_destinations_),
[now = std::chrono::system_clock::now()](
std::unique_ptr<LogDestination>& log) {
if (log != nullptr) {
// Flush the base fileobject_ logger directly instead of
// going through any wrappers to reduce chance of deadlock.
log->fileobject_.FlushUnlocked(now);
}
});
}
|
O3
|
cpp
|
nglog::FlushLogFilesUnsafe(nglog::LogSeverity):
pushq %rbx
movslq %edi, %rax
leaq 0x246b8(%rip), %rcx # 0x2fd30
leaq (%rcx,%rax,8), %rbx
callq 0x7060
leaq 0x246c8(%rip), %rsi # 0x2fd50
movq %rbx, %rdi
movq %rax, %rdx
popq %rbx
jmp 0x11c2e
|
_ZN5nglog19FlushLogFilesUnsafeENS_11LogSeverityE:
push rbx
movsxd rax, edi
lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea rbx, [rcx+rax*8]
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
lea rsi, _ZN5nglog12_GLOBAL__N_125g_application_fingerprintB5cxx11E; nglog::`anonymous namespace'::g_application_fingerprint
mov rdi, rbx
mov rdx, rax
pop rbx
jmp _ZSt8for_eachIPSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS2_EEZNS2_19FlushLogFilesUnsafeEiEUlRS5_E_ET0_T_SA_S9_; std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(std::unique_ptr<nglog::LogDestination> *,std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1})
|
long long nglog::FlushLogFilesUnsafe(std::chrono::_V2::system_clock *a1)
{
long long v1; // rax
v1 = std::chrono::_V2::system_clock::now(a1);
return std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(
&nglog::LogDestination::log_destinations_[(int)a1],
&nglog::`anonymous namespace'::g_application_fingerprint[abi:cxx11],
v1);
}
|
FlushLogFilesUnsafe:
PUSH RBX
MOVSXD RAX,EDI
LEA RCX,[0x12fd30]
LEA RBX,[RCX + RAX*0x8]
CALL 0x00107060
LEA RSI,[0x12fd50]
MOV RDI,RBX
MOV RDX,RAX
POP RBX
JMP 0x00111c2e
|
/* nglog::FlushLogFilesUnsafe(nglog::LogSeverity) */
void nglog::FlushLogFilesUnsafe(int param_1)
{
int8 uVar1;
uVar1 = std::chrono::_V2::system_clock::now();
std::
for_each<std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>*,nglog::LogDestination::FlushLogFilesUnsafe(int)::_lambda(std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>&)_1_>
(&LogDestination::log_destinations_ + param_1,
&(anonymous_namespace)::g_application_fingerprint_abi_cxx11_,uVar1);
return;
}
|
|
65,427 |
Elevetor::qt_metacall(QMetaObject::Call, int, void**)
|
LeafBlue[P]myElevetor/build_O1/myElevetor_autogen/EWIEGA46WW/moc_elevetor.cpp
|
int Elevetor::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 1)
qt_static_metacall(this, _c, _id, _a);
_id -= 1;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 1)
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
_id -= 1;
}
return _id;
}
|
O1
|
cpp
|
Elevetor::qt_metacall(QMetaObject::Call, int, void**):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %r15
callq 0x4330
movl %eax, %ebx
testl %eax, %eax
js 0x4a63
cmpl $0x7, %ebp
je 0x4a53
testl %ebp, %ebp
jne 0x4a63
testl %ebx, %ebx
jne 0x4a61
movq 0x8(%r14), %rax
movq %rsp, %rcx
movq $0x0, (%rcx)
movq %rax, 0x8(%rcx)
leaq 0xafb1(%rip), %rsi # 0xf9f8
movq %r15, %rdi
xorl %edx, %edx
callq 0x4180
jmp 0x4a61
testl %ebx, %ebx
jne 0x4a61
movq (%r14), %rax
movq $0x0, (%rax)
decl %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ZN8Elevetor11qt_metacallEN11QMetaObject4CallEiPPv:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov r14, rcx
mov ebp, esi
mov r15, rdi
call __ZN7QObject11qt_metacallEN11QMetaObject4CallEiPPv; QObject::qt_metacall(QMetaObject::Call,int,void **)
mov ebx, eax
test eax, eax
js short loc_4A63
cmp ebp, 7
jz short loc_4A53
test ebp, ebp
jnz short loc_4A63
test ebx, ebx
jnz short loc_4A61
mov rax, [r14+8]
mov rcx, rsp; int
mov qword ptr [rcx], 0
mov [rcx+8], rax
lea rsi, _ZN8Elevetor16staticMetaObjectE; QObject *
mov rdi, r15; this
xor edx, edx; QMetaObject *
call __ZN11QMetaObject8activateEP7QObjectPKS_iPPv; QMetaObject::activate(QObject *,QMetaObject const*,int,void **)
jmp short loc_4A61
loc_4A53:
test ebx, ebx
jnz short loc_4A61
mov rax, [r14]
mov qword ptr [rax], 0
loc_4A61:
dec ebx
loc_4A63:
mov eax, ebx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long Elevetor::qt_metacall(QMetaObject *this, int a2, long long a3, long long a4)
{
int v5; // ebx
void **v6; // r8
long long v7; // rax
_QWORD v9[7]; // [rsp+0h] [rbp-38h] BYREF
v5 = QObject::qt_metacall();
if ( v5 >= 0 )
{
if ( a2 == 7 )
{
if ( !v5 )
**(_QWORD **)a4 = 0LL;
goto LABEL_8;
}
if ( !a2 )
{
if ( !v5 )
{
v7 = *(_QWORD *)(a4 + 8);
v9[0] = 0LL;
v9[1] = v7;
QMetaObject::activate(this, (QObject *)&Elevetor::staticMetaObject, 0LL, (int)v9, v6);
}
LABEL_8:
--v5;
}
}
return (unsigned int)v5;
}
|
qt_metacall:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RCX
MOV EBP,ESI
MOV R15,RDI
CALL 0x00104330
MOV EBX,EAX
TEST EAX,EAX
JS 0x00104a63
CMP EBP,0x7
JZ 0x00104a53
TEST EBP,EBP
JNZ 0x00104a63
TEST EBX,EBX
JNZ 0x00104a61
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,RSP
MOV qword ptr [RCX],0x0
MOV qword ptr [RCX + 0x8],RAX
LEA RSI,[0x10f9f8]
MOV RDI,R15
XOR EDX,EDX
CALL 0x00104180
JMP 0x00104a61
LAB_00104a53:
TEST EBX,EBX
JNZ 0x00104a61
MOV RAX,qword ptr [R14]
MOV qword ptr [RAX],0x0
LAB_00104a61:
DEC EBX
LAB_00104a63:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* Elevetor::qt_metacall(QMetaObject::Call, int, void**) */
int __thiscall
Elevetor::qt_metacall(Elevetor *this,int param_2,int8 param_3,int8 *param_4)
{
int iVar1;
void *local_38;
int8 local_30;
iVar1 = QObject::qt_metacall();
if (-1 < iVar1) {
if (param_2 == 7) {
if (iVar1 == 0) {
*(int8 *)*param_4 = 0;
}
}
else {
if (param_2 != 0) {
return iVar1;
}
if (iVar1 == 0) {
local_30 = param_4[1];
local_38 = (void *)0x0;
QMetaObject::activate((QObject *)this,(QMetaObject *)staticMetaObject,0,&local_38);
}
}
iVar1 = iVar1 + -1;
}
return iVar1;
}
|
|
65,428 |
my_mutex_end
|
eloqsql/mysys/thr_mutex.c
|
void my_mutex_end()
{
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_fast_mutexattr);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
#endif
}
|
O3
|
c
|
my_mutex_end:
pushq %rbp
movq %rsp, %rbp
leaq 0xb64e21(%rip), %rdi # 0xc0a570
callq 0x291d0
leaq 0xb64e19(%rip), %rdi # 0xc0a574
popq %rbp
jmp 0x291d0
nopl (%rax)
|
my_mutex_end:
push rbp
mov rbp, rsp
lea rdi, my_fast_mutexattr
call _pthread_mutexattr_destroy
lea rdi, my_errorcheck_mutexattr
pop rbp
jmp _pthread_mutexattr_destroy
|
long long my_mutex_end()
{
pthread_mutexattr_destroy(&my_fast_mutexattr);
return pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
}
|
my_mutex_end:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0xd0a570]
CALL 0x001291d0
LEA RDI,[0xd0a574]
POP RBP
JMP 0x001291d0
|
void my_mutex_end(void)
{
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
return;
}
|
|
65,429 |
stop_waiting_locked
|
eloqsql/mysys/waiting_threads.c
|
static int stop_waiting_locked(WT_THD *thd)
{
int ret;
WT_RESOURCE *rc= thd->waiting_for;
DBUG_ENTER("stop_waiting_locked");
DBUG_ASSERT(rc->waiter_count);
DBUG_ASSERT(rc->state == ACTIVE);
rc->waiter_count--;
thd->waiting_for= 0;
ret= unlock_lock_and_free_resource(thd, rc);
DBUG_RETURN((thd->killed || ret) ? WT_DEADLOCK : WT_OK);
}
|
O3
|
c
|
stop_waiting_locked:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rsi
decl 0x10(%rsi)
movq $0x0, 0x28(%rdi)
popq %rbp
jmp 0xadecd
|
stop_waiting_locked:
push rbp
mov rbp, rsp
mov rsi, [rdi+28h]
dec dword ptr [rsi+10h]
mov qword ptr [rdi+28h], 0
pop rbp
jmp unlock_lock_and_free_resource
|
long long stop_waiting_locked(long long a1)
{
--*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL);
*(_QWORD *)(a1 + 40) = 0LL;
return unlock_lock_and_free_resource(a1);
}
|
stop_waiting_locked:
PUSH RBP
MOV RBP,RSP
MOV RSI,qword ptr [RDI + 0x28]
DEC dword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x28],0x0
POP RBP
JMP 0x001adecd
|
void stop_waiting_locked(long param_1)
{
int *piVar1;
piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10);
*piVar1 = *piVar1 + -1;
*(int8 *)(param_1 + 0x28) = 0;
unlock_lock_and_free_resource();
return;
}
|
|
65,430 |
ma_print_error
|
eloqsql/storage/maria/ma_info.c
|
void _ma_print_error(MARIA_HA *info, int error, my_bool write_to_log)
{
DBUG_ENTER("_ma_print_error");
DBUG_PRINT("error", ("error: %d log: %d", error, write_to_log));
if (!info->error_count++ || !maria_in_ha_maria || write_to_log)
{
MARIA_SHARE *share= info->s;
_ma_report_error(error,
(share->index_file_name.length ?
&share->index_file_name :
&share->unique_file_name),
MYF(write_to_log ? ME_ERROR_LOG : 0));
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
ma_print_error:
pushq %rbp
movq %rsp, %rbp
movl 0x628(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x628(%rdi)
testb %dl, %dl
jne 0x369ef
testl %eax, %eax
je 0x369ef
leaq 0x3c60b4(%rip), %rax # 0x3fca9c
cmpb $0x0, (%rax)
je 0x369ef
popq %rbp
retq
xorl %eax, %eax
testb %dl, %dl
setne %al
movq (%rdi), %rcx
xorl %edx, %edx
cmpq $0x0, 0x5d8(%rcx)
setne %dl
shll $0x5, %edx
addq %rdx, %rcx
addq $0x5b0, %rcx # imm = 0x5B0
shll $0x6, %eax
movl %esi, %edi
movq %rcx, %rsi
movq %rax, %rdx
popq %rbp
jmp 0x36968
|
_ma_print_error:
push rbp
mov rbp, rsp
mov eax, [rdi+628h]
lea ecx, [rax+1]
mov [rdi+628h], ecx
test dl, dl
jnz short loc_369EF
test eax, eax
jz short loc_369EF
lea rax, maria_in_ha_maria
cmp byte ptr [rax], 0
jz short loc_369EF
pop rbp
retn
loc_369EF:
xor eax, eax
test dl, dl
setnz al
mov rcx, [rdi]
xor edx, edx
cmp qword ptr [rcx+5D8h], 0
setnz dl
shl edx, 5
add rcx, rdx
add rcx, 5B0h
shl eax, 6
mov edi, esi
mov rsi, rcx
mov rdx, rax
pop rbp
jmp _ma_report_error
|
void * ma_print_error(_DWORD *a1, int a2, char a3, long long a4, long long a5, int a6)
{
int v6; // eax
void *result; // rax
_QWORD *v8; // rcx
v6 = a1[394];
a1[394] = v6 + 1;
if ( a3 || !v6 || (result = &maria_in_ha_maria, !maria_in_ha_maria) )
{
v8 = (_QWORD *)(32 * (unsigned int)(*(_QWORD *)(*(_QWORD *)a1 + 1496LL) != 0LL) + *(_QWORD *)a1 + 1456LL);
return (void *)ma_report_error(a2, v8, (unsigned __int8)(a3 != 0) << 6, (long long)v8, a5, a6);
}
return result;
}
|
_ma_print_error:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0x628]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RDI + 0x628],ECX
TEST DL,DL
JNZ 0x001369ef
TEST EAX,EAX
JZ 0x001369ef
LEA RAX,[0x4fca9c]
CMP byte ptr [RAX],0x0
JZ 0x001369ef
POP RBP
RET
LAB_001369ef:
XOR EAX,EAX
TEST DL,DL
SETNZ AL
MOV RCX,qword ptr [RDI]
XOR EDX,EDX
CMP qword ptr [RCX + 0x5d8],0x0
SETNZ DL
SHL EDX,0x5
ADD RCX,RDX
ADD RCX,0x5b0
SHL EAX,0x6
MOV EDI,ESI
MOV RSI,RCX
MOV RDX,RAX
POP RBP
JMP 0x00136968
|
void _ma_print_error(long *param_1,int4 param_2,char param_3)
{
long lVar1;
lVar1 = param_1[0xc5];
*(int *)(param_1 + 0xc5) = (int)lVar1 + 1;
if (((param_3 == '\0') && ((int)lVar1 != 0)) && (maria_in_ha_maria != '\0')) {
return;
}
_ma_report_error(param_2,*param_1 + (ulong)(*(long *)(*param_1 + 0x5d8) != 0) * 0x20 + 0x5b0,
(ulong)(param_3 != '\0') << 6);
return;
}
|
|
65,431 |
init_queue
|
eloqsql/mysys/queues.c
|
int init_queue(QUEUE *queue, uint max_elements, uint offset_to_key,
my_bool max_at_top, int (*compare) (void *, uchar *, uchar *),
void *first_cmp_arg, uint offset_to_queue_pos,
uint auto_extent)
{
DBUG_ENTER("init_queue");
if ((queue->root= (uchar **) my_malloc(key_memory_QUEUE,
(max_elements + 1) * sizeof(void*),
MYF(MY_WME))) == 0)
DBUG_RETURN(1);
queue->elements= 0;
queue->compare= compare;
queue->first_cmp_arg= first_cmp_arg;
queue->max_elements= max_elements;
queue->offset_to_key= offset_to_key;
queue->offset_to_queue_pos= offset_to_queue_pos;
queue->auto_extent= auto_extent;
queue_set_max_at_top(queue, max_at_top);
DBUG_RETURN(0);
}
|
O0
|
c
|
init_queue:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movl 0x18(%rbp), %ecx
movl 0x10(%rbp), %ecx
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0xb8c014(%rip), %rax # 0xc82f90
movl (%rax), %edi
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x3, %rsi
movl $0x10, %edx
callq 0xf3820
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0xf6fae
jmp 0xf6fa5
movl $0x1, -0x4(%rbp)
jmp 0xf701b
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movl 0x10(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl 0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movsbl -0x19(%rbp), %edx
movl $0x1, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
init_queue:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov ecx, [rbp+arg_8]
mov ecx, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_19], al
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, key_memory_QUEUE
mov edi, [rax]
mov eax, [rbp+var_14]
add eax, 1
mov eax, eax
mov esi, eax
shl rsi, 3
mov edx, 10h
call my_malloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_F6FAE
jmp short $+2
loc_F6FA5:
mov [rbp+var_4], 1
jmp short loc_F701B
loc_F6FAE:
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+28h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+18h], ecx
mov ecx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+1Ch], ecx
mov ecx, [rbp+arg_8]
mov rax, [rbp+var_10]
mov [rax+20h], ecx
movsx edx, [rbp+var_19]
mov ecx, 1
mov eax, 0FFFFFFFFh
cmp edx, 0
cmovnz ecx, eax
mov rax, [rbp+var_10]
mov [rax+24h], ecx
mov [rbp+var_4], 0
loc_F701B:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long init_queue(long long a1, int a2, int a3, char a4, long long a5, long long a6, int a7, int a8)
{
long long v8; // rax
int v9; // ecx
v8 = my_malloc(key_memory_QUEUE, (const char *)(8LL * (unsigned int)(a2 + 1)), 16);
*(_QWORD *)a1 = v8;
if ( v8 )
{
*(_DWORD *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 40) = a5;
*(_QWORD *)(a1 + 8) = a6;
*(_DWORD *)(a1 + 20) = a2;
*(_DWORD *)(a1 + 24) = a3;
*(_DWORD *)(a1 + 28) = a7;
*(_DWORD *)(a1 + 32) = a8;
v9 = 1;
if ( a4 )
v9 = -1;
*(_DWORD *)(a1 + 36) = v9;
return 0;
}
else
{
return 1;
}
}
|
init_queue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV ECX,dword ptr [RBP + 0x18]
MOV ECX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV byte ptr [RBP + -0x19],AL
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0xd82f90]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV EAX,EAX
MOV ESI,EAX
SHL RSI,0x3
MOV EDX,0x10
CALL 0x001f3820
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001f6fae
JMP 0x001f6fa5
LAB_001f6fa5:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001f701b
LAB_001f6fae:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0x0
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],ECX
MOV ECX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],ECX
MOV ECX,dword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],ECX
MOVSX EDX,byte ptr [RBP + -0x19]
MOV ECX,0x1
MOV EAX,0xffffffff
CMP EDX,0x0
CMOVNZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],ECX
MOV dword ptr [RBP + -0x4],0x0
LAB_001f701b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4
init_queue(long *param_1,int param_2,int4 param_3,char param_4,long param_5,long param_6,
int4 param_7,int4 param_8)
{
long lVar1;
int4 uVar2;
int4 local_c;
lVar1 = my_malloc(key_memory_QUEUE,(ulong)(param_2 + 1) << 3,0x10,param_7);
*param_1 = lVar1;
if (lVar1 == 0) {
local_c = 1;
}
else {
*(int4 *)(param_1 + 2) = 0;
param_1[5] = param_5;
param_1[1] = param_6;
*(int *)((long)param_1 + 0x14) = param_2;
*(int4 *)(param_1 + 3) = param_3;
*(int4 *)((long)param_1 + 0x1c) = param_7;
*(int4 *)(param_1 + 4) = param_8;
uVar2 = 1;
if (param_4 != '\0') {
uVar2 = 0xffffffff;
}
*(int4 *)((long)param_1 + 0x24) = uVar2;
local_c = 0;
}
return local_c;
}
|
|
65,432 |
js_new_string_char
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_string_char(JSContext *ctx, uint16_t c)
{
if (c < 0x100) {
char ch8 = c;
return js_new_string8_len(ctx, &ch8, 1);
} else {
uint16_t ch16 = c;
return js_new_string16_len(ctx, &ch16, 1);
}
}
|
O1
|
c
|
js_new_string_char:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
cmpl $0xff, %esi
ja 0x3d5b0
leaq 0x7(%rsp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
callq 0x201dd
jmp 0x3d5e8
movl $0x1, %esi
movl $0x1, %edx
callq 0x20b73
testq %rax, %rax
je 0x3d5d6
movw %bx, 0x18(%rax)
movq %rax, 0x8(%rsp)
movq $-0x7, %rdx
jmp 0x3d5e3
movl $0x0, 0x8(%rsp)
movl $0x6, %edx
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
|
js_new_string_char:
push rbx
sub rsp, 10h
mov ebx, esi
cmp esi, 0FFh
ja short loc_3D5B0
lea rsi, [rsp+18h+var_11]
mov [rsi], bl
mov edx, 1
call js_new_string8_len
jmp short loc_3D5E8
loc_3D5B0:
mov esi, 1
mov edx, 1
call js_alloc_string
test rax, rax
jz short loc_3D5D6
mov [rax+18h], bx
mov [rsp+18h+var_10], rax
mov rdx, 0FFFFFFFFFFFFFFF9h
jmp short loc_3D5E3
loc_3D5D6:
mov dword ptr [rsp+18h+var_10], 0
mov edx, 6
loc_3D5E3:
mov rax, [rsp+18h+var_10]
loc_3D5E8:
add rsp, 10h
pop rbx
retn
|
long long js_new_string_char(long long a1, unsigned int a2)
{
long long v3; // rax
char v4; // [rsp+7h] [rbp-11h] BYREF
long long v5; // [rsp+8h] [rbp-10h]
if ( a2 > 0xFF )
{
v3 = js_alloc_string(a1, 1LL, 1u);
if ( v3 )
{
*(_WORD *)(v3 + 24) = a2;
return v3;
}
else
{
LODWORD(v5) = 0;
}
return v5;
}
else
{
v4 = a2;
return js_new_string8_len(a1, (long long)&v4, 1u);
}
}
|
js_new_string_char:
PUSH RBX
SUB RSP,0x10
MOV EBX,ESI
CMP ESI,0xff
JA 0x0013d5b0
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],BL
MOV EDX,0x1
CALL 0x001201dd
JMP 0x0013d5e8
LAB_0013d5b0:
MOV ESI,0x1
MOV EDX,0x1
CALL 0x00120b73
TEST RAX,RAX
JZ 0x0013d5d6
MOV word ptr [RAX + 0x18],BX
MOV qword ptr [RSP + 0x8],RAX
MOV RDX,-0x7
JMP 0x0013d5e3
LAB_0013d5d6:
MOV dword ptr [RSP + 0x8],0x0
MOV EDX,0x6
LAB_0013d5e3:
MOV RAX,qword ptr [RSP + 0x8]
LAB_0013d5e8:
ADD RSP,0x10
POP RBX
RET
|
long js_new_string_char(int8 param_1,uint param_2)
{
long lVar1;
int1 local_11;
int8 local_10;
if (param_2 < 0x100) {
local_11 = (int1)param_2;
local_10 = js_new_string8_len(param_1,&local_11,1);
}
else {
lVar1 = js_alloc_string(param_1,1,1);
if (lVar1 == 0) {
local_10 = (ulong)local_10._4_4_ << 0x20;
}
else {
*(short *)(lVar1 + 0x18) = (short)param_2;
local_10 = lVar1;
}
}
return local_10;
}
|
|
65,433 |
js_new_string_char
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_string_char(JSContext *ctx, uint16_t c)
{
if (c < 0x100) {
char ch8 = c;
return js_new_string8_len(ctx, &ch8, 1);
} else {
uint16_t ch16 = c;
return js_new_string16_len(ctx, &ch16, 1);
}
}
|
O2
|
c
|
js_new_string_char:
pushq %rax
cmpw $0xff, %si
ja 0x35eb9
leaq 0x5(%rsp), %rax
movb %sil, (%rax)
pushq $0x1
popq %rdx
movq %rax, %rsi
callq 0x1a4e8
jmp 0x35ecc
leaq 0x6(%rsp), %rax
movw %si, (%rax)
pushq $0x1
popq %rdx
movq %rax, %rsi
callq 0x35ff3
popq %rcx
retq
|
js_new_string_char:
push rax
cmp si, 0FFh
ja short loc_35EB9
lea rax, [rsp+8+var_3]
mov [rax], sil
push 1
pop rdx
mov rsi, rax
call js_new_string8_len
jmp short loc_35ECC
loc_35EB9:
lea rax, [rsp+8+var_2]
mov [rax], si
push 1
pop rdx
mov rsi, rax
call js_new_string16_len
loc_35ECC:
pop rcx
retn
|
long long js_new_string_char(long long a1, unsigned __int16 a2)
{
long long v2; // rax
int v4; // [rsp+0h] [rbp-4h] BYREF
v4 = HIDWORD(v2);
if ( a2 > 0xFFu )
{
HIWORD(v4) = a2;
return js_new_string16_len(a1, (char *)&v4 + 2, 1LL);
}
else
{
BYTE1(v4) = a2;
return js_new_string8_len(a1, (long long)&v4 + 1, 1u);
}
}
|
js_new_string_char:
PUSH RAX
CMP SI,0xff
JA 0x00135eb9
LEA RAX,[RSP + 0x5]
MOV byte ptr [RAX],SIL
PUSH 0x1
POP RDX
MOV RSI,RAX
CALL 0x0011a4e8
JMP 0x00135ecc
LAB_00135eb9:
LEA RAX,[RSP + 0x6]
MOV word ptr [RAX],SI
PUSH 0x1
POP RDX
MOV RSI,RAX
CALL 0x00135ff3
LAB_00135ecc:
POP RCX
RET
|
void js_new_string_char(int8 param_1,ushort param_2)
{
int1 local_3;
int1 local_2 [2];
if (param_2 < 0x100) {
js_new_string8_len(param_1,&local_3,1);
}
else {
js_new_string16_len(param_1,local_2,1);
}
return;
}
|
|
65,434 |
my_default_csname
|
eloqsql/mysys/charset.c
|
const char* my_default_csname()
{
const char* csname = NULL;
#ifdef _WIN32
char cpbuf[64];
int cp = GetConsoleCP();
if (cp == 0)
cp = GetACP();
snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp);
csname = my_os_charset_to_mysql_charset(cpbuf);
#elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO)
if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET)))
csname = my_os_charset_to_mysql_charset(csname);
#endif
return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME;
}
|
O0
|
c
|
my_default_csname:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
xorl %edi, %edi
leaq 0x61dc7(%rip), %rsi # 0x8dab0
callq 0x252b0
cmpq $0x0, %rax
je 0x2bd15
movl $0xe, %edi
callq 0x252f0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x2bd15
movq -0x8(%rbp), %rdi
callq 0x2bd40
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2bd26
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x2bd33
leaq 0x5d3e1(%rip), %rax # 0x8910e
movq %rax, -0x10(%rbp)
jmp 0x2bd33
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
my_default_csname:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], 0
xor edi, edi
lea rsi, asc_8DAAC+4; ""
call _setlocale
cmp rax, 0
jz short loc_2BD15
mov edi, 0Eh
call _nl_langinfo
mov [rbp+var_8], rax
cmp rax, 0
jz short loc_2BD15
mov rdi, [rbp+var_8]
call my_os_charset_to_mysql_charset
mov [rbp+var_8], rax
loc_2BD15:
cmp [rbp+var_8], 0
jz short loc_2BD26
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short loc_2BD33
loc_2BD26:
lea rax, aLatin1; "latin1"
mov [rbp+var_10], rax
jmp short $+2
loc_2BD33:
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
|
const char *my_default_csname()
{
long long v2; // [rsp+8h] [rbp-8h]
v2 = 0LL;
if ( setlocale(0LL, "") )
{
v2 = nl_langinfo(14LL);
if ( v2 )
v2 = my_os_charset_to_mysql_charset(v2);
}
if ( v2 )
return (const char *)v2;
else
return "latin1";
}
|
my_default_csname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],0x0
XOR EDI,EDI
LEA RSI,[0x18dab0]
CALL 0x001252b0
CMP RAX,0x0
JZ 0x0012bd15
MOV EDI,0xe
CALL 0x001252f0
MOV qword ptr [RBP + -0x8],RAX
CMP RAX,0x0
JZ 0x0012bd15
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012bd40
MOV qword ptr [RBP + -0x8],RAX
LAB_0012bd15:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0012bd26
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0012bd33
LAB_0012bd26:
LEA RAX,[0x18910e]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0012bd33
LAB_0012bd33:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
char * my_default_csname(void)
{
char *pcVar1;
char *local_18;
char *local_10;
local_10 = (char *)0x0;
pcVar1 = setlocale(0,"");
if (pcVar1 != (char *)0x0) {
local_10 = nl_langinfo(0xe);
if (local_10 != (char *)0x0) {
local_10 = (char *)my_os_charset_to_mysql_charset(local_10);
}
}
if (local_10 == (char *)0x0) {
local_18 = "latin1";
}
else {
local_18 = local_10;
}
return local_18;
}
|
|
65,435 |
program_hash_get_key(unsigned char const*, unsigned long*, char)
|
eloqsql/storage/perfschema/pfs_program.cc
|
C_MODE_START
static uchar *program_hash_get_key(const uchar *entry, size_t *length,
my_bool)
{
const PFS_program * const *typed_entry;
const PFS_program *program;
const void *result;
typed_entry= reinterpret_cast<const PFS_program* const *> (entry);
assert(typed_entry != NULL);
program= *typed_entry;
assert(program != NULL);
*length= program->m_key.m_key_length;
result= program->m_key.m_hash_key;
return const_cast<uchar*> (reinterpret_cast<const uchar*> (result));
}
|
O3
|
cpp
|
program_hash_get_key(unsigned char const*, unsigned long*, char):
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movl 0xbc(%rax), %ecx
addq $0x34, %rax
movq %rcx, (%rsi)
popq %rbp
retq
|
_ZL20program_hash_get_keyPKhPmc:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov ecx, [rax+0BCh]
add rax, 34h ; '4'
mov [rsi], rcx
pop rbp
retn
|
long long program_hash_get_key(const unsigned __int8 *a1, unsigned long long *a2)
{
long long result; // rax
result = *(_QWORD *)a1 + 52LL;
*a2 = *(unsigned int *)(*(_QWORD *)a1 + 188LL);
return result;
}
|
program_hash_get_key:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX + 0xbc]
ADD RAX,0x34
MOV qword ptr [RSI],RCX
POP RBP
RET
|
/* program_hash_get_key(unsigned char const*, unsigned long*, char) */
long program_hash_get_key(uchar *param_1,ulong *param_2,char param_3)
{
long lVar1;
lVar1 = *(long *)param_1;
*param_2 = (ulong)*(uint *)(lVar1 + 0xbc);
return lVar1 + 0x34;
}
|
|
65,436 |
ggml_backend_cpu_buffer_cpy_tensor(ggml_backend_buffer*, ggml_tensor const*, ggml_tensor*)
|
monkey531[P]llama/ggml/src/ggml-backend.cpp
|
static bool ggml_backend_cpu_buffer_cpy_tensor(ggml_backend_buffer_t buffer, const struct ggml_tensor * src, struct ggml_tensor * dst) {
if (ggml_backend_buffer_is_host(src->buffer)) {
memcpy(dst->data, src->data, ggml_nbytes(src));
return true;
}
return false;
GGML_UNUSED(buffer);
}
|
O3
|
cpp
|
ggml_backend_cpu_buffer_cpy_tensor(ggml_backend_buffer*, ggml_tensor const*, ggml_tensor*):
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rsi), %rax
movq 0x48(%rax), %rdi
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x28991
movq %rdx, %r14
movq %rsi, %rbx
callq *%rax
testb %al, %al
je 0x28991
movq 0xf8(%r14), %r14
movq 0xf8(%rbx), %r15
movq %rbx, %rdi
callq 0x161c0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x16dc0
movb $0x1, %al
jmp 0x28993
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
|
_ZL34ggml_backend_cpu_buffer_cpy_tensorP19ggml_backend_bufferPK11ggml_tensorPS1_:
push r15
push r14
push rbx
mov rax, [rsi+8]
mov rdi, [rax+48h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_28991
mov r14, rdx
mov rbx, rsi
call rax
test al, al
jz short loc_28991
mov r14, [r14+0F8h]
mov r15, [rbx+0F8h]
mov rdi, rbx
call _ggml_nbytes
mov rdi, r14
mov rsi, r15
mov rdx, rax
call _memcpy
mov al, 1
jmp short loc_28993
loc_28991:
xor eax, eax
loc_28993:
pop rbx
pop r14
pop r15
retn
|
char ggml_backend_cpu_buffer_cpy_tensor(long long a1, long long a2, long long a3)
{
unsigned __int8 (*v3)(void); // rax
long long v5; // r14
long long v6; // r15
unsigned long long v7; // rax
v3 = *(unsigned __int8 (**)(void))(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 72LL) + 40LL);
if ( !v3 || !v3() )
return 0;
v5 = *(_QWORD *)(a3 + 248);
v6 = *(_QWORD *)(a2 + 248);
v7 = ggml_nbytes((unsigned int *)a2);
memcpy(v5, v6, v7);
return 1;
}
|
ggml_backend_cpu_buffer_cpy_tensor:
PUSH R15
PUSH R14
PUSH RBX
MOV RAX,qword ptr [RSI + 0x8]
MOV RDI,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x00128991
MOV R14,RDX
MOV RBX,RSI
CALL RAX
TEST AL,AL
JZ 0x00128991
MOV R14,qword ptr [R14 + 0xf8]
MOV R15,qword ptr [RBX + 0xf8]
MOV RDI,RBX
CALL 0x001161c0
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x00116dc0
MOV AL,0x1
JMP 0x00128993
LAB_00128991:
XOR EAX,EAX
LAB_00128993:
POP RBX
POP R14
POP R15
RET
|
/* ggml_backend_cpu_buffer_cpy_tensor(ggml_backend_buffer*, ggml_tensor const*, ggml_tensor*) */
int8
ggml_backend_cpu_buffer_cpy_tensor
(ggml_backend_buffer *param_1,ggml_tensor *param_2,ggml_tensor *param_3)
{
code *pcVar1;
void *__dest;
void *__src;
char cVar2;
size_t __n;
pcVar1 = *(code **)(*(long *)(*(long *)(param_2 + 8) + 0x48) + 0x28);
if ((pcVar1 != (code *)0x0) && (cVar2 = (*pcVar1)(), cVar2 != '\0')) {
__dest = *(void **)(param_3 + 0xf8);
__src = *(void **)(param_2 + 0xf8);
__n = ggml_nbytes(param_2);
memcpy(__dest,__src,__n);
return 1;
}
return 0;
}
|
|
65,437 |
my_strnxfrm_latin1_de
|
eloqsql/strings/ctype-latin1.c
|
static size_t
my_strnxfrm_latin1_de(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar* src, size_t srclen, uint flags)
{
uchar *de= dst + dstlen;
const uchar *se= src + srclen;
uchar *d0= dst;
for ( ; src < se && dst < de && nweights; src++, nweights--)
{
uchar chr= combo1map[*src];
*dst++= chr;
if ((chr= combo2map[*src]) && dst < de && nweights > 1)
{
*dst++= chr;
nweights--;
}
}
return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0);
}
|
O3
|
c
|
my_strnxfrm_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rax
movl %ecx, %r10d
movq %rdx, %rcx
movl 0x10(%rbp), %r9d
addq %rsi, %rcx
testq %rax, %rax
jle 0xb2ee7
addq %r8, %rax
leaq 0x17186f(%rip), %r11 # 0x2246f0
leaq 0x171968(%rip), %rbx # 0x2247f0
movq %rsi, %r14
cmpq %rcx, %r14
jae 0xb2eec
testl %r10d, %r10d
je 0xb2eec
movzbl (%r8), %edx
movb (%rdx,%r11), %r15b
leaq 0x1(%r14), %rdx
movb %r15b, (%r14)
movzbl (%r8), %r15d
movb (%r15,%rbx), %r15b
testb %r15b, %r15b
je 0xb2ed7
cmpq %rcx, %rdx
setb %r12b
cmpl $0x2, %r10d
setae %r13b
andb %r12b, %r13b
cmpb $0x1, %r13b
jne 0xb2ed7
movb %r15b, 0x1(%r14)
addq $0x2, %r14
decl %r10d
movq %r14, %rdx
incq %r8
decl %r10d
movq %rdx, %r14
cmpq %rax, %r8
jb 0xb2e8b
jmp 0xb2eef
movq %rsi, %rdx
jmp 0xb2eef
movq %r14, %rdx
movl $0x0, (%rsp)
movl %r10d, %r8d
callq 0xb4c78
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
my_strnxfrm_latin1_de:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rax, r9
mov r10d, ecx
mov rcx, rdx
mov r9d, [rbp+arg_0]
add rcx, rsi
test rax, rax
jle short loc_B2EE7
add rax, r8
lea r11, combo1map
lea rbx, combo2map
mov r14, rsi
loc_B2E8B:
cmp r14, rcx
jnb short loc_B2EEC
test r10d, r10d
jz short loc_B2EEC
movzx edx, byte ptr [r8]
mov r15b, [rdx+r11]
lea rdx, [r14+1]
mov [r14], r15b
movzx r15d, byte ptr [r8]
mov r15b, [r15+rbx]
test r15b, r15b
jz short loc_B2ED7
cmp rdx, rcx
setb r12b
cmp r10d, 2
setnb r13b
and r13b, r12b
cmp r13b, 1
jnz short loc_B2ED7
mov [r14+1], r15b
add r14, 2
dec r10d
mov rdx, r14
loc_B2ED7:
inc r8
dec r10d
mov r14, rdx
cmp r8, rax
jb short loc_B2E8B
jmp short loc_B2EEF
loc_B2EE7:
mov rdx, rsi
jmp short loc_B2EEF
loc_B2EEC:
mov rdx, r14
loc_B2EEF:
mov [rsp+30h+var_30], 0
mov r8d, r10d
call my_strxfrm_pad_desc_and_reverse
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strnxfrm_latin1_de(
int a1,
_BYTE *a2,
long long a3,
unsigned int a4,
unsigned __int8 *a5,
long long a6,
int a7)
{
unsigned long long v8; // rcx
unsigned __int8 *v9; // rax
_BYTE *v10; // r14
_BYTE *v11; // rdx
unsigned __int8 v12; // r15
v8 = (unsigned long long)&a2[a3];
if ( a6 <= 0 )
{
LODWORD(v11) = (_DWORD)a2;
}
else
{
v9 = &a5[a6];
v10 = a2;
while ( (unsigned long long)v10 < v8 && a4 )
{
v11 = v10 + 1;
*v10 = combo1map[*a5];
v12 = combo2map[*a5];
if ( v12 && (unsigned long long)v11 < v8 && a4 >= 2 )
{
v10[1] = v12;
--a4;
v11 = v10 + 2;
}
++a5;
--a4;
v10 = v11;
if ( a5 >= v9 )
return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0);
}
LODWORD(v11) = (_DWORD)v10;
}
return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0);
}
|
my_strnxfrm_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,R9
MOV R10D,ECX
MOV RCX,RDX
MOV R9D,dword ptr [RBP + 0x10]
ADD RCX,RSI
TEST RAX,RAX
JLE 0x001b2ee7
ADD RAX,R8
LEA R11,[0x3246f0]
LEA RBX,[0x3247f0]
MOV R14,RSI
LAB_001b2e8b:
CMP R14,RCX
JNC 0x001b2eec
TEST R10D,R10D
JZ 0x001b2eec
MOVZX EDX,byte ptr [R8]
MOV R15B,byte ptr [RDX + R11*0x1]
LEA RDX,[R14 + 0x1]
MOV byte ptr [R14],R15B
MOVZX R15D,byte ptr [R8]
MOV R15B,byte ptr [R15 + RBX*0x1]
TEST R15B,R15B
JZ 0x001b2ed7
CMP RDX,RCX
SETC R12B
CMP R10D,0x2
SETNC R13B
AND R13B,R12B
CMP R13B,0x1
JNZ 0x001b2ed7
MOV byte ptr [R14 + 0x1],R15B
ADD R14,0x2
DEC R10D
MOV RDX,R14
LAB_001b2ed7:
INC R8
DEC R10D
MOV R14,RDX
CMP R8,RAX
JC 0x001b2e8b
JMP 0x001b2eef
LAB_001b2ee7:
MOV RDX,RSI
JMP 0x001b2eef
LAB_001b2eec:
MOV RDX,R14
LAB_001b2eef:
MOV dword ptr [RSP],0x0
MOV R8D,R10D
CALL 0x001b4c78
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_strnxfrm_latin1_de
(int8 param_1,int1 *param_2,long param_3,uint param_4,byte *param_5,
long param_6,int4 param_7)
{
ulong in_RAX;
byte *pbVar1;
int1 *puVar2;
int1 *puVar3;
int1 *puVar4;
puVar2 = param_2 + param_3;
puVar4 = param_2;
if (0 < param_6) {
pbVar1 = param_5 + param_6;
puVar3 = param_2;
do {
puVar4 = puVar3;
if ((puVar2 <= puVar3) || (param_4 == 0)) break;
puVar4 = puVar3 + 1;
*puVar3 = combo1map[*param_5];
if ((combo2map[*param_5] != '\0') && (1 < param_4 && puVar4 < puVar2)) {
puVar3[1] = combo2map[*param_5];
puVar4 = puVar3 + 2;
param_4 = param_4 - 1;
}
param_5 = param_5 + 1;
param_4 = param_4 - 1;
puVar3 = puVar4;
} while (param_5 < pbVar1);
}
my_strxfrm_pad_desc_and_reverse
(param_1,param_2,puVar4,puVar2,param_4,param_7,in_RAX & 0xffffffff00000000);
return;
}
|
|
65,438 |
testing::UnitTest::current_test_info() const
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
GTEST_LOCK_EXCLUDED_(mutex_) {
internal::MutexLock lock(&mutex_);
return impl_->current_test_info();
}
|
O1
|
cpp
|
testing::UnitTest::current_test_info() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x3a578
movq 0x40(%rbx), %rax
movq 0x170(%rax), %rbx
movq %r14, %rdi
callq 0x3a616
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0xf6fa
nop
|
_ZNK7testing8UnitTest17current_test_infoEv:
push r14
push rbx
push rax
mov rbx, rdi
lea r14, [rdi+8]
mov rdi, r14; this
call _ZN7testing8internal9MutexBase4LockEv; testing::internal::MutexBase::Lock(void)
mov rax, [rbx+40h]
mov rbx, [rax+170h]
mov rdi, r14; this
call _ZN7testing8internal9MutexBase6UnlockEv; testing::internal::MutexBase::Unlock(void)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov rdi, rax
call __clang_call_terminate
|
long long testing::UnitTest::current_test_info(testing::UnitTest *this)
{
long long v1; // rbx
testing::internal::MutexBase::Lock((testing::UnitTest *)((char *)this + 8));
v1 = *(_QWORD *)(*((_QWORD *)this + 8) + 368LL);
testing::internal::MutexBase::Unlock((testing::UnitTest *)((char *)this + 8));
return v1;
}
|
current_test_info:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[RDI + 0x8]
MOV RDI,R14
CALL 0x0013a578
MOV RAX,qword ptr [RBX + 0x40]
MOV RBX,qword ptr [RAX + 0x170]
LAB_00131716:
MOV RDI,R14
CALL 0x0013a616
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* testing::UnitTest::current_test_info() const */
int8 __thiscall testing::UnitTest::current_test_info(UnitTest *this)
{
int8 uVar1;
internal::MutexBase::Lock((MutexBase *)(this + 8));
uVar1 = *(int8 *)(*(long *)(this + 0x40) + 0x170);
/* try { // try from 00131716 to 0013171d has its CatchHandler @ 00131729 */
internal::MutexBase::Unlock((MutexBase *)(this + 8));
return uVar1;
}
|
|
65,439 |
my_mb_wc_euc_jp
|
eloqsql/strings/ctype-ujis.c
|
static int
my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
}
|
O3
|
c
|
my_mb_wc_euc_jp:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xc9a3f
movzbl (%rdx), %edi
testb %dil, %dil
js 0xc9a41
movq %rdi, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leal 0x5f(%rdi), %eax
cmpb $0x5d, %al
ja 0xc9a8d
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xc9a3f
movzbl 0x1(%rdx), %eax
shll $0x9, %edi
leal (%rdi,%rax,2), %eax
leaq 0x20d149(%rip), %rcx # 0x2d6bb0
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0xc9a3f
movb 0x1(%rdx), %al
incb %al
xorl %ecx, %ecx
cmpb $-0x5e, %al
setb %cl
leal -0x2(,%rcx,2), %eax
jmp 0xc9a3f
cmpq $0x8f, %rdi
je 0xc9ad1
cmpl $0x8e, %edi
jne 0xc9b13
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0xc9a3f
movzbl 0x1(%rdx), %ecx
leal 0x20(%rcx), %edx
movl $0x0, %eax
cmpb $-0x3f, %dl
jb 0xc9a3f
addq $0xfec0, %rcx # imm = 0xFEC0
movq %rcx, (%rsi)
movl $0x2, %eax
jmp 0xc9a3f
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0xc9a3f
movzwl 0x1(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0x22d0bb(%rip), %rcx # 0x2f6bb0
movzwl (%rcx,%rax,2), %ecx
movq %rcx, (%rsi)
movl $0x3, %eax
testq %rcx, %rcx
jne 0xc9a3f
movb 0x1(%rdx), %al
incb %al
cmpb $-0x5e, %al
jae 0xc9b1a
xorl %eax, %eax
jmp 0xc9a3f
movb 0x2(%rdx), %cl
movl $0x0, %eax
cmpb $-0x5f, %cl
jb 0xc9a3f
xorl %eax, %eax
cmpb $-0x1, %cl
sete %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
jmp 0xc9a3f
|
my_mb_wc_euc_jp:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_C9A3F
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_C9A41
mov [rsi], rdi
mov eax, 1
loc_C9A3F:
pop rbp
retn
loc_C9A41:
lea eax, [rdi+5Fh]
cmp al, 5Dh ; ']'
ja short loc_C9A8D
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_C9A3F
movzx eax, byte ptr [rdx+1]
shl edi, 9
lea eax, [rdi+rax*2]
lea rcx, jisx0208_eucjp_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_C9A3F
mov al, [rdx+1]
inc al
xor ecx, ecx
cmp al, 0A2h
setb cl
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
jmp short loc_C9A3F
loc_C9A8D:
cmp rdi, 8Fh
jz short loc_C9AD1
cmp edi, 8Eh
jnz short loc_C9B13
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_C9A3F
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+20h]
mov eax, 0
cmp dl, 0C1h
jb short loc_C9A3F
add rcx, 0FEC0h
mov [rsi], rcx
mov eax, 2
jmp loc_C9A3F
loc_C9AD1:
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_C9A3F
movzx eax, word ptr [rdx+1]
rol ax, 8
movzx eax, ax
lea rcx, jisx0212_eucjp_to_unicode
movzx ecx, word ptr [rcx+rax*2]
mov [rsi], rcx
mov eax, 3
test rcx, rcx
jnz loc_C9A3F
mov al, [rdx+1]
inc al
cmp al, 0A2h
jnb short loc_C9B1A
loc_C9B13:
xor eax, eax
jmp loc_C9A3F
loc_C9B1A:
mov cl, [rdx+2]
mov eax, 0
cmp cl, 0A1h
jb loc_C9A3F
xor eax, eax
cmp cl, 0FFh
setz al
lea eax, [rax+rax*2]
add eax, 0FFFFFFFDh
jmp loc_C9A3F
|
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
long long v7; // rcx
long long v8; // rcx
unsigned __int8 v9; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x5Du )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = jisx0208_eucjp_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2;
}
return result;
}
if ( v5 != 143 )
{
if ( (_DWORD)v5 == 142 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v7 = a3[1];
result = 0LL;
if ( (unsigned __int8)(v7 + 32) >= 0xC1u )
{
*a2 = v7 + 65216;
return 2LL;
}
}
return result;
}
return 0LL;
}
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v8 = jisx0212_eucjp_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)];
*a2 = v8;
result = 3LL;
if ( v8 )
return result;
if ( (unsigned __int8)(a3[1] + 1) < 0xA2u )
return 0LL;
v9 = a3[2];
result = 0LL;
if ( v9 >= 0xA1u )
return 3 * (unsigned int)(v9 == 0xFF) - 3;
return result;
}
|
my_mb_wc_euc_jp:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001c9a3f
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x001c9a41
MOV qword ptr [RSI],RDI
MOV EAX,0x1
LAB_001c9a3f:
POP RBP
RET
LAB_001c9a41:
LEA EAX,[RDI + 0x5f]
CMP AL,0x5d
JA 0x001c9a8d
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001c9a3f
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EDI,0x9
LEA EAX,[RDI + RAX*0x2]
LEA RCX,[0x3d6bb0]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x001c9a3f
MOV AL,byte ptr [RDX + 0x1]
INC AL
XOR ECX,ECX
CMP AL,0xa2
SETC CL
LEA EAX,[-0x2 + RCX*0x2]
JMP 0x001c9a3f
LAB_001c9a8d:
CMP RDI,0x8f
JZ 0x001c9ad1
CMP EDI,0x8e
JNZ 0x001c9b13
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001c9a3f
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x20]
MOV EAX,0x0
CMP DL,0xc1
JC 0x001c9a3f
ADD RCX,0xfec0
MOV qword ptr [RSI],RCX
MOV EAX,0x2
JMP 0x001c9a3f
LAB_001c9ad1:
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001c9a3f
MOVZX EAX,word ptr [RDX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
LEA RCX,[0x3f6bb0]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RCX
MOV EAX,0x3
TEST RCX,RCX
JNZ 0x001c9a3f
MOV AL,byte ptr [RDX + 0x1]
INC AL
CMP AL,0xa2
JNC 0x001c9b1a
LAB_001c9b13:
XOR EAX,EAX
JMP 0x001c9a3f
LAB_001c9b1a:
MOV CL,byte ptr [RDX + 0x2]
MOV EAX,0x0
CMP CL,0xa1
JC 0x001c9a3f
XOR EAX,EAX
CMP CL,0xff
SETZ AL
LEA EAX,[RAX + RAX*0x2]
ADD EAX,-0x3
JMP 0x001c9a3f
|
int my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if ((byte)(bVar1 + 0x5f) < 0x5e) {
iVar3 = -0x66;
if (param_3 + 2 <= param_4) {
uVar2 = *(ushort *)
(jisx0208_eucjp_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
iVar3 = 2;
if ((ulong)uVar2 == 0) {
iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2;
}
}
}
else {
if ((ulong)bVar1 == 0x8f) {
if (param_4 < param_3 + 3) {
return -0x67;
}
uVar2 = *(ushort *)
(&jisx0212_eucjp_to_unicode +
(ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) *
2);
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 3;
}
if (0xa1 < (byte)(param_3[1] + 1)) {
if (param_3[2] < 0xa1) {
return 0;
}
return (uint)(param_3[2] == 0xff) * 3 + -3;
}
}
else if (bVar1 == 0x8e) {
if (param_4 < param_3 + 2) {
return -0x66;
}
if ((byte)(param_3[1] + 0x20) < 0xc1) {
return 0;
}
*param_2 = (ulong)param_3[1] + 0xfec0;
return 2;
}
iVar3 = 0;
}
}
else {
*param_2 = (ulong)bVar1;
iVar3 = 1;
}
}
return iVar3;
}
|
|
65,440 |
stbi__bmp_parse_header
|
opengl-water/include/stb_image.h
|
static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info)
{
int hsz;
if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP");
stbi__get32le(s); // discard filesize
stbi__get16le(s); // discard reserved
stbi__get16le(s); // discard reserved
info->offset = stbi__get32le(s);
info->hsz = hsz = stbi__get32le(s);
info->mr = info->mg = info->mb = info->ma = 0;
info->extra_read = 14;
if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP");
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown");
if (hsz == 12) {
s->img_x = stbi__get16le(s);
s->img_y = stbi__get16le(s);
} else {
s->img_x = stbi__get32le(s);
s->img_y = stbi__get32le(s);
}
if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP");
info->bpp = stbi__get16le(s);
if (hsz != 12) {
int compress = stbi__get32le(s);
if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE");
if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes
if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel
stbi__get32le(s); // discard sizeof
stbi__get32le(s); // discard hres
stbi__get32le(s); // discard vres
stbi__get32le(s); // discard colorsused
stbi__get32le(s); // discard max important
if (hsz == 40 || hsz == 56) {
if (hsz == 56) {
stbi__get32le(s);
stbi__get32le(s);
stbi__get32le(s);
stbi__get32le(s);
}
if (info->bpp == 16 || info->bpp == 32) {
if (compress == 0) {
stbi__bmp_set_mask_defaults(info, compress);
} else if (compress == 3) {
info->mr = stbi__get32le(s);
info->mg = stbi__get32le(s);
info->mb = stbi__get32le(s);
info->extra_read += 12;
// not documented, but generated by photoshop and handled by mspaint
if (info->mr == info->mg && info->mg == info->mb) {
// ?!?!?
return stbi__errpuc("bad BMP", "bad BMP");
}
} else
return stbi__errpuc("bad BMP", "bad BMP");
}
} else {
// V4/V5 header
int i;
if (hsz != 108 && hsz != 124)
return stbi__errpuc("bad BMP", "bad BMP");
info->mr = stbi__get32le(s);
info->mg = stbi__get32le(s);
info->mb = stbi__get32le(s);
info->ma = stbi__get32le(s);
if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs
stbi__bmp_set_mask_defaults(info, compress);
stbi__get32le(s); // discard color space
for (i=0; i < 12; ++i)
stbi__get32le(s); // discard color space parameters
if (hsz == 124) {
stbi__get32le(s); // discard rendering intent
stbi__get32le(s); // discard offset of profile data
stbi__get32le(s); // discard size of profile data
stbi__get32le(s); // discard reserved
}
}
}
return (void *) 1;
}
|
O3
|
c
|
stbi__bmp_parse_header:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x45860
cmpb $0x42, %al
jne 0x4802a
movq %rbx, %rdi
callq 0x45860
cmpb $0x4d, %al
jne 0x4802a
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x45860
movq %rbx, %rdi
callq 0x45860
movq %rbx, %rdi
callq 0x45860
movq %rbx, %rdi
callq 0x45860
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%r14)
movl $0xe, 0x20(%r14)
cmpl $0x0, 0x4(%r14)
js 0x4823f
movl %eax, %r12d
cmpl $0x37, %eax
jle 0x4804f
cmpl $0x38, %r12d
je 0x47fa2
cmpl $0x6c, %r12d
je 0x47fa2
cmpl $0x7c, %r12d
jne 0x4805f
movq %rbx, %rdi
callq 0x47e99
movl %eax, (%rbx)
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x4(%rbx)
movq %rbx, %rdi
callq 0x45860
movzbl %al, %r15d
movq %rbx, %rdi
callq 0x45860
movzbl %al, %eax
shll $0x8, %eax
orl %r15d, %eax
cmpl $0x1, %eax
jne 0x4823f
movq %rbx, %rdi
callq 0x45860
movzbl %al, %r15d
movq %rbx, %rdi
callq 0x45860
movzbl %al, %eax
shll $0x8, %eax
orl %r15d, %eax
movl %eax, (%r14)
movl $0x1, %r15d
cmpl $0xc, %r12d
je 0x4803d
movq %rbx, %rdi
callq 0x47e99
movl %eax, %r13d
leal -0x1(%r13), %eax
cmpl $0x1, %eax
ja 0x480a9
leaq 0x8bc5(%rip), %rax # 0x50bed
jmp 0x48031
leaq 0x8ba0(%rip), %rax # 0x50bd1
movq %rax, %fs:-0x20
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xc, %r12d
je 0x48068
cmpl $0x28, %r12d
je 0x47fa2
leaq 0x8b7b(%rip), %rax # 0x50be1
jmp 0x48031
movq %rbx, %rdi
callq 0x45860
movzbl %al, %r15d
movq %rbx, %rdi
callq 0x45860
movzbl %al, %eax
shll $0x8, %eax
orl %r15d, %eax
movl %eax, (%rbx)
movq %rbx, %rdi
callq 0x45860
movzbl %al, %r15d
movq %rbx, %rdi
callq 0x45860
movzbl %al, %eax
shll $0x8, %eax
orl %r15d, %eax
jmp 0x47fb4
cmpl $0x4, %r13d
jl 0x480bb
leaq 0x8b3f(%rip), %rax # 0x50bf5
jmp 0x48031
cmpl $0x3, %r13d
jne 0x480d2
movl (%r14), %eax
cmpl $0x10, %eax
je 0x480d2
cmpl $0x20, %eax
jne 0x4823f
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
cmpl $0x6b, %r12d
jg 0x4819a
cmpl $0x28, %r12d
je 0x48134
cmpl $0x38, %r12d
jne 0x4823f
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movl (%r14), %eax
cmpl $0x20, %eax
je 0x48145
cmpl $0x10, %eax
jne 0x4803d
testl %r13d, %r13d
je 0x4824b
cmpl $0x3, %r13d
jne 0x4823f
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x14(%r14)
addl $0xc, 0x20(%r14)
movl 0x10(%r14), %ecx
movl 0xc(%r14), %edx
xorl %ecx, %edx
xorl %eax, %ecx
orl %edx, %ecx
jne 0x4803d
jmp 0x4823f
cmpl $0x6c, %r12d
je 0x481aa
cmpl $0x7c, %r12d
jne 0x4823f
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x14(%r14)
movq %rbx, %rdi
callq 0x47e99
movl %eax, 0x18(%r14)
cmpl $0x3, %r13d
je 0x481eb
movq %r14, %rdi
movl %r13d, %esi
callq 0x483bf
movq %rbx, %rdi
callq 0x47e99
movl $0xc, %r14d
movq %rbx, %rdi
callq 0x47e99
decl %r14d
jne 0x481f9
cmpl $0x6c, %r12d
je 0x4803d
cmpl $0x7c, %r12d
jne 0x4803a
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
movq %rbx, %rdi
callq 0x47e99
jmp 0x4803d
leaq 0x8993(%rip), %rax # 0x50bd9
jmp 0x48031
cmpl $0x20, %eax
je 0x48270
cmpl $0x10, %eax
jne 0x48289
movabsq $0x3e000007c00, %rax # imm = 0x3E000007C00
movq %rax, 0xc(%r14)
movl $0x1f, 0x14(%r14)
jmp 0x4803d
movaps 0x7cc9(%rip), %xmm0 # 0x4ff40
movups %xmm0, 0xc(%r14)
movl $0x0, 0x1c(%r14)
jmp 0x4803d
addq $0xc, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
jmp 0x4803d
|
stbi__bmp_parse_header:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call stbi__get8
cmp al, 42h ; 'B'
jnz loc_4802A
mov rdi, rbx
call stbi__get8
cmp al, 4Dh ; 'M'
jnz loc_4802A
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get8
mov rdi, rbx
call stbi__get8
mov rdi, rbx
call stbi__get8
mov rdi, rbx
call stbi__get8
mov rdi, rbx
call stbi__get32le
mov [r14+4], eax
mov rdi, rbx
call stbi__get32le
mov [r14+8], eax
xorps xmm0, xmm0
movups xmmword ptr [r14+0Ch], xmm0
mov dword ptr [r14+20h], 0Eh
cmp dword ptr [r14+4], 0
js loc_4823F
mov r12d, eax
cmp eax, 37h ; '7'
jle loc_4804F
cmp r12d, 38h ; '8'
jz short loc_47FA2
cmp r12d, 6Ch ; 'l'
jz short loc_47FA2
cmp r12d, 7Ch ; '|'
jnz loc_4805F
loc_47FA2:
mov rdi, rbx
call stbi__get32le
mov [rbx], eax
mov rdi, rbx
call stbi__get32le
loc_47FB4:
mov [rbx+4], eax
mov rdi, rbx
call stbi__get8
movzx r15d, al
mov rdi, rbx
call stbi__get8
movzx eax, al
shl eax, 8
or eax, r15d
cmp eax, 1
jnz loc_4823F
mov rdi, rbx
call stbi__get8
movzx r15d, al
mov rdi, rbx
call stbi__get8
movzx eax, al
shl eax, 8
or eax, r15d
mov [r14], eax
mov r15d, 1
cmp r12d, 0Ch
jz short loc_4803D
mov rdi, rbx
call stbi__get32le
mov r13d, eax
lea eax, [r13-1]
cmp eax, 1
ja loc_480A9
lea rax, aBmpRle; "BMP RLE"
jmp short loc_48031
loc_4802A:
lea rax, aNotBmp; "not BMP"
loc_48031:
mov fs:0FFFFFFFFFFFFFFE0h, rax
loc_4803A:
xor r15d, r15d
loc_4803D:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4804F:
cmp r12d, 0Ch
jz short loc_48068
cmp r12d, 28h ; '('
jz loc_47FA2
loc_4805F:
lea rax, aUnknownBmp; "unknown BMP"
jmp short loc_48031
loc_48068:
mov rdi, rbx
call stbi__get8
movzx r15d, al
mov rdi, rbx
call stbi__get8
movzx eax, al
shl eax, 8
or eax, r15d
mov [rbx], eax
mov rdi, rbx
call stbi__get8
movzx r15d, al
mov rdi, rbx
call stbi__get8
movzx eax, al
shl eax, 8
or eax, r15d
jmp loc_47FB4
loc_480A9:
cmp r13d, 4
jl short loc_480BB
lea rax, aBmpJpegPng; "BMP JPEG/PNG"
jmp loc_48031
loc_480BB:
cmp r13d, 3
jnz short loc_480D2
mov eax, [r14]
cmp eax, 10h
jz short loc_480D2
cmp eax, 20h ; ' '
jnz loc_4823F
loc_480D2:
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
cmp r12d, 6Bh ; 'k'
jg loc_4819A
cmp r12d, 28h ; '('
jz short loc_48134
cmp r12d, 38h ; '8'
jnz loc_4823F
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
loc_48134:
mov eax, [r14]
cmp eax, 20h ; ' '
jz short loc_48145
cmp eax, 10h
jnz loc_4803D
loc_48145:
test r13d, r13d
jz loc_4824B
cmp r13d, 3
jnz loc_4823F
mov rdi, rbx
call stbi__get32le
mov [r14+0Ch], eax
mov rdi, rbx
call stbi__get32le
mov [r14+10h], eax
mov rdi, rbx
call stbi__get32le
mov [r14+14h], eax
add dword ptr [r14+20h], 0Ch
mov ecx, [r14+10h]
mov edx, [r14+0Ch]
xor edx, ecx
xor ecx, eax
or ecx, edx
jnz loc_4803D
jmp loc_4823F
loc_4819A:
cmp r12d, 6Ch ; 'l'
jz short loc_481AA
cmp r12d, 7Ch ; '|'
jnz loc_4823F
loc_481AA:
mov rdi, rbx
call stbi__get32le
mov [r14+0Ch], eax
mov rdi, rbx
call stbi__get32le
mov [r14+10h], eax
mov rdi, rbx
call stbi__get32le
mov [r14+14h], eax
mov rdi, rbx
call stbi__get32le
mov [r14+18h], eax
cmp r13d, 3
jz short loc_481EB
mov rdi, r14
mov esi, r13d
call stbi__bmp_set_mask_defaults
loc_481EB:
mov rdi, rbx
call stbi__get32le
mov r14d, 0Ch
loc_481F9:
mov rdi, rbx
call stbi__get32le
dec r14d
jnz short loc_481F9
cmp r12d, 6Ch ; 'l'
jz loc_4803D
cmp r12d, 7Ch ; '|'
jnz loc_4803A
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
mov rdi, rbx
call stbi__get32le
jmp loc_4803D
loc_4823F:
lea rax, aBadBmp; "bad BMP"
jmp loc_48031
loc_4824B:
cmp eax, 20h ; ' '
jz short loc_48270
cmp eax, 10h
jnz short loc_48289
mov rax, 3E000007C00h
mov [r14+0Ch], rax
mov dword ptr [r14+14h], 1Fh
jmp loc_4803D
loc_48270:
movaps xmm0, cs:xmmword_4FF40
movups xmmword ptr [r14+0Ch], xmm0
mov dword ptr [r14+1Ch], 0
jmp loc_4803D
loc_48289:
add r14, 0Ch
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
jmp loc_4803D
|
long long stbi__bmp_parse_header(int *a1, int *a2)
{
int v2; // eax
int v3; // r12d
int v4; // eax
int v5; // r15d
int v6; // r15d
long long v7; // r15
int v8; // r13d
const char *v9; // rax
int v11; // r15d
int v12; // r15d
int v13; // eax
unsigned int v14; // eax
int v15; // r14d
if ( stbi__get8((long long)a1) != 66 || stbi__get8((long long)a1) != 77 )
{
v9 = "not BMP";
goto LABEL_14;
}
stbi__get32le((long long)a1);
stbi__get8((long long)a1);
stbi__get8((long long)a1);
stbi__get8((long long)a1);
stbi__get8((long long)a1);
a2[1] = stbi__get32le((long long)a1);
v2 = stbi__get32le((long long)a1);
a2[2] = v2;
*(_OWORD *)(a2 + 3) = 0LL;
a2[8] = 14;
if ( a2[1] < 0 )
goto LABEL_40;
v3 = v2;
if ( v2 > 55 )
{
if ( v2 == 56 || v2 == 108 || v2 == 124 )
goto LABEL_8;
LABEL_18:
v9 = "unknown BMP";
goto LABEL_14;
}
if ( v2 == 12 )
{
v11 = (unsigned __int8)stbi__get8((long long)a1);
*a1 = v11 | ((unsigned __int8)stbi__get8((long long)a1) << 8);
v12 = (unsigned __int8)stbi__get8((long long)a1);
v4 = v12 | ((unsigned __int8)stbi__get8((long long)a1) << 8);
goto LABEL_9;
}
if ( v2 != 40 )
goto LABEL_18;
LABEL_8:
*a1 = stbi__get32le((long long)a1);
v4 = stbi__get32le((long long)a1);
LABEL_9:
a1[1] = v4;
v5 = (unsigned __int8)stbi__get8((long long)a1);
if ( (v5 | ((unsigned __int8)stbi__get8((long long)a1) << 8)) != 1 )
goto LABEL_40;
v6 = (unsigned __int8)stbi__get8((long long)a1);
*a2 = v6 | ((unsigned __int8)stbi__get8((long long)a1) << 8);
v7 = 1LL;
if ( v3 == 12 )
return v7;
v8 = stbi__get32le((long long)a1);
if ( (unsigned int)(v8 - 1) <= 1 )
{
v9 = "BMP RLE";
LABEL_14:
__writefsqword(0xFFFFFFE0, (unsigned long long)v9);
return 0LL;
}
if ( v8 >= 4 )
{
v9 = "BMP JPEG/PNG";
goto LABEL_14;
}
if ( v8 == 3 && *a2 != 16 && *a2 != 32 )
{
LABEL_40:
v9 = "bad BMP";
goto LABEL_14;
}
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
if ( v3 > 107 )
{
a2[3] = stbi__get32le((long long)a1);
a2[4] = stbi__get32le((long long)a1);
a2[5] = stbi__get32le((long long)a1);
a2[6] = stbi__get32le((long long)a1);
if ( v8 != 3 )
stbi__bmp_set_mask_defaults(a2, (unsigned int)v8);
stbi__get32le((long long)a1);
v15 = 12;
do
{
stbi__get32le((long long)a1);
--v15;
}
while ( v15 );
if ( v3 != 108 )
{
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
}
}
else
{
if ( v3 != 40 )
{
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
stbi__get32le((long long)a1);
}
v13 = *a2;
if ( *a2 == 32 || v13 == 16 )
{
if ( v8 )
{
if ( v8 != 3 )
goto LABEL_40;
a2[3] = stbi__get32le((long long)a1);
a2[4] = stbi__get32le((long long)a1);
v14 = stbi__get32le((long long)a1);
a2[5] = v14;
a2[8] += 12;
if ( *(_QWORD *)(a2 + 3) == __PAIR64__(v14, a2[4]) )
goto LABEL_40;
}
else if ( v13 == 32 )
{
*(_OWORD *)(a2 + 3) = xmmword_4FF40;
a2[7] = 0;
}
else if ( v13 == 16 )
{
*(_QWORD *)(a2 + 3) = 0x3E000007C00LL;
a2[5] = 31;
}
else
{
*(_OWORD *)(a2 + 3) = 0LL;
}
}
}
return v7;
}
|
stbi__bmp_parse_header:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x00145860
CMP AL,0x42
JNZ 0x0014802a
MOV RDI,RBX
CALL 0x00145860
CMP AL,0x4d
JNZ 0x0014802a
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00145860
MOV RDI,RBX
CALL 0x00145860
MOV RDI,RBX
CALL 0x00145860
MOV RDI,RBX
CALL 0x00145860
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0x4],EAX
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0x8],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0xc],XMM0
MOV dword ptr [R14 + 0x20],0xe
CMP dword ptr [R14 + 0x4],0x0
JS 0x0014823f
MOV R12D,EAX
CMP EAX,0x37
JLE 0x0014804f
CMP R12D,0x38
JZ 0x00147fa2
CMP R12D,0x6c
JZ 0x00147fa2
CMP R12D,0x7c
JNZ 0x0014805f
LAB_00147fa2:
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [RBX],EAX
MOV RDI,RBX
CALL 0x00147e99
LAB_00147fb4:
MOV dword ptr [RBX + 0x4],EAX
MOV RDI,RBX
CALL 0x00145860
MOVZX R15D,AL
MOV RDI,RBX
CALL 0x00145860
MOVZX EAX,AL
SHL EAX,0x8
OR EAX,R15D
CMP EAX,0x1
JNZ 0x0014823f
MOV RDI,RBX
CALL 0x00145860
MOVZX R15D,AL
MOV RDI,RBX
CALL 0x00145860
MOVZX EAX,AL
SHL EAX,0x8
OR EAX,R15D
MOV dword ptr [R14],EAX
MOV R15D,0x1
CMP R12D,0xc
JZ 0x0014803d
MOV RDI,RBX
CALL 0x00147e99
MOV R13D,EAX
LEA EAX,[R13 + -0x1]
CMP EAX,0x1
JA 0x001480a9
LEA RAX,[0x150bed]
JMP 0x00148031
LAB_0014802a:
LEA RAX,[0x150bd1]
LAB_00148031:
MOV qword ptr FS:[-0x20],RAX
LAB_0014803a:
XOR R15D,R15D
LAB_0014803d:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014804f:
CMP R12D,0xc
JZ 0x00148068
CMP R12D,0x28
JZ 0x00147fa2
LAB_0014805f:
LEA RAX,[0x150be1]
JMP 0x00148031
LAB_00148068:
MOV RDI,RBX
CALL 0x00145860
MOVZX R15D,AL
MOV RDI,RBX
CALL 0x00145860
MOVZX EAX,AL
SHL EAX,0x8
OR EAX,R15D
MOV dword ptr [RBX],EAX
MOV RDI,RBX
CALL 0x00145860
MOVZX R15D,AL
MOV RDI,RBX
CALL 0x00145860
MOVZX EAX,AL
SHL EAX,0x8
OR EAX,R15D
JMP 0x00147fb4
LAB_001480a9:
CMP R13D,0x4
JL 0x001480bb
LEA RAX,[0x150bf5]
JMP 0x00148031
LAB_001480bb:
CMP R13D,0x3
JNZ 0x001480d2
MOV EAX,dword ptr [R14]
CMP EAX,0x10
JZ 0x001480d2
CMP EAX,0x20
JNZ 0x0014823f
LAB_001480d2:
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
CMP R12D,0x6b
JG 0x0014819a
CMP R12D,0x28
JZ 0x00148134
CMP R12D,0x38
JNZ 0x0014823f
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
LAB_00148134:
MOV EAX,dword ptr [R14]
CMP EAX,0x20
JZ 0x00148145
CMP EAX,0x10
JNZ 0x0014803d
LAB_00148145:
TEST R13D,R13D
JZ 0x0014824b
CMP R13D,0x3
JNZ 0x0014823f
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0xc],EAX
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0x10],EAX
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0x14],EAX
ADD dword ptr [R14 + 0x20],0xc
MOV ECX,dword ptr [R14 + 0x10]
MOV EDX,dword ptr [R14 + 0xc]
XOR EDX,ECX
XOR ECX,EAX
OR ECX,EDX
JNZ 0x0014803d
JMP 0x0014823f
LAB_0014819a:
CMP R12D,0x6c
JZ 0x001481aa
CMP R12D,0x7c
JNZ 0x0014823f
LAB_001481aa:
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0xc],EAX
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0x10],EAX
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0x14],EAX
MOV RDI,RBX
CALL 0x00147e99
MOV dword ptr [R14 + 0x18],EAX
CMP R13D,0x3
JZ 0x001481eb
MOV RDI,R14
MOV ESI,R13D
CALL 0x001483bf
LAB_001481eb:
MOV RDI,RBX
CALL 0x00147e99
MOV R14D,0xc
LAB_001481f9:
MOV RDI,RBX
CALL 0x00147e99
DEC R14D
JNZ 0x001481f9
CMP R12D,0x6c
JZ 0x0014803d
CMP R12D,0x7c
JNZ 0x0014803a
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
MOV RDI,RBX
CALL 0x00147e99
JMP 0x0014803d
LAB_0014823f:
LEA RAX,[0x150bd9]
JMP 0x00148031
LAB_0014824b:
CMP EAX,0x20
JZ 0x00148270
CMP EAX,0x10
JNZ 0x00148289
MOV RAX,0x3e000007c00
MOV qword ptr [R14 + 0xc],RAX
MOV dword ptr [R14 + 0x14],0x1f
JMP 0x0014803d
LAB_00148270:
MOVAPS XMM0,xmmword ptr [0x0014ff40]
MOVUPS xmmword ptr [R14 + 0xc],XMM0
MOV dword ptr [R14 + 0x1c],0x0
JMP 0x0014803d
LAB_00148289:
ADD R14,0xc
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
JMP 0x0014803d
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 stbi__bmp_parse_header(uint *param_1,uint *param_2)
{
int8 uVar1;
char cVar2;
int1 uVar3;
int1 uVar4;
uint uVar5;
uint uVar6;
int iVar7;
char *pcVar8;
long in_FS_OFFSET;
cVar2 = stbi__get8();
if ((cVar2 != 'B') || (cVar2 = stbi__get8(param_1), cVar2 != 'M')) {
pcVar8 = "not BMP";
goto LAB_00148031;
}
stbi__get32le(param_1);
stbi__get8(param_1);
stbi__get8(param_1);
stbi__get8(param_1);
stbi__get8(param_1);
uVar5 = stbi__get32le(param_1);
param_2[1] = uVar5;
uVar5 = stbi__get32le(param_1);
param_2[2] = uVar5;
param_2[3] = 0;
param_2[4] = 0;
param_2[5] = 0;
param_2[6] = 0;
param_2[8] = 0xe;
if (-1 < (int)param_2[1]) {
if ((int)uVar5 < 0x38) {
if (uVar5 != 0xc) {
if (uVar5 != 0x28) goto LAB_0014805f;
goto LAB_00147fa2;
}
uVar3 = stbi__get8(param_1);
uVar4 = stbi__get8(param_1);
*param_1 = (uint)CONCAT11(uVar4,uVar3);
uVar3 = stbi__get8(param_1);
uVar4 = stbi__get8(param_1);
uVar6 = (uint)CONCAT11(uVar4,uVar3);
}
else {
if (((uVar5 != 0x38) && (uVar5 != 0x6c)) && (uVar5 != 0x7c)) {
LAB_0014805f:
pcVar8 = "unknown BMP";
goto LAB_00148031;
}
LAB_00147fa2:
uVar6 = stbi__get32le(param_1);
*param_1 = uVar6;
uVar6 = stbi__get32le(param_1);
}
param_1[1] = uVar6;
uVar3 = stbi__get8(param_1);
uVar4 = stbi__get8(param_1);
if (CONCAT11(uVar4,uVar3) == 1) {
uVar3 = stbi__get8(param_1);
uVar4 = stbi__get8(param_1);
*param_2 = (uint)CONCAT11(uVar4,uVar3);
if (uVar5 == 0xc) {
return 1;
}
iVar7 = stbi__get32le(param_1);
if (iVar7 - 1U < 2) {
pcVar8 = "BMP RLE";
goto LAB_00148031;
}
if (3 < iVar7) {
pcVar8 = "BMP JPEG/PNG";
goto LAB_00148031;
}
if (((iVar7 != 3) || (*param_2 == 0x10)) || (*param_2 == 0x20)) {
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
if ((int)uVar5 < 0x6c) {
if (uVar5 != 0x28) {
if (uVar5 != 0x38) goto LAB_0014823f;
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
}
uVar1 = _UNK_0014ff48;
uVar5 = *param_2;
if ((uVar5 != 0x20) && (uVar5 != 0x10)) {
return 1;
}
if (iVar7 == 0) {
if (uVar5 == 0x20) {
*(int8 *)(param_2 + 3) = ram0x0014ff40;
*(int8 *)(param_2 + 5) = uVar1;
param_2[7] = 0;
return 1;
}
if (uVar5 != 0x10) {
param_2[3] = 0;
param_2[4] = 0;
param_2[5] = 0;
param_2[6] = 0;
return 1;
}
param_2[3] = 0x7c00;
param_2[4] = 0x3e0;
param_2[5] = 0x1f;
return 1;
}
if (iVar7 == 3) {
uVar5 = stbi__get32le(param_1);
param_2[3] = uVar5;
uVar5 = stbi__get32le(param_1);
param_2[4] = uVar5;
uVar5 = stbi__get32le(param_1);
param_2[5] = uVar5;
param_2[8] = param_2[8] + 0xc;
if (param_2[4] != uVar5 || param_2[3] != param_2[4]) {
return 1;
}
}
}
else if ((uVar5 == 0x6c) || (uVar5 == 0x7c)) {
uVar6 = stbi__get32le(param_1);
param_2[3] = uVar6;
uVar6 = stbi__get32le(param_1);
param_2[4] = uVar6;
uVar6 = stbi__get32le(param_1);
param_2[5] = uVar6;
uVar6 = stbi__get32le(param_1);
param_2[6] = uVar6;
if (iVar7 != 3) {
stbi__bmp_set_mask_defaults(param_2,iVar7);
}
stbi__get32le(param_1);
iVar7 = 0xc;
do {
stbi__get32le(param_1);
iVar7 = iVar7 + -1;
} while (iVar7 != 0);
if (uVar5 != 0x6c) {
if (uVar5 != 0x7c) {
return 0;
}
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
return 1;
}
return 1;
}
}
}
}
LAB_0014823f:
pcVar8 = "bad BMP";
LAB_00148031:
*(char **)(in_FS_OFFSET + -0x20) = pcVar8;
return 0;
}
|
|
65,441 |
mysql_autocommit_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_autocommit_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_autocommit,
(parms->mysql, parms->auto_mode),
parms->mysql,
my_bool,
r_my_bool)
}
|
O0
|
c
|
mysql_autocommit_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movsbl 0x8(%rax), %esi
callq 0x299f0
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
mysql_autocommit_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
movsx esi, byte ptr [rax+8]
call mysql_autocommit
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long mysql_autocommit_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_autocommit(*(_QWORD *)a1, *(_BYTE *)(a1 + 8));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_autocommit_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ESI,byte ptr [RAX + 0x8]
CALL 0x001299f0
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_autocommit_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_autocommit(*param_1,(int)(char)param_1[1]);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
65,442 |
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&)
|
monkey531[P]llama/common/minja.hpp
|
static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) {
Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options);
auto tokens = parser.tokenize();
TemplateTokenIterator begin = tokens.begin();
auto it = begin;
TemplateTokenIterator end = tokens.end();
return parser.parseTemplate(begin, it, end, /* full= */ true);
}
|
O2
|
cpp
|
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x24c50
movq %rsp, %rdi
movq %r15, %rsi
callq 0x68fd8
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
movq %r14, %rdx
callq 0x68ff6
leaq 0x8(%rsp), %rdi
callq 0x5b5b4
leaq 0x10(%rsp), %rdi
callq 0x25298
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x6909e
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rsi
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x38(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r8
movq %rsi, (%r8)
leaq 0x40(%rsp), %rsi
pushq $0x1
popq %r9
movq %rbx, %rdi
callq 0x6ae3e
leaq 0x10(%rsp), %rdi
callq 0x6bd5e
leaq 0x48(%rsp), %rdi
callq 0x5b5b4
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6bd5e
jmp 0x68516
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5b5b4
jmp 0x6853e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5b5b4
jmp 0x68534
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x25298
movq %rbx, %rdi
callq 0x25010
|
_ZN5minja6Parser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsE:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rdx
mov rbx, rdi
lea r15, [rsp+88h+var_78]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, rsp
mov rsi, r15
call _ZSt11make_sharedINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EESt10shared_ptrIT_EDpOT0_; std::make_shared<std::string,std::string>(std::string &&)
lea rdi, [rsp+88h+var_48]
mov rsi, rsp
mov rdx, r14
call _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE; minja::Parser::Parser(std::shared_ptr<std::string> const&,minja::Options const&)
lea rdi, [rsp+88h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_78]; this
lea rsi, [rsp+88h+var_48]
call _ZN5minja6Parser8tokenizeEv; minja::Parser::tokenize(void)
mov rax, [rsp+88h+var_78]
mov rsi, [rsp+88h+var_70]
mov rdx, rsp
mov [rdx], rax
lea rcx, [rsp+88h+var_50]
mov [rcx], rax
lea r8, [rsp+88h+var_58]
mov [r8], rsi
lea rsi, [rsp+88h+var_48]
push 1
pop r9
mov rdi, rbx
call _ZNK5minja6Parser13parseTemplateERKN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrINS_13TemplateTokenESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEERSD_SF_b; minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,bool)
lea rdi, [rsp+88h+var_78]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
lea rdi, [rsp+88h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
jmp short loc_68516
mov rbx, rax
loc_68516:
lea rdi, [rsp+arg_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6853E
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_68534
mov rbx, rax
loc_68534:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_6853E:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Parser::parse(long long a1, long long a2, long long a3)
{
long long v5; // [rsp+0h] [rbp-88h] BYREF
long long v6; // [rsp+8h] [rbp-80h] BYREF
_QWORD v7[4]; // [rsp+10h] [rbp-78h] BYREF
long long v8; // [rsp+30h] [rbp-58h] BYREF
long long v9; // [rsp+38h] [rbp-50h] BYREF
_BYTE v10[8]; // [rsp+40h] [rbp-48h] BYREF
_QWORD v11[8]; // [rsp+48h] [rbp-40h] BYREF
std::string::basic_string(v7, a2);
std::make_shared<std::string,std::string>(&v5, v7);
minja::Parser::Parser(v10, &v5, a3);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v6);
std::string::~string(v7);
minja::Parser::tokenize((minja::Parser *)v7);
v5 = v7[0];
v9 = v7[0];
v8 = v7[1];
((void ( *)(long long, _BYTE *, long long *, long long *, long long *, long long))minja::Parser::parseTemplate)(
a1,
v10,
&v5,
&v9,
&v8,
1LL);
std::vector<std::unique_ptr<minja::TemplateToken>>::~vector(v7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v11);
return a1;
}
|
parse:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RDX
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x00124c50
LAB_00168474:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00168fd8
LAB_0016847f:
LEA RDI,[RSP + 0x40]
MOV RSI,RSP
MOV RDX,R14
CALL 0x00168ff6
LEA RDI,[RSP + 0x8]
CALL 0x0015b5b4
LEA RDI,[RSP + 0x10]
CALL 0x00125298
LAB_001684a3:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x40]
CALL 0x0016909e
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX],RAX
LEA R8,[RSP + 0x30]
MOV qword ptr [R8],RSI
LAB_001684d2:
LEA RSI,[RSP + 0x40]
PUSH 0x1
POP R9
MOV RDI,RBX
CALL 0x0016ae3e
LAB_001684e3:
LEA RDI,[RSP + 0x10]
CALL 0x0016bd5e
LEA RDI,[RSP + 0x48]
CALL 0x0015b5b4
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
|
/* minja::Parser::parse(std::__cxx11::string const&, minja::Options const&) */
Parser * __thiscall minja::Parser::parse(Parser *this,string *param_1,Options *param_2)
{
int8 local_88;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_80 [8];
int8 local_78;
int8 local_70;
int8 local_58;
int8 local_50;
Parser local_48 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [40];
std::__cxx11::string::string((string *)&local_78,param_1);
/* try { // try from 00168474 to 0016847e has its CatchHandler @ 00168531 */
std::make_shared<std::__cxx11::string,std::__cxx11::string>((string *)&local_88);
/* try { // try from 0016847f to 0016848e has its CatchHandler @ 00168522 */
Parser(local_48,(shared_ptr *)&local_88,param_2);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_80);
std::__cxx11::string::~string((string *)&local_78);
/* try { // try from 001684a3 to 001684b1 has its CatchHandler @ 00168513 */
tokenize();
local_88 = local_78;
local_50 = local_78;
local_58 = local_70;
/* try { // try from 001684d2 to 001684e2 has its CatchHandler @ 00168504 */
parseTemplate(this,local_48,(__normal_iterator *)&local_88,SUB81(&local_50,0));
std::
vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
::~vector((vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
*)&local_78);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
return this;
}
|
|
65,443 |
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&)
|
monkey531[P]llama/common/minja.hpp
|
static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) {
Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options);
auto tokens = parser.tokenize();
TemplateTokenIterator begin = tokens.begin();
auto it = begin;
TemplateTokenIterator end = tokens.end();
return parser.parseTemplate(begin, it, end, /* full= */ true);
}
|
O3
|
cpp
|
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %rax, %rsi
callq 0x2d500
movq $0x0, 0x20(%rsp)
movl $0x30, %edi
callq 0x1b8d0
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xac965(%rip), %rcx # 0x139250
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
movq %rax, %rdx
addq $0x20, %rdx
movq %rdx, 0x10(%rax)
movq (%rsp), %rsi
cmpq %r15, %rsi
je 0x8c917
movq %rsi, (%rcx)
movq 0x10(%rsp), %rsi
movq %rsi, (%rdx)
jmp 0x8c91e
movups (%r15), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rsp), %rdx
movq %rdx, 0x18(%rax)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rcx, (%rsi)
leaq 0x40(%rsp), %rdi
movq %r14, %rdx
callq 0x8d7c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8c961
callq 0x7b578
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x8c977
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x8d88a
movq (%rsp), %rax
movq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x38(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r8
movq %rsi, (%r8)
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %r9d
callq 0x8ff10
movq %rsp, %rdi
callq 0x911c8
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x8c9cf
callq 0x7b578
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x911c8
jmp 0x8c9ec
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x8ca2a
callq 0x7b578
jmp 0x8ca2a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8ca14
callq 0x7b578
jmp 0x8ca14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x8ca2a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq %rbx, %rdi
callq 0x1c020
|
_ZN5minja6Parser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsE:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rdx
mov rbx, rdi
lea r15, [rsp+88h+var_78]
mov [r15-10h], r15
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
mov rdi, rsp
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov [rsp+88h+var_68], 0
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<std::string,std::allocator<std::string>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
lea rcx, [rax+10h]
mov rdx, rax
add rdx, 20h ; ' '
mov [rax+10h], rdx
mov rsi, [rsp+88h+var_88]
cmp rsi, r15
jz short loc_8C917
mov [rcx], rsi
mov rsi, [rsp+88h+var_78]
mov [rdx], rsi
jmp short loc_8C91E
loc_8C917:
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [rdx], xmm0
loc_8C91E:
mov rdx, [rsp+88h+var_80]
mov [rax+18h], rdx
mov [rsp+88h+var_88], r15
mov [rsp+88h+var_80], 0
mov byte ptr [rsp+88h+var_78], 0
lea rsi, [rsp+88h+var_68]
mov [rsi+8], rax
mov [rsi], rcx
lea rdi, [rsp+88h+var_48]
mov rdx, r14
call _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE; minja::Parser::Parser(std::shared_ptr<std::string> const&,minja::Options const&)
mov rdi, [rsp+88h+var_60]
test rdi, rdi
jz short loc_8C961
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C961:
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r15
jz short loc_8C977
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C977:
mov rdi, rsp; this
lea rsi, [rsp+88h+var_48]
call _ZN5minja6Parser8tokenizeEv; minja::Parser::tokenize(void)
mov rax, [rsp+88h+var_88]
mov rsi, [rsp+88h+var_80]
lea rdx, [rsp+88h+var_68]
mov [rdx], rax
lea rcx, [rsp+88h+var_50]
mov [rcx], rax
lea r8, [rsp+88h+var_58]
mov [r8], rsi
lea rsi, [rsp+88h+var_48]
mov rdi, rbx
mov r9d, 1
call _ZNK5minja6Parser13parseTemplateERKN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrINS_13TemplateTokenESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEERSD_SF_b; minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,bool)
mov rdi, rsp
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
mov rdi, [rsp+88h+var_40]
test rdi, rdi
jz short loc_8C9CF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C9CF:
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
jmp short loc_8C9EC
mov rbx, rax
loc_8C9EC:
mov rdi, [rsp+arg_40]
test rdi, rdi
jz short loc_8CA2A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8CA2A
mov rbx, rax
mov rdi, [rsp+arg_20]
test rdi, rdi
jz short loc_8CA14
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8CA14
mov rbx, rax
loc_8CA14:
mov rdi, [rsp+0]; void *
cmp rdi, r15
jz short loc_8CA2A
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8CA2A:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Parser::parse(long long a1, long long a2, long long a3)
{
long long v4; // rax
_OWORD *v5; // rdx
void *v7; // [rsp+0h] [rbp-88h] BYREF
long long v8; // [rsp+8h] [rbp-80h]
__int128 v9; // [rsp+10h] [rbp-78h] BYREF
void *v10; // [rsp+20h] [rbp-68h] BYREF
volatile signed __int32 *v11; // [rsp+28h] [rbp-60h]
long long v12; // [rsp+30h] [rbp-58h] BYREF
void *v13; // [rsp+38h] [rbp-50h] BYREF
_BYTE v14[8]; // [rsp+40h] [rbp-48h] BYREF
volatile signed __int32 *v15; // [rsp+48h] [rbp-40h]
v7 = &v9;
std::string::_M_construct<char *>((long long)&v7, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
v10 = 0LL;
v4 = operator new(0x30uLL);
*(_QWORD *)(v4 + 8) = 0x100000001LL;
*(_QWORD *)v4 = &`vtable for'std::_Sp_counted_ptr_inplace<std::string,std::allocator<std::string>,(__gnu_cxx::_Lock_policy)2>
+ 2;
v5 = (_OWORD *)(v4 + 32);
*(_QWORD *)(v4 + 16) = v4 + 32;
if ( v7 == &v9 )
{
*v5 = v9;
}
else
{
*(_QWORD *)(v4 + 16) = v7;
*(_QWORD *)v5 = v9;
}
*(_QWORD *)(v4 + 24) = v8;
v7 = &v9;
v8 = 0LL;
LOBYTE(v9) = 0;
v11 = (volatile signed __int32 *)v4;
v10 = (void *)(v4 + 16);
minja::Parser::Parser(v14, &v10, a3);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
minja::Parser::tokenize((minja::Parser *)&v7);
v10 = v7;
v13 = v7;
v12 = v8;
minja::Parser::parseTemplate(a1, v14, &v10, &v13, &v12, 1LL);
std::vector<std::unique_ptr<minja::TemplateToken>>::~vector(&v7);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
return a1;
}
|
parse:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RDX
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
MOV RDI,RSP
MOV RSI,RAX
CALL 0x0012d500
MOV qword ptr [RSP + 0x20],0x0
LAB_0018c8cc:
MOV EDI,0x30
CALL 0x0011b8d0
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x239250]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
LEA RCX,[RAX + 0x10]
MOV RDX,RAX
ADD RDX,0x20
MOV qword ptr [RAX + 0x10],RDX
MOV RSI,qword ptr [RSP]
CMP RSI,R15
JZ 0x0018c917
MOV qword ptr [RCX],RSI
MOV RSI,qword ptr [RSP + 0x10]
MOV qword ptr [RDX],RSI
JMP 0x0018c91e
LAB_0018c917:
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0018c91e:
MOV RDX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x18],RDX
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI],RCX
LAB_0018c945:
LEA RDI,[RSP + 0x40]
MOV RDX,R14
CALL 0x0018d7c0
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0018c961
CALL 0x0017b578
LAB_0018c961:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x0018c977
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b8f0
LAB_0018c977:
MOV RDI,RSP
LEA RSI,[RSP + 0x40]
CALL 0x0018d88a
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX],RAX
LEA R8,[RSP + 0x30]
MOV qword ptr [R8],RSI
LAB_0018c9a5:
LEA RSI,[RSP + 0x40]
MOV RDI,RBX
MOV R9D,0x1
CALL 0x0018ff10
LAB_0018c9b8:
MOV RDI,RSP
CALL 0x001911c8
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x0018c9cf
CALL 0x0017b578
LAB_0018c9cf:
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
|
/* minja::Parser::parse(std::__cxx11::string const&, minja::Options const&) */
Parser * __thiscall minja::Parser::parse(Parser *this,string *param_1,Options *param_2)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_88;
int8 local_80;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> local_78;
int7 uStack_77;
int8 uStack_70;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
Parser local_48 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
local_88 = &local_78;
std::__cxx11::string::_M_construct<char*>
(&local_88,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
local_68 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
/* try { // try from 0018c8cc to 0018c8d5 has its CatchHandler @ 0018ca11 */
local_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x30);
*(int8 *)(local_60 + 8) = 0x100000001;
*(int ***)local_60 = &PTR___Sp_counted_ptr_inplace_00239260;
local_68 = local_60 + 0x10;
p_Var1 = local_60 + 0x20;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(local_60 + 0x10) = p_Var1;
if (local_88 == &local_78) {
*(ulong *)p_Var1 = CONCAT71(uStack_77,local_78);
*(int8 *)(local_60 + 0x28) = uStack_70;
}
else {
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)local_68 = local_88;
*(ulong *)p_Var1 = CONCAT71(uStack_77,local_78);
}
*(int8 *)(local_60 + 0x18) = local_80;
local_80 = 0;
local_78 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>)0x0;
/* try { // try from 0018c945 to 0018c951 has its CatchHandler @ 0018c9fd */
local_88 = &local_78;
Parser(local_48,(shared_ptr *)&local_68,param_2);
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
if (local_88 != &local_78) {
operator_delete(local_88,CONCAT71(uStack_77,local_78) + 1);
}
/* try { // try from 0018c977 to 0018c983 has its CatchHandler @ 0018c9e9 */
tokenize();
local_68 = local_88;
local_50 = local_88;
local_58 = local_80;
/* try { // try from 0018c9a5 to 0018c9b7 has its CatchHandler @ 0018c9dc */
parseTemplate(this,local_48,(__normal_iterator *)&local_68,SUB81(&local_50,0));
std::
vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
::~vector((vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
*)&local_88);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
return this;
}
|
|
65,444 |
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double)
|
monkey531[P]llama/common/json.hpp
|
JSON_HEDLEY_NON_NULL(1)
void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value)
{
static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3,
"internal error: not enough precision");
JSON_ASSERT(std::isfinite(value));
JSON_ASSERT(value > 0);
// If the neighbors (and boundaries) of 'value' are always computed for double-precision
// numbers, all float's can be recovered using strtod (and strtof). However, the resulting
// decimal representations are not exactly "short".
//
// The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars)
// says "value is converted to a string as if by std::sprintf in the default ("C") locale"
// and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars'
// does.
// On the other hand, the documentation for 'std::to_chars' requires that "parsing the
// representation using the corresponding std::from_chars function recovers value exactly". That
// indicates that single precision floating-point numbers should be recovered using
// 'std::strtof'.
//
// NB: If the neighbors are computed for single-precision numbers, there is a single float
// (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision
// value is off by 1 ulp.
#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if)
const boundaries w = compute_boundaries(static_cast<double>(value));
#else
const boundaries w = compute_boundaries(value);
#endif
grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus);
}
|
O2
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jge 0x882c9
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x882e5
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x8849f
movq 0x10(%r12), %rcx
movl 0x18(%r12), %r8d
movups (%r12), %xmm0
movups 0x20(%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x885e7
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x27c9c(%rip), %rdi # 0xaff6c
leaq 0x21f15(%rip), %rdx # 0xaa1ec
leaq 0x2d357(%rip), %rcx # 0xb5635
movl $0x4589, %esi # imm = 0x4589
jmp 0x882ff
leaq 0x27c80(%rip), %rdi # 0xaff6c
leaq 0x21ef9(%rip), %rdx # 0xaa1ec
leaq 0x2d454(%rip), %rcx # 0xb574e
movl $0x458a, %esi # imm = 0x458A
xorl %eax, %eax
callq 0x23ec0
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jge short loc_882C9
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jbe short loc_882E5
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea r12, [rsp+78h+var_50]
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
mov rcx, [r12+10h]
mov r8d, [r12+18h]
movups xmm0, xmmword ptr [r12]
movups xmm1, xmmword ptr [r12+20h]
movups [rsp+78h+var_68], xmm1
movups [rsp+78h+var_78], xmm0
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_882C9:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStdIsfiniteVal; "std::isfinite(value)"
mov esi, 4589h
jmp short loc_882FF
loc_882E5:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aValue0; "value > 0"
mov esi, 458Ah
loc_882FF:
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(
long long a1,
long long a2,
long long a3,
double a4)
{
long long v5; // r9
char *v7; // rsi
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
_QWORD v12[3]; // [rsp+28h] [rbp-50h] BYREF
unsigned int v13; // [rsp+40h] [rbp-38h]
long long v14; // [rsp+48h] [rbp-30h]
long long v15; // [rsp+50h] [rbp-28h]
if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
{
v7 = (_BYTE *)(&stru_4588 + 1);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17801LL,
"GGML_ASSERT(%s) failed",
"std::isfinite(value)");
}
else
{
if ( a4 > 0.0 )
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12);
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
a1,
a2,
a3,
v12[2],
v13,
v5,
v12[0],
v12[1],
v14,
v15);
}
v7 = (_BYTE *)(&stru_4588 + 2);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17802LL,
"GGML_ASSERT(%s) failed",
"value > 0");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v7,
v8,
v9,
v10,
v11);
}
|
grisu2<double>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JGE 0x001882c9
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JBE 0x001882e5
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x0018849f
MOV RCX,qword ptr [R12 + 0x10]
MOV R8D,dword ptr [R12 + 0x18]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS XMM1,xmmword ptr [R12 + 0x20]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001885e7
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001882c9:
LEA RDI,[0x1aff6c]
LEA RDX,[0x1aa1ec]
LEA RCX,[0x1b5635]
MOV ESI,0x4589
JMP 0x001882ff
LAB_001882e5:
LEA RDI,[0x1aff6c]
LEA RDX,[0x1aa1ec]
LEA RCX,[0x1b574e]
MOV ESI,0x458a
LAB_001882ff:
XOR EAX,EAX
CALL 0x00123ec0
|
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>
(char *param_1,int *param_2,int *param_3,double param_4)
{
char *pcVar1;
int8 uVar2;
int8 in_R9;
int4 local_50 [2];
int4 uStack_48;
int8 local_40;
int4 local_38;
int4 local_30;
int4 uStack_28;
if ((ulong)ABS(param_4) < 0x7ff0000000000000) {
if (0.0 < param_4) {
compute_boundaries<double>((dtoa_impl *)local_50,param_4);
grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30,
uStack_28);
return;
}
pcVar1 = "value > 0";
uVar2 = 0x458a;
}
else {
pcVar1 = "std::isfinite(value)";
uVar2 = 0x4589;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar2,
"GGML_ASSERT(%s) failed",pcVar1);
}
|
|
65,445 |
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double)
|
monkey531[P]llama/common/json.hpp
|
JSON_HEDLEY_NON_NULL(1)
void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value)
{
static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3,
"internal error: not enough precision");
JSON_ASSERT(std::isfinite(value));
JSON_ASSERT(value > 0);
// If the neighbors (and boundaries) of 'value' are always computed for double-precision
// numbers, all float's can be recovered using strtod (and strtof). However, the resulting
// decimal representations are not exactly "short".
//
// The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars)
// says "value is converted to a string as if by std::sprintf in the default ("C") locale"
// and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars'
// does.
// On the other hand, the documentation for 'std::to_chars' requires that "parsing the
// representation using the corresponding std::from_chars function recovers value exactly". That
// indicates that single precision floating-point numbers should be recovered using
// 'std::strtof'.
//
// NB: If the neighbors are computed for single-precision numbers, there is a single float
// (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision
// value is off by 1 ulp.
#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if)
const boundaries w = compute_boundaries(static_cast<double>(value));
#else
const boundaries w = compute_boundaries(value);
#endif
grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus);
}
|
O3
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jge 0xb7ed3
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xb7eef
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0xb818c
movq 0x10(%r12), %rcx
movl 0x18(%r12), %r8d
movups (%r12), %xmm0
movups 0x20(%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb82e5
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x340af(%rip), %rdi # 0xebf89
leaq 0x2e33b(%rip), %rdx # 0xe621c
leaq 0x39711(%rip), %rcx # 0xf15f9
movl $0x4589, %esi # imm = 0x4589
jmp 0xb7f09
leaq 0x34093(%rip), %rdi # 0xebf89
leaq 0x2e31f(%rip), %rdx # 0xe621c
leaq 0x3980e(%rip), %rcx # 0xf1712
movl $0x458a, %esi # imm = 0x458A
xorl %eax, %eax
callq 0x1aea0
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jge short loc_B7ED3
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jbe short loc_B7EEF
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea r12, [rsp+78h+var_50]
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
mov rcx, [r12+10h]
mov r8d, [r12+18h]
movups xmm0, xmmword ptr [r12]
movups xmm1, xmmword ptr [r12+20h]
movups [rsp+78h+var_68], xmm1
movups [rsp+78h+var_78], xmm0
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_B7ED3:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStdIsfiniteVal; "std::isfinite(value)"
mov esi, 4589h
jmp short loc_B7F09
loc_B7EEF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aValue0; "value > 0"
mov esi, 458Ah
loc_B7F09:
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(
long long a1,
long long a2,
long long a3,
double a4)
{
long long v5; // r9
char *v7; // rsi
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
_QWORD v12[3]; // [rsp+28h] [rbp-50h] BYREF
unsigned int v13; // [rsp+40h] [rbp-38h]
long long v14; // [rsp+48h] [rbp-30h]
long long v15; // [rsp+50h] [rbp-28h]
if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
{
v7 = (_BYTE *)(&stru_4588 + 1);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17801LL,
"GGML_ASSERT(%s) failed",
"std::isfinite(value)");
}
else
{
if ( a4 > 0.0 )
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12);
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
a1,
a2,
a3,
v12[2],
v13,
v5,
v12[0],
v12[1],
v14,
v15);
}
v7 = (_BYTE *)(&stru_4588 + 2);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17802LL,
"GGML_ASSERT(%s) failed",
"value > 0");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v7,
v8,
v9,
v10,
v11);
}
|
grisu2<double>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JGE 0x001b7ed3
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JBE 0x001b7eef
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x001b818c
MOV RCX,qword ptr [R12 + 0x10]
MOV R8D,dword ptr [R12 + 0x18]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS XMM1,xmmword ptr [R12 + 0x20]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001b82e5
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001b7ed3:
LEA RDI,[0x1ebf89]
LEA RDX,[0x1e621c]
LEA RCX,[0x1f15f9]
MOV ESI,0x4589
JMP 0x001b7f09
LAB_001b7eef:
LEA RDI,[0x1ebf89]
LEA RDX,[0x1e621c]
LEA RCX,[0x1f1712]
MOV ESI,0x458a
LAB_001b7f09:
XOR EAX,EAX
CALL 0x0011aea0
|
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>
(char *param_1,int *param_2,int *param_3,double param_4)
{
char *pcVar1;
int8 uVar2;
int8 in_R9;
int4 local_50 [2];
int4 uStack_48;
int8 local_40;
int4 local_38;
int4 local_30;
int4 uStack_28;
if ((ulong)ABS(param_4) < 0x7ff0000000000000) {
if (0.0 < param_4) {
compute_boundaries<double>((dtoa_impl *)local_50,param_4);
grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30,
uStack_28);
return;
}
pcVar1 = "value > 0";
uVar2 = 0x458a;
}
else {
pcVar1 = "std::isfinite(value)";
uVar2 = 0x4589;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar2,
"GGML_ASSERT(%s) failed",pcVar1);
}
|
|
65,446 |
TransformComponent::fixed_update(Dimension*)
|
untodesu[P]voxelius/game/shared/transform.cc
|
void TransformComponent::fixed_update(Dimension *dimension)
{
auto view = dimension->entities.view<TransformComponent>();
for(auto [entity, transform] : view.each()) {
update_component(0U, transform);
update_component(1U, transform);
update_component(2U, transform);
}
}
|
O2
|
cpp
|
TransformComponent::fixed_update(Dimension*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
addq $0x158, %rdi # imm = 0x158
callq 0x44f0e
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x44f36
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movq %rsp, %rbx
movaps %xmm1, 0x10(%rbx)
movaps %xmm0, (%rbx)
movq 0x38(%r14), %r13
movq 0x18(%rbx), %rax
leaq 0x20(%rsp), %r14
pushq $0x1
popq %rbp
pushq $0x2
popq %r15
cmpq %r13, %rax
je 0x484ae
movq %r14, %rdi
movq %rbx, %rsi
callq 0x44f64
movq 0x20(%rsp), %r12
xorl %edi, %edi
movq %r12, %rsi
callq 0x484bd
movl %ebp, %edi
movq %r12, %rsi
callq 0x484bd
movl %r15d, %edi
movq %r12, %rsi
callq 0x484bd
movq 0x18(%rsp), %rax
decq %rax
movq %rax, 0x18(%rsp)
decq 0x8(%rsp)
jmp 0x48466
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN18TransformComponent12fixed_updateEP9Dimension:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
add rdi, 158h
call _ZN4entt14basic_registryINS_6entityESaIS1_EE4viewI18TransformComponentJEJEEENS_10basic_viewINS_5get_tIJNS_11storage_forIT_S1_SaINSt12remove_constIS9_E4typeEEE4typeEDpNS8_IT0_S1_SaINSA_ISG_E4typeEEE4typeEEEENS_9exclude_tIJDpNS8_IT1_S1_SaINSA_ISP_E4typeEEE4typeEEEEvEENSO_IJDpSP_EEE
lea rsi, [rsp+0A8h+var_78]
mov [rsi], rax
lea r14, [rsp+0A8h+var_70]
mov rdi, r14
call _ZNK4entt10basic_viewINS_5get_tIJNS_16basic_sigh_mixinINS_13basic_storageI18TransformComponentNS_6entityESaIS4_EvEENS_14basic_registryIS5_SaIS5_EEEEEEEENS_9exclude_tIJEEEvE4eachEv; entt::basic_view<entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<TransformComponent,entt::entity,std::allocator<TransformComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::exclude_t<>,void>::each(void)
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
mov rbx, rsp
movaps xmmword ptr [rbx+10h], xmm1
movaps xmmword ptr [rbx], xmm0
mov r13, [r14+38h]
mov rax, [rbx+18h]
lea r14, [rsp+0A8h+var_88]
push 1
pop rbp
push 2
pop r15
loc_48466:
cmp rax, r13
jz short loc_484AE
mov rdi, r14
mov rsi, rbx
call _ZNK4entt8internal25extended_storage_iteratorINS0_19sparse_set_iteratorISt6vectorINS_6entityESaIS4_EEEEJNS0_16storage_iteratorIS3_IP18TransformComponentSaISA_EEEEEEdeEv; entt::internal::extended_storage_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::internal::storage_iterator<std::vector<TransformComponent *>>>::operator*(void)
mov r12, [rsp+0A8h+var_88]
xor edi, edi
mov rsi, r12
call _ZL16update_componentjR18TransformComponent; update_component(uint,TransformComponent &)
mov edi, ebp
mov rsi, r12
call _ZL16update_componentjR18TransformComponent; update_component(uint,TransformComponent &)
mov edi, r15d
mov rsi, r12
call _ZL16update_componentjR18TransformComponent; update_component(uint,TransformComponent &)
mov rax, [rsp+0A8h+var_90]
dec rax
mov [rsp+0A8h+var_90], rax
dec [rsp+0A8h+var_A0]
jmp short loc_48466
loc_484AE:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long TransformComponent::fixed_update(TransformComponent *this, Dimension *a2)
{
long long v2; // r13
long long result; // rax
TransformComponent *v4; // r12
__int128 v5; // [rsp+0h] [rbp-A8h] BYREF
__int128 v6; // [rsp+10h] [rbp-98h]
TransformComponent *v7; // [rsp+20h] [rbp-88h] BYREF
long long v8; // [rsp+30h] [rbp-78h] BYREF
__int128 v9; // [rsp+38h] [rbp-70h] BYREF
__int128 v10; // [rsp+48h] [rbp-60h]
long long v11; // [rsp+70h] [rbp-38h]
v8 = ZN4entt14basic_registryINS_6entityESaIS1_EE4viewI18TransformComponentJEJEEENS_10basic_viewINS_5get_tIJNS_11storage_forIT_S1_SaINSt12remove_constIS9_E4typeEEE4typeEDpNS8_IT0_S1_SaINSA_ISG_E4typeEEE4typeEEEENS_9exclude_tIJDpNS8_IT1_S1_SaINSA_ISP_E4typeEEE4typeEEEEvEENSO_IJDpSP_EEE((long long)this + 344);
entt::basic_view<entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<TransformComponent,entt::entity,std::allocator<TransformComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::exclude_t<>,void>::each(
&v9,
&v8);
v6 = v10;
v5 = v9;
v2 = v11;
result = *((_QWORD *)&v10 + 1);
while ( result != v2 )
{
entt::internal::extended_storage_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::internal::storage_iterator<std::vector<TransformComponent *>>>::operator*(
(long long)&v7,
(long long)&v5);
v4 = v7;
update_component(0, v7);
update_component(1u, v4);
update_component(2u, v4);
result = --*((_QWORD *)&v6 + 1);
--*((_QWORD *)&v5 + 1);
}
return result;
}
|
fixed_update:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
ADD RDI,0x158
CALL 0x00144f0e
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSI],RAX
LEA R14,[RSP + 0x38]
MOV RDI,R14
CALL 0x00144f36
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
MOV RBX,RSP
MOVAPS xmmword ptr [RBX + 0x10],XMM1
MOVAPS xmmword ptr [RBX],XMM0
MOV R13,qword ptr [R14 + 0x38]
MOV RAX,qword ptr [RBX + 0x18]
LEA R14,[RSP + 0x20]
PUSH 0x1
POP RBP
PUSH 0x2
POP R15
LAB_00148466:
CMP RAX,R13
JZ 0x001484ae
MOV RDI,R14
MOV RSI,RBX
CALL 0x00144f64
MOV R12,qword ptr [RSP + 0x20]
XOR EDI,EDI
MOV RSI,R12
CALL 0x001484bd
MOV EDI,EBP
MOV RSI,R12
CALL 0x001484bd
MOV EDI,R15D
MOV RSI,R12
CALL 0x001484bd
MOV RAX,qword ptr [RSP + 0x18]
DEC RAX
MOV qword ptr [RSP + 0x18],RAX
DEC qword ptr [RSP + 0x8]
JMP 0x00148466
LAB_001484ae:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* TransformComponent::fixed_update(Dimension*) */
void TransformComponent::fixed_update(Dimension *param_1)
{
TransformComponent *pTVar1;
TransformComponent *local_88 [2];
int8 local_78;
long lStack_58;
long local_38;
local_78 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
view<TransformComponent>(param_1 + 0x158);
entt::
basic_view<entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<TransformComponent,entt::entity,std::allocator<TransformComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::exclude_t<>,void>
::each();
for (; lStack_58 != local_38; lStack_58 = lStack_58 + -1) {
entt::internal::
extended_storage_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::internal::storage_iterator<std::vector<TransformComponent*,std::allocator<TransformComponent*>>>>
::operator*((extended_storage_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::internal::storage_iterator<std::vector<TransformComponent*,std::allocator<TransformComponent*>>>>
*)local_88);
pTVar1 = local_88[0];
update_component(0,local_88[0]);
update_component(1,pTVar1);
update_component(2,pTVar1);
}
return;
}
|
|
65,447 |
my_mb_wc_gb2312
|
eloqsql/strings/ctype-gb2312.c
|
static int
my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F)))
return -2;
return 2;
}
|
O3
|
c
|
my_mb_wc_gb2312:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb1b58
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0xb1b34
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xb1b58
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x56, %cl
ja 0xb1b58
movzbl 0x1(%rdx), %ecx
leal 0x1(%rcx), %edx
cmpb $-0x5e, %dl
jae 0xb1b59
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
orl %ecx, %eax
andl $0x7f7f, %eax # imm = 0x7F7F
leal -0x2121(%rax), %ecx
cmpl $0x537, %ecx # imm = 0x537
ja 0xb1b84
movl %ecx, %eax
leaq 0x1371be(%rip), %rcx # 0x1e8d40
jmp 0xb1bb2
leal -0x2721(%rax), %ecx
cmpl $0x24e, %ecx # imm = 0x24E
ja 0xb1b9d
movl %ecx, %eax
leaq 0x137c15(%rip), %rcx # 0x1e97b0
jmp 0xb1bb2
addl $0xffffcfdf, %eax # imm = 0xFFFFCFDF
cmpl $0x475e, %eax # imm = 0x475E
jae 0xb1bcb
movl %eax, %eax
leaq 0x13809e(%rip), %rcx # 0x1e9c50
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0xb1bd7
jmp 0xb1bd2
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
|
my_mb_wc_gb2312:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_B1B58
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_B1B34
mov [rsi], rdi
mov eax, 1
retn
loc_B1B34:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_B1B58
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 56h ; 'V'
ja short locret_B1B58
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+1]
cmp dl, 0A2h
jnb short loc_B1B59
locret_B1B58:
retn
loc_B1B59:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
or eax, ecx
and eax, 7F7Fh
lea ecx, [rax-2121h]
cmp ecx, 537h
ja short loc_B1B84
mov eax, ecx
lea rcx, tab_gb2312_uni0
jmp short loc_B1BB2
loc_B1B84:
lea ecx, [rax-2721h]
cmp ecx, 24Eh
ja short loc_B1B9D
mov eax, ecx
lea rcx, tab_gb2312_uni1
jmp short loc_B1BB2
loc_B1B9D:
add eax, 0FFFFCFDFh
cmp eax, 475Eh
jnb short loc_B1BCB
mov eax, eax
lea rcx, tab_gb2312_uni2
loc_B1BB2:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_B1BD7
jmp short loc_B1BD2
loc_B1BCB:
mov qword ptr [rsi], 0
loc_B1BD2:
mov eax, 0FFFFFFFEh
loc_B1BD7:
pop rbp
retn
|
long long my_mb_wc_gb2312(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
unsigned __int16 v6; // cx
int v7; // eax
long long v8; // rax
unsigned __int16 *v9; // rcx
long long v10; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x56u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u )
{
v7 = (v6 | (unsigned __int16)((unsigned __int8)v5 << 8)) & 0x7F7F;
if ( (unsigned int)(v7 - 8481) > 0x537 )
{
if ( (unsigned int)(v7 - 10017) > 0x24E )
{
LODWORD(v8) = v7 - 12321;
if ( (unsigned int)v8 >= 0x475E )
{
*a2 = 0LL;
return 4294967294LL;
}
v8 = (unsigned int)v8;
v9 = (unsigned __int16 *)&tab_gb2312_uni2;
}
else
{
v8 = (unsigned int)(v7 - 10017);
v9 = (unsigned __int16 *)&tab_gb2312_uni1;
}
}
else
{
v8 = (unsigned int)(v7 - 8481);
v9 = (unsigned __int16 *)&tab_gb2312_uni0;
}
v10 = v9[v8];
*a2 = v10;
result = 2LL;
if ( (_WORD)v10 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
|
my_mb_wc_gb2312:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b1b58
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001b1b34
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001b1b34:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001b1b58
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x56
JA 0x001b1b58
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x1]
CMP DL,0xa2
JNC 0x001b1b59
LAB_001b1b58:
RET
LAB_001b1b59:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
OR EAX,ECX
AND EAX,0x7f7f
LEA ECX,[RAX + -0x2121]
CMP ECX,0x537
JA 0x001b1b84
MOV EAX,ECX
LEA RCX,[0x2e8d40]
JMP 0x001b1bb2
LAB_001b1b84:
LEA ECX,[RAX + -0x2721]
CMP ECX,0x24e
JA 0x001b1b9d
MOV EAX,ECX
LEA RCX,[0x2e97b0]
JMP 0x001b1bb2
LAB_001b1b9d:
ADD EAX,0xffffcfdf
CMP EAX,0x475e
JNC 0x001b1bcb
MOV EAX,EAX
LEA RCX,[0x2e9c50]
LAB_001b1bb2:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x001b1bd7
JMP 0x001b1bd2
LAB_001b1bcb:
MOV qword ptr [RSI],0x0
LAB_001b1bd2:
MOV EAX,0xfffffffe
LAB_001b1bd7:
POP RBP
RET
|
int8 my_mb_wc_gb2312(int8 param_1,ulong *param_2,char *param_3,char *param_4)
{
char cVar1;
ushort uVar2;
uint uVar3;
ulong uVar4;
int1 *puVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
cVar1 = *param_3;
if (-1 < (long)cVar1) {
*param_2 = (long)cVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(cVar1 + 0x5fU) < 0x57) {
if ((byte)(param_3[1] + 1U) < 0xa2) {
return 0;
}
uVar3 = CONCAT11(cVar1,param_3[1]) & 0x7f7f;
if (uVar3 - 0x2121 < 0x538) {
uVar4 = (ulong)(uVar3 - 0x2121);
puVar5 = tab_gb2312_uni0;
}
else if (uVar3 - 0x2721 < 0x24f) {
uVar4 = (ulong)(uVar3 - 0x2721);
puVar5 = tab_gb2312_uni1;
}
else {
if (0x475d < uVar3 - 0x3021) {
*param_2 = 0;
return 0xfffffffe;
}
uVar4 = (ulong)(uVar3 - 0x3021);
puVar5 = tab_gb2312_uni2;
}
uVar2 = *(ushort *)(puVar5 + uVar4 * 2);
*param_2 = (ulong)uVar2;
if (uVar2 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
|
|
65,448 |
my_uca_copy_page
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_copy_page(MY_CHARSET_LOADER *loader,
const MY_UCA_WEIGHT_LEVEL *src,
MY_UCA_WEIGHT_LEVEL *dst,
size_t page)
{
uint chc, size= 256 * dst->lengths[page] * sizeof(uint16);
if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size)))
return TRUE;
DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]);
memset(dst->weights[page], 0, size);
for (chc=0 ; chc < 256; chc++)
{
memcpy(dst->weights[page] + chc * dst->lengths[page],
src->weights[page] + chc * src->lengths[page],
src->lengths[page] * sizeof(uint16));
}
return FALSE;
}
|
O0
|
c
|
my_uca_copy_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
cltq
shlq %rax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %edi
callq *%rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x28(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x50774
movb $0x1, -0x1(%rbp)
jmp 0x50830
jmp 0x50776
jmp 0x50778
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x30(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x24190
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp) # imm = 0x100
jae 0x5082c
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
shlq %rdx
callq 0x24230
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5079b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_uca_copy_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
shl eax, 8
cdqe
shl rax, 1
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_30]
mov edi, ecx
call rax
mov rcx, [rbp+var_20]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_28]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_50774
mov [rbp+var_1], 1
jmp loc_50830
loc_50774:
jmp short $+2
loc_50776:
jmp short $+2
loc_50778:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_30]
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_2C], 0
loc_5079B:
cmp [rbp+var_2C], 100h
jnb loc_5082C
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_20]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rdi, rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rsi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rsi, rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
mov edx, eax
shl rdx, 1
call _memcpy
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_5079B
loc_5082C:
mov [rbp+var_1], 0
loc_50830:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
unsigned int v6; // [rsp+0h] [rbp-30h]
unsigned int i; // [rsp+4h] [rbp-2Ch]
v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9;
v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6);
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6);
for ( i = 0; i < 0x100; ++i )
memcpy(
2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4));
return 0;
}
|
my_uca_copy_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
CDQE
SHL RAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x30]
MOV EDI,ECX
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x00150774
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00150830
LAB_00150774:
JMP 0x00150776
LAB_00150776:
JMP 0x00150778
LAB_00150778:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00124190
MOV dword ptr [RBP + -0x2c],0x0
LAB_0015079b:
CMP dword ptr [RBP + -0x2c],0x100
JNC 0x0015082c
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x00124230
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015079b
LAB_0015082c:
MOV byte ptr [RBP + -0x1],0x0
LAB_00150830:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4)
{
size_t __n;
long lVar1;
int4 local_34;
int1 local_9;
__n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1;
lVar1 = (**(code **)(param_1 + 0x80))(__n);
*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1;
if (lVar1 == 0) {
local_9 = 1;
}
else {
memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n);
for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) {
memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2),
(void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2),
(ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1);
}
local_9 = 0;
}
return local_9;
}
|
|
65,449 |
SET_header
|
xtate/src/probe-modules/http-state-probe.c
|
static ConfRes SET_header(void *conf, const char *name, const char *value) {
UNUSEDPARM(conf);
char *newname;
char *newvalue;
unsigned name_length;
size_t value_length;
/*
* allocate a new name
*/
name += 6;
if (*name == '[') {
/* Specified as: "--header[name] value" */
while (ispunct(*name))
name++;
name_length = (unsigned)strlen(name);
while (name_length && ispunct(name[name_length - 1]))
name_length--;
newname = MALLOC(name_length + 1);
memcpy(newname, name, name_length + 1);
newname[name_length] = '\0';
} else if (strchr(value, ':')) {
/* Specified as: "--header Name:value" */
name_length = conf_index_of(value, ':');
newname = MALLOC(name_length + 1);
memcpy(newname, value, name_length + 1);
/* Trim the value */
value = value + name_length + 1;
while (*value && isspace(*value & 0xFF))
value++;
/* Trim the name */
while (name_length && isspace(newname[name_length - 1] & 0xFF))
name_length--;
newname[name_length] = '\0';
} else {
LOG(LEVEL_ERROR, "--header needs both a name and value\n");
LOG(LEVEL_HINT, "specify it like \"--header Name:value\"\n");
return Conf_ERR;
}
/* allocate new value */
value_length = strlen(value);
newvalue = MALLOC(value_length + 1);
memcpy(newvalue, value, value_length + 1);
newvalue[value_length] = '\0';
/* Add to our list of headers */
if (httpstate_conf.headers_count < ARRAY_SIZE(httpstate_conf.headers)) {
size_t x = httpstate_conf.headers_count;
httpstate_conf.headers[x].name = newname;
httpstate_conf.headers[x].value = newvalue;
httpstate_conf.headers[x].value_length = value_length;
httpstate_conf.headers_count++;
}
return Conf_OK;
}
|
O3
|
c
|
SET_header:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
cmpb $0x5b, 0x6(%rsi)
jne 0x291cb
movq %rsi, %r14
callq 0x15150
movq (%rax), %r12
addq $0x4, %r14
movsbq 0x2(%r14), %rax
incq %r14
testb $0x4, (%r12,%rax,2)
jne 0x29161
leaq 0x1(%r14), %r15
movq %r15, %rdi
callq 0x15470
movl %eax, %ecx
addq %rcx, %r14
xorl %r13d, %r13d
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x291a3
movsbq (%r14), %rsi
incq %rdx
decq %r14
testb $0x4, (%r12,%rsi,2)
jne 0x29186
subl %edx, %eax
incl %eax
movl %eax, %r13d
leal 0x1(%r13), %r12d
movq %r12, %rdi
callq 0x50885
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x150c0
movl %r13d, %eax
addq %r14, %rax
jmp 0x29261
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x15590
testq %rax, %rax
je 0x292ce
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x52dfc
movl %eax, %r15d
leal 0x1(%r15), %r12d
movq %r12, %rdi
callq 0x50885
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x150c0
movl %r15d, %r15d
leaq (%r15,%rbx), %rax
incq %rax
movq %rax, %rbx
movzbl (%rax), %r12d
testq %r12, %r12
je 0x2924f
callq 0x15150
movq (%rax), %rcx
leaq 0x1(%rbx), %rax
testb $0x20, 0x1(%rcx,%r12,2)
jne 0x29218
jmp 0x2924f
callq 0x15150
movq (%rax), %rax
movzbl -0x1(%r14,%r12), %ecx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x29258
movq %r15, %r12
subq $0x1, %r15
jae 0x2923a
movl %r12d, %ecx
movq %r14, %rax
addq %rcx, %rax
xorl %ebp, %ebp
movb %bpl, (%rax)
movq %rbx, %rdi
callq 0x15470
movq %rax, %r15
leaq 0x1(%rax), %r13
movq %r13, %rdi
callq 0x50885
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x150c0
movb %bpl, (%r12,%r15)
movq 0x17a8d7(%rip), %rax # 0x1a3b70
cmpq $0xf, %rax
ja 0x292f9
leaq (%rax,%rax,2), %rcx
leaq 0x17a6c6(%rip), %rdx # 0x1a3970
movq %r14, 0x80(%rdx,%rcx,8)
movq %r12, 0x88(%rdx,%rcx,8)
movq %r15, 0x90(%rdx,%rcx,8)
incq %rax
movq %rax, 0x17a8a4(%rip) # 0x1a3b70
jmp 0x292f9
leaq 0x3cd8f(%rip), %rsi # 0x66064
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x536da
leaq 0x3cda2(%rip), %rsi # 0x6608a
movl $0xfffffffe, %edi # imm = 0xFFFFFFFE
xorl %eax, %eax
callq 0x536da
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
SET_header_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
cmp byte ptr [rsi+6], 5Bh ; '['
jnz short loc_291CB
mov r14, rsi
call ___ctype_b_loc
mov r12, [rax]
add r14, 4
loc_29161:
movsx rax, byte ptr [r14+2]
inc r14
test byte ptr [r12+rax*2], 4
jnz short loc_29161
lea r15, [r14+1]
mov rdi, r15
call _strlen
mov ecx, eax
add r14, rcx
xor r13d, r13d
xor edx, edx
loc_29186:
cmp rcx, rdx
jz short loc_291A3
movsx rsi, byte ptr [r14]
inc rdx
dec r14
test byte ptr [r12+rsi*2], 4
jnz short loc_29186
sub eax, edx
inc eax
mov r13d, eax
loc_291A3:
lea r12d, [r13+1]
mov rdi, r12
call MALLOC
mov r14, rax
mov rdi, rax
mov rsi, r15
mov rdx, r12
call _memcpy
mov eax, r13d
add rax, r14
jmp loc_29261
loc_291CB:
mov rdi, rbx
mov esi, 3Ah ; ':'
call _strchr
test rax, rax
jz loc_292CE
mov rdi, rbx
mov esi, 3Ah ; ':'
call conf_index_of
mov r15d, eax
lea r12d, [r15+1]
mov rdi, r12
call MALLOC
mov r14, rax
mov rdi, rax
mov rsi, rbx
mov rdx, r12
call _memcpy
mov r15d, r15d
lea rax, [r15+rbx]
inc rax
loc_29218:
mov rbx, rax
movzx r12d, byte ptr [rax]
test r12, r12
jz short loc_2924F
call ___ctype_b_loc
mov rcx, [rax]
lea rax, [rbx+1]
test byte ptr [rcx+r12*2+1], 20h
jnz short loc_29218
jmp short loc_2924F
loc_2923A:
call ___ctype_b_loc
mov rax, [rax]
movzx ecx, byte ptr [r14+r12-1]
test byte ptr [rax+rcx*2+1], 20h
jz short loc_29258
loc_2924F:
mov r12, r15
sub r15, 1
jnb short loc_2923A
loc_29258:
mov ecx, r12d
mov rax, r14
add rax, rcx
loc_29261:
xor ebp, ebp
mov [rax], bpl
mov rdi, rbx
call _strlen
mov r15, rax
lea r13, [rax+1]
mov rdi, r13
call MALLOC
mov r12, rax
mov rdi, rax
mov rsi, rbx
mov rdx, r13
call _memcpy
mov [r12+r15], bpl
mov rax, cs:qword_1A3B70
cmp rax, 0Fh
ja short loc_292F9
lea rcx, [rax+rax*2]
lea rdx, httpstate_conf
mov [rdx+rcx*8+80h], r14
mov [rdx+rcx*8+88h], r12
mov [rdx+rcx*8+90h], r15
inc rax
mov cs:qword_1A3B70, rax
jmp short loc_292F9
loc_292CE:
lea rsi, aHeaderNeedsBot; "--header needs both a name and value\n"
mov edi, 0FFFFFFFFh
xor eax, eax
call LOG
lea rsi, aSpecifyItLikeH; "specify it like \"--header Name:value\""...
mov edi, 0FFFFFFFEh
xor eax, eax
call LOG
mov ebp, 1
loc_292F9:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long SET_header_0(long long a1, long long a2, const char *a3, long long a4, long long a5)
{
const char *v5; // rbx
long long v6; // r12
long long v7; // r14
long long v8; // rax
long long v9; // r15
unsigned int v10; // eax
char *v11; // r14
unsigned int v12; // r13d
long long v13; // rdx
long long v14; // rsi
long long v15; // r14
_BYTE *v16; // rax
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
const char *v21; // rsi
long long v22; // rdx
long long v23; // rcx
long long v24; // r8
long long v25; // r15
const char *v26; // rax
long long v27; // r12
_QWORD *v28; // rax
long long v29; // r12
unsigned int v31; // ebp
long long v32; // r15
long long v33; // r12
long long v34; // rax
long long v35; // rcx
int v36; // edx
int v37; // ecx
int v38; // r8d
int v39; // r9d
v5 = a3;
if ( *(_BYTE *)(a2 + 6) == 91 )
{
v6 = *(_QWORD *)__ctype_b_loc(a1, a2, a3, a4, a5);
v7 = a2 + 4;
do
{
v8 = *(char *)(v7 + 2);
++v7;
}
while ( (*(_BYTE *)(v6 + 2 * v8) & 4) != 0 );
v9 = v7 + 1;
v10 = strlen(v7 + 1);
v11 = (char *)(v10 + v7);
v12 = 0;
v13 = 0LL;
while ( v10 != v13 )
{
v14 = *v11;
++v13;
--v11;
if ( (*(_BYTE *)(v6 + 2 * v14) & 4) == 0 )
{
v12 = v10 - v13 + 1;
break;
}
}
v15 = MALLOC(v12 + 1);
memcpy(v15, v9, v12 + 1);
v16 = (_BYTE *)(v15 + v12);
}
else
{
if ( !strchr(a3, 58LL) )
{
LOG(-1, (unsigned int)"--header needs both a name and value\n", v17, v18, v19, v20);
LOG(-2, (unsigned int)"specify it like \"--header Name:value\"\n", v36, v37, v38, v39);
return 1;
}
LODWORD(v25) = conf_index_of(v5, 58LL);
v15 = MALLOC((unsigned int)(v25 + 1));
v21 = v5;
memcpy(v15, v5, (unsigned int)(v25 + 1));
v25 = (unsigned int)v25;
v26 = &v5[(unsigned int)v25 + 1];
do
{
v5 = v26;
v27 = *(unsigned __int8 *)v26;
if ( !*v26 )
break;
v23 = *(_QWORD *)__ctype_b_loc(v15, v21, v22, v23, v24);
v26 = v5 + 1;
}
while ( (*(_BYTE *)(v23 + 2 * v27 + 1) & 0x20) != 0 );
do
{
v29 = v25;
if ( v25-- == 0 )
break;
v28 = (_QWORD *)__ctype_b_loc(v15, v21, v22, v23, v24);
v23 = *(unsigned __int8 *)(v15 + v29 - 1);
}
while ( (*(_BYTE *)(*v28 + 2 * v23 + 1) & 0x20) != 0 );
v16 = (_BYTE *)((unsigned int)v29 + v15);
}
v31 = 0;
*v16 = 0;
v32 = strlen(v5);
v33 = MALLOC(v32 + 1);
memcpy(v33, v5, v32 + 1);
*(_BYTE *)(v33 + v32) = 0;
v34 = qword_1A3B70;
if ( (unsigned long long)qword_1A3B70 <= 0xF )
{
v35 = 3 * qword_1A3B70;
httpstate_conf[v35 + 16] = v15;
httpstate_conf[v35 + 17] = v33;
httpstate_conf[v35 + 18] = v32;
qword_1A3B70 = v34 + 1;
}
return v31;
}
|
SET_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
CMP byte ptr [RSI + 0x6],0x5b
JNZ 0x001291cb
MOV R14,RSI
CALL 0x00115150
MOV R12,qword ptr [RAX]
ADD R14,0x4
LAB_00129161:
MOVSX RAX,byte ptr [R14 + 0x2]
INC R14
TEST byte ptr [R12 + RAX*0x2],0x4
JNZ 0x00129161
LEA R15,[R14 + 0x1]
MOV RDI,R15
CALL 0x00115470
MOV ECX,EAX
ADD R14,RCX
XOR R13D,R13D
XOR EDX,EDX
LAB_00129186:
CMP RCX,RDX
JZ 0x001291a3
MOVSX RSI,byte ptr [R14]
INC RDX
DEC R14
TEST byte ptr [R12 + RSI*0x2],0x4
JNZ 0x00129186
SUB EAX,EDX
INC EAX
MOV R13D,EAX
LAB_001291a3:
LEA R12D,[R13 + 0x1]
MOV RDI,R12
CALL 0x00150885
MOV R14,RAX
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R12
CALL 0x001150c0
MOV EAX,R13D
ADD RAX,R14
JMP 0x00129261
LAB_001291cb:
MOV RDI,RBX
MOV ESI,0x3a
CALL 0x00115590
TEST RAX,RAX
JZ 0x001292ce
MOV RDI,RBX
MOV ESI,0x3a
CALL 0x00152dfc
MOV R15D,EAX
LEA R12D,[R15 + 0x1]
MOV RDI,R12
CALL 0x00150885
MOV R14,RAX
MOV RDI,RAX
MOV RSI,RBX
MOV RDX,R12
CALL 0x001150c0
MOV R15D,R15D
LEA RAX,[R15 + RBX*0x1]
INC RAX
LAB_00129218:
MOV RBX,RAX
MOVZX R12D,byte ptr [RAX]
TEST R12,R12
JZ 0x0012924f
CALL 0x00115150
MOV RCX,qword ptr [RAX]
LEA RAX,[RBX + 0x1]
TEST byte ptr [RCX + R12*0x2 + 0x1],0x20
JNZ 0x00129218
JMP 0x0012924f
LAB_0012923a:
CALL 0x00115150
MOV RAX,qword ptr [RAX]
MOVZX ECX,byte ptr [R14 + R12*0x1 + -0x1]
TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20
JZ 0x00129258
LAB_0012924f:
MOV R12,R15
SUB R15,0x1
JNC 0x0012923a
LAB_00129258:
MOV ECX,R12D
MOV RAX,R14
ADD RAX,RCX
LAB_00129261:
XOR EBP,EBP
MOV byte ptr [RAX],BPL
MOV RDI,RBX
CALL 0x00115470
MOV R15,RAX
LEA R13,[RAX + 0x1]
MOV RDI,R13
CALL 0x00150885
MOV R12,RAX
MOV RDI,RAX
MOV RSI,RBX
MOV RDX,R13
CALL 0x001150c0
MOV byte ptr [R12 + R15*0x1],BPL
MOV RAX,qword ptr [0x002a3b70]
CMP RAX,0xf
JA 0x001292f9
LEA RCX,[RAX + RAX*0x2]
LEA RDX,[0x2a3970]
MOV qword ptr [RDX + RCX*0x8 + 0x80],R14
MOV qword ptr [RDX + RCX*0x8 + 0x88],R12
MOV qword ptr [RDX + RCX*0x8 + 0x90],R15
INC RAX
MOV qword ptr [0x002a3b70],RAX
JMP 0x001292f9
LAB_001292ce:
LEA RSI,[0x166064]
MOV EDI,0xffffffff
XOR EAX,EAX
CALL 0x001536da
LEA RSI,[0x16608a]
MOV EDI,0xfffffffe
XOR EAX,EAX
CALL 0x001536da
MOV EBP,0x1
LAB_001292f9:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 SET_header(int8 param_1,long param_2,byte *param_3)
{
char cVar1;
byte bVar2;
ushort *puVar3;
long lVar4;
uint uVar5;
ushort **ppuVar6;
size_t sVar7;
void *__dest;
int1 *puVar8;
void *__dest_00;
ulong uVar9;
long lVar10;
char *pcVar11;
ulong uVar12;
if (*(char *)(param_2 + 6) == '[') {
ppuVar6 = __ctype_b_loc();
puVar3 = *ppuVar6;
lVar4 = param_2 + 4;
do {
lVar10 = lVar4;
lVar4 = lVar10 + 1;
} while ((puVar3[*(char *)(lVar10 + 2)] & 4) != 0);
sVar7 = strlen((char *)(lVar10 + 2));
pcVar11 = (char *)(lVar10 + 1 + (sVar7 & 0xffffffff));
uVar5 = 0;
uVar9 = 0;
do {
if ((sVar7 & 0xffffffff) == uVar9) goto LAB_001291a3;
cVar1 = *pcVar11;
uVar9 = uVar9 + 1;
pcVar11 = pcVar11 + -1;
} while ((puVar3[cVar1] & 4) != 0);
uVar5 = ((int)sVar7 - (int)uVar9) + 1;
LAB_001291a3:
__dest = (void *)MALLOC((ulong)(uVar5 + 1));
memcpy(__dest,(char *)(lVar10 + 2),(ulong)(uVar5 + 1));
puVar8 = (int1 *)((ulong)uVar5 + (long)__dest);
}
else {
pcVar11 = strchr((char *)param_3,0x3a);
if (pcVar11 == (char *)0x0) {
LOG(0xffffffff,"--header needs both a name and value\n");
LOG(0xfffffffe,"specify it like \"--header Name:value\"\n");
return 1;
}
uVar5 = conf_index_of(param_3,0x3a);
__dest = (void *)MALLOC((ulong)(uVar5 + 1));
memcpy(__dest,param_3,(ulong)(uVar5 + 1));
uVar9 = (ulong)uVar5;
param_3 = param_3 + uVar9;
do {
param_3 = param_3 + 1;
bVar2 = *param_3;
if ((ulong)bVar2 == 0) break;
ppuVar6 = __ctype_b_loc();
} while ((*(byte *)((long)*ppuVar6 + (ulong)bVar2 * 2 + 1) & 0x20) != 0);
do {
uVar12 = uVar9;
if (uVar12 == 0) break;
ppuVar6 = __ctype_b_loc();
uVar9 = uVar12 - 1;
} while ((*(byte *)((long)*ppuVar6 + (ulong)*(byte *)((long)__dest + (uVar12 - 1)) * 2 + 1) &
0x20) != 0);
puVar8 = (int1 *)((long)__dest + (uVar12 & 0xffffffff));
}
*puVar8 = 0;
sVar7 = strlen((char *)param_3);
__dest_00 = (void *)MALLOC(sVar7 + 1);
memcpy(__dest_00,param_3,sVar7 + 1);
*(int1 *)((long)__dest_00 + sVar7) = 0;
if (DAT_002a3b70 < 0x10) {
(&DAT_002a39f0)[DAT_002a3b70 * 3] = __dest;
(&DAT_002a39f8)[DAT_002a3b70 * 3] = __dest_00;
(&DAT_002a3a00)[DAT_002a3b70 * 3] = sVar7;
DAT_002a3b70 = DAT_002a3b70 + 1;
}
return 0;
}
|
|
65,450 |
my_wc_mb_sjis
|
eloqsql/strings/ctype-sjis.c
|
static int
my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */
{
/*
This branch is for performance purposes on ASCII range,
to avoid using unicode_to_cp932[]: about 10% improvement.
*/
if (wc == 0x5c)
{
/*
Special case when converting from Unicode to SJIS:
U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS
*/
code= MB2(0x815F);
goto mb;
}
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= (uchar) wc; /* ASCII */
return 1;
}
if (wc > 0xFFFF ||
!(code= unicode_to_sjis[wc])) /* Bad Unicode code point */
return MY_CS_ILUNI;
if (code <= 0xFF)
{
/* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= code;
return 1;
}
mb:
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, code); /* JIS-X-0208 */
return 2;
}
|
O0
|
c
|
my_wc_mb_sjis:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jge 0x46820
cmpq $0x5c, -0x18(%rbp)
jne 0x467f2
movl $0x815f, -0x2c(%rbp) # imm = 0x815F
jmp 0x4687c
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x46808
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x468b9
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x468b9
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0x46841
movq -0x18(%rbp), %rcx
leaq 0x25110b(%rip), %rax # 0x297940
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x4684a
movl $0x0, -0x4(%rbp)
jmp 0x468b9
cmpl $0xff, -0x2c(%rbp)
jg 0x4687a
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x46866
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x468b9
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x468b9
jmp 0x4687c
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x46893
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x468b9
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
|
my_wc_mb_sjis:
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_18]
cmp eax, 80h
jge short loc_46820
cmp [rbp+var_18], 5Ch ; '\'
jnz short loc_467F2
mov [rbp+var_2C], 815Fh
jmp loc_4687C
loc_467F2:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_46808
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_468B9
loc_46808:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_468B9
loc_46820:
cmp [rbp+var_18], 0FFFFh
ja short loc_46841
mov rcx, [rbp+var_18]
lea rax, unicode_to_sjis
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_4684A
loc_46841:
mov [rbp+var_4], 0
jmp short loc_468B9
loc_4684A:
cmp [rbp+var_2C], 0FFh
jg short loc_4687A
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_46866
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_468B9
loc_46866:
mov eax, [rbp+var_2C]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_468B9
loc_4687A:
jmp short $+2
loc_4687C:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_46893
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_468B9
loc_46893:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_468B9:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
__int16 v5; // [rsp+0h] [rbp-2Ch]
if ( (int)a2 >= 128 )
{
if ( a2 > 0xFFFF || (v5 = unicode_to_sjis[a2]) == 0 )
return 0;
if ( unicode_to_sjis[a2] > 0xFFu )
goto LABEL_14;
if ( (unsigned long long)a3 < a4 )
{
*a3 = v5;
return 1;
}
else
{
return (unsigned int)-101;
}
}
else
{
if ( a2 == 92 )
{
v5 = -32417;
LABEL_14:
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = HIBYTE(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
}
|
my_wc_mb_sjis:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JGE 0x00146820
CMP qword ptr [RBP + -0x18],0x5c
JNZ 0x001467f2
MOV dword ptr [RBP + -0x2c],0x815f
JMP 0x0014687c
LAB_001467f2:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00146808
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001468b9
LAB_00146808:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001468b9
LAB_00146820:
CMP qword ptr [RBP + -0x18],0xffff
JA 0x00146841
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x397940]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0014684a
LAB_00146841:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001468b9
LAB_0014684a:
CMP dword ptr [RBP + -0x2c],0xff
JG 0x0014687a
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00146866
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001468b9
LAB_00146866:
MOV EAX,dword ptr [RBP + -0x2c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001468b9
LAB_0014687a:
JMP 0x0014687c
LAB_0014687c:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00146893
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001468b9
LAB_00146893:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_001468b9:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_sjis(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
ushort local_34;
int4 local_c;
if ((int)param_2 < 0x80) {
if (param_2 != 0x5c) {
if (param_4 <= param_3) {
return 0xffffff9b;
}
*param_3 = (char)param_2;
return 1;
}
local_34 = 0x815f;
}
else {
if ((0xffff < param_2) || (local_34 = *(ushort *)(unicode_to_sjis + param_2 * 2), local_34 == 0)
) {
return 0;
}
if (local_34 < 0x100) {
if (param_4 <= param_3) {
return 0xffffff9b;
}
*param_3 = (char)local_34;
return 1;
}
}
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)(local_34 >> 8);
param_3[1] = (char)local_34;
local_c = 2;
}
return local_c;
}
|
|
65,451 |
my_wc_mb_sjis
|
eloqsql/strings/ctype-sjis.c
|
static int
my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */
{
/*
This branch is for performance purposes on ASCII range,
to avoid using unicode_to_cp932[]: about 10% improvement.
*/
if (wc == 0x5c)
{
/*
Special case when converting from Unicode to SJIS:
U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS
*/
code= MB2(0x815F);
goto mb;
}
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= (uchar) wc; /* ASCII */
return 1;
}
if (wc > 0xFFFF ||
!(code= unicode_to_sjis[wc])) /* Bad Unicode code point */
return MY_CS_ILUNI;
if (code <= 0xFF)
{
/* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= code;
return 1;
}
mb:
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, code); /* JIS-X-0208 */
return 2;
}
|
O3
|
c
|
my_wc_mb_sjis:
pushq %rbp
movq %rsp, %rbp
cmpl $0x7f, %esi
jg 0x39a5a
movl $0x815f, %edi # imm = 0x815F
cmpq $0x5c, %rsi
je 0x39a90
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x39aaa
movb %sil, (%rdx)
jmp 0x39a89
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x39aaa
leaq 0x188b14(%rip), %rdi # 0x1c2580
movzwl (%rdi,%rsi,2), %edi
testl %edi, %edi
je 0x39aaa
cmpl $0xff, %edi
ja 0x39a90
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x39aaa
movb %dil, (%rdx)
movl $0x1, %eax
jmp 0x39aaa
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x39aaa
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
popq %rbp
retq
|
my_wc_mb_sjis:
push rbp
mov rbp, rsp
cmp esi, 7Fh
jg short loc_39A5A
mov edi, 815Fh
cmp rsi, 5Ch ; '\'
jz short loc_39A90
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_39AAA
mov [rdx], sil
jmp short loc_39A89
loc_39A5A:
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_39AAA
lea rdi, unicode_to_sjis
movzx edi, word ptr [rdi+rsi*2]
test edi, edi
jz short loc_39AAA
cmp edi, 0FFh
ja short loc_39A90
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_39AAA
mov [rdx], dil
loc_39A89:
mov eax, 1
jmp short loc_39AAA
loc_39A90:
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short loc_39AAA
rol di, 8
mov [rdx], di
mov eax, 2
loc_39AAA:
pop rbp
retn
|
long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
unsigned int v4; // edi
long long result; // rax
if ( (int)a2 <= 127 )
{
LOWORD(v4) = -32417;
if ( a2 != 92 )
{
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
*a3 = a2;
return 1LL;
}
LABEL_11:
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*(_WORD *)a3 = __ROL2__(v4, 8);
return 2LL;
}
return result;
}
result = 0LL;
if ( a2 <= 0xFFFF )
{
v4 = unicode_to_sjis[a2];
if ( unicode_to_sjis[a2] )
{
if ( v4 <= 0xFF )
{
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
*a3 = v4;
return 1LL;
}
goto LABEL_11;
}
}
return result;
}
|
my_wc_mb_sjis:
PUSH RBP
MOV RBP,RSP
CMP ESI,0x7f
JG 0x00139a5a
MOV EDI,0x815f
CMP RSI,0x5c
JZ 0x00139a90
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00139aaa
MOV byte ptr [RDX],SIL
JMP 0x00139a89
LAB_00139a5a:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00139aaa
LEA RDI,[0x2c2580]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST EDI,EDI
JZ 0x00139aaa
CMP EDI,0xff
JA 0x00139a90
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00139aaa
MOV byte ptr [RDX],DIL
LAB_00139a89:
MOV EAX,0x1
JMP 0x00139aaa
LAB_00139a90:
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x00139aaa
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_00139aaa:
POP RBP
RET
|
int8 my_wc_mb_sjis(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
if ((int)param_2 < 0x80) {
uVar1 = 0x815f;
if (param_2 == 0x5c) {
LAB_00139a90:
if (param_4 < param_3 + 1) {
return 0xffffff9a;
}
*param_3 = uVar1 << 8 | uVar1 >> 8;
return 2;
}
if (param_4 <= param_3) {
return 0xffffff9b;
}
*(char *)param_3 = (char)param_2;
}
else {
if (0xffff < param_2) {
return 0;
}
uVar1 = *(ushort *)(unicode_to_sjis + param_2 * 2);
if (uVar1 == 0) {
return 0;
}
if (0xff < uVar1) goto LAB_00139a90;
if (param_4 <= param_3) {
return 0xffffff9b;
}
*(char *)param_3 = (char)uVar1;
}
return 1;
}
|
|
65,452 |
my_coll_parser_scan_reset_sequence
|
eloqsql/strings/ctype-uca.c
|
static int
my_coll_parser_scan_reset_sequence(MY_COLL_RULE_PARSER *p)
{
my_coll_rule_reset(&p->rule);
/* Scan "[before x]" option, if exists */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION)
my_coll_parser_scan_reset_before(p);
/* Try logical reset position */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION)
{
if (!my_coll_parser_scan_logical_position(p, p->rule.base, 1))
return 0;
}
else
{
/* Scan single reset character or expansion */
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION, "Expansion"))
return 0;
}
return 1;
}
|
O0
|
c
|
my_coll_parser_scan_reset_sequence:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x5f150
movq -0x10(%rbp), %rdi
callq 0x5e650
cmpl $0x7, (%rax)
jne 0x5eeb0
movq -0x10(%rbp), %rdi
callq 0x5f180
movq -0x10(%rbp), %rdi
callq 0x5e650
cmpl $0x7, (%rax)
jne 0x5eee4
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0x1, %edx
callq 0x5f2f0
cmpl $0x0, %eax
jne 0x5eee2
movl $0x0, -0x4(%rbp)
jmp 0x5ef18
jmp 0x5ef11
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0xa, %edx
leaq 0x2d98b(%rip), %rcx # 0x8c887
callq 0x5f610
cmpl $0x0, %eax
jne 0x5ef0f
movl $0x0, -0x4(%rbp)
jmp 0x5ef18
jmp 0x5ef11
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_coll_parser_scan_reset_sequence:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call my_coll_rule_reset
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 7
jnz short loc_5EEB0
mov rdi, [rbp+var_10]
call my_coll_parser_scan_reset_before
loc_5EEB0:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 7
jnz short loc_5EEE4
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 1
call my_coll_parser_scan_logical_position
cmp eax, 0
jnz short loc_5EEE2
mov [rbp+var_4], 0
jmp short loc_5EF18
loc_5EEE2:
jmp short loc_5EF11
loc_5EEE4:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 0Ah
lea rcx, aExpansion; "Expansion"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_5EF0F
mov [rbp+var_4], 0
jmp short loc_5EF18
loc_5EF0F:
jmp short $+2
loc_5EF11:
mov [rbp+var_4], 1
loc_5EF18:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
|
_BOOL8 my_coll_parser_scan_reset_sequence(long long a1)
{
my_coll_rule_reset(a1 + 80);
if ( *(_DWORD *)my_coll_parser_curr(a1) == 7 )
my_coll_parser_scan_reset_before(a1);
if ( *(_DWORD *)my_coll_parser_curr(a1) != 7 )
return (unsigned int)my_coll_parser_scan_character_list(a1, a1 + 80, 10LL, "Expansion") != 0;
return (unsigned int)my_coll_parser_scan_logical_position(a1, a1 + 80, 1LL) != 0;
}
|
my_coll_parser_scan_reset_sequence:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x0015f150
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015e650
CMP dword ptr [RAX],0x7
JNZ 0x0015eeb0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015f180
LAB_0015eeb0:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015e650
CMP dword ptr [RAX],0x7
JNZ 0x0015eee4
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0x1
CALL 0x0015f2f0
CMP EAX,0x0
JNZ 0x0015eee2
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015ef18
LAB_0015eee2:
JMP 0x0015ef11
LAB_0015eee4:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0xa
LEA RCX,[0x18c887]
CALL 0x0015f610
CMP EAX,0x0
JNZ 0x0015ef0f
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015ef18
LAB_0015ef0f:
JMP 0x0015ef11
LAB_0015ef11:
MOV dword ptr [RBP + -0x4],0x1
LAB_0015ef18:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 my_coll_parser_scan_reset_sequence(long param_1)
{
int iVar1;
int *piVar2;
my_coll_rule_reset(param_1 + 0x50);
piVar2 = (int *)my_coll_parser_curr(param_1);
if (*piVar2 == 7) {
my_coll_parser_scan_reset_before(param_1);
}
piVar2 = (int *)my_coll_parser_curr(param_1);
if (*piVar2 == 7) {
iVar1 = my_coll_parser_scan_logical_position(param_1,param_1 + 0x50,1);
if (iVar1 == 0) {
return 0;
}
}
else {
iVar1 = my_coll_parser_scan_character_list(param_1,param_1 + 0x50,10,"Expansion");
if (iVar1 == 0) {
return 0;
}
}
return 1;
}
|
|
65,453 |
blst_uniq_test
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/rb_tree.c
|
int blst_uniq_test(struct rb_tree *tree, const void *data, size_t len)
{ return (int)rb_tree_insert(tree, data, len); }
|
O2
|
c
|
blst_uniq_test:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1c0, %rsp # imm = 0x1C0
xorl %eax, %eax
movq %rdi, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x5b5dd
movq 0x10(%rcx), %r9
movq 0x18(%rcx), %r10
shrq %r10
movq %rdx, %r8
subq %r10, %r8
cmovbq %rdx, %r10
xorl %r11d, %r11d
cmpq %r11, %r10
je 0x5b5b6
movzbl (%rsi,%r11), %ebx
movzbl (%r9,%r11), %r14d
incq %r11
cmpb %r14b, %bl
je 0x5b599
subq %r14, %rbx
movq %rbx, %r8
testq %r8, %r8
je 0x5b678
movq %rcx, -0x250(%rbp,%rax,8)
setg -0x50(%rbp,%rax)
setg %r8b
movzbl %r8b, %r8d
leaq (%rcx,%r8,8), %rcx
incq %rax
jmp 0x5b579
movq 0x8(%rdi), %rcx
leaq 0x1(%rcx), %r8
movq %r8, 0x8(%rdi)
shlq $0x5, %rcx
addq %rdi, %rcx
addq $0x10, %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq %rsi, 0x10(%rcx)
leaq 0x1(,%rdx,2), %rdx
movq %rdx, 0x18(%rcx)
movq %rdi, %rdx
testq %rax, %rax
je 0x5b622
movzbl -0x51(%rbp,%rax), %edx
shll $0x3, %edx
addq -0x258(%rbp,%rax,8), %rdx
movq %rcx, (%rdx)
cmpq $0x2, %rax
jb 0x5b6c6
movq -0x258(%rbp,%rax,8), %rcx
testb $0x1, 0x18(%rcx)
je 0x5b6c6
movzbl -0x52(%rbp,%rax), %esi
movq -0x260(%rbp,%rax,8), %rdx
movq %rsi, %r8
xorq $0x1, %r8
movq (%rdx,%r8,8), %r9
testq %r9, %r9
je 0x5b67c
testb $0x1, 0x18(%r9)
je 0x5b67c
orb $0x1, 0x18(%rdx)
andb $-0x2, 0x18(%rcx)
andb $-0x2, 0x18(%r9)
addq $-0x2, %rax
jmp 0x5b625
xorl %eax, %eax
jmp 0x5b6d3
cmpb %sil, -0x51(%rbp,%rax)
je 0x5b696
movq (%rcx,%r8,8), %r9
movq (%r9,%rsi,8), %r10
movq %r10, (%rcx,%r8,8)
movq %rcx, (%r9,%rsi,8)
movq %r9, %rcx
movq (%rcx,%r8,8), %r9
movq %r9, (%rdx,%rsi,8)
movq %rdx, (%rcx,%r8,8)
orb $0x1, 0x18(%rdx)
andb $-0x2, 0x18(%rcx)
movq %rdi, %rdx
cmpq $0x2, %rax
je 0x5b6c3
movzbl -0x53(%rbp,%rax), %edx
shll $0x3, %edx
addq -0x268(%rbp,%rax,8), %rdx
movq %rcx, (%rdx)
movq (%rdi), %rax
andq $-0x2, 0x18(%rax)
movl $0x1, %eax
addq $0x1c0, %rsp # imm = 0x1C0
popq %rbx
popq %r14
popq %rbp
retq
|
blst_uniq_test:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 1C0h
xor eax, eax
mov rcx, rdi
loc_5B579:
mov rcx, [rcx]
test rcx, rcx
jz short loc_5B5DD
mov r9, [rcx+10h]
mov r10, [rcx+18h]
shr r10, 1
mov r8, rdx
sub r8, r10
cmovb r10, rdx
xor r11d, r11d
loc_5B599:
cmp r10, r11
jz short loc_5B5B6
movzx ebx, byte ptr [rsi+r11]
movzx r14d, byte ptr [r9+r11]
inc r11
cmp bl, r14b
jz short loc_5B599
sub rbx, r14
mov r8, rbx
loc_5B5B6:
test r8, r8
jz loc_5B678
mov [rbp+rax*8+var_250], rcx
setnle [rbp+rax+var_50]
setnle r8b
movzx r8d, r8b
lea rcx, [rcx+r8*8]
inc rax
jmp short loc_5B579
loc_5B5DD:
mov rcx, [rdi+8]
lea r8, [rcx+1]
mov [rdi+8], r8
shl rcx, 5
add rcx, rdi
add rcx, 10h
xorps xmm0, xmm0
movups xmmword ptr [rcx], xmm0
mov [rcx+10h], rsi
lea rdx, ds:1[rdx*2]
mov [rcx+18h], rdx
mov rdx, rdi
test rax, rax
jz short loc_5B622
movzx edx, [rbp+rax+var_51]
shl edx, 3
add rdx, [rbp+rax*8+var_258]
loc_5B622:
mov [rdx], rcx
loc_5B625:
cmp rax, 2
jb loc_5B6C6
mov rcx, [rbp+rax*8+var_258]
test byte ptr [rcx+18h], 1
jz loc_5B6C6
movzx esi, [rbp+rax+var_52]
mov rdx, [rbp+rax*8+var_260]
mov r8, rsi
xor r8, 1
mov r9, [rdx+r8*8]
test r9, r9
jz short loc_5B67C
test byte ptr [r9+18h], 1
jz short loc_5B67C
or byte ptr [rdx+18h], 1
and byte ptr [rcx+18h], 0FEh
and byte ptr [r9+18h], 0FEh
add rax, 0FFFFFFFFFFFFFFFEh
jmp short loc_5B625
loc_5B678:
xor eax, eax
jmp short loc_5B6D3
loc_5B67C:
cmp [rbp+rax+var_51], sil
jz short loc_5B696
mov r9, [rcx+r8*8]
mov r10, [r9+rsi*8]
mov [rcx+r8*8], r10
mov [r9+rsi*8], rcx
mov rcx, r9
loc_5B696:
mov r9, [rcx+r8*8]
mov [rdx+rsi*8], r9
mov [rcx+r8*8], rdx
or byte ptr [rdx+18h], 1
and byte ptr [rcx+18h], 0FEh
mov rdx, rdi
cmp rax, 2
jz short loc_5B6C3
movzx edx, [rbp+rax+var_53]
shl edx, 3
add rdx, [rbp+rax*8+var_268]
loc_5B6C3:
mov [rdx], rcx
loc_5B6C6:
mov rax, [rdi]
and qword ptr [rax+18h], 0FFFFFFFFFFFFFFFEh
mov eax, 1
loc_5B6D3:
add rsp, 1C0h
pop rbx
pop r14
pop rbp
retn
|
long long blst_uniq_test(long long *a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rax
long long *v4; // rcx
long long v5; // rcx
unsigned long long v6; // r10
long long v7; // r8
long long v8; // r11
long long v9; // rbx
long long v10; // r14
long long v11; // rcx
long long v12; // rcx
long long *v13; // rdx
long long v14; // rcx
long long v15; // rsi
long long v16; // rdx
long long v17; // r8
long long v18; // r9
long long v20; // r9
long long *v21; // rdx
_QWORD v22[77]; // [rsp+0h] [rbp-268h]
v3 = 0LL;
v4 = a1;
while ( 1 )
{
v5 = *v4;
if ( !v5 )
break;
v6 = *(_QWORD *)(v5 + 24) >> 1;
v7 = a3 - v6;
if ( a3 < v6 )
v6 = a3;
v8 = 0LL;
while ( v6 != v8 )
{
v9 = *(unsigned __int8 *)(a2 + v8);
v10 = *(unsigned __int8 *)(*(_QWORD *)(v5 + 16) + v8++);
if ( (_BYTE)v9 != (_BYTE)v10 )
{
v7 = v9 - v10;
break;
}
}
if ( !v7 )
return 0LL;
v22[v3 + 3] = v5;
*((_BYTE *)&v22[67] + v3) = v7 > 0;
v4 = (long long *)(v5 + 8LL * (v7 > 0));
++v3;
}
v11 = a1[1];
a1[1] = v11 + 1;
v12 = (long long)&a1[4 * v11 + 2];
*(_OWORD *)v12 = 0LL;
*(_QWORD *)(v12 + 16) = a2;
*(_QWORD *)(v12 + 24) = 2 * a3 + 1;
v13 = a1;
if ( v3 )
v13 = (long long *)(v22[v3 + 2] + 8 * (unsigned int)*((unsigned __int8 *)&v22[66] + v3 + 7));
*v13 = v12;
while ( v3 >= 2 )
{
v14 = v22[v3 + 2];
if ( (*(_BYTE *)(v14 + 24) & 1) == 0 )
break;
v15 = *((unsigned __int8 *)&v22[66] + v3 + 6);
v16 = v22[v3 + 1];
v17 = v15 ^ 1;
v18 = *(_QWORD *)(v16 + 8 * (v15 ^ 1));
if ( !v18 || (*(_BYTE *)(v18 + 24) & 1) == 0 )
{
if ( *((_BYTE *)&v22[66] + v3 + 7) != (_BYTE)v15 )
{
v20 = *(_QWORD *)(v14 + 8 * v17);
*(_QWORD *)(v14 + 8 * v17) = *(_QWORD *)(v20 + 8 * v15);
*(_QWORD *)(v20 + 8 * v15) = v14;
v14 = v20;
}
*(_QWORD *)(v16 + 8 * v15) = *(_QWORD *)(v14 + 8 * v17);
*(_QWORD *)(v14 + 8 * v17) = v16;
*(_BYTE *)(v16 + 24) |= 1u;
*(_BYTE *)(v14 + 24) &= ~1u;
v21 = a1;
if ( v3 != 2 )
v21 = (long long *)(v22[v3] + 8 * (unsigned int)*((unsigned __int8 *)&v22[66] + v3 + 5));
*v21 = v14;
break;
}
*(_BYTE *)(v16 + 24) |= 1u;
*(_BYTE *)(v14 + 24) &= ~1u;
*(_BYTE *)(v18 + 24) &= ~1u;
v3 -= 2LL;
}
*(_QWORD *)(*a1 + 24) &= ~1uLL;
return 1LL;
}
|
blst_uniq_test:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x1c0
XOR EAX,EAX
MOV RCX,RDI
LAB_0015b579:
MOV RCX,qword ptr [RCX]
TEST RCX,RCX
JZ 0x0015b5dd
MOV R9,qword ptr [RCX + 0x10]
MOV R10,qword ptr [RCX + 0x18]
SHR R10,0x1
MOV R8,RDX
SUB R8,R10
CMOVC R10,RDX
XOR R11D,R11D
LAB_0015b599:
CMP R10,R11
JZ 0x0015b5b6
MOVZX EBX,byte ptr [RSI + R11*0x1]
MOVZX R14D,byte ptr [R9 + R11*0x1]
INC R11
CMP BL,R14B
JZ 0x0015b599
SUB RBX,R14
MOV R8,RBX
LAB_0015b5b6:
TEST R8,R8
JZ 0x0015b678
MOV qword ptr [RBP + RAX*0x8 + -0x250],RCX
SETG byte ptr [RBP + RAX*0x1 + -0x50]
SETG R8B
MOVZX R8D,R8B
LEA RCX,[RCX + R8*0x8]
INC RAX
JMP 0x0015b579
LAB_0015b5dd:
MOV RCX,qword ptr [RDI + 0x8]
LEA R8,[RCX + 0x1]
MOV qword ptr [RDI + 0x8],R8
SHL RCX,0x5
ADD RCX,RDI
ADD RCX,0x10
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX],XMM0
MOV qword ptr [RCX + 0x10],RSI
LEA RDX,[0x1 + RDX*0x2]
MOV qword ptr [RCX + 0x18],RDX
MOV RDX,RDI
TEST RAX,RAX
JZ 0x0015b622
MOVZX EDX,byte ptr [RBP + RAX*0x1 + -0x51]
SHL EDX,0x3
ADD RDX,qword ptr [RBP + RAX*0x8 + -0x258]
LAB_0015b622:
MOV qword ptr [RDX],RCX
LAB_0015b625:
CMP RAX,0x2
JC 0x0015b6c6
MOV RCX,qword ptr [RBP + RAX*0x8 + -0x258]
TEST byte ptr [RCX + 0x18],0x1
JZ 0x0015b6c6
MOVZX ESI,byte ptr [RBP + RAX*0x1 + -0x52]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x260]
MOV R8,RSI
XOR R8,0x1
MOV R9,qword ptr [RDX + R8*0x8]
TEST R9,R9
JZ 0x0015b67c
TEST byte ptr [R9 + 0x18],0x1
JZ 0x0015b67c
OR byte ptr [RDX + 0x18],0x1
AND byte ptr [RCX + 0x18],0xfe
AND byte ptr [R9 + 0x18],0xfe
ADD RAX,-0x2
JMP 0x0015b625
LAB_0015b678:
XOR EAX,EAX
JMP 0x0015b6d3
LAB_0015b67c:
CMP byte ptr [RBP + RAX*0x1 + -0x51],SIL
JZ 0x0015b696
MOV R9,qword ptr [RCX + R8*0x8]
MOV R10,qword ptr [R9 + RSI*0x8]
MOV qword ptr [RCX + R8*0x8],R10
MOV qword ptr [R9 + RSI*0x8],RCX
MOV RCX,R9
LAB_0015b696:
MOV R9,qword ptr [RCX + R8*0x8]
MOV qword ptr [RDX + RSI*0x8],R9
MOV qword ptr [RCX + R8*0x8],RDX
OR byte ptr [RDX + 0x18],0x1
AND byte ptr [RCX + 0x18],0xfe
MOV RDX,RDI
CMP RAX,0x2
JZ 0x0015b6c3
MOVZX EDX,byte ptr [RBP + RAX*0x1 + -0x53]
SHL EDX,0x3
ADD RDX,qword ptr [RBP + RAX*0x8 + -0x268]
LAB_0015b6c3:
MOV qword ptr [RDX],RCX
LAB_0015b6c6:
MOV RAX,qword ptr [RDI]
AND qword ptr [RAX + 0x18],-0x2
MOV EAX,0x1
LAB_0015b6d3:
ADD RSP,0x1c0
POP RBX
POP R14
POP RBP
RET
|
int8 blst_uniq_test(long *param_1,long param_2,ulong param_3)
{
byte *pbVar1;
byte bVar2;
long lVar3;
ulong uVar4;
long lVar5;
long *plVar6;
long lVar7;
ulong uVar8;
ulong uVar9;
long alStack_270 [66];
byte abStack_5b [67];
uVar4 = 0;
plVar6 = param_1;
while (lVar3 = *plVar6, lVar3 != 0) {
uVar8 = *(ulong *)(lVar3 + 0x18) >> 1;
lVar7 = param_3 - uVar8;
if (param_3 < uVar8) {
uVar8 = param_3;
}
uVar9 = 0;
do {
if (uVar8 == uVar9) goto LAB_0015b5b6;
pbVar1 = (byte *)(param_2 + uVar9);
bVar2 = *(byte *)(*(long *)(lVar3 + 0x10) + uVar9);
uVar9 = uVar9 + 1;
} while (*pbVar1 == bVar2);
lVar7 = (ulong)*pbVar1 - (ulong)bVar2;
LAB_0015b5b6:
if (lVar7 == 0) {
return 0;
}
alStack_270[uVar4 + 3] = lVar3;
abStack_5b[uVar4 + 3] = 0 < lVar7;
uVar4 = uVar4 + 1;
plVar6 = (long *)(lVar3 + (ulong)(0 < lVar7) * 8);
}
lVar3 = param_1[1];
param_1[1] = lVar3 + 1;
param_1[lVar3 * 4 + 2] = 0;
param_1[lVar3 * 4 + 3] = 0;
param_1[lVar3 * 4 + 4] = param_2;
param_1[lVar3 * 4 + 5] = param_3 * 2 + 1;
plVar6 = param_1;
if (uVar4 != 0) {
plVar6 = (long *)((ulong)abStack_5b[uVar4 + 2] * 8 + alStack_270[uVar4 + 2]);
}
*plVar6 = (long)(param_1 + lVar3 * 4 + 2);
while( true ) {
if ((uVar4 < 2) || (lVar3 = alStack_270[uVar4 + 2], (*(byte *)(lVar3 + 0x18) & 1) == 0))
goto LAB_0015b6c6;
uVar8 = (ulong)abStack_5b[uVar4 + 1];
lVar7 = alStack_270[uVar4 + 1];
uVar9 = uVar8 ^ 1;
lVar5 = *(long *)(lVar7 + uVar9 * 8);
if ((lVar5 == 0) || ((*(byte *)(lVar5 + 0x18) & 1) == 0)) break;
*(byte *)(lVar7 + 0x18) = *(byte *)(lVar7 + 0x18) | 1;
*(byte *)(lVar3 + 0x18) = *(byte *)(lVar3 + 0x18) & 0xfe;
*(byte *)(lVar5 + 0x18) = *(byte *)(lVar5 + 0x18) & 0xfe;
uVar4 = uVar4 - 2;
}
lVar5 = lVar3;
if (abStack_5b[uVar4 + 2] != abStack_5b[uVar4 + 1]) {
lVar5 = *(long *)(lVar3 + uVar9 * 8);
*(int8 *)(lVar3 + uVar9 * 8) = *(int8 *)(lVar5 + uVar8 * 8);
*(long *)(lVar5 + uVar8 * 8) = lVar3;
}
*(int8 *)(lVar7 + uVar8 * 8) = *(int8 *)(lVar5 + uVar9 * 8);
*(long *)(lVar5 + uVar9 * 8) = lVar7;
*(byte *)(lVar7 + 0x18) = *(byte *)(lVar7 + 0x18) | 1;
*(byte *)(lVar5 + 0x18) = *(byte *)(lVar5 + 0x18) & 0xfe;
plVar6 = param_1;
if (uVar4 != 2) {
plVar6 = (long *)((ulong)abStack_5b[uVar4] * 8 + alStack_270[uVar4]);
}
*plVar6 = lVar5;
LAB_0015b6c6:
*(ulong *)(*param_1 + 0x18) = *(ulong *)(*param_1 + 0x18) & 0xfffffffffffffffe;
return 1;
}
|
|
65,454 |
st_print_event_info::~st_print_event_info()
|
eloqsql/sql/log_event.h
|
~st_print_event_info() {
close_cached_file(&head_cache);
close_cached_file(&body_cache);
close_cached_file(&tail_cache);
#ifdef WHEN_FLASHBACK_REVIEW_READY
close_cached_file(&review_sql_cache);
#endif
}
|
O0
|
c
|
st_print_event_info::~st_print_event_info():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x4e8, %rdi # imm = 0x4E8
callq 0xab1f0
jmp 0x69292
movq -0x10(%rbp), %rdi
addq $0x5f0, %rdi # imm = 0x5F0
callq 0xab1f0
jmp 0x692a4
movq -0x10(%rbp), %rdi
addq $0x6f8, %rdi # imm = 0x6F8
callq 0xab1f0
jmp 0x692b6
movq -0x10(%rbp), %rdi
addq $0x420, %rdi # imm = 0x420
callq 0x41050
movq -0x10(%rbp), %rdi
addq $0x368, %rdi # imm = 0x368
callq 0x41050
addq $0x10, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x65960
nopw %cs:(%rax,%rax)
nop
|
_ZN19st_print_event_infoD2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_10], rdi
add rdi, 4E8h
call close_cached_file
jmp short $+2
loc_69292:
mov rdi, [rbp+var_10]
add rdi, 5F0h
call close_cached_file
jmp short $+2
loc_692A4:
mov rdi, [rbp+var_10]
add rdi, 6F8h
call close_cached_file
jmp short $+2
loc_692B6:
mov rdi, [rbp+var_10]
add rdi, 420h; this
call _ZN13table_mappingD2Ev; table_mapping::~table_mapping()
mov rdi, [rbp+var_10]
add rdi, 368h; this
call _ZN13table_mappingD2Ev; table_mapping::~table_mapping()
add rsp, 10h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
|
void st_print_event_info::~st_print_event_info(st_print_event_info *this)
{
close_cached_file((char *)this + 1256);
close_cached_file((char *)this + 1520);
close_cached_file((char *)this + 1784);
table_mapping::~table_mapping((st_print_event_info *)((char *)this + 1056));
table_mapping::~table_mapping((st_print_event_info *)((char *)this + 872));
}
|
~st_print_event_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
ADD RDI,0x4e8
LAB_0016928b:
CALL 0x001ab1f0
JMP 0x00169292
LAB_00169292:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x5f0
CALL 0x001ab1f0
JMP 0x001692a4
LAB_001692a4:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x6f8
CALL 0x001ab1f0
LAB_001692b4:
JMP 0x001692b6
LAB_001692b6:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x420
CALL 0x00141050
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x368
CALL 0x00141050
ADD RSP,0x10
POP RBP
RET
|
/* st_print_event_info::~st_print_event_info() */
void __thiscall st_print_event_info::~st_print_event_info(st_print_event_info *this)
{
/* try { // try from 0016928b to 001692b3 has its CatchHandler @ 001692dc */
close_cached_file(this + 0x4e8);
close_cached_file(this + 0x5f0);
close_cached_file(this + 0x6f8);
table_mapping::~table_mapping((table_mapping *)(this + 0x420));
table_mapping::~table_mapping((table_mapping *)(this + 0x368));
return;
}
|
|
65,455 |
mi_calc_total_blob_length
|
eloqsql/storage/myisam/mi_dynrec.c
|
ulong _mi_calc_total_blob_length(MI_INFO *info, const uchar *record)
{
ulong length;
MI_BLOB *blob,*end;
for (length=0, blob= info->blobs, end=blob+info->s->base.blobs ;
blob != end;
blob++)
{
blob->length=_mi_calc_blob_length(blob->pack_length,record + blob->offset);
length+=blob->length;
}
return length;
}
|
O0
|
c
|
mi_calc_total_blob_length:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x188(%rcx), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xa869a
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
addq (%rax), %rsi
callq 0xaae30
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0xa8650
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_mi_calc_total_blob_length:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
mov rax, [rax+48h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov ecx, [rcx+188h]
imul rcx, 18h
add rax, rcx
mov [rbp+var_28], rax
loc_A8650:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jz short loc_A869A
mov rax, [rbp+var_20]
mov edi, [rax+8]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_20]
add rsi, [rax]
call _mi_calc_blob_length
mov rcx, rax
mov rax, [rbp+var_20]
mov [rax+10h], rcx
mov rax, [rbp+var_20]
mov rax, [rax+10h]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, 18h
mov [rbp+var_20], rax
jmp short loc_A8650
loc_A869A:
mov rax, [rbp+var_18]
add rsp, 30h
pop rbp
retn
|
long long mi_calc_total_blob_length(_QWORD *a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v5 = 0LL;
v4 = a1[9];
v3 = 24LL * *(unsigned int *)(*a1 + 392LL) + v4;
while ( v4 != v3 )
{
*(_QWORD *)(v4 + 16) = mi_calc_blob_length(*(unsigned int *)(v4 + 8), *(_QWORD *)v4 + a2);
v5 += *(_QWORD *)(v4 + 16);
v4 += 24LL;
}
return v5;
}
|
_mi_calc_total_blob_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x188]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_001a8650:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x001a869a
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
ADD RSI,qword ptr [RAX]
CALL 0x001aae30
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001a8650
LAB_001a869a:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x30
POP RBP
RET
|
long _mi_calc_total_blob_length(long *param_1,long param_2)
{
long *plVar1;
long lVar2;
long *local_28;
long local_20;
local_20 = 0;
local_28 = (long *)param_1[9];
plVar1 = local_28 + (ulong)*(uint *)(*param_1 + 0x188) * 3;
for (; local_28 != plVar1; local_28 = local_28 + 3) {
lVar2 = _mi_calc_blob_length((int)local_28[1],param_2 + *local_28);
local_28[2] = lVar2;
local_20 = local_28[2] + local_20;
}
return local_20;
}
|
|
65,456 |
LefDefParser::lefiLayer::addProp(char const*, char const*, char)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
|
void
lefiLayer::addProp(const char *name,
const char *value,
const char type)
{
int len = strlen(name) + 1;
// char* tvalue;
// int vlen, i;
if (numProps_ == propsAllocated_) {
int i;
int max;
int lim = numProps_;
char **nn;
char **nv;
double *nd;
char *nt;
if (propsAllocated_ == 0)
max = propsAllocated_ = 2;
else
max = propsAllocated_ *= 2;
nn = (char**) lefMalloc(sizeof(char*) * max);
nv = (char**) lefMalloc(sizeof(char*) * max);
nd = (double*) lefMalloc(sizeof(double) * max);
nt = (char*) lefMalloc(sizeof(char) * max);
for (i = 0; i < lim; i++) {
nn[i] = names_[i];
nv[i] = values_[i];
nd[i] = dvalues_[i];
nt[i] = types_[i];
}
lefFree((char*) (names_));
lefFree((char*) (values_));
lefFree((char*) (dvalues_));
lefFree((char*) (types_));
names_ = nn;
values_ = nv;
dvalues_ = nd;
types_ = nt;
}
names_[numProps_] = (char*) lefMalloc(sizeof(char) * len);
strcpy(names_[numProps_], name);
len = strlen(value) + 1;
values_[numProps_] = (char*) lefMalloc(sizeof(char) * len);
strcpy(values_[numProps_], value);
dvalues_[numProps_] = 0;
//if (type == 'N') {
// it is a number, don't know if it is an integer or real
// Look for . in the value
//tvalue = (char*)value;
//vlen = strlen(value);
//for (i = 0; i < vlen; i++) {
//if (*tvalue == '.') {
//types_[numProps_] = 'R';
//break;
//}
//++tvalue;
//types_[numProps_] = type;
//}
//} else
types_[numProps_] = type;
numProps_ += 1;
}
|
O3
|
cpp
|
LefDefParser::lefiLayer::addProp(char const*, char const*, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x20d0
movl 0x350(%r14), %r13d
cmpl 0x354(%r14), %r13d
jne 0x1b372
movq %rax, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movl %ebx, 0xc(%rsp)
leal (,%r13,2), %eax
testq %r13, %r13
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x354(%r14)
movslq %ecx, %r12
leaq (,%r12,8), %r15
movq %r15, %rdi
callq 0x24985
movq %rax, %rbp
movq %r15, %rdi
callq 0x24985
movq %rax, %rbx
movq %r15, %rdi
callq 0x24985
movq %rax, %r15
movq %r12, %rdi
callq 0x24985
movq %rax, %r12
testl %r13d, %r13d
jle 0x1b313
xorl %eax, %eax
movq 0x358(%r14), %rcx
movq (%rcx,%rax,8), %rcx
movq %rcx, (%rbp,%rax,8)
movq 0x360(%r14), %rcx
movq (%rcx,%rax,8), %rcx
movq %rcx, (%rbx,%rax,8)
movq 0x368(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%r15,%rax,8)
movq 0x370(%r14), %rcx
movb (%rcx,%rax), %cl
movb %cl, (%r12,%rax)
incq %rax
cmpq %rax, %r13
jne 0x1b2cc
movq 0x358(%r14), %rdi
callq 0x26040
movq 0x360(%r14), %rdi
callq 0x26040
movq 0x368(%r14), %rdi
callq 0x26040
movq 0x370(%r14), %rdi
callq 0x26040
movq %rbp, 0x358(%r14)
movq %rbx, 0x360(%r14)
movq %r15, 0x368(%r14)
movq %r12, 0x370(%r14)
movl 0xc(%rsp), %ebx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %r12
movq 0x10(%rsp), %rax
incl %eax
movslq %eax, %rdi
callq 0x24985
movq 0x358(%r14), %rcx
movslq 0x350(%r14), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x358(%r14), %rax
movq (%rax,%rdx,8), %rdi
movq %r12, %rsi
callq 0x21b0
movq %r15, %rdi
callq 0x20d0
incl %eax
movslq %eax, %rdi
callq 0x24985
movq 0x360(%r14), %rcx
movslq 0x350(%r14), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x360(%r14), %rax
movq (%rax,%rdx,8), %rdi
movq %r15, %rsi
callq 0x21b0
movq 0x368(%r14), %rax
movslq 0x350(%r14), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x370(%r14), %rax
movb %bl, (%rax,%rcx)
incl 0x350(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN12LefDefParser9lefiLayer7addPropEPKcS2_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, ecx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rdi, rsi
call _strlen
mov r13d, [r14+350h]
cmp r13d, [r14+354h]
jnz loc_1B372
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_40], r12
mov [rsp+58h+var_38], r15
mov [rsp+58h+var_4C], ebx
lea eax, ds:0[r13*2]
test r13, r13
mov ecx, 2
cmovnz ecx, eax
mov [r14+354h], ecx
movsxd r12, ecx
lea r15, ds:0[r12*8]
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rbp, rax
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rbx, rax
mov rdi, r15; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r15, rax
mov rdi, r12; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r12, rax
test r13d, r13d
jle short loc_1B313
xor eax, eax
loc_1B2CC:
mov rcx, [r14+358h]
mov rcx, [rcx+rax*8]
mov [rbp+rax*8+0], rcx
mov rcx, [r14+360h]
mov rcx, [rcx+rax*8]
mov [rbx+rax*8], rcx
mov rcx, [r14+368h]
movsd xmm0, qword ptr [rcx+rax*8]
movsd qword ptr [r15+rax*8], xmm0
mov rcx, [r14+370h]
mov cl, [rcx+rax]
mov [r12+rax], cl
inc rax
cmp r13, rax
jnz short loc_1B2CC
loc_1B313:
mov rdi, [r14+358h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [r14+360h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [r14+368h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [r14+370h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov [r14+358h], rbp
mov [r14+360h], rbx
mov [r14+368h], r15
mov [r14+370h], r12
mov ebx, [rsp+58h+var_4C]
mov r15, [rsp+58h+var_38]
mov r12, [rsp+58h+var_40]
mov rax, [rsp+58h+var_48]
loc_1B372:
inc eax
movsxd rdi, eax; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [r14+358h]
movsxd rdx, dword ptr [r14+350h]
mov [rcx+rdx*8], rax
mov rax, [r14+358h]
mov rdi, [rax+rdx*8]
mov rsi, r12; unsigned __int64
call _strcpy
mov rdi, r15
call _strlen
inc eax
movsxd rdi, eax; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [r14+360h]
movsxd rdx, dword ptr [r14+350h]
mov [rcx+rdx*8], rax
mov rax, [r14+360h]
mov rdi, [rax+rdx*8]
mov rsi, r15
call _strcpy
mov rax, [r14+368h]
movsxd rcx, dword ptr [r14+350h]
mov qword ptr [rax+rcx*8], 0
mov rax, [r14+370h]
mov [rax+rcx], bl
inc dword ptr [r14+350h]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::lefiLayer::addProp(LefDefParser::lefiLayer *this, char *a2, const char *a3, char a4)
{
const char *v6; // r12
int v7; // eax
long long v8; // r13
int v9; // ecx
LefDefParser *v10; // r12
LefDefParser *v11; // r15
long long v12; // rbp
long long v13; // rbx
long long v14; // r15
long long v15; // r12
long long i; // rax
long long v17; // rax
long long v18; // rdx
int v19; // eax
long long v20; // rax
long long v21; // rdx
long long v22; // rcx
long long result; // rax
char v24; // [rsp+Ch] [rbp-4Ch]
int v25; // [rsp+10h] [rbp-48h]
const char *v26; // [rsp+20h] [rbp-38h]
v6 = a2;
v7 = strlen(a2);
v8 = *((unsigned int *)this + 212);
if ( (_DWORD)v8 == *((_DWORD *)this + 213) )
{
v25 = v7;
v26 = a3;
v24 = a4;
v9 = 2;
if ( *((_DWORD *)this + 212) )
v9 = 2 * v8;
*((_DWORD *)this + 213) = v9;
v10 = (LefDefParser *)v9;
v11 = (LefDefParser *)(8LL * v9);
v12 = LefDefParser::lefMalloc(v11, (unsigned long long)a2);
v13 = LefDefParser::lefMalloc(v11, (unsigned long long)a2);
v14 = LefDefParser::lefMalloc(v11, (unsigned long long)a2);
v15 = LefDefParser::lefMalloc(v10, (unsigned long long)a2);
if ( (int)v8 > 0 )
{
for ( i = 0LL; i != v8; ++i )
{
*(_QWORD *)(v12 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 107) + 8 * i);
*(_QWORD *)(v13 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 108) + 8 * i);
*(_QWORD *)(v14 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 109) + 8 * i);
*(_BYTE *)(v15 + i) = *(_BYTE *)(*((_QWORD *)this + 110) + i);
}
}
LefDefParser::lefFree(*((LefDefParser **)this + 107), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 108), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 109), a2);
LefDefParser::lefFree(*((LefDefParser **)this + 110), a2);
*((_QWORD *)this + 107) = v12;
*((_QWORD *)this + 108) = v13;
*((_QWORD *)this + 109) = v14;
*((_QWORD *)this + 110) = v15;
a4 = v24;
a3 = v26;
v6 = a2;
v7 = v25;
}
v17 = LefDefParser::lefMalloc((LefDefParser *)(v7 + 1), (unsigned long long)a2);
v18 = *((int *)this + 212);
*(_QWORD *)(*((_QWORD *)this + 107) + 8 * v18) = v17;
strcpy(*(_QWORD *)(*((_QWORD *)this + 107) + 8 * v18), v6);
v19 = strlen(a3);
v20 = LefDefParser::lefMalloc((LefDefParser *)(v19 + 1), (unsigned long long)v6);
v21 = *((int *)this + 212);
*(_QWORD *)(*((_QWORD *)this + 108) + 8 * v21) = v20;
strcpy(*(_QWORD *)(*((_QWORD *)this + 108) + 8 * v21), a3);
v22 = *((int *)this + 212);
*(_QWORD *)(*((_QWORD *)this + 109) + 8 * v22) = 0LL;
result = *((_QWORD *)this + 110);
*(_BYTE *)(result + v22) = a4;
++*((_DWORD *)this + 212);
return result;
}
|
addProp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ECX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x001020d0
MOV R13D,dword ptr [R14 + 0x350]
CMP R13D,dword ptr [R14 + 0x354]
JNZ 0x0011b372
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],R12
MOV qword ptr [RSP + 0x20],R15
MOV dword ptr [RSP + 0xc],EBX
LEA EAX,[R13*0x2]
TEST R13,R13
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [R14 + 0x354],ECX
MOVSXD R12,ECX
LEA R15,[R12*0x8]
MOV RDI,R15
CALL 0x00124985
MOV RBP,RAX
MOV RDI,R15
CALL 0x00124985
MOV RBX,RAX
MOV RDI,R15
CALL 0x00124985
MOV R15,RAX
MOV RDI,R12
CALL 0x00124985
MOV R12,RAX
TEST R13D,R13D
JLE 0x0011b313
XOR EAX,EAX
LAB_0011b2cc:
MOV RCX,qword ptr [R14 + 0x358]
MOV RCX,qword ptr [RCX + RAX*0x8]
MOV qword ptr [RBP + RAX*0x8],RCX
MOV RCX,qword ptr [R14 + 0x360]
MOV RCX,qword ptr [RCX + RAX*0x8]
MOV qword ptr [RBX + RAX*0x8],RCX
MOV RCX,qword ptr [R14 + 0x368]
MOVSD XMM0,qword ptr [RCX + RAX*0x8]
MOVSD qword ptr [R15 + RAX*0x8],XMM0
MOV RCX,qword ptr [R14 + 0x370]
MOV CL,byte ptr [RCX + RAX*0x1]
MOV byte ptr [R12 + RAX*0x1],CL
INC RAX
CMP R13,RAX
JNZ 0x0011b2cc
LAB_0011b313:
MOV RDI,qword ptr [R14 + 0x358]
CALL 0x00126040
MOV RDI,qword ptr [R14 + 0x360]
CALL 0x00126040
MOV RDI,qword ptr [R14 + 0x368]
CALL 0x00126040
MOV RDI,qword ptr [R14 + 0x370]
CALL 0x00126040
MOV qword ptr [R14 + 0x358],RBP
MOV qword ptr [R14 + 0x360],RBX
MOV qword ptr [R14 + 0x368],R15
MOV qword ptr [R14 + 0x370],R12
MOV EBX,dword ptr [RSP + 0xc]
MOV R15,qword ptr [RSP + 0x20]
MOV R12,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
LAB_0011b372:
INC EAX
MOVSXD RDI,EAX
CALL 0x00124985
MOV RCX,qword ptr [R14 + 0x358]
MOVSXD RDX,dword ptr [R14 + 0x350]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [R14 + 0x358]
MOV RDI,qword ptr [RAX + RDX*0x8]
MOV RSI,R12
CALL 0x001021b0
MOV RDI,R15
CALL 0x001020d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00124985
MOV RCX,qword ptr [R14 + 0x360]
MOVSXD RDX,dword ptr [R14 + 0x350]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [R14 + 0x360]
MOV RDI,qword ptr [RAX + RDX*0x8]
MOV RSI,R15
CALL 0x001021b0
MOV RAX,qword ptr [R14 + 0x368]
MOVSXD RCX,dword ptr [R14 + 0x350]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [R14 + 0x370]
MOV byte ptr [RAX + RCX*0x1],BL
INC dword ptr [R14 + 0x350]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::lefiLayer::addProp(char const*, char const*, char) */
void __thiscall
LefDefParser::lefiLayer::addProp(lefiLayer *this,char *param_1,char *param_2,char param_3)
{
LefDefParser *this_00;
uint uVar1;
size_t sVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
ulong uVar7;
int8 uVar8;
int iVar9;
char *pcVar10;
pcVar10 = param_1;
sVar2 = strlen(param_1);
uVar1 = *(uint *)(this + 0x350);
if (uVar1 == *(uint *)(this + 0x354)) {
iVar9 = 2;
if ((ulong)uVar1 != 0) {
iVar9 = uVar1 * 2;
}
*(int *)(this + 0x354) = iVar9;
this_00 = (LefDefParser *)((long)iVar9 * 8);
lVar3 = lefMalloc(this_00,(ulong)pcVar10);
lVar4 = lefMalloc(this_00,(ulong)pcVar10);
lVar5 = lefMalloc(this_00,(ulong)pcVar10);
lVar6 = lefMalloc((LefDefParser *)(long)iVar9,(ulong)pcVar10);
if (0 < (int)uVar1) {
uVar7 = 0;
do {
*(int8 *)(lVar3 + uVar7 * 8) = *(int8 *)(*(long *)(this + 0x358) + uVar7 * 8);
*(int8 *)(lVar4 + uVar7 * 8) = *(int8 *)(*(long *)(this + 0x360) + uVar7 * 8);
*(int8 *)(lVar5 + uVar7 * 8) = *(int8 *)(*(long *)(this + 0x368) + uVar7 * 8);
*(int1 *)(lVar6 + uVar7) = *(int1 *)(*(long *)(this + 0x370) + uVar7);
uVar7 = uVar7 + 1;
} while (uVar1 != uVar7);
}
lefFree(*(void **)(this + 0x358));
lefFree(*(void **)(this + 0x360));
lefFree(*(void **)(this + 0x368));
lefFree(*(void **)(this + 0x370));
*(long *)(this + 0x358) = lVar3;
*(long *)(this + 0x360) = lVar4;
*(long *)(this + 0x368) = lVar5;
*(long *)(this + 0x370) = lVar6;
}
uVar8 = lefMalloc((LefDefParser *)(long)((int)sVar2 + 1),(ulong)pcVar10);
iVar9 = *(int *)(this + 0x350);
*(int8 *)(*(long *)(this + 0x358) + (long)iVar9 * 8) = uVar8;
strcpy(*(char **)(*(long *)(this + 0x358) + (long)iVar9 * 8),param_1);
sVar2 = strlen(param_2);
uVar8 = lefMalloc((LefDefParser *)(long)((int)sVar2 + 1),(ulong)param_1);
iVar9 = *(int *)(this + 0x350);
*(int8 *)(*(long *)(this + 0x360) + (long)iVar9 * 8) = uVar8;
strcpy(*(char **)(*(long *)(this + 0x360) + (long)iVar9 * 8),param_2);
iVar9 = *(int *)(this + 0x350);
*(int8 *)(*(long *)(this + 0x368) + (long)iVar9 * 8) = 0;
*(char *)(*(long *)(this + 0x370) + (long)iVar9) = param_3;
*(int *)(this + 0x350) = *(int *)(this + 0x350) + 1;
return;
}
|
|
65,457 |
LEX::sp_for_loop_intrange_finalize(THD*, Lex_for_loop_st const&)
|
eloqsql/sql/sql_lex.cc
|
bool LEX::sp_for_loop_intrange_finalize(THD *thd, const Lex_for_loop_st &loop)
{
sphead->reset_lex(thd);
// Generate FOR LOOP index increment in its own lex
DBUG_ASSERT(this != thd->lex);
if (unlikely(thd->lex->sp_for_loop_increment(thd, loop) ||
thd->lex->sphead->restore_lex(thd)))
return true;
// Generate a jump to the beginning of the loop
DBUG_ASSERT(this == thd->lex);
return sp_while_loop_finalize(thd);
}
|
O0
|
cpp
|
LEX::sp_for_loop_intrange_finalize(THD*, Lex_for_loop_st const&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x1960(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x905f90
jmp 0x9bc48e
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x9bc140
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x29(%rbp)
jne 0x9bc4ca
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x1960(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x9cc780
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x9bc4dd
movb $0x1, -0x1(%rbp)
jmp 0x9bc4f3
jmp 0x9bc4df
jmp 0x9bc4e1
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9bc500
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
|
_ZN3LEX29sp_for_loop_intrange_finalizeEP3THDRK15Lex_for_loop_st:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rdi, [rax+1960h]; this
mov rsi, [rbp+var_18]; THD *
call _ZN7sp_head9reset_lexEP3THD; sp_head::reset_lex(THD *)
jmp short $+2
loc_9BC48E:
mov rax, [rbp+var_18]
mov rdi, [rax+58h]; this
mov rsi, [rbp+var_18]; THD *
mov rdx, [rbp+var_20]; Lex_for_loop_st *
call _ZN3LEX21sp_for_loop_incrementEP3THDRK15Lex_for_loop_st; LEX::sp_for_loop_increment(THD *,Lex_for_loop_st const&)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_29], al
jnz short loc_9BC4CA
mov rax, [rbp+var_18]
mov rax, [rax+58h]
mov rdi, [rax+1960h]; this
mov rsi, [rbp+var_18]; THD *
call _ZN7sp_head11restore_lexEP3THD; sp_head::restore_lex(THD *)
mov [rbp+var_29], al
loc_9BC4CA:
mov al, [rbp+var_29]
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_9BC4DD
mov [rbp+var_1], 1
jmp short loc_9BC4F3
loc_9BC4DD:
jmp short $+2
loc_9BC4DF:
jmp short $+2
loc_9BC4E1:
mov rdi, [rbp+var_28]; this
mov rsi, [rbp+var_18]; THD *
call _ZN3LEX22sp_while_loop_finalizeEP3THD; LEX::sp_while_loop_finalize(THD *)
and al, 1
mov [rbp+var_1], al
loc_9BC4F3:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char LEX::sp_for_loop_intrange_finalize(sp_head **this, sp_head ***a2, sp_variable **a3)
{
char v4; // [rsp+7h] [rbp-29h]
sp_head::reset_lex(this[812], (THD *)a2);
v4 = 1;
if ( !LEX::sp_for_loop_increment(a2[11], (THD *)a2, a3) )
v4 = sp_head::restore_lex(a2[11][812], (THD *)a2);
if ( (v4 & 1) != 0 )
return 1;
else
return LEX::sp_while_loop_finalize((LEX *)this, (THD *)a2) & 1;
}
|
rb_delete_fixup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LAB_009bc488:
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x29],AL
JZ 0x009bc4a5
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x60],0x0
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_009bc4a5:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x009bc4b1
JMP 0x009bc6d0
LAB_009bc4b1:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x30]
JNZ 0x009bc5c4
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x60],0x1
JNZ 0x009bc508
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x60],0x1
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x8]
CALL 0x009bc6f0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x28],RAX
LAB_009bc508:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x009bc53c
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x009bc53c
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x009bc5bf
LAB_009bc53c:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x009bc57d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],0x1
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x8]
CALL 0x009bc7a0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x28],RAX
LAB_009bc57d:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x60],0x0
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x8]
CALL 0x009bc6f0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x009bc6d0
LAB_009bc5bf:
JMP 0x009bc6bf
LAB_009bc5c4:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x60],0x1
JNZ 0x009bc609
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x60],0x1
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x8]
CALL 0x009bc7a0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x28],RAX
LAB_009bc609:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x009bc63d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x009bc63d
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x009bc6bd
LAB_009bc63d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x009bc67e
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],0x1
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x8]
CALL 0x009bc6f0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x28],RAX
LAB_009bc67e:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
MOV dword ptr [RAX + 0x60],0x0
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x8]
CALL 0x009bc7a0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x009bc6d0
LAB_009bc6bd:
JMP 0x009bc6bf
LAB_009bc6bf:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x009bc488
LAB_009bc6d0:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
/* rb_delete_fixup(SEL_ARG*, SEL_ARG*, SEL_ARG*) */
SEL_ARG * rb_delete_fixup(SEL_ARG *param_1,SEL_ARG *param_2,SEL_ARG *param_3)
{
bool bVar1;
SEL_ARG *local_30;
SEL_ARG *local_28;
SEL_ARG *local_20;
SEL_ARG *local_10;
*(int8 *)(param_1 + 0x50) = 0;
local_28 = param_2;
local_20 = param_3;
local_10 = param_1;
do {
bVar1 = false;
if (local_28 != local_10) {
bVar1 = *(int *)(local_28 + 0x60) == 0;
}
if (!bVar1) goto LAB_009bc6d0;
if (local_28 == *(SEL_ARG **)(local_20 + 0x30)) {
local_30 = *(SEL_ARG **)(local_20 + 0x38);
if (*(int *)(local_30 + 0x60) == 1) {
*(int4 *)(local_30 + 0x60) = 0;
*(int4 *)(local_20 + 0x60) = 1;
left_rotate(&local_10,local_20);
local_30 = *(SEL_ARG **)(local_20 + 0x38);
}
if ((*(int *)(*(long *)(local_30 + 0x30) + 0x60) != 0) ||
(*(int *)(*(long *)(local_30 + 0x38) + 0x60) != 0)) {
if (*(int *)(*(long *)(local_30 + 0x38) + 0x60) == 0) {
*(int4 *)(*(long *)(local_30 + 0x30) + 0x60) = 0;
*(int4 *)(local_30 + 0x60) = 1;
right_rotate(&local_10,local_30);
local_30 = *(SEL_ARG **)(local_20 + 0x38);
}
*(int4 *)(local_30 + 0x60) = *(int4 *)(local_20 + 0x60);
*(int4 *)(local_20 + 0x60) = 0;
*(int4 *)(*(long *)(local_30 + 0x38) + 0x60) = 0;
left_rotate(&local_10,local_20);
local_28 = local_10;
LAB_009bc6d0:
*(int4 *)(local_28 + 0x60) = 0;
return local_10;
}
*(int4 *)(local_30 + 0x60) = 1;
}
else {
local_30 = *(SEL_ARG **)(local_20 + 0x30);
if (*(int *)(local_30 + 0x60) == 1) {
*(int4 *)(local_30 + 0x60) = 0;
*(int4 *)(local_20 + 0x60) = 1;
right_rotate(&local_10,local_20);
local_30 = *(SEL_ARG **)(local_20 + 0x30);
}
if ((*(int *)(*(long *)(local_30 + 0x38) + 0x60) != 0) ||
(*(int *)(*(long *)(local_30 + 0x30) + 0x60) != 0)) {
if (*(int *)(*(long *)(local_30 + 0x30) + 0x60) == 0) {
*(int4 *)(*(long *)(local_30 + 0x38) + 0x60) = 0;
*(int4 *)(local_30 + 0x60) = 1;
left_rotate(&local_10,local_30);
local_30 = *(SEL_ARG **)(local_20 + 0x30);
}
*(int4 *)(local_30 + 0x60) = *(int4 *)(local_20 + 0x60);
*(int4 *)(local_20 + 0x60) = 0;
*(int4 *)(*(long *)(local_30 + 0x30) + 0x60) = 0;
right_rotate(&local_10,local_20);
local_28 = local_10;
goto LAB_009bc6d0;
}
*(int4 *)(local_30 + 0x60) = 1;
}
local_28 = local_20;
local_20 = *(SEL_ARG **)(local_20 + 0x50);
} while( true );
}
|
|
65,458 |
trnman_trid_to_trn
|
eloqsql/storage/maria/trnman.c
|
TRN *trnman_trid_to_trn(TRN *trn, TrID trid)
{
TRN **found;
if (trid < trn->min_read_from)
return 0; /* it's committed eons ago */
found= lf_hash_search(&trid_to_trn, trn->pins, &trid, sizeof(trid));
if (found == NULL || found == MY_ERRPTR)
return 0; /* no luck */
/* we've found something */
mysql_mutex_lock(&(*found)->state_lock);
if ((*found)->short_id == 0)
{
mysql_mutex_unlock(&(*found)->state_lock);
lf_hash_search_unpin(trn->pins);
return 0; /* but it was a ghost */
}
lf_hash_search_unpin(trn->pins);
/* Gotcha! */
return *found;
}
|
O3
|
c
|
trnman_trid_to_trn:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, -0x20(%rbp)
cmpq %rsi, 0x80(%rdi)
ja 0x47139
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x3b6333(%rip), %rdi # 0x3fd458
leaq -0x20(%rbp), %rdx
movl $0x8, %ecx
callq 0x2fc5f
cmpq $0x2, %rax
jae 0x47146
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rax), %rax
leaq 0x10(%rax), %rdi
cmpq $0x0, 0x50(%rax)
jne 0x4719a
callq 0x29220
movq (%r14), %r15
cmpw $0x0, 0xac(%r15)
je 0x47178
movq (%rbx), %rax
xorl %ecx, %ecx
xchgq %rcx, 0x10(%rax)
movq (%r14), %rax
jmp 0x4713b
movq 0x50(%r15), %rdi
addq $0x10, %r15
testq %rdi, %rdi
jne 0x471ad
movq %r15, %rdi
callq 0x291e0
movq (%rbx), %rcx
xorl %eax, %eax
xorl %edx, %edx
xchgq %rdx, 0x10(%rcx)
jmp 0x4713b
leaq 0x9280c(%rip), %rsi # 0xd99ad
movl $0x285, %edx # imm = 0x285
callq 0x2eb8f
jmp 0x4715c
leaq 0x33ee5c(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x47185
|
trnman_trid_to_trn:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov [rbp+var_20], rsi
cmp [rdi+80h], rsi
ja short loc_47139
mov rbx, rdi
mov rsi, [rdi]
lea rdi, trid_to_trn
lea rdx, [rbp+var_20]
mov ecx, 8
call lf_hash_search
cmp rax, 2
jnb short loc_47146
loc_47139:
xor eax, eax
loc_4713B:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_47146:
mov r14, rax
mov rax, [rax]
lea rdi, [rax+10h]
cmp qword ptr [rax+50h], 0
jnz short loc_4719A
call _pthread_mutex_lock
loc_4715C:
mov r15, [r14]
cmp word ptr [r15+0ACh], 0
jz short loc_47178
mov rax, [rbx]
xor ecx, ecx
xchg rcx, [rax+10h]
mov rax, [r14]
jmp short loc_4713B
loc_47178:
mov rdi, [r15+50h]
add r15, 10h
test rdi, rdi
jnz short loc_471AD
loc_47185:
mov rdi, r15
call _pthread_mutex_unlock
mov rcx, [rbx]
xor eax, eax
xor edx, edx
xchg rdx, [rcx+10h]
jmp short loc_4713B
loc_4719A:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 285h
call psi_mutex_lock
jmp short loc_4715C
loc_471AD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_47185
|
long long trnman_trid_to_trn(long long a1, unsigned long long a2)
{
_QWORD *v3; // rax
long long result; // rax
_QWORD *v5; // r14
long long v6; // rax
long long v7; // rdi
long long v8; // r15
long long v9; // rdi
long long v10; // r15
_QWORD v11[4]; // [rsp+0h] [rbp-20h] BYREF
v11[0] = a2;
if ( *(_QWORD *)(a1 + 128) > a2 )
return 0LL;
v3 = (_QWORD *)lf_hash_search((long long)&trid_to_trn, *(volatile long long **)a1, (long long)v11, 8u);
if ( (unsigned long long)v3 < 2 )
return 0LL;
v5 = v3;
v6 = *v3;
v7 = v6 + 16;
if ( *(_QWORD *)(v6 + 80) )
psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x285u);
else
pthread_mutex_lock(v7);
v8 = *v5;
if ( *(_WORD *)(*v5 + 172LL) )
{
_InterlockedExchange64((volatile long long *)(*(_QWORD *)a1 + 16LL), 0LL);
return *v5;
}
else
{
v9 = *(_QWORD *)(v8 + 80);
v10 = v8 + 16;
if ( v9 )
((void ( *)(long long))PSI_server[44])(v9);
pthread_mutex_unlock(v10);
result = 0LL;
_InterlockedExchange64((volatile long long *)(*(_QWORD *)a1 + 16LL), 0LL);
}
return result;
}
|
trnman_trid_to_trn:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV qword ptr [RBP + -0x20],RSI
CMP qword ptr [RDI + 0x80],RSI
JA 0x00147139
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
LEA RDI,[0x4fd458]
LEA RDX,[RBP + -0x20]
MOV ECX,0x8
CALL 0x0012fc5f
CMP RAX,0x2
JNC 0x00147146
LAB_00147139:
XOR EAX,EAX
LAB_0014713b:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00147146:
MOV R14,RAX
MOV RAX,qword ptr [RAX]
LEA RDI,[RAX + 0x10]
CMP qword ptr [RAX + 0x50],0x0
JNZ 0x0014719a
CALL 0x00129220
LAB_0014715c:
MOV R15,qword ptr [R14]
CMP word ptr [R15 + 0xac],0x0
JZ 0x00147178
MOV RAX,qword ptr [RBX]
XOR ECX,ECX
XCHG qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [R14]
JMP 0x0014713b
LAB_00147178:
MOV RDI,qword ptr [R15 + 0x50]
ADD R15,0x10
TEST RDI,RDI
JNZ 0x001471ad
LAB_00147185:
MOV RDI,R15
CALL 0x001291e0
MOV RCX,qword ptr [RBX]
XOR EAX,EAX
XOR EDX,EDX
XCHG qword ptr [RCX + 0x10],RDX
JMP 0x0014713b
LAB_0014719a:
LEA RSI,[0x1d99ad]
MOV EDX,0x285
CALL 0x0012eb8f
JMP 0x0014715c
LAB_001471ad:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00147185
|
long trnman_trid_to_trn(long *param_1,ulong param_2)
{
pthread_mutex_t *__mutex;
long lVar1;
long *plVar2;
ulong local_28;
if ((param_2 < (ulong)param_1[0x10]) ||
(local_28 = param_2, plVar2 = (long *)lf_hash_search(trid_to_trn,*param_1,&local_28),
plVar2 < (long *)0x2)) {
return 0;
}
__mutex = (pthread_mutex_t *)(*plVar2 + 0x10);
if (*(long *)(*plVar2 + 0x50) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x285);
}
lVar1 = *plVar2;
if (*(short *)(lVar1 + 0xac) != 0) {
LOCK();
*(int8 *)(*param_1 + 0x10) = 0;
UNLOCK();
return *plVar2;
}
if (*(long *)(lVar1 + 0x50) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x10));
LOCK();
*(int8 *)(*param_1 + 0x10) = 0;
UNLOCK();
return 0;
}
|
|
65,459 |
my_wc_mb_eucjpms
|
eloqsql/strings/ctype-eucjpms.c
|
static int
my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_wc_mb_eucjpms:
cmpl $0x7f, %esi
jg 0x73c6d
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x73ca2
movb %sil, (%rdx)
movl $0x1, %eax
retq
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x73ca2
leaq 0xf0cb1(%rip), %rdi # 0x164930
movzwl (%rdi,%rsi,2), %edi
testw %di, %di
je 0x73ca3
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x73ca2
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq 0x110c81(%rip), %rdi # 0x184930
movzwl (%rdi,%rsi,2), %ebx
testw %bx, %bx
je 0x73cd6
leaq 0x3(%rdx), %rsi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rsi
ja 0x73d01
movb $-0x71, (%rdx)
movb %bh, 0x1(%rdx)
movb %bl, 0x2(%rdx)
movl $0x3, %eax
jmp 0x73d01
leaq -0xff61(%rsi), %rdi
cmpq $0x3e, %rdi
ja 0x73d01
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x73d01
movb $-0x72, (%rdx)
addb $0x40, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
popq %rbx
popq %rbp
retq
|
my_wc_mb_eucjpms:
cmp esi, 7Fh
jg short loc_73C6D
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_73CA2
mov [rdx], sil
mov eax, 1
retn
loc_73C6D:
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_73CA2
lea rdi, unicode_to_jisx0208_eucjpms
movzx edi, word ptr [rdi+rsi*2]
test di, di
jz short loc_73CA3
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short locret_73CA2
rol di, 8
mov [rdx], di
mov eax, 2
locret_73CA2:
retn
loc_73CA3:
push rbp
mov rbp, rsp
push rbx
lea rdi, unicode_to_jisx0212_eucjpms
movzx ebx, word ptr [rdi+rsi*2]
test bx, bx
jz short loc_73CD6
lea rsi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rsi, rcx
ja short loc_73D01
mov byte ptr [rdx], 8Fh
mov [rdx+1], bh
mov [rdx+2], bl
mov eax, 3
jmp short loc_73D01
loc_73CD6:
lea rdi, [rsi-0FF61h]
cmp rdi, 3Eh ; '>'
ja short loc_73D01
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_73D01
mov byte ptr [rdx], 8Eh
add sil, 40h ; '@'
mov [rdx+1], sil
mov eax, 2
loc_73D01:
pop rbx
pop rbp
retn
|
long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4)
{
long long result; // rax
__int16 v5; // di
__int16 v6; // bx
if ( (int)a2 > 127 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjpms[a2];
if ( v5 )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_WORD *)a3 = __ROL2__(v5, 8);
return 2LL;
}
}
else
{
v6 = unicode_to_jisx0212_eucjpms[a2];
if ( v6 )
{
result = 4294967193LL;
if ( a3 + 3 <= a4 )
{
*(_BYTE *)a3 = -113;
*(_BYTE *)(a3 + 1) = HIBYTE(v6);
*(_BYTE *)(a3 + 2) = v6;
return 3LL;
}
}
else if ( a2 - 65377 <= 0x3E )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_BYTE *)a3 = -114;
*(_BYTE *)(a3 + 1) = a2 + 64;
return 2LL;
}
}
}
}
}
else
{
result = 4294967195LL;
if ( a3 < a4 )
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
|
my_wc_mb_eucjpms:
CMP ESI,0x7f
JG 0x00173c6d
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00173ca2
MOV byte ptr [RDX],SIL
MOV EAX,0x1
RET
LAB_00173c6d:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00173ca2
LEA RDI,[0x264930]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST DI,DI
JZ 0x00173ca3
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x00173ca2
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_00173ca2:
RET
LAB_00173ca3:
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDI,[0x284930]
MOVZX EBX,word ptr [RDI + RSI*0x2]
TEST BX,BX
JZ 0x00173cd6
LEA RSI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RSI,RCX
JA 0x00173d01
MOV byte ptr [RDX],0x8f
MOV byte ptr [RDX + 0x1],BH
MOV byte ptr [RDX + 0x2],BL
MOV EAX,0x3
JMP 0x00173d01
LAB_00173cd6:
LEA RDI,[RSI + -0xff61]
CMP RDI,0x3e
JA 0x00173d01
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00173d01
MOV byte ptr [RDX],0x8e
ADD SIL,0x40
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
LAB_00173d01:
POP RBX
POP RBP
RET
|
int8 my_wc_mb_eucjpms(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
short sVar2;
int8 uVar3;
if ((int)param_2 < 0x80) {
uVar3 = 0xffffff9b;
if (param_3 < param_4) {
*(char *)param_3 = (char)param_2;
return 1;
}
}
else {
uVar3 = 0;
if (param_2 < 0x10000) {
uVar1 = *(ushort *)(unicode_to_jisx0208_eucjpms + param_2 * 2);
if (uVar1 == 0) {
sVar2 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2);
if (sVar2 == 0) {
if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) {
*(char *)param_3 = -0x72;
*(char *)((long)param_3 + 1) = (char)param_2 + '@';
uVar3 = 2;
}
}
else {
uVar3 = 0xffffff99;
if ((ushort *)((long)param_3 + 3) <= param_4) {
*(char *)param_3 = -0x71;
*(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8);
*(char *)(param_3 + 1) = (char)sVar2;
uVar3 = 3;
}
}
return uVar3;
}
uVar3 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar3 = 2;
}
}
}
return uVar3;
}
|
|
65,460 |
ma_unique_comp
|
eloqsql/storage/maria/ma_unique.c
|
my_bool _ma_unique_comp(MARIA_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *pos_a++;
b_length= (uint) *pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _ma_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _ma_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((void*) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((void*) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, pos_a, a_length,
pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
}
|
O3
|
c
|
ma_unique_comp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %r15
movq %rdi, -0x48(%rbp)
cmpq 0x10(%rdi), %r15
jae 0x429cc
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movl %ecx, -0x2c(%rbp)
movzbl 0x18(%r15), %r12d
movzwl 0x14(%r15), %ecx
movb 0x19(%r15), %dil
testb %dil, %dil
je 0x428b6
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movb $0x1, %al
cmpb %dil, %r8b
jne 0x429ce
testb %r8b, %r8b
je 0x428b6
testb %r14b, %r14b
jne 0x4298c
jmp 0x429ce
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0x428d5
testb $0x20, %al
jne 0x428ec
movl %ecx, %esi
jmp 0x42959
cmpb $0x1, 0x1a(%r15)
jne 0x4293b
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0x4294b
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x3e1b3
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x3e1b3
movzwl 0x14(%r15), %edx
cmpl %edx, %r14d
movl %edx, %ecx
cmovbl %r14d, %ecx
cmpl %edx, %eax
movl %edx, %esi
cmovbl %eax, %esi
testl %edx, %edx
cmovel %r14d, %ecx
movl -0x2c(%rbp), %r14d
cmovel %eax, %esi
movzbl 0x1a(%r15), %eax
movq (%rbx,%rax), %rbx
movq (%r13,%rax), %r13
jmp 0x42959
movzwl (%rbx), %eax
movzwl (%r13), %edx
addq $0x2, %rbx
addq $0x2, %r13
cmpl %ecx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
movl %ecx, %esi
cmovbl %edx, %esi
movl %eax, %ecx
cmpl $0x11, %r12d
ja 0x429a0
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0x429a0
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0x9e6e4
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x429dd
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0x42876
jmp 0x429cc
movb $0x1, %al
cmpl %esi, %ecx
jne 0x429ce
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0x4298c
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0x429b3
jmp 0x429ce
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x429ce
nopl (%rax)
|
_ma_unique_comp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, [rdi+8]
mov [rbp+var_48], rdi
cmp r15, [rdi+10h]
jnb loc_429CC
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_42876:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_428B6
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov al, 1
cmp r8b, dil
jnz loc_429CE
test r8b, r8b
jz short loc_428B6
test r14b, r14b
jnz loc_4298C
jmp loc_429CE
loc_428B6:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_428D5
test al, 20h
jnz short loc_428EC
mov esi, ecx
jmp loc_42959
loc_428D5:
cmp byte ptr [r15+1Ah], 1
jnz short loc_4293B
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_4294B
loc_428EC:
movzx edi, byte ptr [r15+1Ah]
mov rsi, rbx
call _ma_calc_blob_length
mov r14, rax
movzx edi, byte ptr [r15+1Ah]
mov rsi, r13
call _ma_calc_blob_length
movzx edx, word ptr [r15+14h]
cmp r14d, edx
mov ecx, edx
cmovb ecx, r14d
cmp eax, edx
mov esi, edx
cmovb esi, eax
test edx, edx
cmovz ecx, r14d
mov r14d, [rbp+var_2C]
cmovz esi, eax
movzx eax, byte ptr [r15+1Ah]
mov rbx, [rbx+rax]
mov r13, [r13+rax+0]
jmp short loc_42959
loc_4293B:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_4294B:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_42959:
cmp r12d, 11h
ja short loc_429A0
mov eax, 28002h
bt eax, r12d
jnb short loc_429A0
mov rdi, [r15]
mov edx, ecx
mov r8d, esi
mov rsi, rbx
mov rcx, r13
xor r9d, r9d
call ha_compare_text
test eax, eax
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_429DD
loc_4298C:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_42876
jmp short loc_429CC
loc_429A0:
mov al, 1
cmp ecx, esi
jnz short loc_429CE
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_429B3:
cmp rcx, r8
jz short loc_4298C
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_429B3
jmp short loc_429CE
loc_429CC:
xor eax, eax
loc_429CE:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_429DD:
mov al, 1
jmp short loc_429CE
|
char ma_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned long long v4; // r15
char v5; // r14
unsigned int v6; // r12d
unsigned int v7; // ecx
char v8; // di
long long v9; // rax
char v10; // r8
char v11; // di
char result; // al
long long v13; // r13
unsigned __int8 *v14; // rbx
unsigned __int8 *v15; // r13
__int16 v16; // ax
unsigned int v17; // esi
unsigned int v18; // eax
unsigned int v19; // edx
unsigned int v20; // r14d
unsigned int v21; // eax
unsigned int v22; // edx
long long v23; // rax
int v24; // eax
int v25; // eax
long long v26; // r8
bool v27; // zf
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 8);
if ( v4 < *(_QWORD *)(a1 + 16) )
{
v5 = a4;
v29 = a3;
v30 = a2;
do
{
v6 = *(unsigned __int8 *)(v4 + 24);
v7 = *(unsigned __int16 *)(v4 + 20);
v8 = *(_BYTE *)(v4 + 25);
if ( !v8 )
goto LABEL_8;
v9 = *(unsigned int *)(v4 + 12);
v10 = v8 & *(_BYTE *)(a2 + v9);
v11 = *(_BYTE *)(a3 + v9) & v8;
result = 1;
if ( v10 != v11 )
return result;
if ( v10 )
{
if ( !v5 )
return result;
}
else
{
LABEL_8:
v13 = *(unsigned int *)(v4 + 8);
v14 = (unsigned __int8 *)(a2 + v13);
v15 = (unsigned __int8 *)(a3 + v13);
v16 = *(_WORD *)(v4 + 18);
if ( (v16 & 8) != 0 )
{
if ( *(_BYTE *)(v4 + 26) == 1 )
{
v18 = *v14++;
v19 = *v15++;
}
else
{
v18 = *(unsigned __int16 *)v14;
v19 = *(unsigned __int16 *)v15;
v14 += 2;
v15 += 2;
}
if ( v18 >= v7 )
v18 = *(unsigned __int16 *)(v4 + 20);
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v19 < v7 )
v17 = v19;
v7 = v18;
}
else if ( (v16 & 0x20) != 0 )
{
v20 = ma_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14);
v21 = ma_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15);
v22 = *(unsigned __int16 *)(v4 + 20);
v7 = v22;
if ( v20 < v22 )
v7 = v20;
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v21 < v22 )
v17 = v21;
if ( !*(_WORD *)(v4 + 20) )
v7 = v20;
v5 = a4;
if ( !*(_WORD *)(v4 + 20) )
v17 = v21;
v23 = *(unsigned __int8 *)(v4 + 26);
v14 = *(unsigned __int8 **)&v14[v23];
v15 = *(unsigned __int8 **)&v15[v23];
}
else
{
v17 = *(unsigned __int16 *)(v4 + 20);
}
if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) )
{
v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL);
a3 = v29;
a2 = v30;
if ( v25 )
return 1;
}
else
{
result = 1;
if ( v7 != v17 )
return result;
v26 = 0LL;
a3 = v29;
a2 = v30;
while ( v7 != v26 )
{
v27 = v14[v26] == v15[v26];
++v26;
if ( !v27 )
return result;
}
}
}
v4 += 32LL;
}
while ( v4 < *(_QWORD *)(a1 + 16) );
}
return 0;
}
|
_ma_unique_comp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x48],RDI
CMP R15,qword ptr [RDI + 0x10]
JNC 0x001429cc
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_00142876:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x001428b6
MOV EAX,dword ptr [R15 + 0xc]
MOV R8B,byte ptr [RSI + RAX*0x1]
AND R8B,DIL
AND DIL,byte ptr [RDX + RAX*0x1]
MOV AL,0x1
CMP R8B,DIL
JNZ 0x001429ce
TEST R8B,R8B
JZ 0x001428b6
TEST R14B,R14B
JNZ 0x0014298c
JMP 0x001429ce
LAB_001428b6:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x001428d5
TEST AL,0x20
JNZ 0x001428ec
MOV ESI,ECX
JMP 0x00142959
LAB_001428d5:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x0014293b
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x0014294b
LAB_001428ec:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x0013e1b3
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x0013e1b3
MOVZX EDX,word ptr [R15 + 0x14]
CMP R14D,EDX
MOV ECX,EDX
CMOVC ECX,R14D
CMP EAX,EDX
MOV ESI,EDX
CMOVC ESI,EAX
TEST EDX,EDX
CMOVZ ECX,R14D
MOV R14D,dword ptr [RBP + -0x2c]
CMOVZ ESI,EAX
MOVZX EAX,byte ptr [R15 + 0x1a]
MOV RBX,qword ptr [RBX + RAX*0x1]
MOV R13,qword ptr [R13 + RAX*0x1]
JMP 0x00142959
LAB_0014293b:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_0014294b:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_00142959:
CMP R12D,0x11
JA 0x001429a0
MOV EAX,0x28002
BT EAX,R12D
JNC 0x001429a0
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x0019e6e4
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x001429dd
LAB_0014298c:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x00142876
JMP 0x001429cc
LAB_001429a0:
MOV AL,0x1
CMP ECX,ESI
JNZ 0x001429ce
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_001429b3:
CMP RCX,R8
JZ 0x0014298c
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x001429b3
JMP 0x001429ce
LAB_001429cc:
XOR EAX,EAX
LAB_001429ce:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001429dd:
MOV AL,0x1
JMP 0x001429ce
|
int8 _ma_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
byte bVar14;
ulong uVar15;
ushort *puVar16;
int8 *puVar17;
puVar17 = *(int8 **)(param_1 + 8);
if (puVar17 < *(int8 **)(param_1 + 0x10)) {
do {
bVar4 = *(byte *)(puVar17 + 3);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar11 = (ulong)uVar5;
bVar3 = *(byte *)((long)puVar17 + 0x19);
if (bVar3 == 0) {
LAB_001428b6:
puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1));
puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3);
if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) {
uVar10 = (uint)uVar5;
}
else {
uVar7 = _ma_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13);
uVar8 = _ma_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar6 = (uint)uVar5;
if (uVar7 < uVar5) {
uVar6 = uVar7;
}
uVar12 = (uint)uVar5;
uVar10 = uVar12;
if (uVar8 < uVar12) {
uVar10 = uVar8;
}
if (uVar12 == 0) {
uVar10 = uVar8;
uVar6 = uVar7;
}
uVar11 = (ulong)uVar6;
puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a));
puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a));
}
}
else {
if (*(char *)((long)puVar17 + 0x1a) == '\x01') {
uVar6 = (uint)(byte)*puVar13;
puVar13 = (ushort *)((long)puVar13 + 1);
uVar7 = (uint)(byte)*puVar16;
puVar16 = (ushort *)((long)puVar16 + 1);
}
else {
uVar6 = (uint)*puVar13;
uVar7 = (uint)*puVar16;
puVar13 = puVar13 + 1;
puVar16 = puVar16 + 1;
}
uVar10 = (uint)uVar5;
if (uVar10 <= uVar6) {
uVar6 = uVar10;
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
uVar11 = (ulong)uVar6;
}
if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) {
iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0);
if (iVar9 != 0) {
return 1;
}
}
else {
if ((uint)uVar11 != uVar10) {
return 1;
}
uVar15 = 0;
while (uVar11 != uVar15) {
pbVar1 = (byte *)((long)puVar13 + uVar15);
pbVar2 = (byte *)((long)puVar16 + uVar15);
uVar15 = uVar15 + 1;
if (*pbVar1 != *pbVar2) {
return 1;
}
}
}
}
else {
bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3;
if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) {
return 1;
}
if (bVar14 == 0) goto LAB_001428b6;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
|
|
65,461 |
list_delete
|
eloqsql/libmariadb/libmariadb/ma_list.c
|
LIST *list_delete(LIST *root, LIST *element)
{
if (element->prev)
element->prev->next=element->next;
else
root=element->next;
if (element->next)
element->next->prev=element->prev;
return root;
}
|
O3
|
c
|
list_delete:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movq 0x8(%rsi), %rcx
movq %rcx, %rax
testq %rdx, %rdx
je 0x1fa3e
movq %rcx, 0x8(%rdx)
movq %rdi, %rax
testq %rcx, %rcx
je 0x1fa49
movq (%rsi), %rdx
movq %rdx, (%rcx)
popq %rbp
retq
|
list_delete:
push rbp
mov rbp, rsp
mov rdx, [rsi]
mov rcx, [rsi+8]
mov rax, rcx
test rdx, rdx
jz short loc_1FA3E
mov [rdx+8], rcx
mov rax, rdi
loc_1FA3E:
test rcx, rcx
jz short loc_1FA49
mov rdx, [rsi]
mov [rcx], rdx
loc_1FA49:
pop rbp
retn
|
_QWORD * list_delete(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // rcx
_QWORD *result; // rax
v2 = (_QWORD *)a2[1];
result = v2;
if ( *a2 )
{
*(_QWORD *)(*a2 + 8LL) = v2;
result = a1;
}
if ( v2 )
*v2 = *a2;
return result;
}
|
list_delete:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
MOV RAX,RCX
TEST RDX,RDX
JZ 0x0011fa3e
MOV qword ptr [RDX + 0x8],RCX
MOV RAX,RDI
LAB_0011fa3e:
TEST RCX,RCX
JZ 0x0011fa49
MOV RDX,qword ptr [RSI]
MOV qword ptr [RCX],RDX
LAB_0011fa49:
POP RBP
RET
|
long * list_delete(long *param_1,long *param_2)
{
long *plVar1;
long *plVar2;
plVar1 = (long *)param_2[1];
plVar2 = plVar1;
if (*param_2 != 0) {
*(long **)(*param_2 + 8) = plVar1;
plVar2 = param_1;
}
if (plVar1 != (long *)0x0) {
*plVar1 = *param_2;
}
return plVar2;
}
|
|
65,462 |
llm_tokenizer_rwkv_session::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&)
|
monkey531[P]llama/src/llama-vocab.cpp
|
void tokenize(const std::string & text, std::vector<llama_token> & output) {
uint32_t position = 0;
while (position < text.size()) {
const struct naive_trie * node = tokenizer.token_matcher.traverse(text[position]);
if (node == NULL) {
// no matching token found, add unknown token
output.push_back(vocab.token_unk());
position += 1;
continue;
}
// traverse the trie to find the longest matching token
uint32_t token_id = 0;
uint32_t token_length = 0;
while (node != NULL) {
if (node->has_value) {
token_id = node->value;
token_length = position + 1;
}
node = node->traverse(text[++position]);
}
// add the longest matching token
output.push_back(token_id);
position = token_length;
}
}
|
O1
|
cpp
|
llm_tokenizer_rwkv_session::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&):
cmpq $0x0, 0x8(%rsi)
je 0xeeb79
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ecx, %ecx
movq %rsp, %r13
xorl %ebp, %ebp
movq 0x8(%r15), %rdx
movq (%r14), %rax
movb (%rax,%rcx), %sil
movq 0x18(%rdx), %rcx
addq $0x10, %rdx
movq %rdx, %rdi
testq %rcx, %rcx
je 0xeea77
movq %rdx, %rdi
xorl %r8d, %r8d
cmpb %sil, 0x20(%rcx)
setl %r8b
cmovgeq %rcx, %rdi
movq 0x10(%rcx,%r8,8), %rcx
testq %rcx, %rcx
jne 0xeea5e
movq %rdx, %rcx
cmpq %rdx, %rdi
je 0xeea8a
cmpb %sil, 0x20(%rdi)
cmovgq %rdx, %rdi
movq %rdi, %rcx
cmpq %rdx, %rcx
je 0xeeb19
addq $0x28, %rcx
xorl %r12d, %r12d
xorl %edx, %edx
cmpb $0x1, 0x30(%rcx)
jne 0xeeaa9
movl 0x34(%rcx), %edx
leal 0x1(%rbp), %r12d
incl %ebp
movb (%rax,%rbp), %sil
movq 0x10(%rcx), %r8
addq $0x8, %rcx
movq %rcx, %rdi
testq %r8, %r8
je 0xeeadb
movq %rcx, %rdi
xorl %r9d, %r9d
cmpb %sil, 0x20(%r8)
setl %r9b
cmovgeq %r8, %rdi
movq 0x10(%r8,%r9,8), %r8
testq %r8, %r8
jne 0xeeac2
movq %rcx, %r8
cmpq %rcx, %rdi
je 0xeeaee
cmpb %sil, 0x20(%rdi)
cmovgq %rcx, %rdi
movq %rdi, %r8
leaq 0x28(%r8), %rsi
cmpq %rcx, %r8
movl $0x0, %ecx
cmovneq %rsi, %rcx
jne 0xeea9c
movl %edx, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xeeb3c
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xeeb5b
movq (%r15), %rax
movq (%rax), %rax
movl 0x20(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xeeb49
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xeeb56
movq %rbx, %rdi
movq %r13, %rdx
callq 0x6b740
jmp 0xeeb5b
movq %rbx, %rdi
leaq 0x4(%rsp), %rdx
callq 0x6b740
incl %ebp
movl %ebp, %r12d
movl %r12d, %ecx
movl %r12d, %ebp
cmpq %rcx, 0x8(%r14)
ja 0xeea40
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN26llm_tokenizer_rwkv_session8tokenizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIiSaIiEE:
cmp qword ptr [rsi+8], 0
jz locret_EEB79
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
xor ecx, ecx
mov r13, rsp
xor ebp, ebp
loc_EEA40:
mov rdx, [r15+8]
mov rax, [r14]
mov sil, [rax+rcx]
mov rcx, [rdx+18h]
add rdx, 10h
mov rdi, rdx
test rcx, rcx
jz short loc_EEA77
mov rdi, rdx
loc_EEA5E:
xor r8d, r8d
cmp [rcx+20h], sil
setl r8b
cmovge rdi, rcx
mov rcx, [rcx+r8*8+10h]
test rcx, rcx
jnz short loc_EEA5E
loc_EEA77:
mov rcx, rdx
cmp rdi, rdx
jz short loc_EEA8A
cmp [rdi+20h], sil
cmovg rdi, rdx
mov rcx, rdi
loc_EEA8A:
cmp rcx, rdx
jz loc_EEB19
add rcx, 28h ; '('
xor r12d, r12d
xor edx, edx
loc_EEA9C:
cmp byte ptr [rcx+30h], 1
jnz short loc_EEAA9
mov edx, [rcx+34h]
lea r12d, [rbp+1]
loc_EEAA9:
inc ebp
mov sil, [rax+rbp]
mov r8, [rcx+10h]
add rcx, 8
mov rdi, rcx
test r8, r8
jz short loc_EEADB
mov rdi, rcx
loc_EEAC2:
xor r9d, r9d
cmp [r8+20h], sil
setl r9b
cmovge rdi, r8
mov r8, [r8+r9*8+10h]
test r8, r8
jnz short loc_EEAC2
loc_EEADB:
mov r8, rcx
cmp rdi, rcx
jz short loc_EEAEE
cmp [rdi+20h], sil
cmovg rdi, rcx
mov r8, rdi
loc_EEAEE:
lea rsi, [r8+28h]
cmp r8, rcx
mov ecx, 0
cmovnz rcx, rsi
jnz short loc_EEA9C
mov [rsp+38h+var_38], edx
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_EEB3C
mov [rsi], edx
add rsi, 4
mov [rbx+8], rsi
jmp short loc_EEB5B
loc_EEB19:
mov rax, [r15]
mov rax, [rax]
mov eax, [rax+20h]
mov [rsp+38h+var_34], eax
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_EEB49
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_EEB56
loc_EEB3C:
mov rdi, rbx
mov rdx, r13
call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
jmp short loc_EEB5B
loc_EEB49:
mov rdi, rbx
lea rdx, [rsp+38h+var_34]
call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
loc_EEB56:
inc ebp
mov r12d, ebp
loc_EEB5B:
mov ecx, r12d
mov ebp, r12d
cmp [r14+8], rcx
ja loc_EEA40
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_EEB79:
retn
|
long long llm_tokenizer_rwkv_session::tokenize(_QWORD *a1, long long *a2, long long a3)
{
long long result; // rax
long long v7; // rcx
long long v8; // rbp
long long v9; // rdx
signed __int8 v10; // si
long long v11; // rcx
long long v12; // rdx
long long v13; // rdi
long long v14; // rcx
long long v15; // rcx
unsigned int v16; // r12d
int v17; // edx
signed __int8 v18; // si
long long v19; // r8
long long v20; // rcx
long long v21; // rdi
long long v22; // r8
_DWORD *v23; // rsi
_DWORD *v24; // rsi
_QWORD v25[7]; // [rsp+0h] [rbp-38h] BYREF
if ( a2[1] )
{
v25[0] = result;
v7 = 0LL;
LODWORD(v8) = 0;
do
{
v9 = a1[1];
result = *a2;
v10 = *(_BYTE *)(*a2 + v7);
v11 = *(_QWORD *)(v9 + 24);
v12 = v9 + 16;
v13 = v12;
if ( v11 )
{
v13 = v12;
do
{
if ( *(char *)(v11 + 32) >= v10 )
v13 = v11;
v11 = *(_QWORD *)(v11 + 8LL * (*(_BYTE *)(v11 + 32) < (unsigned __int8)v10) + 16);
}
while ( v11 );
}
v14 = v12;
if ( v13 != v12 )
{
if ( *(char *)(v13 + 32) > v10 )
v13 = v12;
v14 = v13;
}
if ( v14 == v12 )
{
result = *(unsigned int *)(*(_QWORD *)*a1 + 32LL);
HIDWORD(v25[0]) = *(_DWORD *)(*(_QWORD *)*a1 + 32LL);
v24 = *(_DWORD **)(a3 + 8);
if ( v24 == *(_DWORD **)(a3 + 16) )
{
result = std::vector<int>::_M_realloc_insert<int>(a3, v24, (char *)v25 + 4);
}
else
{
*v24 = result;
*(_QWORD *)(a3 + 8) = v24 + 1;
}
v16 = v8 + 1;
}
else
{
v15 = v14 + 40;
v16 = 0;
v17 = 0;
while ( 1 )
{
if ( *(_BYTE *)(v15 + 48) == 1 )
{
v17 = *(_DWORD *)(v15 + 52);
v16 = v8 + 1;
}
v8 = (unsigned int)(v8 + 1);
v18 = *(_BYTE *)(result + v8);
v19 = *(_QWORD *)(v15 + 16);
v20 = v15 + 8;
v21 = v20;
if ( v19 )
{
v21 = v20;
do
{
if ( *(char *)(v19 + 32) >= v18 )
v21 = v19;
v19 = *(_QWORD *)(v19 + 8LL * (*(_BYTE *)(v19 + 32) < (unsigned __int8)v18) + 16);
}
while ( v19 );
}
v22 = v20;
if ( v21 != v20 )
{
if ( *(char *)(v21 + 32) > v18 )
v21 = v20;
v22 = v21;
}
if ( v22 == v20 )
break;
v15 = v22 + 40;
}
LODWORD(v25[0]) = v17;
v23 = *(_DWORD **)(a3 + 8);
if ( v23 == *(_DWORD **)(a3 + 16) )
{
result = std::vector<int>::_M_realloc_insert<int>(a3, v23, v25);
}
else
{
*v23 = v17;
*(_QWORD *)(a3 + 8) = v23 + 1;
}
}
v7 = v16;
LODWORD(v8) = v16;
}
while ( a2[1] > (unsigned long long)v16 );
}
return result;
}
|
tokenize:
CMP qword ptr [RSI + 0x8],0x0
JZ 0x001eeb79
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
XOR ECX,ECX
MOV R13,RSP
XOR EBP,EBP
LAB_001eea40:
MOV RDX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [R14]
MOV SIL,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RDX + 0x18]
ADD RDX,0x10
MOV RDI,RDX
TEST RCX,RCX
JZ 0x001eea77
MOV RDI,RDX
LAB_001eea5e:
XOR R8D,R8D
CMP byte ptr [RCX + 0x20],SIL
SETL R8B
CMOVGE RDI,RCX
MOV RCX,qword ptr [RCX + R8*0x8 + 0x10]
TEST RCX,RCX
JNZ 0x001eea5e
LAB_001eea77:
MOV RCX,RDX
CMP RDI,RDX
JZ 0x001eea8a
CMP byte ptr [RDI + 0x20],SIL
CMOVG RDI,RDX
MOV RCX,RDI
LAB_001eea8a:
CMP RCX,RDX
JZ 0x001eeb19
ADD RCX,0x28
XOR R12D,R12D
XOR EDX,EDX
LAB_001eea9c:
CMP byte ptr [RCX + 0x30],0x1
JNZ 0x001eeaa9
MOV EDX,dword ptr [RCX + 0x34]
LEA R12D,[RBP + 0x1]
LAB_001eeaa9:
INC EBP
MOV SIL,byte ptr [RAX + RBP*0x1]
MOV R8,qword ptr [RCX + 0x10]
ADD RCX,0x8
MOV RDI,RCX
TEST R8,R8
JZ 0x001eeadb
MOV RDI,RCX
LAB_001eeac2:
XOR R9D,R9D
CMP byte ptr [R8 + 0x20],SIL
SETL R9B
CMOVGE RDI,R8
MOV R8,qword ptr [R8 + R9*0x8 + 0x10]
TEST R8,R8
JNZ 0x001eeac2
LAB_001eeadb:
MOV R8,RCX
CMP RDI,RCX
JZ 0x001eeaee
CMP byte ptr [RDI + 0x20],SIL
CMOVG RDI,RCX
MOV R8,RDI
LAB_001eeaee:
LEA RSI,[R8 + 0x28]
CMP R8,RCX
MOV ECX,0x0
CMOVNZ RCX,RSI
JNZ 0x001eea9c
MOV dword ptr [RSP],EDX
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001eeb3c
MOV dword ptr [RSI],EDX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001eeb5b
LAB_001eeb19:
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001eeb49
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001eeb56
LAB_001eeb3c:
MOV RDI,RBX
MOV RDX,R13
CALL 0x0016b740
JMP 0x001eeb5b
LAB_001eeb49:
MOV RDI,RBX
LEA RDX,[RSP + 0x4]
CALL 0x0016b740
LAB_001eeb56:
INC EBP
MOV R12D,EBP
LAB_001eeb5b:
MOV ECX,R12D
MOV EBP,R12D
CMP qword ptr [R14 + 0x8],RCX
JA 0x001eea40
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_001eeb79:
RET
|
/* llm_tokenizer_rwkv_session::tokenize(std::__cxx11::string const&, std::vector<int,
std::allocator<int> >&) */
void __thiscall
llm_tokenizer_rwkv_session::tokenize
(llm_tokenizer_rwkv_session *this,string *param_1,vector *param_2)
{
char cVar1;
int4 *puVar2;
int8 in_RAX;
long lVar3;
int4 uVar4;
long lVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
int8 local_38;
if (*(long *)(param_1 + 8) != 0) {
uVar6 = 0;
local_38 = in_RAX;
do {
cVar1 = *(char *)(*(long *)param_1 + uVar6);
lVar5 = *(long *)(this + 8) + 0x10;
lVar7 = lVar5;
for (lVar3 = *(long *)(*(long *)(this + 8) + 0x18); lVar3 != 0;
lVar3 = *(long *)(lVar3 + 0x10 + (ulong)(*(char *)(lVar3 + 0x20) < cVar1) * 8)) {
if (cVar1 <= *(char *)(lVar3 + 0x20)) {
lVar7 = lVar3;
}
}
lVar3 = lVar5;
if ((lVar7 != lVar5) && (lVar3 = lVar7, cVar1 < *(char *)(lVar7 + 0x20))) {
lVar3 = lVar5;
}
if (lVar3 == lVar5) {
local_38 = CONCAT44(*(int4 *)(**(long **)this + 0x20),(int4)local_38);
puVar2 = *(int4 **)(param_2 + 8);
if (puVar2 == *(int4 **)(param_2 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)param_2,puVar2,(long)&local_38 + 4);
}
else {
*puVar2 = *(int4 *)(**(long **)this + 0x20);
*(int4 **)(param_2 + 8) = puVar2 + 1;
}
uVar6 = (ulong)((int)uVar6 + 1);
}
else {
uVar8 = 0;
uVar4 = 0;
do {
if (*(char *)(lVar3 + 0x58) == '\x01') {
uVar4 = *(int4 *)(lVar3 + 0x5c);
uVar8 = (ulong)((int)uVar6 + 1);
}
uVar6 = (ulong)((int)uVar6 + 1);
cVar1 = *(char *)(*(long *)param_1 + uVar6);
lVar5 = lVar3 + 0x30;
lVar7 = lVar5;
for (lVar3 = *(long *)(lVar3 + 0x38); lVar3 != 0;
lVar3 = *(long *)(lVar3 + 0x10 + (ulong)(*(char *)(lVar3 + 0x20) < cVar1) * 8)) {
if (cVar1 <= *(char *)(lVar3 + 0x20)) {
lVar7 = lVar3;
}
}
lVar3 = lVar5;
if ((lVar7 != lVar5) && (lVar3 = lVar7, cVar1 < *(char *)(lVar7 + 0x20))) {
lVar3 = lVar5;
}
} while (lVar3 != lVar5);
local_38 = CONCAT44(local_38._4_4_,uVar4);
puVar2 = *(int4 **)(param_2 + 8);
uVar6 = uVar8;
if (puVar2 == *(int4 **)(param_2 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)param_2,puVar2,&local_38);
}
else {
*puVar2 = uVar4;
*(int4 **)(param_2 + 8) = puVar2 + 1;
}
}
} while (uVar6 < *(ulong *)(param_1 + 8));
}
return;
}
|
|
65,463 |
llm_tokenizer_rwkv_session::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&)
|
monkey531[P]llama/src/llama-vocab.cpp
|
void tokenize(const std::string & text, std::vector<llama_token> & output) {
uint32_t position = 0;
while (position < text.size()) {
const struct naive_trie * node = tokenizer.token_matcher.traverse(text[position]);
if (node == NULL) {
// no matching token found, add unknown token
output.push_back(vocab.token_unk());
position += 1;
continue;
}
// traverse the trie to find the longest matching token
uint32_t token_id = 0;
uint32_t token_length = 0;
while (node != NULL) {
if (node->has_value) {
token_id = node->value;
token_length = position + 1;
}
node = node->traverse(text[++position]);
}
// add the longest matching token
output.push_back(token_id);
position = token_length;
}
}
|
O3
|
cpp
|
llm_tokenizer_rwkv_session::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&):
cmpq $0x0, 0x8(%rsi)
je 0xea9e2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ecx, %ecx
leaq 0x4(%rsp), %r12
xorl %ebp, %ebp
movq 0x8(%r15), %rdx
movq 0x18(%rdx), %rsi
testq %rsi, %rsi
je 0xea913
movq (%r14), %rax
movb (%rax,%rcx), %dil
addq $0x10, %rdx
movq %rdx, %rcx
xorl %r8d, %r8d
cmpb %dil, 0x20(%rsi)
setl %r8b
cmovgeq %rsi, %rcx
movq 0x10(%rsi,%r8,8), %rsi
testq %rsi, %rsi
jne 0xea8ef
cmpq %rdx, %rcx
je 0xea913
cmpb %dil, 0x20(%rcx)
jle 0xea954
movq (%r15), %rax
movq (%rax), %rax
movl 0x20(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xea936
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xea941
movq %rbx, %rdi
movq %r12, %rdx
callq 0x6a6d0
incl %ebp
movl %ebp, %r13d
movl %r13d, %ecx
cmpq %rcx, 0x8(%r14)
ja 0xea8d4
jmp 0xea9d4
xorl %r13d, %r13d
xorl %edx, %edx
cmpb $0x0, 0x58(%rcx)
je 0xea969
movl 0x5c(%rcx), %edx
incl %ebp
movl %ebp, %r13d
jmp 0xea96b
incl %ebp
movq 0x38(%rcx), %rsi
testq %rsi, %rsi
je 0xea9a8
movl %ebp, %edi
movb (%rax,%rdi), %dil
movq %rcx, %r8
addq $0x30, %r8
movq %r8, %rcx
xorl %r9d, %r9d
cmpb %dil, 0x20(%rsi)
setl %r9b
cmovgeq %rsi, %rcx
movq 0x10(%rsi,%r9,8), %rsi
testq %rsi, %rsi
jne 0xea984
cmpq %r8, %rcx
je 0xea9a8
cmpb %dil, 0x20(%rcx)
jle 0xea959
movl %edx, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xea9c1
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xea9cc
movq %rbx, %rdi
movq %rsp, %rdx
callq 0x6a6d0
movl %r13d, %ebp
jmp 0xea946
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN26llm_tokenizer_rwkv_session8tokenizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIiSaIiEE:
cmp qword ptr [rsi+8], 0
jz locret_EA9E2
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
xor ecx, ecx
lea r12, [rsp+38h+var_34]
xor ebp, ebp
loc_EA8D4:
mov rdx, [r15+8]
mov rsi, [rdx+18h]
test rsi, rsi
jz short loc_EA913
mov rax, [r14]
mov dil, [rax+rcx]
add rdx, 10h
mov rcx, rdx
loc_EA8EF:
xor r8d, r8d
cmp [rsi+20h], dil
setl r8b
cmovge rcx, rsi
mov rsi, [rsi+r8*8+10h]
test rsi, rsi
jnz short loc_EA8EF
cmp rcx, rdx
jz short loc_EA913
cmp [rcx+20h], dil
jle short loc_EA954
loc_EA913:
mov rax, [r15]
mov rax, [rax]
mov eax, [rax+20h]
mov [rsp+38h+var_34], eax
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_EA936
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_EA941
loc_EA936:
mov rdi, rbx
mov rdx, r12
call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
loc_EA941:
inc ebp
mov r13d, ebp
loc_EA946:
mov ecx, r13d
cmp [r14+8], rcx
ja short loc_EA8D4
jmp loc_EA9D4
loc_EA954:
xor r13d, r13d
xor edx, edx
loc_EA959:
cmp byte ptr [rcx+58h], 0
jz short loc_EA969
mov edx, [rcx+5Ch]
inc ebp
mov r13d, ebp
jmp short loc_EA96B
loc_EA969:
inc ebp
loc_EA96B:
mov rsi, [rcx+38h]
test rsi, rsi
jz short loc_EA9A8
mov edi, ebp
mov dil, [rax+rdi]
mov r8, rcx
add r8, 30h ; '0'
mov rcx, r8
loc_EA984:
xor r9d, r9d
cmp [rsi+20h], dil
setl r9b
cmovge rcx, rsi
mov rsi, [rsi+r9*8+10h]
test rsi, rsi
jnz short loc_EA984
cmp rcx, r8
jz short loc_EA9A8
cmp [rcx+20h], dil
jle short loc_EA959
loc_EA9A8:
mov [rsp+38h+var_38], edx
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_EA9C1
mov [rsi], edx
add rsi, 4
mov [rbx+8], rsi
jmp short loc_EA9CC
loc_EA9C1:
mov rdi, rbx
mov rdx, rsp
call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&)
loc_EA9CC:
mov ebp, r13d
jmp loc_EA946
loc_EA9D4:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_EA9E2:
retn
|
long long llm_tokenizer_rwkv_session::tokenize(_QWORD *a1, long long *a2, long long a3)
{
long long result; // rax
long long v7; // rcx
unsigned int v8; // ebp
long long v9; // rdx
long long v10; // rsi
signed __int8 v11; // di
long long v12; // rdx
long long v13; // rcx
_DWORD *v14; // rsi
unsigned int v15; // r13d
int v16; // edx
long long v17; // rsi
signed __int8 v18; // di
long long v19; // r8
_DWORD *v20; // rsi
_QWORD v21[7]; // [rsp+0h] [rbp-38h] BYREF
if ( a2[1] )
{
v21[0] = result;
v7 = 0LL;
v8 = 0;
do
{
v9 = a1[1];
v10 = *(_QWORD *)(v9 + 24);
if ( !v10 )
goto LABEL_10;
result = *a2;
v11 = *(_BYTE *)(*a2 + v7);
v12 = v9 + 16;
v13 = v12;
do
{
if ( *(char *)(v10 + 32) >= v11 )
v13 = v10;
v10 = *(_QWORD *)(v10 + 8LL * (*(_BYTE *)(v10 + 32) < (unsigned __int8)v11) + 16);
}
while ( v10 );
if ( v13 != v12 && *(char *)(v13 + 32) <= v11 )
{
v15 = 0;
v16 = 0;
do
{
if ( *(_BYTE *)(v13 + 88) )
{
v16 = *(_DWORD *)(v13 + 92);
v15 = ++v8;
}
else
{
++v8;
}
v17 = *(_QWORD *)(v13 + 56);
if ( !v17 )
break;
v18 = *(_BYTE *)(result + v8);
v19 = v13 + 48;
v13 += 48LL;
do
{
if ( *(char *)(v17 + 32) >= v18 )
v13 = v17;
v17 = *(_QWORD *)(v17 + 8LL * (*(_BYTE *)(v17 + 32) < (unsigned __int8)v18) + 16);
}
while ( v17 );
}
while ( v13 != v19 && *(char *)(v13 + 32) <= v18 );
LODWORD(v21[0]) = v16;
v20 = *(_DWORD **)(a3 + 8);
if ( v20 == *(_DWORD **)(a3 + 16) )
{
result = std::vector<int>::_M_realloc_insert<int>(a3, v20, v21);
}
else
{
*v20 = v16;
*(_QWORD *)(a3 + 8) = v20 + 1;
}
v8 = v15;
}
else
{
LABEL_10:
result = *(unsigned int *)(*(_QWORD *)*a1 + 32LL);
HIDWORD(v21[0]) = *(_DWORD *)(*(_QWORD *)*a1 + 32LL);
v14 = *(_DWORD **)(a3 + 8);
if ( v14 == *(_DWORD **)(a3 + 16) )
{
result = std::vector<int>::_M_realloc_insert<int>(a3, v14, (char *)v21 + 4);
}
else
{
*v14 = result;
*(_QWORD *)(a3 + 8) = v14 + 1;
}
v15 = ++v8;
}
v7 = v15;
}
while ( a2[1] > (unsigned long long)v15 );
}
return result;
}
|
tokenize:
CMP qword ptr [RSI + 0x8],0x0
JZ 0x001ea9e2
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
XOR ECX,ECX
LEA R12,[RSP + 0x4]
XOR EBP,EBP
LAB_001ea8d4:
MOV RDX,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [RDX + 0x18]
TEST RSI,RSI
JZ 0x001ea913
MOV RAX,qword ptr [R14]
MOV DIL,byte ptr [RAX + RCX*0x1]
ADD RDX,0x10
MOV RCX,RDX
LAB_001ea8ef:
XOR R8D,R8D
CMP byte ptr [RSI + 0x20],DIL
SETL R8B
CMOVGE RCX,RSI
MOV RSI,qword ptr [RSI + R8*0x8 + 0x10]
TEST RSI,RSI
JNZ 0x001ea8ef
CMP RCX,RDX
JZ 0x001ea913
CMP byte ptr [RCX + 0x20],DIL
JLE 0x001ea954
LAB_001ea913:
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001ea936
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001ea941
LAB_001ea936:
MOV RDI,RBX
MOV RDX,R12
CALL 0x0016a6d0
LAB_001ea941:
INC EBP
MOV R13D,EBP
LAB_001ea946:
MOV ECX,R13D
CMP qword ptr [R14 + 0x8],RCX
JA 0x001ea8d4
JMP 0x001ea9d4
LAB_001ea954:
XOR R13D,R13D
XOR EDX,EDX
LAB_001ea959:
CMP byte ptr [RCX + 0x58],0x0
JZ 0x001ea969
MOV EDX,dword ptr [RCX + 0x5c]
INC EBP
MOV R13D,EBP
JMP 0x001ea96b
LAB_001ea969:
INC EBP
LAB_001ea96b:
MOV RSI,qword ptr [RCX + 0x38]
TEST RSI,RSI
JZ 0x001ea9a8
MOV EDI,EBP
MOV DIL,byte ptr [RAX + RDI*0x1]
MOV R8,RCX
ADD R8,0x30
MOV RCX,R8
LAB_001ea984:
XOR R9D,R9D
CMP byte ptr [RSI + 0x20],DIL
SETL R9B
CMOVGE RCX,RSI
MOV RSI,qword ptr [RSI + R9*0x8 + 0x10]
TEST RSI,RSI
JNZ 0x001ea984
CMP RCX,R8
JZ 0x001ea9a8
CMP byte ptr [RCX + 0x20],DIL
JLE 0x001ea959
LAB_001ea9a8:
MOV dword ptr [RSP],EDX
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001ea9c1
MOV dword ptr [RSI],EDX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001ea9cc
LAB_001ea9c1:
MOV RDI,RBX
MOV RDX,RSP
CALL 0x0016a6d0
LAB_001ea9cc:
MOV EBP,R13D
JMP 0x001ea946
LAB_001ea9d4:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_001ea9e2:
RET
|
/* llm_tokenizer_rwkv_session::tokenize(std::__cxx11::string const&, std::vector<int,
std::allocator<int> >&) */
void __thiscall
llm_tokenizer_rwkv_session::tokenize
(llm_tokenizer_rwkv_session *this,string *param_1,vector *param_2)
{
char cVar1;
int4 *puVar2;
int8 in_RAX;
ulong uVar3;
long lVar4;
int4 uVar5;
long lVar6;
uint uVar7;
long lVar8;
int8 local_38;
if (*(long *)(param_1 + 8) != 0) {
uVar3 = 0;
uVar7 = 0;
local_38 = in_RAX;
do {
lVar8 = *(long *)(*(long *)(this + 8) + 0x18);
if (lVar8 == 0) {
LAB_001ea913:
local_38 = CONCAT44(*(int4 *)(**(long **)this + 0x20),(int4)local_38);
puVar2 = *(int4 **)(param_2 + 8);
if (puVar2 == *(int4 **)(param_2 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)param_2,puVar2,(long)&local_38 + 4);
}
else {
*puVar2 = *(int4 *)(**(long **)this + 0x20);
*(int4 **)(param_2 + 8) = puVar2 + 1;
}
uVar7 = uVar7 + 1;
uVar3 = (ulong)uVar7;
}
else {
cVar1 = *(char *)(*(long *)param_1 + uVar3);
lVar6 = *(long *)(this + 8) + 0x10;
lVar4 = lVar6;
do {
if (cVar1 <= *(char *)(lVar8 + 0x20)) {
lVar4 = lVar8;
}
lVar8 = *(long *)(lVar8 + 0x10 + (ulong)(*(char *)(lVar8 + 0x20) < cVar1) * 8);
} while (lVar8 != 0);
if ((lVar4 == lVar6) || (cVar1 < *(char *)(lVar4 + 0x20))) goto LAB_001ea913;
uVar3 = 0;
uVar5 = 0;
while( true ) {
if (*(char *)(lVar4 + 0x58) != '\0') {
uVar5 = *(int4 *)(lVar4 + 0x5c);
uVar3 = (ulong)(uVar7 + 1);
}
uVar7 = uVar7 + 1;
lVar8 = *(long *)(lVar4 + 0x38);
if (lVar8 == 0) break;
cVar1 = *(char *)(*(long *)param_1 + (ulong)uVar7);
lVar6 = lVar4 + 0x30;
lVar4 = lVar6;
do {
if (cVar1 <= *(char *)(lVar8 + 0x20)) {
lVar4 = lVar8;
}
lVar8 = *(long *)(lVar8 + 0x10 + (ulong)(*(char *)(lVar8 + 0x20) < cVar1) * 8);
} while (lVar8 != 0);
if ((lVar4 == lVar6) || (cVar1 < *(char *)(lVar4 + 0x20))) break;
}
local_38 = CONCAT44(local_38._4_4_,uVar5);
puVar2 = *(int4 **)(param_2 + 8);
if (puVar2 == *(int4 **)(param_2 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int>
((vector<int,std::allocator<int>> *)param_2,puVar2,&local_38);
}
else {
*puVar2 = uVar5;
*(int4 **)(param_2 + 8) = puVar2 + 1;
}
uVar7 = (uint)uVar3;
}
} while (uVar3 < *(ulong *)(param_1 + 8));
}
return;
}
|
|
65,464 |
mariadb_read_options
|
eloqsql/libmariadb/libmariadb/ma_default.c
|
my_bool _mariadb_read_options(MYSQL *mysql,
const char *config_dir,
const char *config_file,
const char *group,
unsigned int recursion)
{
int i= 0,
exts,
errors= 0;
char filename[FN_REFLEN + 1];
unsigned int recursion_stop= 64;
#ifndef _WIN32
char *env;
#endif
if (recursion >= recursion_stop)
return 1;
if (config_file && config_file[0])
return _mariadb_read_options_from_file(mysql, config_file, group, recursion);
if (config_dir && config_dir[0])
{
for (exts= 0; ini_exts[exts]; exts++)
{
snprintf(filename, FN_REFLEN,
"%s%cmy.%s", config_dir, FN_LIBCHAR, ini_exts[exts]);
if (!access(filename, R_OK))
errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion);
}
return errors;
}
for (i=0; i < MAX_CONFIG_DIRS && configuration_dirs[i]; i++)
{
for (exts= 0; ini_exts[exts]; exts++)
{
snprintf(filename, FN_REFLEN,
"%s%cmy.%s", configuration_dirs[i], FN_LIBCHAR, ini_exts[exts]);
if (!access(filename, R_OK))
errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion);
}
}
#ifndef _WIN32
/* special case: .my.cnf in Home directory */
if ((env= getenv("HOME")))
{
for (exts= 0; ini_exts[exts]; exts++)
{
snprintf(filename, FN_REFLEN,
"%s%c.my.%s", env, FN_LIBCHAR, ini_exts[exts]);
if (!access(filename, R_OK))
errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion);
}
}
#endif
return errors;
}
|
O3
|
c
|
mariadb_read_options:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %rcx, -0x258(%rbp)
movq %rdi, -0x250(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %r12b
movl %r8d, -0x244(%rbp)
cmpl $0x3f, %r8d
jbe 0x36ef8
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x370db
movl %r12d, %eax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r9
testq %rdx, %rdx
je 0x36f45
cmpb $0x0, (%rdx)
je 0x36f45
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x370db
movq -0x250(%rbp), %rdi
movq %rdx, %rsi
movq -0x258(%rbp), %rdx
movl -0x244(%rbp), %ecx
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x370e0
testq %r9, %r9
je 0x36fc3
cmpb $0x0, (%r9)
je 0x36fc3
leaq 0x760e(%rip), %r10 # 0x3e565
leaq 0x75c2(%rip), %r8 # 0x3e520
xorl %r12d, %r12d
leaq -0x240(%rbp), %r14
movl $0x200, %esi # imm = 0x200
movl $0x201, %ecx # imm = 0x201
movq %r14, %rdi
movl $0x1, %edx
xorl %eax, %eax
pushq %r10
pushq $0x2f
callq 0x132c0
addq $0x10, %rsp
movq %r14, %rdi
movl $0x4, %esi
callq 0x13760
testl %eax, %eax
jne 0x36ed0
leaq -0x240(%rbp), %rsi
movq -0x250(%rbp), %rdi
movq -0x258(%rbp), %rdx
movl -0x244(%rbp), %ecx
callq 0x370e0
jmp 0x370d3
xorl %r12d, %r12d
leaq 0x1bd93(%rip), %r15 # 0x52d60
leaq 0x754c(%rip), %r13 # 0x3e520
leaq -0x240(%rbp), %r14
xorl %ebx, %ebx
movq (%r15), %rax
movq (%rax,%rbx,8), %r9
testq %r9, %r9
je 0x3704d
movl $0x200, %esi # imm = 0x200
movl $0x201, %ecx # imm = 0x201
movq %r14, %rdi
movl $0x1, %edx
movq %r13, %r8
xorl %eax, %eax
leaq 0x755e(%rip), %r10 # 0x3e565
pushq %r10
pushq $0x2f
callq 0x132c0
addq $0x10, %rsp
movq %r14, %rdi
movl $0x4, %esi
callq 0x13760
testl %eax, %eax
jne 0x37044
movq -0x250(%rbp), %rdi
movq %r14, %rsi
movq -0x258(%rbp), %rdx
movl -0x244(%rbp), %ecx
callq 0x370e0
addb %al, %r12b
incq %rbx
cmpq $0x6, %rbx
jne 0x36fdd
leaq 0x74bc(%rip), %rdi # 0x3e510
callq 0x13590
testq %rax, %rax
je 0x36ed0
leaq 0x74c1(%rip), %r8 # 0x3e52a
leaq -0x240(%rbp), %r14
movl $0x200, %esi # imm = 0x200
movl $0x201, %ecx # imm = 0x201
movq %r14, %rdi
movl $0x1, %edx
movq %rax, %r9
xorl %eax, %eax
leaq 0x74d7(%rip), %r10 # 0x3e565
pushq %r10
pushq $0x2f
callq 0x132c0
addq $0x10, %rsp
movq %r14, %rdi
movl $0x4, %esi
callq 0x13760
testl %eax, %eax
jne 0x36ed0
leaq -0x240(%rbp), %rsi
movq -0x250(%rbp), %rdi
movq -0x258(%rbp), %rdx
movl -0x244(%rbp), %ecx
callq 0x370e0
addb %r12b, %al
movl %eax, %r12d
jmp 0x36ed0
callq 0x13500
|
_mariadb_read_options:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 238h
mov [rbp+var_258], rcx
mov [rbp+var_250], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r12b, 1
mov [rbp+var_244], r8d
cmp r8d, 3Fh ; '?'
jbe short loc_36EF8
loc_36ED0:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_370DB
mov eax, r12d
add rsp, 238h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36EF8:
mov r9, rsi
test rdx, rdx
jz short loc_36F45
cmp byte ptr [rdx], 0
jz short loc_36F45
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_370DB
mov rdi, [rbp+var_250]
mov rsi, rdx
mov rdx, [rbp+var_258]
mov ecx, [rbp+var_244]
add rsp, 238h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _mariadb_read_options_from_file
loc_36F45:
test r9, r9
jz short loc_36FC3
cmp byte ptr [r9], 0
jz short loc_36FC3
lea r10, aCnf; "cnf"
lea r8, aSCmyS; "%s%cmy.%s"
xor r12d, r12d
lea r14, [rbp+var_240]
mov esi, 200h
mov ecx, 201h
mov rdi, r14
mov edx, 1
xor eax, eax
push r10
push 2Fh ; '/'
call ___snprintf_chk
add rsp, 10h
mov rdi, r14
mov esi, 4
call _access
test eax, eax
jnz loc_36ED0
lea rsi, [rbp+var_240]
mov rdi, [rbp+var_250]
mov rdx, [rbp+var_258]
mov ecx, [rbp+var_244]
call _mariadb_read_options_from_file
jmp loc_370D3
loc_36FC3:
xor r12d, r12d
lea r15, configuration_dirs
lea r13, aSCmyS; "%s%cmy.%s"
lea r14, [rbp+var_240]
xor ebx, ebx
loc_36FDD:
mov rax, [r15]
mov r9, [rax+rbx*8]
test r9, r9
jz short loc_3704D
mov esi, 200h
mov ecx, 201h
mov rdi, r14
mov edx, 1
mov r8, r13
xor eax, eax
lea r10, aCnf; "cnf"
push r10
push 2Fh ; '/'
call ___snprintf_chk
add rsp, 10h
mov rdi, r14
mov esi, 4
call _access
test eax, eax
jnz short loc_37044
mov rdi, [rbp+var_250]
mov rsi, r14
mov rdx, [rbp+var_258]
mov ecx, [rbp+var_244]
call _mariadb_read_options_from_file
add r12b, al
loc_37044:
inc rbx
cmp rbx, 6
jnz short loc_36FDD
loc_3704D:
lea rdi, aMariadbHome+8; "HOME"
call _getenv
test rax, rax
jz loc_36ED0
lea r8, aSCMyS; "%s%c.my.%s"
lea r14, [rbp+var_240]
mov esi, 200h
mov ecx, 201h
mov rdi, r14
mov edx, 1
mov r9, rax
xor eax, eax
lea r10, aCnf; "cnf"
push r10
push 2Fh ; '/'
call ___snprintf_chk
add rsp, 10h
mov rdi, r14
mov esi, 4
call _access
test eax, eax
jnz loc_36ED0
lea rsi, [rbp+var_240]
mov rdi, [rbp+var_250]
mov rdx, [rbp+var_258]
mov ecx, [rbp+var_244]
call _mariadb_read_options_from_file
add al, r12b
loc_370D3:
mov r12d, eax
jmp loc_36ED0
loc_370DB:
call ___stack_chk_fail
|
long long mariadb_read_options(long long a1, const char *a2, _BYTE *a3, long long a4, unsigned int a5)
{
unsigned int v5; // r12d
double v7; // xmm0_8
unsigned int options_from_file; // eax
long long i; // rbx
const char *v10; // r9
double v11; // xmm0_8
const char *v12; // rax
double v13; // xmm0_8
_BYTE v16[528]; // [rsp+20h] [rbp-240h] BYREF
unsigned long long v17; // [rsp+230h] [rbp-30h]
v17 = __readfsqword(0x28u);
LOBYTE(v5) = 1;
if ( a5 > 0x3F )
return v5;
if ( !a3 || !*a3 )
{
if ( a2 && *a2 )
{
v5 = 0;
v7 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%cmy.%s", a2, 47LL, "cnf");
if ( (unsigned int)access(v16, 4LL, v7) )
return v5;
return (unsigned int)mariadb_read_options_from_file(a1, v16, a4, a5);
}
else
{
v5 = 0;
for ( i = 0LL; i != 6; ++i )
{
v10 = *(const char **)(configuration_dirs + 8 * i);
if ( !v10 )
break;
v11 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%cmy.%s", v10, 47LL, "cnf");
if ( !(unsigned int)access(v16, 4LL, v11) )
LOBYTE(v5) = mariadb_read_options_from_file(a1, v16, a4, a5) + v5;
}
v12 = (const char *)getenv("HOME");
if ( !v12 )
return v5;
v13 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%c.my.%s", v12, 47LL, "cnf");
if ( (unsigned int)access(v16, 4LL, v13) )
return v5;
options_from_file = mariadb_read_options_from_file(a1, v16, a4, a5);
LOBYTE(options_from_file) = v5 + options_from_file;
}
return options_from_file;
}
return mariadb_read_options_from_file(a1, a3, a4, a5);
}
|
_mariadb_read_options:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x238
MOV qword ptr [RBP + -0x258],RCX
MOV qword ptr [RBP + -0x250],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R12B,0x1
MOV dword ptr [RBP + -0x244],R8D
CMP R8D,0x3f
JBE 0x00136ef8
LAB_00136ed0:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001370db
MOV EAX,R12D
ADD RSP,0x238
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00136ef8:
MOV R9,RSI
TEST RDX,RDX
JZ 0x00136f45
CMP byte ptr [RDX],0x0
JZ 0x00136f45
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001370db
MOV RDI,qword ptr [RBP + -0x250]
MOV RSI,RDX
MOV RDX,qword ptr [RBP + -0x258]
MOV ECX,dword ptr [RBP + -0x244]
ADD RSP,0x238
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001370e0
LAB_00136f45:
TEST R9,R9
JZ 0x00136fc3
CMP byte ptr [R9],0x0
JZ 0x00136fc3
LEA R10,[0x13e565]
LEA R8,[0x13e520]
XOR R12D,R12D
LEA R14,[RBP + -0x240]
MOV ESI,0x200
MOV ECX,0x201
MOV RDI,R14
MOV EDX,0x1
XOR EAX,EAX
PUSH R10
PUSH 0x2f
CALL 0x001132c0
ADD RSP,0x10
MOV RDI,R14
MOV ESI,0x4
CALL 0x00113760
TEST EAX,EAX
JNZ 0x00136ed0
LEA RSI,[RBP + -0x240]
MOV RDI,qword ptr [RBP + -0x250]
MOV RDX,qword ptr [RBP + -0x258]
MOV ECX,dword ptr [RBP + -0x244]
CALL 0x001370e0
JMP 0x001370d3
LAB_00136fc3:
XOR R12D,R12D
LEA R15,[0x152d60]
LEA R13,[0x13e520]
LEA R14,[RBP + -0x240]
XOR EBX,EBX
LAB_00136fdd:
MOV RAX,qword ptr [R15]
MOV R9,qword ptr [RAX + RBX*0x8]
TEST R9,R9
JZ 0x0013704d
MOV ESI,0x200
MOV ECX,0x201
MOV RDI,R14
MOV EDX,0x1
MOV R8,R13
XOR EAX,EAX
LEA R10,[0x13e565]
PUSH R10
PUSH 0x2f
CALL 0x001132c0
ADD RSP,0x10
MOV RDI,R14
MOV ESI,0x4
CALL 0x00113760
TEST EAX,EAX
JNZ 0x00137044
MOV RDI,qword ptr [RBP + -0x250]
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x258]
MOV ECX,dword ptr [RBP + -0x244]
CALL 0x001370e0
ADD R12B,AL
LAB_00137044:
INC RBX
CMP RBX,0x6
JNZ 0x00136fdd
LAB_0013704d:
LEA RDI,[0x13e510]
CALL 0x00113590
TEST RAX,RAX
JZ 0x00136ed0
LEA R8,[0x13e52a]
LEA R14,[RBP + -0x240]
MOV ESI,0x200
MOV ECX,0x201
MOV RDI,R14
MOV EDX,0x1
MOV R9,RAX
XOR EAX,EAX
LEA R10,[0x13e565]
PUSH R10
PUSH 0x2f
CALL 0x001132c0
ADD RSP,0x10
MOV RDI,R14
MOV ESI,0x4
CALL 0x00113760
TEST EAX,EAX
JNZ 0x00136ed0
LEA RSI,[RBP + -0x240]
MOV RDI,qword ptr [RBP + -0x250]
MOV RDX,qword ptr [RBP + -0x258]
MOV ECX,dword ptr [RBP + -0x244]
CALL 0x001370e0
ADD AL,R12B
LAB_001370d3:
MOV R12D,EAX
JMP 0x00136ed0
LAB_001370db:
CALL 0x00113500
|
ulong _mariadb_read_options
(int8 param_1,char *param_2,char *param_3,int8 param_4,uint param_5)
{
long lVar1;
char cVar2;
int iVar3;
uint uVar4;
ulong uVar5;
char *pcVar6;
int8 uVar7;
long lVar8;
int8 unaff_R12;
long in_FS_OFFSET;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar5 = CONCAT71((int7)((ulong)unaff_R12 >> 8),1);
if (param_5 < 0x40) {
if ((param_3 != (char *)0x0) && (*param_3 != '\0')) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
uVar5 = _mariadb_read_options_from_file(param_1,param_3,param_4,param_5);
return uVar5;
}
goto LAB_001370db;
}
if ((param_2 == (char *)0x0) || (*param_2 == '\0')) {
uVar5 = 0;
lVar8 = 0;
do {
lVar1 = *(long *)(configuration_dirs + lVar8 * 8);
if (lVar1 == 0) break;
__snprintf_chk(local_248,0x200,1,0x201,"%s%cmy.%s",lVar1,0x2f,&DAT_0013e565);
iVar3 = access(local_248,4);
if (iVar3 == 0) {
cVar2 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5);
uVar5 = (ulong)(byte)((char)uVar5 + cVar2);
}
lVar8 = lVar8 + 1;
} while (lVar8 != 6);
pcVar6 = getenv("HOME");
if (pcVar6 != (char *)0x0) {
__snprintf_chk(local_248,0x200,1,0x201,"%s%c.my.%s",pcVar6,0x2f,&DAT_0013e565);
iVar3 = access(local_248,4);
if (iVar3 == 0) {
uVar7 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5);
uVar4 = (uint)CONCAT71((int7)((ulong)uVar7 >> 8),(char)uVar7 + (char)uVar5);
goto LAB_001370d3;
}
}
}
else {
uVar5 = 0;
__snprintf_chk(local_248,0x200,1,0x201,"%s%cmy.%s",param_2,0x2f,&DAT_0013e565);
iVar3 = access(local_248,4);
if (iVar3 == 0) {
uVar4 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5);
LAB_001370d3:
uVar5 = (ulong)uVar4;
}
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5 & 0xffffffff;
}
LAB_001370db:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
65,465 |
testing::internal::StreamingListener::OnTestIterationEnd(testing::UnitTest const&, int)
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
void OnTestIterationEnd(const UnitTest& unit_test,
int /* iteration */) override {
SendLn("event=TestIterationEnd&passed=" + FormatBool(unit_test.Passed()) +
"&elapsed_time=" + StreamableToString(unit_test.elapsed_time()) +
"ms");
}
|
O1
|
c
|
testing::internal::StreamingListener::OnTestIterationEnd(testing::UnitTest const&, int):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsi), %rdi
callq 0x37b0a
leaq 0x64c2(%rip), %rcx # 0x4258a
leaq 0x7f9d(%rip), %rsi # 0x4406c
testb %al, %al
cmovneq %rcx, %rsi
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x64a2(%rip), %rax # 0x4258b
leaq 0x7f7d(%rip), %rdx # 0x4406d
cmovneq %rax, %rdx
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
callq 0xfdfe
leaq 0x86b8(%rip), %rcx # 0x447c3
movl $0x1e, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9580
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3c144
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x3c14b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x862c(%rip), %rsi # 0x4479a
callq 0x9a70
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3c19a
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3c1a2
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%r14), %rax
movq 0x230(%rax), %rax
leaq 0xc8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x48(%rsp), %rdi
callq 0x37aa0
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x3c1fc
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3c21b
leaq 0x58(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x3c216
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3c22c
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x9170
jmp 0x3c23a
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9580
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x3c25e
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x3c264
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x41a5(%rip), %rsi # 0x4042d
leaq 0x8(%rsp), %rdi
callq 0x9a70
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3c2c2
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x3c2c9
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rbx), %rdi
callq 0x3c7ae
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x3c30e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c329
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c344
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x3c35b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x3c372
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c38f
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x94c0
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x3c3c5
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x3c3c5
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c3e5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x3c3e5
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c405
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x3c405
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x3c421
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x3c421
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x3c43d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x3c43d
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c45a
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
|
_ZN7testing8internal17StreamingListener18OnTestIterationEndERKNS_8UnitTestEi:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D0h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi+40h]; this
call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void)
lea rcx, aFcntlPipeFd1FS+22h; "1"
lea rsi, aStaticCastSize+77h; "0"
test al, al
cmovnz rsi, rcx
lea r12, [rsp+0F8h+var_40]
mov [r12-10h], r12
lea rax, aFcntlPipeFd1FS+23h; ""
lea rdx, aStaticCastSize+78h; ""
cmovnz rdx, rax
lea r15, [rsp+0F8h+var_50]
mov rdi, 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 rcx, aEventTestitera_0; "event=TestIterationEnd&passed="
mov r8d, 1Eh
mov rdi, r15
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r15, [rsp+0F8h+var_80]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_3C144
mov [rsp+0F8h+var_90], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_80], rdx
jmp short loc_3C14B
loc_3C144:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_3C14B:
mov rdx, [rax+8]
lea rdi, [rsp+0F8h+var_90]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aElapsedTime; "&elapsed_time="
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+0F8h+var_C0]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_3C19A
mov [rsp+0F8h+var_D0], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_C0], rdx
jmp short loc_3C1A2
loc_3C19A:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
loc_3C1A2:
mov rdx, [rax+8]
mov [rsp+0F8h+var_C8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rax, [r14+40h]
mov rax, [rax+230h]
lea rsi, [rsp+0F8h+var_30]
mov [rsi], rax
lea rdi, [rsp+0F8h+var_B0]
call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&)
mov rcx, [rsp+0F8h+var_D0]
mov r8, [rsp+0F8h+var_C8]
mov rdx, [rsp+0F8h+var_A8]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r13
jz short loc_3C1FC
mov rsi, [rsp+0F8h+var_C0]
loc_3C1FC:
cmp rax, rsi
jbe short loc_3C21B
lea rdi, [rsp+0F8h+var_A0]
mov esi, 0Fh
cmp [rdi-10h], rdi
jz short loc_3C216
mov rsi, [rsp+0F8h+var_A0]
loc_3C216:
cmp rax, rsi
jbe short loc_3C22C
loc_3C21B:
mov rsi, [rsp+0F8h+var_B0]
lea rdi, [rsp+0F8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_3C23A
loc_3C22C:
lea rdi, [rsp+0F8h+var_B0]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_3C23A:
lea rdx, [rsp+0F8h+var_E0]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_3C25E
mov [rsp+0F8h+var_F0], rsi
mov rdx, [rcx]
mov [rsp+0F8h+var_E0], rdx
jmp short loc_3C264
loc_3C25E:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_3C264:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0F8h+var_E8], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, aMs+1; "ms"
lea rdi, [rsp+0F8h+var_F0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r14, [rsp+0F8h+var_60]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_3C2C2
mov [rsp+0F8h+var_70], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_60], rdx
jmp short loc_3C2C9
loc_3C2C2:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_3C2C9:
mov rdx, [rax+8]
lea rsi, [rsp+0F8h+var_70]
mov [rsi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rbx+8]
call _ZN7testing8internal17StreamingListener20AbstractSocketWriter6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::AbstractSocketWriter::SendLn(std::string const&)
mov rdi, [rsp+0F8h+var_70]; void *
cmp rdi, r14
jz short loc_3C30E
mov rsi, [rsp+0F8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C30E:
lea rax, [rsp+0F8h+var_E0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3C329
mov rsi, [rsp+0F8h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C329:
lea rax, [rsp+0F8h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3C344
mov rsi, [rsp+0F8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C344:
mov rdi, [rsp+0F8h+var_D0]; void *
cmp rdi, r13
jz short loc_3C35B
mov rsi, [rsp+0F8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C35B:
mov rdi, [rsp+0F8h+var_90]; void *
cmp rdi, r15
jz short loc_3C372
mov rsi, [rsp+0F8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C372:
mov rdi, [rsp+0F8h+var_50]; void *
cmp rdi, r12
jz short loc_3C38F
mov rsi, [rsp+0F8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C38F:
add rsp, 0D0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_80]; void *
cmp rdi, r14
jz short loc_3C3C5
mov rsi, [rsp+arg_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3C3C5
mov rbx, rax
loc_3C3C5:
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3C3E5
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3C3E5
mov rbx, rax
loc_3C3E5:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3C405
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3C405
mov rbx, rax
loc_3C405:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_3C421
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3C421
mov rbx, rax
loc_3C421:
mov rdi, [rsp+arg_60]; void *
cmp rdi, r15
jz short loc_3C43D
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3C43D
mov rbx, rax
loc_3C43D:
mov rdi, [rsp+arg_A0]; void *
cmp rdi, r12
jz short loc_3C45A
mov rsi, [rsp+arg_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3C45A:
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::StreamingListener::OnTestIterationEnd(
testing::internal::StreamingListener *this,
testing::internal::UnitTestImpl **a2)
{
char v3; // al
char *v4; // rsi
char *v5; // rdx
long long v6; // rax
__int128 *v7; // rcx
long long v8; // rax
__int128 *v9; // rcx
char *v10; // rax
unsigned long long v11; // rsi
unsigned long long v12; // rsi
void **v13; // rax
__int128 *v14; // rcx
long long v15; // rax
int v16; // r8d
int v17; // r9d
__int128 *v18; // rcx
int v19; // edx
void *v20[2]; // [rsp+8h] [rbp-F0h] BYREF
__int128 v21; // [rsp+18h] [rbp-E0h] BYREF
void *v22; // [rsp+28h] [rbp-D0h] BYREF
long long v23; // [rsp+30h] [rbp-C8h]
__int128 v24; // [rsp+38h] [rbp-C0h] BYREF
void *v25[2]; // [rsp+48h] [rbp-B0h] BYREF
_QWORD v26[2]; // [rsp+58h] [rbp-A0h] BYREF
void *v27[2]; // [rsp+68h] [rbp-90h] BYREF
__int128 v28; // [rsp+78h] [rbp-80h] BYREF
void *v29; // [rsp+88h] [rbp-70h] BYREF
long long v30; // [rsp+90h] [rbp-68h]
__int128 v31; // [rsp+98h] [rbp-60h] BYREF
void *v32[2]; // [rsp+A8h] [rbp-50h] BYREF
_QWORD v33[2]; // [rsp+B8h] [rbp-40h] BYREF
_QWORD v34[6]; // [rsp+C8h] [rbp-30h] BYREF
v3 = testing::internal::UnitTestImpl::Passed(a2[8]);
v4 = "0";
if ( v3 )
v4 = "1";
v32[0] = v33;
v5 = "";
if ( v3 )
v5 = "";
std::string::_M_construct<char const*>(v32, v4, (long long)v5);
v6 = std::string::replace(v32, 0LL, 0LL);
v27[0] = &v28;
v7 = (__int128 *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
v28 = *v7;
}
else
{
v27[0] = *(void **)v6;
*(_QWORD *)&v28 = *(_QWORD *)v7;
}
v27[1] = *(void **)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
v8 = std::string::append(v27, "&elapsed_time=");
v22 = &v24;
v9 = (__int128 *)(v8 + 16);
if ( *(_QWORD *)v8 == v8 + 16 )
{
v24 = *v9;
}
else
{
v22 = *(void **)v8;
*(_QWORD *)&v24 = *(_QWORD *)v9;
}
v23 = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = v9;
*(_QWORD *)(v8 + 8) = 0LL;
*(_BYTE *)(v8 + 16) = 0;
v34[0] = *((_QWORD *)a2[8] + 70);
testing::internal::StreamableToString<long>((long long)v25, v34);
v10 = (char *)v25[1] + v23;
v11 = 15LL;
if ( v22 != &v24 )
v11 = v24;
if ( (unsigned long long)v10 <= v11 )
goto LABEL_17;
v12 = 15LL;
if ( v25[0] != v26 )
v12 = v26[0];
if ( (unsigned long long)v10 <= v12 )
v13 = (void **)std::string::replace(v25, 0LL, 0LL);
else
LABEL_17:
v13 = (void **)std::string::_M_append(&v22, v25[0]);
v20[0] = &v21;
v14 = (__int128 *)(v13 + 2);
if ( *v13 == v13 + 2 )
{
v21 = *v14;
}
else
{
v20[0] = *v13;
*(_QWORD *)&v21 = *(_QWORD *)v14;
}
v20[1] = v13[1];
*v13 = v14;
v13[1] = 0LL;
*(_BYTE *)v14 = 0;
v15 = std::string::append(v20, "ms");
v29 = &v31;
v18 = (__int128 *)(v15 + 16);
if ( *(_QWORD *)v15 == v15 + 16 )
{
v31 = *v18;
}
else
{
v29 = *(void **)v15;
*(_QWORD *)&v31 = *(_QWORD *)v18;
}
v30 = *(_QWORD *)(v15 + 8);
v19 = v30;
*(_QWORD *)v15 = v18;
*(_QWORD *)(v15 + 8) = 0LL;
*(_BYTE *)(v15 + 16) = 0;
testing::internal::StreamingListener::AbstractSocketWriter::SendLn(
*((_QWORD *)this + 1),
(unsigned int)&v29,
v19,
(_DWORD)v18,
v16,
v17);
if ( v29 != &v31 )
operator delete(v29, v31 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
if ( v25[0] != v26 )
operator delete(v25[0], v26[0] + 1LL);
if ( v22 != &v24 )
operator delete(v22, v24 + 1);
if ( v27[0] != &v28 )
operator delete(v27[0], v28 + 1);
if ( v32[0] != v33 )
operator delete(v32[0], v33[0] + 1LL);
}
|
OnTestIterationEnd:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd0
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI + 0x40]
CALL 0x00137b0a
LEA RCX,[0x14258a]
LEA RSI,[0x14406c]
TEST AL,AL
CMOVNZ RSI,RCX
LEA R12,[RSP + 0xb8]
MOV qword ptr [R12 + -0x10],R12
LEA RAX,[0x14258b]
LEA RDX,[0x14406d]
CMOVNZ RDX,RAX
LEA R15,[RSP + 0xa8]
MOV RDI,R15
CALL 0x0010fdfe
LAB_0013c104:
LEA RCX,[0x1447c3]
MOV R8D,0x1e
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00109580
LEA R15,[RSP + 0x78]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0013c144
MOV qword ptr [RSP + 0x68],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x78],RDX
JMP 0x0013c14b
LAB_0013c144:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_0013c14b:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x68]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0013c167:
LEA RSI,[0x14479a]
CALL 0x00109a70
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0013c19a
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0013c1a2
LAB_0013c19a:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
LAB_0013c1a2:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [R14 + 0x40]
MOV RAX,qword ptr [RAX + 0x230]
LEA RSI,[RSP + 0xc8]
MOV qword ptr [RSI],RAX
LAB_0013c1d0:
LEA RDI,[RSP + 0x48]
CALL 0x00137aa0
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R13
JZ 0x0013c1fc
MOV RSI,qword ptr [RSP + 0x38]
LAB_0013c1fc:
CMP RAX,RSI
JBE 0x0013c21b
LEA RDI,[RSP + 0x58]
MOV ESI,0xf
CMP qword ptr [RDI + -0x10],RDI
JZ 0x0013c216
MOV RSI,qword ptr [RSP + 0x58]
LAB_0013c216:
CMP RAX,RSI
JBE 0x0013c22c
LAB_0013c21b:
MOV RSI,qword ptr [RSP + 0x48]
LAB_0013c220:
LEA RDI,[RSP + 0x28]
CALL 0x00109170
JMP 0x0013c23a
LAB_0013c22c:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00109580
LAB_0013c23a:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0013c25e
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0013c264
LAB_0013c25e:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0013c264:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0013c281:
LEA RSI,[0x14042d]
LEA RDI,[RSP + 0x8]
CALL 0x00109a70
LEA R14,[RSP + 0x98]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0013c2c2
MOV qword ptr [RSP + 0x88],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x98],RDX
JMP 0x0013c2c9
LAB_0013c2c2:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_0013c2c9:
MOV RDX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x88]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RBX + 0x8]
LAB_0013c2ec:
CALL 0x0013c7ae
LAB_0013c2f1:
MOV RDI,qword ptr [RSP + 0x88]
CMP RDI,R14
JZ 0x0013c30e
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x001094c0
LAB_0013c30e:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013c329
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_0013c329:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013c344
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001094c0
LAB_0013c344:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0013c35b
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001094c0
LAB_0013c35b:
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R15
JZ 0x0013c372
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001094c0
LAB_0013c372:
MOV RDI,qword ptr [RSP + 0xa8]
CMP RDI,R12
JZ 0x0013c38f
MOV RSI,qword ptr [RSP + 0xb8]
INC RSI
CALL 0x001094c0
LAB_0013c38f:
ADD RSP,0xd0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* testing::internal::StreamingListener::OnTestIterationEnd(testing::UnitTest const&, int) */
void testing::internal::StreamingListener::OnTestIterationEnd(UnitTest *param_1,int param_2)
{
char cVar1;
long *plVar2;
int8 *puVar3;
long *plVar4;
ulong *puVar5;
char *pcVar6;
int4 in_register_00000034;
char *pcVar7;
ulong uVar8;
long *local_f0;
int8 local_e8;
long local_e0;
int8 uStack_d8;
ulong *local_d0;
long local_c8;
ulong local_c0;
long lStack_b8;
ulong *local_b0;
long local_a8;
ulong local_a0 [2];
long *local_90;
long local_88;
long local_80;
long lStack_78;
long *local_70;
long local_68;
long local_60;
long lStack_58;
long *local_50 [2];
long local_40 [2];
int8 local_30;
cVar1 = UnitTestImpl::Passed(*(UnitTestImpl **)(CONCAT44(in_register_00000034,param_2) + 0x40));
pcVar7 = "0";
if (cVar1 != '\0') {
pcVar7 = "1";
}
pcVar6 = "";
if (cVar1 != '\0') {
pcVar6 = "";
}
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>(local_50,pcVar7,pcVar6);
/* try { // try from 0013c104 to 0013c11c has its CatchHandler @ 0013c43a */
plVar2 = (long *)std::__cxx11::string::replace((ulong)local_50,0,(char *)0x0,0x1447c3);
plVar4 = plVar2 + 2;
if ((long *)*plVar2 == plVar4) {
local_80 = *plVar4;
lStack_78 = plVar2[3];
local_90 = &local_80;
}
else {
local_80 = *plVar4;
local_90 = (long *)*plVar2;
}
local_88 = plVar2[1];
*plVar2 = (long)plVar4;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 0013c167 to 0013c172 has its CatchHandler @ 0013c41e */
plVar2 = (long *)std::__cxx11::string::append((char *)&local_90);
puVar5 = (ulong *)(plVar2 + 2);
if ((ulong *)*plVar2 == puVar5) {
local_c0 = *puVar5;
lStack_b8 = plVar2[3];
local_d0 = &local_c0;
}
else {
local_c0 = *puVar5;
local_d0 = (ulong *)*plVar2;
}
local_c8 = plVar2[1];
*plVar2 = (long)puVar5;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
local_30 = *(int8 *)(*(long *)(CONCAT44(in_register_00000034,param_2) + 0x40) + 0x230);
/* try { // try from 0013c1d0 to 0013c1d9 has its CatchHandler @ 0013c402 */
StreamableToString<long>((long *)&local_b0);
uVar8 = 0xf;
if (local_d0 != &local_c0) {
uVar8 = local_c0;
}
if (uVar8 < (ulong)(local_a8 + local_c8)) {
uVar8 = 0xf;
if (local_b0 != local_a0) {
uVar8 = local_a0[0];
}
if ((ulong)(local_a8 + local_c8) <= uVar8) {
puVar3 = (int8 *)
std::__cxx11::string::replace((ulong)&local_b0,0,(char *)0x0,(ulong)local_d0);
goto LAB_0013c23a;
}
}
/* try { // try from 0013c220 to 0013c239 has its CatchHandler @ 0013c3e2 */
puVar3 = (int8 *)std::__cxx11::string::_M_append((char *)&local_d0,(ulong)local_b0);
LAB_0013c23a:
local_f0 = &local_e0;
plVar2 = puVar3 + 2;
if ((long *)*puVar3 == plVar2) {
local_e0 = *plVar2;
uStack_d8 = puVar3[3];
}
else {
local_e0 = *plVar2;
local_f0 = (long *)*puVar3;
}
local_e8 = puVar3[1];
*puVar3 = plVar2;
puVar3[1] = 0;
*(int1 *)plVar2 = 0;
/* try { // try from 0013c281 to 0013c291 has its CatchHandler @ 0013c3c2 */
plVar2 = (long *)std::__cxx11::string::append((char *)&local_f0);
plVar4 = plVar2 + 2;
if ((long *)*plVar2 == plVar4) {
local_60 = *plVar4;
lStack_58 = plVar2[3];
local_70 = &local_60;
}
else {
local_60 = *plVar4;
local_70 = (long *)*plVar2;
}
local_68 = plVar2[1];
*plVar2 = (long)plVar4;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 0013c2ec to 0013c2f0 has its CatchHandler @ 0013c3a0 */
AbstractSocketWriter::SendLn(*(AbstractSocketWriter **)(param_1 + 8),(string *)&local_70);
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_f0 != &local_e0) {
operator_delete(local_f0,local_e0 + 1);
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
if (local_d0 != &local_c0) {
operator_delete(local_d0,local_c0 + 1);
}
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return;
}
|
|
65,466 |
ma_change_bitmap_page
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool _ma_change_bitmap_page(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page)
{
DBUG_ENTER("_ma_change_bitmap_page");
_ma_check_bitmap(bitmap);
/*
We have to mark the file changed here, as otherwise the following
read/write to pagecache may force a page out from this file, which would
cause _ma_mark_file_changed() to be called with bitmaplock hold!
*/
_ma_bitmap_mark_file_changed(info->s, 1);
if (bitmap->changed)
{
if (write_changed_bitmap(info->s, bitmap))
DBUG_RETURN(1);
bitmap->changed= 0;
}
DBUG_RETURN(_ma_read_bitmap_page(info, bitmap, page));
}
|
O3
|
c
|
ma_change_bitmap_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rdi
cmpb $0x0, 0x7df(%rdi)
jne 0x40c71
testb $0x1, 0x170(%rdi)
jne 0x40f7d
cmpb $0x0, 0x20(%rbx)
je 0x40d5c
movb $0x1, 0x21(%rbx)
cmpl $0x0, 0x38(%rbx)
je 0x40cf7
movq 0x600(%rdi), %rdi
leaq 0x40(%rbx), %rsi
movq 0x8(%rbx), %r8
movq 0x10(%rbx), %rdx
movl 0x80(%rdi), %eax
subq $0x8, %rsp
movq %r15, -0x48(%rbp)
movq %r14, %r15
xorl %r14d, %r14d
leaq -0x90(%rbp), %r12
xorl %ecx, %ecx
movl $0x1, %r9d
pushq %rax
pushq %r14
pushq $0x0
pushq %r12
pushq %r14
pushq $0x2
pushq %r14
callq 0x3366a
addq $0x40, %rsp
movl %eax, %r13d
movl %r14d, 0x8(%r12)
movq %r15, %r14
movq -0x48(%rbp), %r15
movb $0x1, 0x10(%r12)
leaq 0x140(%rbx), %rdi
movq %r12, %rsi
callq 0x91792
jmp 0x40d49
movq 0x600(%rdi), %rdi
leaq 0x40(%rbx), %rsi
movq 0x8(%rbx), %r8
movq 0x10(%rbx), %rdx
movl 0x80(%rdi), %eax
subq $0x40, %rsp
movl %eax, 0x30(%rsp)
xorl %eax, %eax
movl %eax, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movl %eax, 0x10(%rsp)
movl %eax, (%rsp)
movl $0x1, 0x8(%rsp)
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x3366a
addq $0x40, %rsp
movl %eax, %r13d
movb $0x1, %r12b
testb %r13b, %r13b
jne 0x40f5c
movb $0x0, 0x20(%rbx)
movq (%r14), %rdi
movq %r15, 0x10(%rbx)
leaq 0x1(%r15), %rsi
movl 0x134(%rbx), %ecx
movq %rsi, %rax
imulq %rcx, %rax
movq (%r14), %r13
cmpq 0x40(%rdi), %rax
jbe 0x40ec5
movq 0x40(%r13), %rax
movb $0x1, %r12b
cmpq %rcx, %rax
jb 0x40f5c
movq %rcx, %rdx
imulq %r15, %rdx
cmpq 0x368(%r13), %rdx
jae 0x40f51
movq %rsi, -0x50(%rbp)
xorl %edx, %edx
divq %rcx
decq %rax
movq 0x138(%rbx), %rsi
xorl %edx, %edx
divq %rsi
incq %rax
imulq %rsi, %rax
cmpb $0x0, 0x7e7(%r13)
movq %rax, -0x48(%rbp)
je 0x40e44
leaq -0x3c(%rbp), %r11
movl %eax, 0x2(%r11)
movq %rax, %rcx
shrq $0x20, %rcx
movb %cl, 0x6(%r11)
movl %r15d, 0x7(%r11)
movq %r15, %rcx
shrq $0x20, %rcx
movb %cl, 0xb(%r11)
leaq -0x90(%rbp), %r10
movq %r11, 0x20(%r10)
movq $0xc, 0x28(%r10)
subq $0x8, %rsp
leaq 0x3bc1c1(%rip), %rdx # 0x3fcfd0
leaq -0x58(%rbp), %rdi
movl $0x28, %esi
movq %r14, %rcx
movl $0xc, %r8d
movl $0x3, %r9d
pushq $0x0
pushq %r11
pushq %r10
callq 0x2a8ac
addq $0x20, %rsp
testb %al, %al
jne 0x40f5c
movl 0x134(%rbx), %ecx
movq 0x8(%rbx), %rdi
xorl %esi, %esi
movq %rcx, %rdx
callq 0x292c0
movq -0x48(%rbp), %rdx
movl $0x0, 0x2c(%rbx)
movq $0x0, 0x24(%rbx)
movb $0x1, 0x20(%rbx)
movq %r15, %rcx
subq 0x138(%rbx), %rcx
cmpq %rcx, %rdx
ja 0x40e8f
movq 0x8(%rbx), %r8
movq %r13, %rdi
movq %rbx, %rsi
callq 0x41c06
testb %al, %al
jne 0x40f5c
movl 0x134(%rbx), %eax
movq -0x50(%rbp), %rcx
imulq %rax, %rcx
movq %rcx, 0x40(%r13)
movq (%r14), %rax
xorl %ecx, %ecx
cmpq %r15, 0xa28(%rax)
setbe %cl
movl 0xb3c(%rax,%rcx,4), %ecx
movl %ecx, 0xb38(%rax)
xorl %r12d, %r12d
jmp 0x40f5c
xorl %eax, %eax
cmpq %r15, 0xa28(%r13)
setbe %al
movl 0xb3c(%r13,%rax,4), %eax
movl %eax, 0xb38(%r13)
xorl %eax, %eax
movq %rax, 0x28(%rbx)
movq 0x600(%rdi), %rdi
leaq 0x40(%rbx), %rsi
movq 0x8(%rbx), %r8
movq %r15, %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
pushq %rax
pushq $0x0
callq 0x32206
addq $0x10, %rsp
testq %rax, %rax
sete %r12b
je 0x40f3d
movq 0x8(%rbx), %rax
movl 0x128(%rbx), %esi
leaq -0x1(%rax), %rcx
movq %rsi, %rdx
leaq (%rcx,%rsi), %rdi
cmpq %rax, %rdi
jb 0x40f38
leaq -0x1(%rdx), %rsi
cmpb $0x0, (%rdi)
je 0x40f23
movl %edx, 0x24(%rbx)
jmp 0x40f5c
callq 0xa16ee
movl (%rax), %esi
movq %r14, %rdi
callq 0x36618
movb $0x1, %r12b
jmp 0x40f5c
callq 0xa16ee
movl $0x87, (%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x40f98
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x90(%rbp), %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x29d22
movq (%r12), %rdi
jmp 0x40c71
callq 0x29270
|
_ma_change_bitmap_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rdi, [rdi]
cmp byte ptr [rdi+7DFh], 0
jnz short loc_40C71
test byte ptr [rdi+170h], 1
jnz loc_40F7D
loc_40C71:
cmp byte ptr [rbx+20h], 0
jz loc_40D5C
mov byte ptr [rbx+21h], 1
cmp dword ptr [rbx+38h], 0
jz short loc_40CF7
mov rdi, [rdi+600h]
lea rsi, [rbx+40h]
mov r8, [rbx+8]
mov rdx, [rbx+10h]
mov eax, [rdi+80h]
sub rsp, 8
mov [rbp+var_48], r15
mov r15, r14
xor r14d, r14d
lea r12, [rbp+var_90]
xor ecx, ecx
mov r9d, 1
push rax
push r14
push 0
push r12
push r14
push 2
push r14
call pagecache_write_part
add rsp, 40h
mov r13d, eax
mov [r12+8], r14d
mov r14, r15
mov r15, [rbp+var_48]
mov byte ptr [r12+10h], 1
lea rdi, [rbx+140h]
mov rsi, r12
call insert_dynamic
jmp short loc_40D49
loc_40CF7:
mov rdi, [rdi+600h]
lea rsi, [rbx+40h]
mov r8, [rbx+8]
mov rdx, [rbx+10h]
mov eax, [rdi+80h]
sub rsp, 40h
mov [rsp+0D0h+var_A0], eax
xor eax, eax
mov [rsp+0D0h+var_A8], eax
xorps xmm0, xmm0
movups [rsp+0D0h+var_B8], xmm0
mov [rsp+0D0h+var_C0], eax
mov [rsp+0D0h+var_D0], eax
mov [rsp+0D0h+var_C8], 1
xor ecx, ecx
mov r9d, 1
call pagecache_write_part
add rsp, 40h
mov r13d, eax
loc_40D49:
mov r12b, 1
test r13b, r13b
jnz loc_40F5C
mov byte ptr [rbx+20h], 0
mov rdi, [r14]
loc_40D5C:
mov [rbx+10h], r15
lea rsi, [r15+1]
mov ecx, [rbx+134h]
mov rax, rsi
imul rax, rcx
mov r13, [r14]
cmp rax, [rdi+40h]
jbe loc_40EC5
mov rax, [r13+40h]
mov r12b, 1
cmp rax, rcx
jb loc_40F5C
mov rdx, rcx
imul rdx, r15
cmp rdx, [r13+368h]
jnb loc_40F51
mov [rbp+var_50], rsi
xor edx, edx
div rcx
dec rax
mov rsi, [rbx+138h]
xor edx, edx
div rsi
inc rax
imul rax, rsi
cmp byte ptr [r13+7E7h], 0
mov [rbp+var_48], rax
jz short loc_40E44
lea r11, [rbp+var_3C]
mov [r11+2], eax
mov rcx, rax
shr rcx, 20h
mov [r11+6], cl
mov [r11+7], r15d
mov rcx, r15
shr rcx, 20h
mov [r11+0Bh], cl
lea r10, [rbp+var_90]
mov [r10+20h], r11
mov qword ptr [r10+28h], 0Ch
sub rsp, 8
lea rdx, dummy_transaction_object
lea rdi, [rbp+var_58]
mov esi, 28h ; '('
mov rcx, r14
mov r8d, 0Ch
mov r9d, 3
push 0
push r11
push r10
call translog_write_record
add rsp, 20h
test al, al
jnz loc_40F5C
mov ecx, [rbx+134h]
loc_40E44:
mov rdi, [rbx+8]
xor esi, esi
mov rdx, rcx
call _memset
mov rdx, [rbp+var_48]
mov dword ptr [rbx+2Ch], 0
mov qword ptr [rbx+24h], 0
mov byte ptr [rbx+20h], 1
mov rcx, r15
sub rcx, [rbx+138h]
cmp rdx, rcx
ja short loc_40E8F
mov r8, [rbx+8]
mov rdi, r13
mov rsi, rbx
call _ma_bitmap_create_missing_into_pagecache
test al, al
jnz loc_40F5C
loc_40E8F:
mov eax, [rbx+134h]
mov rcx, [rbp+var_50]
imul rcx, rax
mov [r13+40h], rcx
mov rax, [r14]
xor ecx, ecx
cmp [rax+0A28h], r15
setbe cl
mov ecx, [rax+rcx*4+0B3Ch]
mov [rax+0B38h], ecx
xor r12d, r12d
jmp loc_40F5C
loc_40EC5:
xor eax, eax
cmp [r13+0A28h], r15
setbe al
mov eax, [r13+rax*4+0B3Ch]
mov [r13+0B38h], eax
xor eax, eax
mov [rbx+28h], rax
mov rdi, [rdi+600h]
lea rsi, [rbx+40h]
mov r8, [rbx+8]
mov rdx, r15
xor ecx, ecx
mov r9d, 1
push rax
push 0
call pagecache_read
add rsp, 10h
test rax, rax
setz r12b
jz short loc_40F3D
mov rax, [rbx+8]
mov esi, [rbx+128h]
lea rcx, [rax-1]
loc_40F23:
mov rdx, rsi
lea rdi, [rcx+rsi]
cmp rdi, rax
jb short loc_40F38
lea rsi, [rdx-1]
cmp byte ptr [rdi], 0
jz short loc_40F23
loc_40F38:
mov [rbx+24h], edx
jmp short loc_40F5C
loc_40F3D:
call _my_thread_var
mov esi, [rax]
mov rdi, r14
call _ma_set_fatal_error
mov r12b, 1
jmp short loc_40F5C
loc_40F51:
call _my_thread_var
mov dword ptr [rax], 87h
loc_40F5C:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_40F98
mov eax, r12d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_40F7D:
lea r12, [rbp+var_90]
mov rsi, r14
mov rdx, r12
call _ma_change_bitmap_page_cold_1
mov rdi, [r12]
jmp loc_40C71
loc_40F98:
call ___stack_chk_fail
|
long long ma_change_bitmap_page(long long *a1, long long a2, unsigned long long a3, long long a4, long long a5)
{
__int128 *v5; // r12
long long v9; // rdi
__m128i *v10; // rdi
char *v11; // r8
long long v12; // rdx
unsigned __int32 v13; // eax
char v14; // r13
unsigned long long v15; // rcx
long long v16; // r13
unsigned long long v17; // rax
unsigned long long v18; // rax
bool v19; // zf
unsigned long long v20; // rdx
unsigned long long v21; // rcx
long long v22; // rdi
long long v23; // rax
long long v24; // rdx
long long v25; // rcx
long long v26; // r8
unsigned long long v27; // rax
long long v28; // rsi
unsigned long long v29; // rcx
int v30; // edx
_BYTE *v31; // rdi
unsigned int *v32; // rax
long long v33; // rdx
long long v34; // rcx
long long v35; // r8
int v36; // r9d
__int128 v38; // [rsp+40h] [rbp-90h] BYREF
char v39; // [rsp+50h] [rbp-80h]
__int16 *v40; // [rsp+60h] [rbp-70h]
long long v41; // [rsp+68h] [rbp-68h]
char v42[8]; // [rsp+78h] [rbp-58h] BYREF
unsigned long long v43; // [rsp+80h] [rbp-50h]
unsigned long long v44; // [rsp+88h] [rbp-48h]
__int16 v45; // [rsp+94h] [rbp-3Ch] BYREF
int v46; // [rsp+96h] [rbp-3Ah]
char v47; // [rsp+9Ah] [rbp-36h]
int v48; // [rsp+9Bh] [rbp-35h]
char v49; // [rsp+9Fh] [rbp-31h]
unsigned long long v50; // [rsp+A0h] [rbp-30h]
v50 = __readfsqword(0x28u);
v9 = *a1;
if ( !*(_BYTE *)(v9 + 2015) && (*(_BYTE *)(v9 + 368) & 1) != 0 )
{
v5 = &v38;
ma_change_bitmap_page_cold_1(v9, a1, (long long *)&v38);
v9 = v38;
}
if ( *(_BYTE *)(a2 + 32) )
{
*(_BYTE *)(a2 + 33) = 1;
if ( *(_DWORD *)(a2 + 56) )
{
v10 = *(__m128i **)(v9 + 1536);
v11 = *(char **)(a2 + 8);
v12 = *(_QWORD *)(a2 + 16);
v13 = v10[8].m128i_u32[0];
v44 = a3;
v5 = &v38;
v14 = pagecache_write_part(v10, (char *)(a2 + 64), v12, 0, v11, 1, 0, 2u, 0, &v38, 0LL, 0, v13);
DWORD2(v38) = 0;
a3 = v44;
v39 = 1;
insert_dynamic(a2 + 320, &v38);
}
else
{
v14 = pagecache_write_part(
*(__m128i **)(v9 + 1536),
(char *)(a2 + 64),
*(_QWORD *)(a2 + 16),
0,
*(char **)(a2 + 8),
1,
0,
1u,
0,
0LL,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v9 + 1536) + 128LL));
}
LOBYTE(v5) = 1;
if ( v14 )
return (unsigned int)v5;
*(_BYTE *)(a2 + 32) = 0;
v9 = *a1;
}
*(_QWORD *)(a2 + 16) = a3;
v15 = *(unsigned int *)(a2 + 308);
v16 = *a1;
if ( v15 * (a3 + 1) <= *(_QWORD *)(v9 + 64) )
{
*(_DWORD *)(v16 + 2872) = *(_DWORD *)(v16 + 4LL * (*(_QWORD *)(v16 + 2600) <= a3) + 2876);
*(_QWORD *)(a2 + 40) = 0LL;
v22 = *(_QWORD *)(v9 + 1536);
v23 = pagecache_read(v22, a2 + 64, a3, 0, *(_QWORD *)(a2 + 8), 1, 0, 0LL);
LOBYTE(v5) = v23 == 0;
if ( v23 )
{
v27 = *(_QWORD *)(a2 + 8);
v28 = *(unsigned int *)(a2 + 296);
v29 = v27 - 1;
do
{
v30 = v28;
v31 = (_BYTE *)(v29 + v28);
if ( v29 + v28 < v27 )
break;
--v28;
}
while ( !*v31 );
*(_DWORD *)(a2 + 36) = v30;
}
else
{
v32 = (unsigned int *)my_thread_var(v22, a2 + 64, v24, v25, v26);
ma_set_fatal_error(a1, *v32, v33, v34, v35, v36);
LOBYTE(v5) = 1;
}
}
else
{
v17 = *(_QWORD *)(v16 + 64);
LOBYTE(v5) = 1;
if ( v17 >= v15 )
{
if ( a3 * v15 >= *(_QWORD *)(v16 + 872) )
{
*(_DWORD *)my_thread_var(v9, a3 + 1, a3 * v15, v15, a5) = 135;
return (unsigned int)v5;
}
v43 = a3 + 1;
v18 = *(_QWORD *)(a2 + 312) * ((v17 / v15 - 1) / *(_QWORD *)(a2 + 312) + 1);
v19 = *(_BYTE *)(v16 + 2023) == 0;
v44 = v18;
if ( !v19 )
{
v46 = v18;
v47 = BYTE4(v18);
v48 = a3;
v49 = BYTE4(a3);
v40 = &v45;
v41 = 12LL;
if ( (unsigned __int8)translog_write_record(
(unsigned long long)v42,
&qword_28,
(long long)dummy_transaction_object,
a1,
0xCu,
3,
&v38,
&v45,
0LL) )
return (unsigned int)v5;
v15 = *(unsigned int *)(a2 + 308);
}
memset(*(_QWORD *)(a2 + 8), 0LL, v15);
v20 = v44;
*(_DWORD *)(a2 + 44) = 0;
*(_QWORD *)(a2 + 36) = 0LL;
*(_BYTE *)(a2 + 32) = 1;
v21 = a3 - *(_QWORD *)(a2 + 312);
if ( v20 > v21
|| !(unsigned __int8)ma_bitmap_create_missing_into_pagecache(v16, a2, v20, v21, *(_QWORD *)(a2 + 8)) )
{
*(_QWORD *)(v16 + 64) = *(unsigned int *)(a2 + 308) * v43;
*(_DWORD *)(*a1 + 2872) = *(_DWORD *)(*a1 + 4LL * (*(_QWORD *)(*a1 + 2600) <= a3) + 2876);
LODWORD(v5) = 0;
}
}
}
return (unsigned int)v5;
}
|
_ma_change_bitmap_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RDI]
CMP byte ptr [RDI + 0x7df],0x0
JNZ 0x00140c71
TEST byte ptr [RDI + 0x170],0x1
JNZ 0x00140f7d
LAB_00140c71:
CMP byte ptr [RBX + 0x20],0x0
JZ 0x00140d5c
MOV byte ptr [RBX + 0x21],0x1
CMP dword ptr [RBX + 0x38],0x0
JZ 0x00140cf7
MOV RDI,qword ptr [RDI + 0x600]
LEA RSI,[RBX + 0x40]
MOV R8,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x80]
SUB RSP,0x8
MOV qword ptr [RBP + -0x48],R15
MOV R15,R14
XOR R14D,R14D
LEA R12,[RBP + -0x90]
XOR ECX,ECX
MOV R9D,0x1
PUSH RAX
PUSH R14
PUSH 0x0
PUSH R12
PUSH R14
PUSH 0x2
PUSH R14
CALL 0x0013366a
ADD RSP,0x40
MOV R13D,EAX
MOV dword ptr [R12 + 0x8],R14D
MOV R14,R15
MOV R15,qword ptr [RBP + -0x48]
MOV byte ptr [R12 + 0x10],0x1
LEA RDI,[RBX + 0x140]
MOV RSI,R12
CALL 0x00191792
JMP 0x00140d49
LAB_00140cf7:
MOV RDI,qword ptr [RDI + 0x600]
LEA RSI,[RBX + 0x40]
MOV R8,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x80]
SUB RSP,0x40
MOV dword ptr [RSP + 0x30],EAX
XOR EAX,EAX
MOV dword ptr [RSP + 0x28],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV dword ptr [RSP + 0x10],EAX
MOV dword ptr [RSP],EAX
MOV dword ptr [RSP + 0x8],0x1
XOR ECX,ECX
MOV R9D,0x1
CALL 0x0013366a
ADD RSP,0x40
MOV R13D,EAX
LAB_00140d49:
MOV R12B,0x1
TEST R13B,R13B
JNZ 0x00140f5c
MOV byte ptr [RBX + 0x20],0x0
MOV RDI,qword ptr [R14]
LAB_00140d5c:
MOV qword ptr [RBX + 0x10],R15
LEA RSI,[R15 + 0x1]
MOV ECX,dword ptr [RBX + 0x134]
MOV RAX,RSI
IMUL RAX,RCX
MOV R13,qword ptr [R14]
CMP RAX,qword ptr [RDI + 0x40]
JBE 0x00140ec5
MOV RAX,qword ptr [R13 + 0x40]
MOV R12B,0x1
CMP RAX,RCX
JC 0x00140f5c
MOV RDX,RCX
IMUL RDX,R15
CMP RDX,qword ptr [R13 + 0x368]
JNC 0x00140f51
MOV qword ptr [RBP + -0x50],RSI
XOR EDX,EDX
DIV RCX
DEC RAX
MOV RSI,qword ptr [RBX + 0x138]
XOR EDX,EDX
DIV RSI
INC RAX
IMUL RAX,RSI
CMP byte ptr [R13 + 0x7e7],0x0
MOV qword ptr [RBP + -0x48],RAX
JZ 0x00140e44
LEA R11,[RBP + -0x3c]
MOV dword ptr [R11 + 0x2],EAX
MOV RCX,RAX
SHR RCX,0x20
MOV byte ptr [R11 + 0x6],CL
MOV dword ptr [R11 + 0x7],R15D
MOV RCX,R15
SHR RCX,0x20
MOV byte ptr [R11 + 0xb],CL
LEA R10,[RBP + -0x90]
MOV qword ptr [R10 + 0x20],R11
MOV qword ptr [R10 + 0x28],0xc
SUB RSP,0x8
LEA RDX,[0x4fcfd0]
LEA RDI,[RBP + -0x58]
MOV ESI,0x28
MOV RCX,R14
MOV R8D,0xc
MOV R9D,0x3
PUSH 0x0
PUSH R11
PUSH R10
CALL 0x0012a8ac
ADD RSP,0x20
TEST AL,AL
JNZ 0x00140f5c
MOV ECX,dword ptr [RBX + 0x134]
LAB_00140e44:
MOV RDI,qword ptr [RBX + 0x8]
XOR ESI,ESI
MOV RDX,RCX
CALL 0x001292c0
MOV RDX,qword ptr [RBP + -0x48]
MOV dword ptr [RBX + 0x2c],0x0
MOV qword ptr [RBX + 0x24],0x0
MOV byte ptr [RBX + 0x20],0x1
MOV RCX,R15
SUB RCX,qword ptr [RBX + 0x138]
CMP RDX,RCX
JA 0x00140e8f
MOV R8,qword ptr [RBX + 0x8]
MOV RDI,R13
MOV RSI,RBX
CALL 0x00141c06
TEST AL,AL
JNZ 0x00140f5c
LAB_00140e8f:
MOV EAX,dword ptr [RBX + 0x134]
MOV RCX,qword ptr [RBP + -0x50]
IMUL RCX,RAX
MOV qword ptr [R13 + 0x40],RCX
MOV RAX,qword ptr [R14]
XOR ECX,ECX
CMP qword ptr [RAX + 0xa28],R15
SETBE CL
MOV ECX,dword ptr [RAX + RCX*0x4 + 0xb3c]
MOV dword ptr [RAX + 0xb38],ECX
XOR R12D,R12D
JMP 0x00140f5c
LAB_00140ec5:
XOR EAX,EAX
CMP qword ptr [R13 + 0xa28],R15
SETBE AL
MOV EAX,dword ptr [R13 + RAX*0x4 + 0xb3c]
MOV dword ptr [R13 + 0xb38],EAX
XOR EAX,EAX
MOV qword ptr [RBX + 0x28],RAX
MOV RDI,qword ptr [RDI + 0x600]
LEA RSI,[RBX + 0x40]
MOV R8,qword ptr [RBX + 0x8]
MOV RDX,R15
XOR ECX,ECX
MOV R9D,0x1
PUSH RAX
PUSH 0x0
CALL 0x00132206
ADD RSP,0x10
TEST RAX,RAX
SETZ R12B
JZ 0x00140f3d
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RBX + 0x128]
LEA RCX,[RAX + -0x1]
LAB_00140f23:
MOV RDX,RSI
LEA RDI,[RCX + RSI*0x1]
CMP RDI,RAX
JC 0x00140f38
LEA RSI,[RDX + -0x1]
CMP byte ptr [RDI],0x0
JZ 0x00140f23
LAB_00140f38:
MOV dword ptr [RBX + 0x24],EDX
JMP 0x00140f5c
LAB_00140f3d:
CALL 0x001a16ee
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x00136618
MOV R12B,0x1
JMP 0x00140f5c
LAB_00140f51:
CALL 0x001a16ee
MOV dword ptr [RAX],0x87
LAB_00140f5c:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00140f98
MOV EAX,R12D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00140f7d:
LEA R12,[RBP + -0x90]
MOV RSI,R14
MOV RDX,R12
CALL 0x00129d22
MOV RDI,qword ptr [R12]
JMP 0x00140c71
LAB_00140f98:
CALL 0x00129270
|
ulong _ma_change_bitmap_page(long *param_1,long param_2,ulong param_3)
{
long lVar1;
char *pcVar2;
long lVar3;
char cVar4;
long lVar5;
int4 *puVar6;
size_t __n;
ulong uVar7;
ulong uVar8;
long *unaff_R12;
int7 uVar9;
long in_FS_OFFSET;
ulong in_stack_ffffffffffffff28;
ulong in_stack_ffffffffffffff38;
ulong in_stack_ffffffffffffff50;
long local_98;
int4 local_90;
int1 local_88;
int1 *local_78;
int8 local_70;
int1 local_60 [8];
long local_58;
ulong local_50;
int1 local_44 [2];
int4 local_42;
int1 local_3e;
int4 local_3d;
int1 local_39;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar5 = *param_1;
if ((*(char *)(lVar5 + 0x7df) == '\0') && ((*(byte *)(lVar5 + 0x170) & 1) != 0)) {
unaff_R12 = &local_98;
_ma_change_bitmap_page_cold_1(lVar5,param_1,unaff_R12);
lVar5 = local_98;
}
if (*(char *)(param_2 + 0x20) != '\0') {
*(int1 *)(param_2 + 0x21) = 1;
if (*(int *)(param_2 + 0x38) == 0) {
cVar4 = pagecache_write_part
(*(long *)(lVar5 + 0x600),param_2 + 0x40,*(int8 *)(param_2 + 0x10),0,
*(int8 *)(param_2 + 8),1,
in_stack_ffffffffffffff28 & 0xffffffff00000000,1,
in_stack_ffffffffffffff38 & 0xffffffff00000000,0,0,
in_stack_ffffffffffffff50 & 0xffffffff00000000,
*(int4 *)(*(long *)(lVar5 + 0x600) + 0x80));
}
else {
unaff_R12 = &local_98;
local_50 = param_3;
cVar4 = pagecache_write_part
(*(long *)(lVar5 + 0x600),param_2 + 0x40,*(int8 *)(param_2 + 0x10),0,
*(int8 *)(param_2 + 8),1,0,2,0,unaff_R12,0,0,
*(int4 *)(*(long *)(lVar5 + 0x600) + 0x80));
param_3 = local_50;
local_90 = 0;
local_88 = 1;
insert_dynamic(param_2 + 0x140,unaff_R12);
}
unaff_R12 = (long *)CONCAT71((int7)((ulong)unaff_R12 >> 8),1);
if (cVar4 != '\0') goto LAB_00140f5c;
*(int1 *)(param_2 + 0x20) = 0;
lVar5 = *param_1;
}
*(ulong *)(param_2 + 0x10) = param_3;
lVar1 = param_3 + 1;
__n = (size_t)*(uint *)(param_2 + 0x134);
lVar3 = *param_1;
uVar9 = (int7)((ulong)unaff_R12 >> 8);
if (lVar1 * __n < *(ulong *)(lVar5 + 0x40) || lVar1 * __n - *(ulong *)(lVar5 + 0x40) == 0) {
*(int4 *)(lVar3 + 0xb38) =
*(int4 *)(lVar3 + 0xb3c + (ulong)(*(ulong *)(lVar3 + 0xa28) <= param_3) * 4);
*(int8 *)(param_2 + 0x28) = 0;
lVar5 = pagecache_read(*(int8 *)(lVar5 + 0x600),param_2 + 0x40,param_3,0,
*(int8 *)(param_2 + 8),1,0,0);
unaff_R12 = (long *)CONCAT71(uVar9,lVar5 == 0);
if (lVar5 == 0) {
puVar6 = (int4 *)_my_thread_var();
_ma_set_fatal_error(param_1,*puVar6);
unaff_R12 = (long *)CONCAT71(uVar9,1);
}
else {
uVar7 = (ulong)*(uint *)(param_2 + 0x128);
do {
uVar8 = uVar7;
pcVar2 = *(char **)(param_2 + 8) + (uVar8 - 1);
if (pcVar2 < *(char **)(param_2 + 8)) break;
uVar7 = uVar8 - 1;
} while (*pcVar2 == '\0');
*(int *)(param_2 + 0x24) = (int)uVar8;
}
}
else {
unaff_R12 = (long *)CONCAT71(uVar9,1);
if (__n <= *(ulong *)(lVar3 + 0x40)) {
if (__n * param_3 < *(ulong *)(lVar3 + 0x368)) {
local_50 = ((*(ulong *)(lVar3 + 0x40) / __n - 1) / *(ulong *)(param_2 + 0x138) + 1) *
*(ulong *)(param_2 + 0x138);
local_58 = lVar1;
if (*(char *)(lVar3 + 0x7e7) != '\0') {
local_78 = local_44;
local_42 = (int4)local_50;
local_3e = (int1)(local_50 >> 0x20);
local_3d = (int4)param_3;
local_39 = (int1)(param_3 >> 0x20);
local_70 = 0xc;
cVar4 = translog_write_record
(local_60,0x28,dummy_transaction_object,param_1,0xc,3,&local_98,local_78
,0);
if (cVar4 != '\0') goto LAB_00140f5c;
__n = (size_t)*(uint *)(param_2 + 0x134);
}
memset(*(void **)(param_2 + 8),0,__n);
*(int4 *)(param_2 + 0x2c) = 0;
*(int8 *)(param_2 + 0x24) = 0;
*(int1 *)(param_2 + 0x20) = 1;
uVar7 = param_3 - *(long *)(param_2 + 0x138);
if (local_50 <= uVar7) {
cVar4 = _ma_bitmap_create_missing_into_pagecache
(lVar3,param_2,local_50,uVar7,*(int8 *)(param_2 + 8));
if (cVar4 != '\0') goto LAB_00140f5c;
}
*(ulong *)(lVar3 + 0x40) = local_58 * (ulong)*(uint *)(param_2 + 0x134);
lVar5 = *param_1;
*(int4 *)(lVar5 + 0xb38) =
*(int4 *)(lVar5 + 0xb3c + (ulong)(*(ulong *)(lVar5 + 0xa28) <= param_3) * 4);
unaff_R12 = (long *)0x0;
}
else {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x87;
}
}
}
LAB_00140f5c:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return (ulong)unaff_R12 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
65,467 |
my_numcells_eucjpms
|
eloqsql/strings/ctype-eucjpms.c
|
static
size_t my_numcells_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O3
|
c
|
my_numcells_eucjpms:
cmpq %rdx, %rsi
jae 0x326cd
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0x326a6
cmpl $0x8f, %edi
jne 0x326b2
movl $0x3, %edi
movl $0x2, %ecx
jmp 0x326c0
movl $0x2, %edi
movl $0x1, %ecx
jmp 0x326c0
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x32687
popq %rbp
retq
xorl %eax, %eax
retq
|
my_numcells_eucjpms:
cmp rsi, rdx
jnb short loc_326CD
push rbp
mov rbp, rsp
xor eax, eax
loc_32687:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_326A6
cmp edi, 8Fh
jnz short loc_326B2
mov edi, 3
mov ecx, 2
jmp short loc_326C0
loc_326A6:
mov edi, 2
mov ecx, 1
jmp short loc_326C0
loc_326B2:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_326C0:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_32687
pop rbp
retn
loc_326CD:
xor eax, eax
retn
|
long long my_numcells_eucjpms(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
|
my_numcells_eucjpms:
CMP RSI,RDX
JNC 0x001326cd
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_00132687:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x001326a6
CMP EDI,0x8f
JNZ 0x001326b2
MOV EDI,0x3
MOV ECX,0x2
JMP 0x001326c0
LAB_001326a6:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x001326c0
LAB_001326b2:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_001326c0:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x00132687
POP RBP
RET
LAB_001326cd:
XOR EAX,EAX
RET
|
long my_numcells_eucjpms(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
|
|
65,468 |
bf_get_fft_size
|
bluesky950520[P]quickjs/libbf.c
|
int bf_get_fft_size(int *pdpl, int *pnb_mods, limb_t len)
{
int dpl, fft_len_log2, n_bits, nb_mods, dpl_found, fft_len_log2_found;
int int_bits, nb_mods_found;
limb_t cost, min_cost;
min_cost = -1;
dpl_found = 0;
nb_mods_found = 4;
fft_len_log2_found = 0;
for(nb_mods = 3; nb_mods <= NB_MODS; nb_mods++) {
int_bits = ntt_int_bits[NB_MODS - nb_mods];
dpl = bf_min((int_bits - 4) / 2,
2 * LIMB_BITS + 2 * NTT_MOD_LOG2_MIN - NTT_MOD_LOG2_MAX);
for(;;) {
fft_len_log2 = ceil_log2((len * LIMB_BITS + dpl - 1) / dpl);
if (fft_len_log2 > NTT_PROOT_2EXP)
goto next;
n_bits = fft_len_log2 + 2 * dpl;
if (n_bits <= int_bits) {
cost = ((limb_t)(fft_len_log2 + 1) << fft_len_log2) * nb_mods;
// printf("n=%d dpl=%d: cost=%" PRId64 "\n", nb_mods, dpl, (int64_t)cost);
if (cost < min_cost) {
min_cost = cost;
dpl_found = dpl;
nb_mods_found = nb_mods;
fft_len_log2_found = fft_len_log2;
}
break;
}
dpl--;
if (dpl == 0)
break;
}
next: ;
}
if (!dpl_found)
abort();
/* limit dpl if possible to reduce fixed cost of limb/NTT conversion */
if (dpl_found > (LIMB_BITS + NTT_MOD_LOG2_MIN) &&
((limb_t)(LIMB_BITS + NTT_MOD_LOG2_MIN) << fft_len_log2_found) >=
len * LIMB_BITS) {
dpl_found = LIMB_BITS + NTT_MOD_LOG2_MIN;
}
*pnb_mods = nb_mods_found;
*pdpl = dpl_found;
return fft_len_log2_found;
}
|
O3
|
c
|
bf_get_fft_size:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
shlq $0x6, %rdx
movq %rdx, (%rsp)
leaq -0x1(%rdx), %r11
xorl %r14d, %r14d
movl $0x4, %edi
movq $-0x1, %r13
movl $0x3, %r15d
leaq 0x12477(%rip), %r12 # 0xa4600
movl $0xbc, %ebp
xorl %r9d, %r9d
xorl %ebx, %ebx
movl $0x5, %eax
subl %r15d, %eax
shll $0x2, %eax
movl (%rax,%r12), %r10d
leal -0x4(%r10), %eax
shrl $0x1f, %eax
addl %r10d, %eax
addl $-0x4, %eax
sarl %eax
cmpl %ebp, %eax
cmovgel %ebp, %eax
movslq %eax, %r8
leal 0x2(,%r8,2), %esi
leaq (%r11,%r8), %rax
xorl %edx, %edx
divq %r8
movq %rax, %rcx
decq %rcx
je 0x921dc
bsrq %rcx, %rdx
xorq $0x3f, %rdx
jmp 0x921e1
movl $0x40, %edx
movl $0x40, %ecx
subl %edx, %ecx
cmpq $0x2, %rax
cmovbl %r14d, %ecx
cmpl $0x33, %ecx
ja 0x92227
leal (%rcx,%rsi), %eax
addl $-0x2, %eax
cmpl %r10d, %eax
jle 0x9220a
addl $-0x2, %esi
decq %r8
jne 0x921c1
jmp 0x92227
movl %ecx, %eax
incq %rax
shlq %cl, %rax
imulq %r15, %rax
cmpq %r13, %rax
jae 0x92227
movl %r8d, %ebx
movl %ecx, %r9d
movl %r15d, %edi
movq %rax, %r13
incq %r15
cmpq $0x6, %r15
jne 0x92193
testl %ebx, %ebx
je 0x92275
movl $0x7d, %eax
movl %r9d, %ecx
shlq %cl, %rax
cmpq (%rsp), %rax
movl $0x7d, %eax
cmovbl %ebx, %eax
cmpl $0x7e, %ebx
cmovll %ebx, %eax
movq 0x8(%rsp), %rcx
movl %edi, (%rcx)
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
movl %r9d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xe090
|
bf_get_fft_size:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_38], rdi
shl rdx, 6
mov [rsp+48h+var_48], rdx
lea r11, [rdx-1]
xor r14d, r14d
mov edi, 4
mov r13, 0FFFFFFFFFFFFFFFFh
mov r15d, 3
lea r12, ntt_int_bits
mov ebp, 0BCh
xor r9d, r9d
xor ebx, ebx
loc_92193:
mov eax, 5
sub eax, r15d
shl eax, 2
mov r10d, [rax+r12]
lea eax, [r10-4]
shr eax, 1Fh
add eax, r10d
add eax, 0FFFFFFFCh
sar eax, 1
cmp eax, ebp
cmovge eax, ebp
movsxd r8, eax
lea esi, ds:2[r8*2]
loc_921C1:
lea rax, [r11+r8]
xor edx, edx
div r8
mov rcx, rax
dec rcx
jz short loc_921DC
bsr rdx, rcx
xor rdx, 3Fh
jmp short loc_921E1
loc_921DC:
mov edx, 40h ; '@'
loc_921E1:
mov ecx, 40h ; '@'
sub ecx, edx
cmp rax, 2
cmovb ecx, r14d
cmp ecx, 33h ; '3'
ja short loc_92227
lea eax, [rcx+rsi]
add eax, 0FFFFFFFEh
cmp eax, r10d
jle short loc_9220A
add esi, 0FFFFFFFEh
dec r8
jnz short loc_921C1
jmp short loc_92227
loc_9220A:
mov eax, ecx
inc rax
shl rax, cl
imul rax, r15
cmp rax, r13
jnb short loc_92227
mov ebx, r8d
mov r9d, ecx
mov edi, r15d
mov r13, rax
loc_92227:
inc r15
cmp r15, 6
jnz loc_92193
test ebx, ebx
jz short loc_92275
mov eax, 7Dh ; '}'
mov ecx, r9d
shl rax, cl
cmp rax, [rsp+48h+var_48]
mov eax, 7Dh ; '}'
cmovb eax, ebx
cmp ebx, 7Eh ; '~'
cmovl eax, ebx
mov rcx, [rsp+48h+var_40]
mov [rcx], edi
mov rcx, [rsp+48h+var_38]
mov [rcx], eax
mov eax, r9d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_92275:
call _abort
|
long long bf_get_fft_size(int *a1, _DWORD *a2, long long a3)
{
long long v3; // r11
unsigned long long v4; // rdi
unsigned long long v5; // r13
long long v6; // r15
long long v7; // r9
int v8; // ebx
int v9; // r10d
int v10; // eax
unsigned long long v11; // r8
long long v12; // rsi
unsigned long long v13; // rdx
unsigned long long v14; // rdx
long long v15; // rcx
int v16; // eax
unsigned long long v18; // [rsp+0h] [rbp-48h]
v18 = a3 << 6;
v3 = (a3 << 6) - 1;
v4 = 4LL;
v5 = -1LL;
v6 = 3LL;
v7 = 0LL;
v8 = 0;
do
{
v9 = *(_DWORD *)((char *)&ntt_int_bits + (unsigned int)(4 * (5 - v6)));
v10 = (int)(v9 + ((unsigned int)(v9 - 4) >> 31) - 4) >> 1;
if ( v10 >= 188 )
v10 = 188;
v11 = v10;
v12 = (unsigned int)(2 * v10 + 2);
do
{
if ( (v3 + v11) / v11 == 1 )
{
v14 = 64LL;
}
else
{
_BitScanReverse64(&v13, (v3 + v11) / v11 - 1);
v14 = v13 ^ 0x3F;
}
v15 = (unsigned int)(64 - v14);
if ( (v3 + v11) / v11 < 2 )
v15 = 0LL;
if ( (unsigned int)v15 > 0x33 )
break;
if ( (int)v15 + (int)v12 - 2 <= v9 )
{
if ( v6 * (((unsigned long long)(unsigned int)v15 + 1) << v15) < v5 )
{
v8 = v11;
v7 = (unsigned int)v15;
v4 = (unsigned int)v6;
v5 = v6 * (((unsigned int)v15 + 1LL) << v15);
}
break;
}
v12 = (unsigned int)(v12 - 2);
--v11;
}
while ( v11 );
++v6;
}
while ( v6 != 6 );
if ( !v8 )
abort((const char *)v4, v12, v14, v15, v11, v7);
v16 = 125;
if ( 125LL << v7 < v18 )
v16 = v8;
if ( v8 < 126 )
v16 = v8;
*a2 = v4;
*a1 = v16;
return (unsigned int)v7;
}
|
bf_get_fft_size:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDI
SHL RDX,0x6
MOV qword ptr [RSP],RDX
LEA R11,[RDX + -0x1]
XOR R14D,R14D
MOV EDI,0x4
MOV R13,-0x1
MOV R15D,0x3
LEA R12,[0x1a4600]
MOV EBP,0xbc
XOR R9D,R9D
XOR EBX,EBX
LAB_00192193:
MOV EAX,0x5
SUB EAX,R15D
SHL EAX,0x2
MOV R10D,dword ptr [RAX + R12*0x1]
LEA EAX,[R10 + -0x4]
SHR EAX,0x1f
ADD EAX,R10D
ADD EAX,-0x4
SAR EAX,0x1
CMP EAX,EBP
CMOVGE EAX,EBP
MOVSXD R8,EAX
LEA ESI,[0x2 + R8*0x2]
LAB_001921c1:
LEA RAX,[R11 + R8*0x1]
XOR EDX,EDX
DIV R8
MOV RCX,RAX
DEC RCX
JZ 0x001921dc
BSR RDX,RCX
XOR RDX,0x3f
JMP 0x001921e1
LAB_001921dc:
MOV EDX,0x40
LAB_001921e1:
MOV ECX,0x40
SUB ECX,EDX
CMP RAX,0x2
CMOVC ECX,R14D
CMP ECX,0x33
JA 0x00192227
LEA EAX,[RCX + RSI*0x1]
ADD EAX,-0x2
CMP EAX,R10D
JLE 0x0019220a
ADD ESI,-0x2
DEC R8
JNZ 0x001921c1
JMP 0x00192227
LAB_0019220a:
MOV EAX,ECX
INC RAX
SHL RAX,CL
IMUL RAX,R15
CMP RAX,R13
JNC 0x00192227
MOV EBX,R8D
MOV R9D,ECX
MOV EDI,R15D
MOV R13,RAX
LAB_00192227:
INC R15
CMP R15,0x6
JNZ 0x00192193
TEST EBX,EBX
JZ 0x00192275
MOV EAX,0x7d
MOV ECX,R9D
SHL RAX,CL
CMP RAX,qword ptr [RSP]
MOV EAX,0x7d
CMOVC EAX,EBX
CMP EBX,0x7e
CMOVL EAX,EBX
MOV RCX,qword ptr [RSP + 0x8]
MOV dword ptr [RCX],EDI
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX],EAX
MOV EAX,R9D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00192275:
CALL 0x0010e090
|
uint bf_get_fft_size(int *param_1,int4 *param_2,long param_3)
{
long lVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
uint uVar5;
int iVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
uint uVar10;
ulong uVar11;
ulong uVar12;
uVar8 = 4;
uVar11 = 0xffffffffffffffff;
uVar12 = 3;
uVar10 = 0;
uVar7 = 0;
do {
iVar6 = *(int *)(ntt_int_bits + (uint)((5 - (int)uVar12) * 4));
iVar2 = (iVar6 - (iVar6 + -4 >> 0x1f)) + -4 >> 1;
if (0xbb < iVar2) {
iVar2 = 0xbc;
}
uVar9 = (ulong)iVar2;
iVar2 = iVar2 * 2 + 2;
do {
uVar3 = ((param_3 * 0x40 - 1U) + uVar9) / uVar9;
uVar4 = uVar3 - 1;
if (uVar4 == 0) {
uVar5 = 0x40;
}
else {
lVar1 = 0x3f;
if (uVar4 != 0) {
for (; uVar4 >> lVar1 == 0; lVar1 = lVar1 + -1) {
}
}
uVar5 = (uint)lVar1 ^ 0x3f;
}
uVar5 = 0x40 - uVar5;
if (uVar3 < 2) {
uVar5 = 0;
}
if (0x33 < uVar5) break;
if ((int)(uVar5 + iVar2 + -2) <= iVar6) {
uVar3 = ((ulong)uVar5 + 1 << ((byte)uVar5 & 0x3f)) * uVar12;
if (uVar3 < uVar11) {
uVar7 = uVar9 & 0xffffffff;
uVar8 = uVar12 & 0xffffffff;
uVar11 = uVar3;
uVar10 = uVar5;
}
break;
}
iVar2 = iVar2 + -2;
uVar9 = uVar9 - 1;
} while (uVar9 != 0);
iVar6 = (int)uVar7;
uVar12 = uVar12 + 1;
if (uVar12 == 6) {
if (iVar6 == 0) {
/* WARNING: Subroutine does not return */
abort();
}
iVar2 = 0x7d;
if ((ulong)(0x7dL << ((byte)uVar10 & 0x3f)) < (ulong)(param_3 * 0x40)) {
iVar2 = iVar6;
}
if (iVar6 < 0x7e) {
iVar2 = iVar6;
}
*param_2 = (int)uVar8;
*param_1 = iVar2;
return uVar10;
}
} while( true );
}
|
|
65,469 |
js_dtoa_infinite
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_dtoa_infinite(JSContext *ctx, double d)
{
// TODO(chqrlie) use atoms for NaN and Infinite?
if (isnan(d))
return js_new_string8(ctx, "NaN");
if (d < 0)
return js_new_string8(ctx, "-Infinity");
else
return js_new_string8(ctx, "Infinity");
}
|
O1
|
c
|
js_dtoa_infinite:
ucomisd %xmm0, %xmm0
jp 0x3e2d3
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3e2c2
leaq 0x60f07(%rip), %rsi # 0x9f1bf
movl $0x9, %edx
jmp 0x201dd
leaq 0x60ef7(%rip), %rsi # 0x9f1c0
movl $0x8, %edx
jmp 0x201dd
leaq 0x6238d(%rip), %rsi # 0xa0667
movl $0x3, %edx
jmp 0x201dd
|
js_dtoa_infinite:
ucomisd xmm0, xmm0
jp short loc_3E2D3
xorpd xmm1, xmm1
ucomisd xmm1, xmm0
jbe short loc_3E2C2
lea rsi, aInfinity; "-Infinity"
mov edx, 9
jmp js_new_string8_len
loc_3E2C2:
lea rsi, aInfinity+1; "Infinity"
mov edx, 8
jmp js_new_string8_len
loc_3E2D3:
lea rsi, aDateValueIsNan+0Eh; "NaN"
mov edx, 3
jmp js_new_string8_len
|
long long js_dtoa_infinite(long long a1, double a2)
{
if ( a2 >= 0.0 )
return js_new_string8_len(a1, (long long)"Infinity", 8u);
else
return js_new_string8_len(a1, (long long)"-Infinity", 9u);
}
| |||
65,470 |
js_dtoa_infinite
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_dtoa_infinite(JSContext *ctx, double d)
{
// TODO(chqrlie) use atoms for NaN and Infinite?
if (isnan(d))
return js_new_string8(ctx, "NaN");
if (d < 0)
return js_new_string8(ctx, "-Infinity");
else
return js_new_string8(ctx, "Infinity");
}
|
O2
|
c
|
js_dtoa_infinite:
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
leaq 0x4f7f5(%rip), %rax # 0x8610f
leaq 0x4f7ef(%rip), %rcx # 0x86110
cmovaq %rax, %rcx
ucomisd %xmm0, %xmm0
leaq 0x50c71(%rip), %rsi # 0x875a1
cmovnpq %rcx, %rsi
jmp 0x21856
|
js_dtoa_infinite:
xorpd xmm1, xmm1
ucomisd xmm1, xmm0
lea rax, aInfinity; "-Infinity"
lea rcx, aInfinity+1; "Infinity"
cmova rcx, rax
ucomisd xmm0, xmm0
lea rsi, aDateValueIsNan+0Eh; "NaN"
cmovnp rsi, rcx
jmp js_new_string8
|
long long js_dtoa_infinite(long long a1, double a2)
{
char *v2; // rcx
v2 = "Infinity";
if ( a2 < 0.0 )
v2 = "-Infinity";
return js_new_string8(a1, (long long)v2);
}
|
js_dtoa_infinite:
XORPD XMM1,XMM1
UCOMISD XMM1,XMM0
LEA RAX,[0x18610f]
LEA RCX,[0x186110]
CMOVA RCX,RAX
UCOMISD XMM0,XMM0
LEA RSI,[0x1875a1]
CMOVNP RSI,RCX
JMP 0x00121856
|
void js_dtoa_infinite(double param_1,int8 param_2)
{
char *pcVar1;
char *pcVar2;
pcVar1 = "Infinity";
if (param_1 < 0.0) {
pcVar1 = "-Infinity";
}
pcVar2 = "NaN";
if (!NAN(param_1)) {
pcVar2 = pcVar1;
}
js_new_string8(param_2,pcVar2);
return;
}
|
|
65,471 |
translog_flush_wait_for_end
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_flush_wait_for_end(LSN lsn)
{
DBUG_ENTER("translog_flush_wait_for_end");
DBUG_PRINT("enter", ("LSN: " LSN_FMT, LSN_IN_PARTS(lsn)));
mysql_mutex_assert_owner(&log_descriptor.log_flush_lock);
while (cmp_translog_addr(log_descriptor.flushed, lsn) < 0)
mysql_cond_wait(&log_descriptor.log_flush_cond,
&log_descriptor.log_flush_lock);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_flush_wait_for_end:
cmpq %rdi, 0xb9f8b2(%rip) # 0xc0caf8
jge 0x6d294
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb9f954(%rip), %r14 # 0xc0cbb0
leaq 0xb9f905(%rip), %r15 # 0xc0cb68
cmpq $0x0, 0xb9f975(%rip) # 0xc0cbe0
jne 0x6d283
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a430
cmpq %rbx, 0xb9f879(%rip) # 0xc0caf8
jl 0x6d263
jmp 0x6d28a
callq 0x2df9d
jmp 0x6d278
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
translog_flush_wait_for_end:
cmp cs:qword_C0CAF8, rdi
jge short locret_6D294
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
lea r14, unk_C0CBB0
lea r15, unk_C0CB68
loc_6D263:
cmp cs:qword_C0CBE0, 0
jnz short loc_6D283
mov rdi, r14
mov rsi, r15
call _pthread_cond_wait
loc_6D278:
cmp cs:qword_C0CAF8, rbx
jl short loc_6D263
jmp short loc_6D28A
loc_6D283:
call translog_flush_wait_for_end_cold_1
jmp short loc_6D278
loc_6D28A:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_6D294:
retn
|
long long translog_flush_wait_for_end(void *a1)
{
long long v1; // rbx
long long result; // rax
if ( qword_C0CAF8 < (long long)a1 )
{
v1 = (long long)a1;
do
{
if ( qword_C0CBE0 )
{
result = translog_flush_wait_for_end_cold_1(a1);
}
else
{
a1 = &unk_C0CBB0;
result = pthread_cond_wait(&unk_C0CBB0, &unk_C0CB68);
}
}
while ( qword_C0CAF8 < v1 );
}
return result;
}
|
translog_flush_wait_for_end:
CMP qword ptr [0x00d0caf8],RDI
JGE 0x0016d294
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[0xd0cbb0]
LEA R15,[0xd0cb68]
LAB_0016d263:
CMP qword ptr [0x00d0cbe0],0x0
JNZ 0x0016d283
MOV RDI,R14
MOV RSI,R15
CALL 0x0012a430
LAB_0016d278:
CMP qword ptr [0x00d0caf8],RBX
JL 0x0016d263
JMP 0x0016d28a
LAB_0016d283:
CALL 0x0012df9d
JMP 0x0016d278
LAB_0016d28a:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_0016d294:
RET
|
void translog_flush_wait_for_end(long param_1)
{
if (DAT_00d0caf8 < param_1) {
do {
if (DAT_00d0cbe0 == 0) {
pthread_cond_wait((pthread_cond_t *)&DAT_00d0cbb0,(pthread_mutex_t *)&DAT_00d0cb68);
}
else {
translog_flush_wait_for_end_cold_1();
}
} while (DAT_00d0caf8 < param_1);
}
return;
}
|
|
65,472 |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&)
|
monkey531[P]llama/common/./json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x8a728
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1f550
movq %rax, %rbx
movq %r14, %rdi
callq 0x578fc
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xc546f(%rip), %rsi # 0x14fbbb
leaq 0x10(%rsp), %rdi
callq 0x8a7c1
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x576a8
xorl %ebp, %ebp
leaq 0x11e1d9(%rip), %rsi # 0x1a8950
leaq -0xb6ea(%rip), %rdx # 0x7f094
movq %rbx, %rdi
callq 0x202e0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a7ac
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x8a7ac
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x8a7b9
movq %rbx, %rdi
callq 0x1f7e0
movq %r14, %rdi
callq 0x20380
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_8A728
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_8A728:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8A7AC
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8A7AC
mov r14, rax
mov bpl, 1
loc_8A7AC:
test bpl, bpl
jz short loc_8A7B9
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8A7B9:
mov rdi, r14
call __Unwind_Resume
|
unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
result = a1[8];
*a2 = result;
return result;
}
|
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x4
JNZ 0x0018a728
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0018a728:
MOV EDI,0x20
CALL 0x0011f550
MOV RBX,RAX
MOV RDI,R14
CALL 0x001578fc
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0018a745:
LEA RSI,[0x24fbbb]
LEA RDI,[RSP + 0x10]
CALL 0x0018a7c1
MOV BPL,0x1
LAB_0018a759:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001576a8
XOR EBP,EBP
LEA RSI,[0x2a8950]
LEA RDX,[0x17f094]
MOV RDI,RBX
CALL 0x001202e0
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x4) {
*param_2 = param_1[8];
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 0018a745 to 0018a755 has its CatchHandler @ 0018a7a6 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 0018a759 to 0018a785 has its CatchHandler @ 0018a786 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
65,473 |
get_bool_option
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static int get_bool_option(JSContext *ctx, BOOL *pbool,
JSValue obj,
const char *option)
{
JSValue val;
val = JS_GetPropertyStr(ctx, obj, option);
if (JS_IsException(val))
return -1;
if (!JS_IsUndefined(val)) {
*pbool = JS_ToBool(ctx, val);
}
JS_FreeValue(ctx, val);
return 0;
}
|
O1
|
c
|
get_bool_option:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x236d6
movq %rax, %r15
movq %rdx, %r12
cmpl $0x3, %r12d
je 0x171c0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x6, %r12d
je 0x171d0
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x26a53
movl %eax, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1cc9f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
get_bool_option:
push r15
push r14
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
call JS_GetPropertyStr
mov r15, rax
mov r12, rdx
cmp r12d, 3
jz short loc_171C0
mov eax, 0FFFFFFFFh
cmp r12d, 6
jz short loc_171D0
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_ToBool
mov [r14], eax
loc_171C0:
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_FreeValue
xor eax, eax
loc_171D0:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long get_bool_option(long long a1, _DWORD *a2, long long a3, long long a4, long long a5)
{
long long v5; // rdx
long long PropertyStr; // r15
long long v7; // r12
long long result; // rax
PropertyStr = JS_GetPropertyStr(a1, a3, a4, a5);
v7 = v5;
if ( (_DWORD)v5 != 3 )
{
result = 0xFFFFFFFFLL;
if ( (_DWORD)v5 == 6 )
return result;
*a2 = JS_ToBool(a1, PropertyStr, v5);
}
JS_FreeValue(a1, PropertyStr, v7);
return 0LL;
}
|
get_bool_option:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
CALL 0x001236d6
MOV R15,RAX
MOV R12,RDX
CMP R12D,0x3
JZ 0x001171c0
MOV EAX,0xffffffff
CMP R12D,0x6
JZ 0x001171d0
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x00126a53
MOV dword ptr [R14],EAX
LAB_001171c0:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0011cc9f
XOR EAX,EAX
LAB_001171d0:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
get_bool_option(int8 param_1,int4 *param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int4 uVar1;
int1 auVar2 [16];
auVar2 = JS_GetPropertyStr(param_1,param_3,param_4,param_5);
if (auVar2._8_4_ != 3) {
if (auVar2._8_4_ == 6) {
return 0xffffffff;
}
uVar1 = JS_ToBool(param_1,auVar2._0_8_,auVar2._8_8_);
*param_2 = uVar1;
}
JS_FreeValue(param_1,auVar2._0_8_,auVar2._8_8_);
return 0;
}
|
|
65,474 |
get_bool_option
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static int get_bool_option(JSContext *ctx, BOOL *pbool,
JSValue obj,
const char *option)
{
JSValue val;
val = JS_GetPropertyStr(ctx, obj, option);
if (JS_IsException(val))
return -1;
if (!JS_IsUndefined(val)) {
*pbool = JS_ToBool(ctx, val);
}
JS_FreeValue(ctx, val);
return 0;
}
|
O3
|
c
|
get_bool_option:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x23ce1
movq %rax, %r15
movq %rdx, %r12
cmpl $0x3, %r12d
je 0x17bca
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x6, %r12d
je 0x17bda
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2711e
movl %eax, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1d599
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
get_bool_option:
push r15
push r14
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
call JS_GetPropertyStr
mov r15, rax
mov r12, rdx
cmp r12d, 3
jz short loc_17BCA
mov eax, 0FFFFFFFFh
cmp r12d, 6
jz short loc_17BDA
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_ToBool
mov [r14], eax
loc_17BCA:
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_FreeValue
xor eax, eax
loc_17BDA:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long get_bool_option(long long a1, _DWORD *a2, long long a3, long long a4, long long a5)
{
long long v5; // rdx
long long PropertyStr; // r15
long long v7; // r12
long long result; // rax
PropertyStr = JS_GetPropertyStr(a1, a3, a4, a5);
v7 = v5;
if ( (_DWORD)v5 != 3 )
{
result = 0xFFFFFFFFLL;
if ( (_DWORD)v5 == 6 )
return result;
*a2 = JS_ToBool(a1, PropertyStr, v5);
}
JS_FreeValue(a1, PropertyStr, v7);
return 0LL;
}
|
get_bool_option:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
CALL 0x00123ce1
MOV R15,RAX
MOV R12,RDX
CMP R12D,0x3
JZ 0x00117bca
MOV EAX,0xffffffff
CMP R12D,0x6
JZ 0x00117bda
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0012711e
MOV dword ptr [R14],EAX
LAB_00117bca:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0011d599
XOR EAX,EAX
LAB_00117bda:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
get_bool_option(int8 param_1,int4 *param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int4 uVar1;
int1 auVar2 [16];
auVar2 = JS_GetPropertyStr(param_1,param_3,param_4,param_5);
if (auVar2._8_4_ != 3) {
if (auVar2._8_4_ == 6) {
return 0xffffffff;
}
uVar1 = JS_ToBool(param_1,auVar2._0_8_,auVar2._8_8_);
*param_2 = uVar1;
}
JS_FreeValue(param_1,auVar2._0_8_,auVar2._8_8_);
return 0;
}
|
|
65,475 |
string_from[abi:cxx11](bool)
|
monkey531[P]llama/common/common.cpp
|
std::string string_from(bool value) {
return value ? "true" : "false";
}
|
O3
|
cpp
|
string_from[abi:cxx11](bool):
pushq %rbx
movq %rdi, %rbx
leaq 0x74a7b(%rip), %rcx # 0xe6bda
leaq 0x7775d(%rip), %rax # 0xe98c3
testl %esi, %esi
cmovneq %rcx, %rax
leaq 0x10(%rdi), %rcx
movq %rcx, (%rdi)
movl %esi, %edx
xorq $0x5, %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x21af4
movq %rbx, %rax
popq %rbx
retq
|
_Z11string_fromB5cxx11b:
push rbx
mov rbx, rdi
lea rcx, aTrue; "true"
lea rax, aAdvancedOption+0ABh; "false"
test esi, esi
cmovnz rax, rcx
lea rcx, [rdi+10h]
mov [rdi], rcx
mov edx, esi
xor rdx, 5
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
|
_QWORD * string_from[abi:cxx11](_QWORD *a1, unsigned int a2)
{
char *v2; // rax
v2 = "false";
if ( a2 )
v2 = "true";
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, v2, (long long)&v2[a2 ^ 5LL]);
return a1;
}
|
string_from[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RCX,[0x1e6bda]
LEA RAX,[0x1e98c3]
TEST ESI,ESI
CMOVNZ RAX,RCX
LEA RCX,[RDI + 0x10]
MOV qword ptr [RDI],RCX
MOV EDX,ESI
XOR RDX,0x5
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00121af4
MOV RAX,RBX
POP RBX
RET
|
/* string_from[abi:cxx11](bool) */
int8 string_from_abi_cxx11_(bool param_1)
{
char *pcVar1;
uint in_ESI;
int7 in_register_00000039;
pcVar1 = "false";
if (in_ESI != 0) {
pcVar1 = "true";
}
*(long *)CONCAT71(in_register_00000039,param_1) = CONCAT71(in_register_00000039,param_1) + 0x10;
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar1,pcVar1 + ((ulong)in_ESI ^ 5));
return CONCAT71(in_register_00000039,param_1);
}
|
|
65,476 |
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/common.cpp
|
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override)
{
auto vocab = llama_model_get_vocab(model);
std::string default_template_src = chat_template_override;
std::string template_tool_use_src = chat_template_override;
bool has_explicit_template = !chat_template_override.empty();
if (chat_template_override.empty()) {
auto str = llama_model_chat_template(model, /* name */ nullptr);
if (str) {
default_template_src = str;
has_explicit_template = true;
}
str = llama_model_chat_template(model, /* name */ "tool_use");
if (str) {
template_tool_use_src = str;
has_explicit_template = true;
}
}
if (default_template_src.empty() || default_template_src == "chatml") {
if (!template_tool_use_src.empty()) {
default_template_src = template_tool_use_src;
} else {
default_template_src = R"(
{%- for message in messages -%}
{{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "<|im_start|>assistant\n" -}}
{%- endif -%}
)";
}
}
const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) {
if (token == LLAMA_TOKEN_NULL) {
if (default_template_src.find(jinja_variable_name) != std::string::npos
|| template_tool_use_src.find(jinja_variable_name) != std::string::npos) {
LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name);
}
return std::string();
} else {
return common_token_to_piece(vocab, token, true);
}
};
auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token");
auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token");
return {
has_explicit_template,
std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos),
template_tool_use_src.empty()
? nullptr
: std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos)
};
}
|
O2
|
cpp
|
common_chat_templates_from_model(llama_model 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 $0xa8, %rsp
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x241c0
movq %rax, %r14
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x23c30
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x23c30
movb $0x1, %r15b
cmpq $0x0, 0x8(%rbp)
jne 0x5761a
movq %r13, %rdi
xorl %esi, %esi
callq 0x233e0
testq %rax, %rax
setne %r15b
je 0x575f6
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x24130
leaq 0x5bdac(%rip), %rsi # 0xb33a9
movq %r13, %rdi
callq 0x233e0
testq %rax, %rax
je 0x5761a
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x24130
movb $0x1, %r15b
cmpq $0x0, 0x18(%rsp)
je 0x57637
leaq 0x5bd89(%rip), %rsi # 0xb33b2
leaq 0x10(%rsp), %rdi
callq 0x395d2
testb %al, %al
je 0x57661
cmpq $0x0, 0x38(%rsp)
je 0x57650
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x234e0
jmp 0x57661
leaq 0x5bd62(%rip), %rsi # 0xb33b9
leaq 0x10(%rsp), %rdi
callq 0x24130
leaq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r12, 0x58(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %r14, %rdi
callq 0x237a0
leaq 0x5be76(%rip), %rcx # 0xb34ff
leaq 0x5be73(%rip), %r8 # 0xb3503
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x577ae
movq 0x8(%rsp), %rdi
callq 0x230a0
leaq 0x5be58(%rip), %rcx # 0xb350d
leaq 0x5be55(%rip), %r8 # 0xb3511
leaq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x577ae
movb %r15b, (%rbx)
leaq 0x8(%rbx), %r14
leaq 0x10(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r14, %rdi
callq 0x5c6a6
leaq 0x10(%rbx), %rdi
cmpq $0x0, 0x38(%rsp)
je 0x57713
leaq 0x30(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
callq 0x5c6a6
jmp 0x57717
andq $0x0, (%rdi)
leaq 0x68(%rsp), %rdi
callq 0x241f8
leaq 0x88(%rsp), %rdi
callq 0x241f8
leaq 0x30(%rsp), %rdi
callq 0x241f8
leaq 0x10(%rsp), %rdi
callq 0x241f8
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x5c702
jmp 0x57769
jmp 0x5778e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x241f8
jmp 0x5777f
movq %rax, %rbx
jmp 0x5779b
jmp 0x5778e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x241f8
jmp 0x57791
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x241f8
leaq 0x10(%rsp), %rdi
callq 0x241f8
movq %rbx, %rdi
callq 0x23fc0
nop
|
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbp, rdx
mov r13, rsi
mov rbx, rdi
mov rdi, rsi
call _llama_model_get_vocab
mov r14, rax
mov [rsp+0D8h+var_D0], rax
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea r12, [rsp+0D8h+var_A8]
mov rdi, r12
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov r15b, 1
cmp qword ptr [rbp+8], 0
jnz short loc_5761A
mov rdi, r13
xor esi, esi
call _llama_model_chat_template
test rax, rax
setnz r15b
jz short loc_575F6
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_575F6:
lea rsi, aToolUse; "tool_use"
mov rdi, r13
call _llama_model_chat_template
test rax, rax
jz short loc_5761A
lea rdi, [rsp+0D8h+var_A8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov r15b, 1
loc_5761A:
cmp [rsp+0D8h+var_C0], 0
jz short loc_57637
lea rsi, aChatml; "chatml"
lea rdi, [rsp+0D8h+var_C8]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_57661
loc_57637:
cmp [rsp+0D8h+var_A0], 0
jz short loc_57650
lea rdi, [rsp+0D8h+var_C8]
lea rsi, [rsp+0D8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_57661
loc_57650:
lea rsi, aForMessageInMe; "\n {%- for message in me"...
lea rdi, [rsp+0D8h+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_57661:
lea rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_88], rax
mov [rsp+0D8h+var_80], r12
lea rax, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_78], rax
mov rdi, r14
call _llama_vocab_bos
lea rcx, aBos; "BOS"
lea r8, aBosToken; "bos_token"
lea rdi, [rsp+0D8h+var_50]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov rdi, [rsp+0D8h+var_D0]
call _llama_vocab_eos
lea rcx, aEos; "EOS"
lea r8, aEosToken; "eos_token"
lea rdi, [rsp+0D8h+var_70]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov [rbx], r15b
lea r14, [rbx+8]
lea rsi, [rsp+0D8h+var_C8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
mov rdi, r14
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
lea rdi, [rbx+10h]
cmp [rsp+0D8h+var_A0], 0
jz short loc_57713
lea rsi, [rsp+0D8h+var_A8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
jmp short loc_57717
loc_57713:
and qword ptr [rdi], 0
loc_57717:
lea rdi, [rsp+0D8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r14
call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr()
jmp short loc_57769
jmp short loc_5778E
mov rbx, rax
loc_57769:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5777F
mov rbx, rax
jmp short loc_5779B
jmp short loc_5778E
mov rbx, rax
loc_5777F:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_57791
loc_5778E:
mov rbx, rax
loc_57791:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_5779B:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3)
{
long long vocab; // r14
bool v6; // r15
const char *v7; // rax
const char *v8; // rax
_QWORD *v9; // rdi
long long v11; // [rsp+8h] [rbp-D0h] BYREF
char v12[8]; // [rsp+10h] [rbp-C8h] BYREF
long long v13; // [rsp+18h] [rbp-C0h]
char v14[8]; // [rsp+30h] [rbp-A8h] BYREF
long long v15; // [rsp+38h] [rbp-A0h]
char *v16; // [rsp+50h] [rbp-88h]
char *v17; // [rsp+58h] [rbp-80h]
long long *v18; // [rsp+60h] [rbp-78h]
_BYTE v19[32]; // [rsp+68h] [rbp-70h] BYREF
_BYTE v20[80]; // [rsp+88h] [rbp-50h] BYREF
vocab = llama_model_get_vocab(a2);
v11 = vocab;
std::string::basic_string(v12, a3);
std::string::basic_string(v14, a3);
v6 = 1;
if ( !*(_QWORD *)(a3 + 8) )
{
v7 = (const char *)llama_model_chat_template(a2, 0LL);
v6 = v7 != 0LL;
if ( v7 )
std::string::assign(v12, v7);
v8 = (const char *)llama_model_chat_template(a2, "tool_use");
if ( v8 )
{
std::string::assign(v14, v8);
v6 = 1;
}
}
if ( !v13 || std::operator==<char>((long long)v12) )
{
if ( v15 )
std::string::_M_assign(v12, v14);
else
std::string::assign(
v12,
"\n"
" {%- for message in messages -%}\n"
" {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n"
" {%- endfor -%}\n"
" {%- if add_generation_prompt -%}\n"
" {{- \"<|im_start|>assistant\\n\" -}}\n"
" {%- endif -%}\n"
" ");
}
v16 = v12;
v17 = v14;
v18 = &v11;
llama_vocab_bos(vocab);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v20);
llama_vocab_eos(v11);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v19);
*a1 = v6;
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(a1 + 8, v12, v20, v19);
v9 = a1 + 16;
if ( v15 )
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(v9, v14, v20, v19);
else
*v9 = 0LL;
std::string::~string(v19);
std::string::~string(v20);
std::string::~string(v14);
std::string::~string(v12);
return a1;
}
|
common_chat_templates_from_model:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBP,RDX
MOV R13,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001241c0
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x10]
MOV RSI,RBP
CALL 0x00123c30
LAB_001575bc:
LEA R12,[RSP + 0x30]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00123c30
MOV R15B,0x1
CMP qword ptr [RBP + 0x8],0x0
JNZ 0x0015761a
LAB_001575d6:
MOV RDI,R13
XOR ESI,ESI
CALL 0x001233e0
TEST RAX,RAX
SETNZ R15B
JZ 0x001575f6
LEA RDI,[RSP + 0x10]
MOV RSI,RAX
CALL 0x00124130
LAB_001575f6:
LEA RSI,[0x1b33a9]
MOV RDI,R13
CALL 0x001233e0
TEST RAX,RAX
JZ 0x0015761a
LEA RDI,[RSP + 0x30]
MOV RSI,RAX
CALL 0x00124130
MOV R15B,0x1
LAB_0015761a:
CMP qword ptr [RSP + 0x18],0x0
JZ 0x00157637
LEA RSI,[0x1b33b2]
LEA RDI,[RSP + 0x10]
CALL 0x001395d2
TEST AL,AL
JZ 0x00157661
LAB_00157637:
CMP qword ptr [RSP + 0x38],0x0
JZ 0x00157650
LAB_0015763f:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
CALL 0x001234e0
JMP 0x00157661
LAB_00157650:
LEA RSI,[0x1b33b9]
LEA RDI,[RSP + 0x10]
CALL 0x00124130
LAB_00157661:
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],R12
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x60],RAX
LAB_0015767a:
MOV RDI,R14
CALL 0x001237a0
LEA RCX,[0x1b34ff]
LEA R8,[0x1b3503]
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x001577ae
MOV RDI,qword ptr [RSP + 0x8]
LAB_001576a9:
CALL 0x001230a0
LEA RCX,[0x1b350d]
LEA R8,[0x1b3511]
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x001577ae
MOV byte ptr [RBX],R15B
LEA R14,[RBX + 0x8]
LAB_001576d4:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
MOV RDI,R14
CALL 0x0015c6a6
LEA RDI,[RBX + 0x10]
CMP qword ptr [RSP + 0x38],0x0
JZ 0x00157713
LAB_001576fa:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
CALL 0x0015c6a6
LAB_00157711:
JMP 0x00157717
LAB_00157713:
AND qword ptr [RDI],0x0
LAB_00157717:
LEA RDI,[RSP + 0x68]
CALL 0x001241f8
LEA RDI,[RSP + 0x88]
CALL 0x001241f8
LEA RDI,[RSP + 0x30]
CALL 0x001241f8
LEA RDI,[RSP + 0x10]
CALL 0x001241f8
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */
llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2)
{
bool bVar1;
uint uVar2;
int8 uVar3;
long lVar4;
string *in_RDX;
llama_model lVar5;
int8 local_d0;
string local_c8 [8];
long local_c0;
string local_a8 [8];
long local_a0;
string *local_88;
string *local_80;
int8 *local_78;
string local_70 [32];
string local_50 [32];
uVar3 = llama_model_get_vocab(param_2);
local_d0 = uVar3;
std::__cxx11::string::string(local_c8,in_RDX);
/* try { // try from 001575bc to 001575cb has its CatchHandler @ 00157775 */
std::__cxx11::string::string(local_a8,in_RDX);
lVar5 = (llama_model)0x1;
if (*(long *)(in_RDX + 8) == 0) {
/* try { // try from 001575d6 to 00157616 has its CatchHandler @ 0015777a */
lVar4 = llama_model_chat_template(param_2,0);
lVar5 = (llama_model)(lVar4 != 0);
if ((bool)lVar5) {
std::__cxx11::string::assign((char *)local_c8);
}
lVar4 = llama_model_chat_template(param_2,"tool_use");
if (lVar4 != 0) {
std::__cxx11::string::assign((char *)local_a8);
lVar5 = (llama_model)0x1;
}
}
if (local_c0 != 0) {
bVar1 = std::operator==(local_c8,"chatml");
if (!bVar1) goto LAB_00157661;
}
if (local_a0 == 0) {
std::__cxx11::string::assign((char *)local_c8);
}
else {
/* try { // try from 0015763f to 00157660 has its CatchHandler @ 00157764 */
std::__cxx11::string::_M_assign(local_c8);
}
LAB_00157661:
local_88 = local_c8;
local_78 = &local_d0;
local_80 = local_a8;
/* try { // try from 0015767a to 001576a3 has its CatchHandler @ 0015778e */
uVar2 = llama_vocab_bos(uVar3);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_50,(char *)&local_88,(char *)(ulong)uVar2);
/* try { // try from 001576a9 to 001576cc has its CatchHandler @ 0015777c */
uVar2 = llama_vocab_eos(local_d0);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_70,(char *)&local_88,(char *)(ulong)uVar2);
*param_1 = lVar5;
/* try { // try from 001576d4 to 001576ed has its CatchHandler @ 00157766 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 8),local_c8,local_50);
if (local_a0 == 0) {
*(int8 *)(param_1 + 0x10) = 0;
}
else {
/* try { // try from 001576fa to 00157710 has its CatchHandler @ 00157757 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 0x10),local_a8,local_50);
}
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string(local_a8);
std::__cxx11::string::~string(local_c8);
return param_1;
}
|
|
65,477 |
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/common.cpp
|
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override)
{
auto vocab = llama_model_get_vocab(model);
std::string default_template_src = chat_template_override;
std::string template_tool_use_src = chat_template_override;
bool has_explicit_template = !chat_template_override.empty();
if (chat_template_override.empty()) {
auto str = llama_model_chat_template(model, /* name */ nullptr);
if (str) {
default_template_src = str;
has_explicit_template = true;
}
str = llama_model_chat_template(model, /* name */ "tool_use");
if (str) {
template_tool_use_src = str;
has_explicit_template = true;
}
}
if (default_template_src.empty() || default_template_src == "chatml") {
if (!template_tool_use_src.empty()) {
default_template_src = template_tool_use_src;
} else {
default_template_src = R"(
{%- for message in messages -%}
{{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "<|im_start|>assistant\n" -}}
{%- endif -%}
)";
}
}
const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) {
if (token == LLAMA_TOKEN_NULL) {
if (default_template_src.find(jinja_variable_name) != std::string::npos
|| template_tool_use_src.find(jinja_variable_name) != std::string::npos) {
LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name);
}
return std::string();
} else {
return common_token_to_piece(vocab, token, true);
}
};
auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token");
auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token");
return {
has_explicit_template,
std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos),
template_tool_use_src.empty()
? nullptr
: std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos)
};
}
|
O3
|
cpp
|
common_chat_templates_from_model(llama_model 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 $0xa8, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1b170
movq %rax, 0x48(%rsp)
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x21b7e
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x21b7e
movb $0x1, %r15b
cmpq $0x0, 0x8(%r13)
jne 0x77013
movq %r12, %rdi
xorl %esi, %esi
callq 0x1a3e0
movq %rax, %r13
testq %rax, %rax
setne %r15b
je 0x76fcf
leaq 0x28(%rsp), %rbp
movq 0x8(%rbp), %r14
movq %r13, %rdi
callq 0x1a3f0
movq %rbp, %rdi
leaq 0x38(%rsp), %rbp
xorl %esi, %esi
movq %r14, %rdx
leaq 0x28(%rsp), %r14
movq %r13, %rcx
movq %rax, %r8
callq 0x1ada0
leaq 0x783e3(%rip), %rsi # 0xef3b9
movq %r12, %rdi
callq 0x1a3e0
movq %rax, %r12
testq %rax, %rax
je 0x77013
movq %r14, %r15
leaq 0x8(%rsp), %r14
movq 0x8(%r14), %r13
movq %r12, %rdi
callq 0x1a3f0
movq %r14, %rdi
movq %r15, %r14
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x1ada0
movb $0x1, %r15b
cmpq $0x0, 0x30(%rsp)
je 0x77030
leaq 0x783a0(%rip), %rsi # 0xef3c2
leaq 0x28(%rsp), %rdi
callq 0x1a230
testl %eax, %eax
jne 0x77066
cmpq $0x0, 0x10(%rsp)
je 0x77049
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1a4c0
jmp 0x77066
leaq 0x28(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x78370(%rip), %rcx # 0xef3c9
movl $0x145, %r8d # imm = 0x145
xorl %esi, %esi
callq 0x1ada0
movq %r14, 0x90(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq (%rax), %rdi
callq 0x1a780
leaq 0x78478(%rip), %rcx # 0xef50f
leaq 0x78475(%rip), %r8 # 0xef513
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl %eax, %edx
callq 0x77292
movq 0x48(%rsp), %rdi
callq 0x1a0b0
leaq 0x7845a(%rip), %rcx # 0xef51d
leaq 0x78457(%rip), %r8 # 0xef521
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl %eax, %edx
callq 0x77292
movb %r15b, (%rbx)
movl $0x80, %edi
callq 0x1a8b0
movq %rax, %r15
leaq 0x28(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %rax, %rdi
callq 0x79084
movq %r15, 0x8(%rbx)
cmpq $0x0, 0x10(%rsp)
je 0x77137
movl $0x80, %edi
callq 0x1a8b0
movq %rax, %r12
leaq 0x8(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %rax, %rdi
callq 0x79084
jmp 0x7713a
xorl %r12d, %r12d
movq %r12, 0x10(%rbx)
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77159
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1a8d0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7717a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x77196
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x771ad
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x77253
movq %rax, %r14
movl $0x80, %esi
movq %r12, %rdi
callq 0x1a8d0
jmp 0x771dc
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xba67a
movq $0x0, (%rbx)
jmp 0x77209
movq %rax, %r14
movl $0x80, %esi
movq %r15, %rdi
callq 0x1a8d0
jmp 0x77209
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77230
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1a8d0
jmp 0x77230
movq %rax, %r14
jmp 0x77272
jmp 0x77253
movq %rax, %r14
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77256
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x1a8d0
jmp 0x77256
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x77272
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x77289
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8d0
movq %r14, %rdi
callq 0x1afc0
nop
|
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp; int
push r15; int
push r14; int
push r13; int
push r12; int
push rbx; int
sub rsp, 0A8h
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov rdi, rsi
call _llama_model_get_vocab
mov qword ptr [rsp+0D8h+var_90], rax; __int64
lea rbp, [rsp+0D8h+var_A0]
mov [rbp-10h], rbp
mov rsi, [r13+0]
mov rdx, [r13+8]
add rdx, rsi
lea r14, [rsp+0D8h+var_B0]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [rsp+0D8h+var_C0]
mov [rax-10h], rax
mov rsi, [r13+0]
mov rdx, [r13+8]
add rdx, rsi
lea rdi, [rsp+0D8h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov r15b, 1
cmp qword ptr [r13+8], 0
jnz loc_77013
mov rdi, r12
xor esi, esi
call _llama_model_chat_template
mov r13, rax
test rax, rax
setnz r15b
jz short loc_76FCF
lea rbp, [rsp+0D8h+var_B0]
mov r14, [rbp+8]
mov rdi, r13
call _strlen
mov rdi, rbp
lea rbp, [rsp+0D8h+var_A0]
xor esi, esi
mov rdx, r14
lea r14, [rsp+0D8h+var_B0]
mov rcx, r13
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_76FCF:
lea rsi, aToolUse; "tool_use"
mov rdi, r12
call _llama_model_chat_template
mov r12, rax
test rax, rax
jz short loc_77013
mov r15, r14
lea r14, [rsp+0D8h+var_D0]
mov r13, [r14+8]
mov rdi, r12
call _strlen
mov rdi, r14
mov r14, r15
xor esi, esi
mov rdx, r13
mov rcx, r12
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov r15b, 1
loc_77013:
cmp [rsp+0D8h+var_A8], 0
jz short loc_77030
lea rsi, aChatml; "chatml"
lea rdi, [rsp+0D8h+var_B0]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_77066
loc_77030:
cmp [rsp+0D8h+var_C8], 0
jz short loc_77049
lea rdi, [rsp+0D8h+var_B0]
lea rsi, [rsp+0D8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_77066
loc_77049:
lea rdi, [rsp+0D8h+var_B0]
mov rdx, [rdi+8]
lea rcx, aForMessageInMe; "\n {%- for message in me"...
mov r8d, 145h
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_77066:
mov qword ptr [rsp+0D8h+var_48], r14; int
lea rax, [rsp+0D8h+var_D0]
mov qword ptr [rsp+0D8h+var_40], rax; int
lea rax, [rsp+0D8h+var_90]
mov qword ptr [rsp+0D8h+var_38], rax; char
mov rdi, [rax]
call _llama_vocab_bos
lea rcx, aBos; "BOS"
lea r8, aBosToken; "bos_token"
lea rdi, [rsp+0D8h+var_68]
lea rsi, [rsp+0D8h+var_48]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov rdi, qword ptr [rsp+0D8h+var_90]
call _llama_vocab_eos
lea rcx, aEos; "EOS"
lea r8, aEosToken; "eos_token"
lea rdi, [rsp+0D8h+var_88]
lea rsi, [rsp+0D8h+var_48]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov [rbx], r15b
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
lea rsi, [rsp+0D8h+var_B0]; int
lea rdx, [rsp+0D8h+var_68]; int
lea rcx, [rsp+0D8h+var_88]; int
mov rdi, rax; int
call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&)
mov [rbx+8], r15
cmp [rsp+0D8h+var_C8], 0
jz short loc_77137
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rsi, [rsp+0D8h+var_D0]; int
lea rdx, [rsp+0D8h+var_68]; int
lea rcx, [rsp+0D8h+var_88]; int
mov rdi, rax; int
call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&)
jmp short loc_7713A
loc_77137:
xor r12d, r12d
loc_7713A:
mov [rbx+10h], r12
lea rax, [rsp+0D8h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_77159
mov rsi, [rsp+0D8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77159:
lea rax, [rsp+0D8h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7717A
mov rsi, [rsp+0D8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7717A:
mov rdi, [rsp+0D8h+var_D0]; void *
lea rax, [rsp+0D8h+var_C0]
cmp rdi, rax
jz short loc_77196
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77196:
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, rbp
jz short loc_771AD
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_771AD:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_77253
mov r14, rax
mov esi, 80h; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_771DC
mov r14, rax
loc_771DC:
add rbx, 8
mov rdi, rbx
mov rsi, r15
call _ZNKSt14default_deleteIN5minja13chat_templateEEclEPS1_; std::default_delete<minja::chat_template>::operator()(minja::chat_template*)
mov qword ptr [rbx], 0
jmp short loc_77209
mov r14, rax
mov esi, 80h; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77209
mov r14, rax
loc_77209:
lea rax, [rsp+arg_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_77230
mov rsi, [rsp+arg_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77230
mov r14, rax
jmp short loc_77272
jmp short loc_77253
mov r14, rax
loc_77230:
lea rax, [rsp+arg_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_77256
mov rsi, [rsp+arg_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77256
loc_77253:
mov r14, rax
loc_77256:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_77272
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77272:
mov rdi, [rsp+arg_20]; void *
cmp rdi, rbp
jz short loc_77289
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77289:
mov rdi, r14
call __Unwind_Resume
|
long long common_chat_templates_from_model(long long a1, long long a2, _BYTE **a3)
{
bool v4; // r15
long long v5; // rax
long long v6; // r13
long long v7; // r14
long long v8; // rax
long long v9; // rax
long long v10; // r12
long long v11; // r13
long long v12; // rax
unsigned int v13; // eax
unsigned int v14; // eax
long long v15; // r15
long long v16; // r12
void *v18; // [rsp+8h] [rbp-D0h] BYREF
long long v19; // [rsp+10h] [rbp-C8h]
_QWORD v20[2]; // [rsp+18h] [rbp-C0h] BYREF
void *v21; // [rsp+28h] [rbp-B0h] BYREF
long long v22; // [rsp+30h] [rbp-A8h]
_QWORD v23[2]; // [rsp+38h] [rbp-A0h] BYREF
char v24[8]; // [rsp+48h] [rbp-90h] BYREF
int v25[4]; // [rsp+50h] [rbp-88h] BYREF
long long v26; // [rsp+60h] [rbp-78h] BYREF
int v27[4]; // [rsp+70h] [rbp-68h] BYREF
long long v28; // [rsp+80h] [rbp-58h] BYREF
int v29[2]; // [rsp+90h] [rbp-48h] BYREF
int v30[2]; // [rsp+98h] [rbp-40h]
char v31[8]; // [rsp+A0h] [rbp-38h]
*(_QWORD *)v24 = llama_model_get_vocab(a2);
v21 = v23;
std::string::_M_construct<char *>((long long)&v21, *a3, (long long)&a3[1][(_QWORD)*a3]);
v18 = v20;
std::string::_M_construct<char *>((long long)&v18, *a3, (long long)&a3[1][(_QWORD)*a3]);
v4 = 1;
if ( !a3[1] )
{
v5 = llama_model_chat_template(a2, 0LL);
v6 = v5;
v4 = v5 != 0;
if ( v5 )
{
v7 = v22;
v8 = strlen(v5);
std::string::_M_replace(&v21, 0LL, v7, v6, v8);
}
v9 = llama_model_chat_template(a2, "tool_use");
v10 = v9;
if ( v9 )
{
v11 = v19;
v12 = strlen(v9);
std::string::_M_replace(&v18, 0LL, v11, v10, v12);
v4 = 1;
}
}
if ( !v22 || !(unsigned int)std::string::compare(&v21, "chatml") )
{
if ( v19 )
std::string::_M_assign(&v21, &v18);
else
std::string::_M_replace(
&v21,
0LL,
v22,
"\n"
" {%- for message in messages -%}\n"
" {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n"
" {%- endfor -%}\n"
" {%- if add_generation_prompt -%}\n"
" {{- \"<|im_start|>assistant\\n\" -}}\n"
" {%- endif -%}\n"
" ",
325LL);
}
*(_QWORD *)v29 = &v21;
*(_QWORD *)v30 = &v18;
*(_QWORD *)v31 = v24;
v13 = llama_vocab_bos(*(_QWORD *)v24);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](
v27,
v29,
v13,
"BOS",
"bos_token");
v14 = llama_vocab_eos(*(_QWORD *)v24);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](
v25,
v29,
v14,
"EOS",
"eos_token");
*(_BYTE *)a1 = v4;
v15 = operator new(0x80uLL);
minja::chat_template::chat_template(v15, &v21, v27, v25);
*(_QWORD *)(a1 + 8) = v15;
if ( v19 )
{
v16 = operator new(0x80uLL);
minja::chat_template::chat_template(v16, &v18, v27, v25);
}
else
{
v16 = 0LL;
}
*(_QWORD *)(a1 + 16) = v16;
if ( *(long long **)v25 != &v26 )
operator delete(*(void **)v25, v26 + 1);
if ( *(long long **)v27 != &v28 )
operator delete(*(void **)v27, v28 + 1);
if ( v18 != v20 )
operator delete(v18, v20[0] + 1LL);
if ( v21 != v23 )
operator delete(v21, v23[0] + 1LL);
return a1;
}
|
common_chat_templates_from_model:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x0011b170
MOV qword ptr [RSP + 0x48],RAX
LEA RBP,[RSP + 0x38]
MOV qword ptr [RBP + -0x10],RBP
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
ADD RDX,RSI
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x00121b7e
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
ADD RDX,RSI
LAB_00176f73:
LEA RDI,[RSP + 0x8]
CALL 0x00121b7e
MOV R15B,0x1
CMP qword ptr [R13 + 0x8],0x0
JNZ 0x00177013
LAB_00176f8b:
MOV RDI,R12
XOR ESI,ESI
CALL 0x0011a3e0
MOV R13,RAX
TEST RAX,RAX
SETNZ R15B
JZ 0x00176fcf
LEA RBP,[RSP + 0x28]
MOV R14,qword ptr [RBP + 0x8]
MOV RDI,R13
CALL 0x0011a3f0
MOV RDI,RBP
LEA RBP,[RSP + 0x38]
XOR ESI,ESI
MOV RDX,R14
LEA R14,[RSP + 0x28]
MOV RCX,R13
MOV R8,RAX
CALL 0x0011ada0
LAB_00176fcf:
LEA RSI,[0x1ef3b9]
MOV RDI,R12
CALL 0x0011a3e0
MOV R12,RAX
TEST RAX,RAX
JZ 0x00177013
MOV R15,R14
LEA R14,[RSP + 0x8]
MOV R13,qword ptr [R14 + 0x8]
MOV RDI,R12
CALL 0x0011a3f0
MOV RDI,R14
MOV R14,R15
XOR ESI,ESI
MOV RDX,R13
MOV RCX,R12
MOV R8,RAX
CALL 0x0011ada0
MOV R15B,0x1
LAB_00177013:
CMP qword ptr [RSP + 0x30],0x0
JZ 0x00177030
LEA RSI,[0x1ef3c2]
LEA RDI,[RSP + 0x28]
CALL 0x0011a230
TEST EAX,EAX
JNZ 0x00177066
LAB_00177030:
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00177049
LAB_00177038:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x0011a4c0
JMP 0x00177066
LAB_00177049:
LEA RDI,[RSP + 0x28]
MOV RDX,qword ptr [RDI + 0x8]
LEA RCX,[0x1ef3c9]
MOV R8D,0x145
XOR ESI,ESI
CALL 0x0011ada0
LAB_00177066:
MOV qword ptr [RSP + 0x90],R14
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x98],RAX
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RAX]
LAB_0017708b:
CALL 0x0011a780
LEA RCX,[0x1ef50f]
LEA R8,[0x1ef513]
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x90]
MOV EDX,EAX
CALL 0x00177292
MOV RDI,qword ptr [RSP + 0x48]
LAB_001770b7:
CALL 0x0011a0b0
LEA RCX,[0x1ef51d]
LEA R8,[0x1ef521]
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x90]
MOV EDX,EAX
CALL 0x00177292
MOV byte ptr [RBX],R15B
LAB_001770e1:
MOV EDI,0x80
CALL 0x0011a8b0
LAB_001770eb:
MOV R15,RAX
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x70]
LEA RCX,[RSP + 0x50]
MOV RDI,RAX
CALL 0x00179084
MOV qword ptr [RBX + 0x8],R15
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00177137
LAB_00177111:
MOV EDI,0x80
CALL 0x0011a8b0
LAB_0017711b:
MOV R12,RAX
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x70]
LEA RCX,[RSP + 0x50]
MOV RDI,RAX
CALL 0x00179084
LAB_00177135:
JMP 0x0017713a
LAB_00177137:
XOR R12D,R12D
LAB_0017713a:
MOV qword ptr [RBX + 0x10],R12
LEA RAX,[RSP + 0x60]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00177159
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x0011a8d0
LAB_00177159:
LEA RAX,[RSP + 0x80]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0017717a
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x0011a8d0
LAB_0017717a:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00177196
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8d0
LAB_00177196:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,RBP
JZ 0x001771ad
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a8d0
LAB_001771ad:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */
llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2)
{
char *pcVar1;
int iVar2;
uint uVar3;
char *pcVar4;
chat_template *pcVar5;
long *in_RDX;
llama_model lVar6;
long *local_d0;
char *local_c8;
long local_c0 [2];
long *local_b0;
char *local_a8;
long local_a0 [2];
int8 local_90;
long *local_88 [2];
long local_78 [2];
long *local_68 [2];
long local_58 [2];
int8 **local_48;
int8 **local_40;
int8 *local_38;
local_90 = llama_model_get_vocab(param_2);
local_b0 = local_a0;
std::__cxx11::string::_M_construct<char*>(&local_b0,*in_RDX,in_RDX[1] + *in_RDX);
local_d0 = local_c0;
/* try { // try from 00176f73 to 00176f7c has its CatchHandler @ 00177226 */
std::__cxx11::string::_M_construct<char*>(&local_d0,*in_RDX,in_RDX[1] + *in_RDX);
lVar6 = (llama_model)0x1;
if (in_RDX[1] == 0) {
/* try { // try from 00176f8b to 0017700f has its CatchHandler @ 0017722b */
pcVar4 = (char *)llama_model_chat_template(param_2);
pcVar1 = local_a8;
lVar6 = (llama_model)(pcVar4 != (char *)0x0);
if ((bool)lVar6) {
strlen(pcVar4);
std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar1,(ulong)pcVar4);
}
pcVar4 = (char *)llama_model_chat_template(param_2);
pcVar1 = local_c8;
if (pcVar4 != (char *)0x0) {
strlen(pcVar4);
std::__cxx11::string::_M_replace((ulong)&local_d0,0,pcVar1,(ulong)pcVar4);
lVar6 = (llama_model)0x1;
}
}
if (local_a8 != (char *)0x0) {
iVar2 = std::__cxx11::string::compare((char *)&local_b0);
if (iVar2 != 0) goto LAB_00177066;
}
if (local_c8 == (char *)0x0) {
std::__cxx11::string::_M_replace((ulong)&local_b0,0,local_a8,0x1ef3c9);
}
else {
/* try { // try from 00177038 to 00177065 has its CatchHandler @ 001771c2 */
std::__cxx11::string::_M_assign((string *)&local_b0);
}
LAB_00177066:
local_40 = &local_d0;
local_38 = &local_90;
local_48 = &local_b0;
/* try { // try from 0017708b to 001770b1 has its CatchHandler @ 00177253 */
uVar3 = llama_vocab_bos(local_90);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_68,(char *)&local_48,(char *)(ulong)uVar3);
/* try { // try from 001770b7 to 001770dd has its CatchHandler @ 0017722d */
uVar3 = llama_vocab_eos(local_90);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_88,(char *)&local_48,(char *)(ulong)uVar3);
*param_1 = lVar6;
/* try { // try from 001770e1 to 001770ea has its CatchHandler @ 00177206 */
pcVar5 = (chat_template *)operator_new(0x80);
/* try { // try from 001770eb to 00177104 has its CatchHandler @ 001771f4 */
minja::chat_template::chat_template
(pcVar5,(string *)&local_b0,(string *)local_68,(string *)local_88);
*(chat_template **)(param_1 + 8) = pcVar5;
if (local_c8 == (char *)0x0) {
pcVar5 = (chat_template *)0x0;
}
else {
/* try { // try from 00177111 to 0017711a has its CatchHandler @ 001771d9 */
pcVar5 = (chat_template *)operator_new(0x80);
/* try { // try from 0017711b to 00177134 has its CatchHandler @ 001771c7 */
minja::chat_template::chat_template
(pcVar5,(string *)&local_d0,(string *)local_68,(string *)local_88);
}
*(chat_template **)(param_1 + 0x10) = pcVar5;
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_68[0] != local_58) {
operator_delete(local_68[0],local_58[0] + 1);
}
if (local_d0 != local_c0) {
operator_delete(local_d0,local_c0[0] + 1);
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
return param_1;
}
|
|
65,478 |
copy_not_changed_fields
|
eloqsql/storage/maria/ma_blockrec.c
|
void copy_not_changed_fields(MARIA_HA *info, MY_BITMAP *changed_fields,
uchar *to, uchar *from)
{
MARIA_COLUMNDEF *column, *end_column;
uchar *bitmap= (uchar*) changed_fields->bitmap;
MARIA_SHARE *share= info->s;
uint bit= 1;
for (column= share->columndef, end_column= column+ share->base.fields;
column < end_column; column++)
{
if (!(*bitmap & bit))
{
uint field_length= column->length;
if (column->type == FIELD_VARCHAR)
{
if (column->fill_length == 1)
field_length= (uint) from[column->offset] + 1;
else
field_length= uint2korr(from + column->offset) + 2;
}
memcpy(to + column->offset, from + column->offset, field_length);
}
if ((bit= (bit << 1)) == 256)
{
bitmap++;
bit= 1;
}
}
}
|
O3
|
c
|
copy_not_changed_fields:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, -0x30(%rbp)
movq (%rdi), %rax
movl 0x3c8(%rax), %ecx
testq %rcx, %rcx
je 0x5bc65
movq 0x588(%rax), %r15
imulq $0x38, %rcx, %r12
addq %r15, %r12
movq (%rsi), %r13
movl $0x1, %ecx
movl $0x1, %r14d
movzbl (%r13), %eax
testl %eax, %r14d
jne 0x5bc46
movl 0x4(%r15), %esi
cmpl $0x8, (%r15)
jne 0x5bc22
cmpw $0x1, 0xc(%r15)
jne 0x5bc29
movzbl (%rbx,%rsi), %edx
incq %rdx
jmp 0x5bc31
movzwl 0x8(%r15), %edx
jmp 0x5bc31
movzwl (%rbx,%rsi), %edx
addq $0x2, %rdx
movq -0x30(%rbp), %rax
leaq (%rax,%rsi), %rdi
addq %rbx, %rsi
callq 0x29080
movl $0x1, %ecx
addl %r14d, %r14d
xorl %eax, %eax
cmpl $0x100, %r14d # imm = 0x100
cmovel %ecx, %r14d
sete %al
addq %rax, %r13
addq $0x38, %r15
cmpq %r12, %r15
jb 0x5bbfd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
copy_not_changed_fields:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov [rbp+var_30], rdx
mov rax, [rdi]
mov ecx, [rax+3C8h]
test rcx, rcx
jz loc_5BC65
mov r15, [rax+588h]
imul r12, rcx, 38h ; '8'
add r12, r15
mov r13, [rsi]
mov ecx, 1
mov r14d, 1
loc_5BBFD:
movzx eax, byte ptr [r13+0]
test r14d, eax
jnz short loc_5BC46
mov esi, [r15+4]
cmp dword ptr [r15], 8
jnz short loc_5BC22
cmp word ptr [r15+0Ch], 1
jnz short loc_5BC29
movzx edx, byte ptr [rbx+rsi]
inc rdx
jmp short loc_5BC31
loc_5BC22:
movzx edx, word ptr [r15+8]
jmp short loc_5BC31
loc_5BC29:
movzx edx, word ptr [rbx+rsi]
add rdx, 2
loc_5BC31:
mov rax, [rbp+var_30]
lea rdi, [rax+rsi]
add rsi, rbx
call _memcpy
mov ecx, 1
loc_5BC46:
add r14d, r14d
xor eax, eax
cmp r14d, 100h
cmovz r14d, ecx
setz al
add r13, rax
add r15, 38h ; '8'
cmp r15, r12
jb short loc_5BBFD
loc_5BC65:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char copy_not_changed_fields(long long *a1, _BYTE **a2, long long a3, long long a4)
{
long long v5; // rax
unsigned long long v6; // r15
unsigned long long v7; // r12
_BYTE *v8; // r13
int v9; // r14d
long long v10; // rsi
long long v11; // rdx
bool v12; // zf
v5 = *a1;
if ( *(_DWORD *)(*a1 + 968) )
{
v6 = *(_QWORD *)(v5 + 1416);
v7 = v6 + 56LL * *(unsigned int *)(*a1 + 968);
v8 = *a2;
v9 = 1;
do
{
if ( (*v8 & (unsigned __int8)v9) == 0 )
{
v10 = *(unsigned int *)(v6 + 4);
if ( *(_DWORD *)v6 == 8 )
{
if ( *(_WORD *)(v6 + 12) == 1 )
v11 = *(unsigned __int8 *)(a4 + v10) + 1LL;
else
v11 = *(unsigned __int16 *)(a4 + v10) + 2LL;
}
else
{
v11 = *(unsigned __int16 *)(v6 + 8);
}
memcpy(a3 + v10, a4 + v10, v11);
}
v9 *= 2;
v5 = 0LL;
v12 = v9 == 256;
if ( v9 == 256 )
v9 = 1;
LOBYTE(v5) = v12;
v8 += v5;
v6 += 56LL;
}
while ( v6 < v7 );
}
return v5;
}
|
copy_not_changed_fields:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV qword ptr [RBP + -0x30],RDX
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX + 0x3c8]
TEST RCX,RCX
JZ 0x0015bc65
MOV R15,qword ptr [RAX + 0x588]
IMUL R12,RCX,0x38
ADD R12,R15
MOV R13,qword ptr [RSI]
MOV ECX,0x1
MOV R14D,0x1
LAB_0015bbfd:
MOVZX EAX,byte ptr [R13]
TEST R14D,EAX
JNZ 0x0015bc46
MOV ESI,dword ptr [R15 + 0x4]
CMP dword ptr [R15],0x8
JNZ 0x0015bc22
CMP word ptr [R15 + 0xc],0x1
JNZ 0x0015bc29
MOVZX EDX,byte ptr [RBX + RSI*0x1]
INC RDX
JMP 0x0015bc31
LAB_0015bc22:
MOVZX EDX,word ptr [R15 + 0x8]
JMP 0x0015bc31
LAB_0015bc29:
MOVZX EDX,word ptr [RBX + RSI*0x1]
ADD RDX,0x2
LAB_0015bc31:
MOV RAX,qword ptr [RBP + -0x30]
LEA RDI,[RAX + RSI*0x1]
ADD RSI,RBX
CALL 0x00129080
MOV ECX,0x1
LAB_0015bc46:
ADD R14D,R14D
XOR EAX,EAX
CMP R14D,0x100
CMOVZ R14D,ECX
SETZ AL
ADD R13,RAX
ADD R15,0x38
CMP R15,R12
JC 0x0015bbfd
LAB_0015bc65:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void copy_not_changed_fields(long *param_1,int8 *param_2,long param_3,long param_4)
{
ulong uVar1;
size_t __n;
int *piVar2;
byte *pbVar3;
uint uVar4;
int *piVar5;
bool bVar6;
uVar1 = (ulong)*(uint *)(*param_1 + 0x3c8);
if (uVar1 != 0) {
piVar5 = *(int **)(*param_1 + 0x588);
piVar2 = piVar5 + uVar1 * 0xe;
pbVar3 = (byte *)*param_2;
uVar4 = 1;
do {
if ((uVar4 & *pbVar3) == 0) {
uVar1 = (ulong)(uint)piVar5[1];
if (*piVar5 == 8) {
if ((short)piVar5[3] == 1) {
__n = (ulong)*(byte *)(param_4 + uVar1) + 1;
}
else {
__n = (ulong)*(ushort *)(param_4 + uVar1) + 2;
}
}
else {
__n = (size_t)*(ushort *)(piVar5 + 2);
}
memcpy((void *)(param_3 + uVar1),(void *)(uVar1 + param_4),__n);
}
uVar4 = uVar4 * 2;
bVar6 = uVar4 == 0x100;
if (bVar6) {
uVar4 = 1;
}
pbVar3 = pbVar3 + bVar6;
piVar5 = piVar5 + 0xe;
} while (piVar5 < piVar2);
}
return;
}
|
|
65,479 |
OpenURL
|
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
|
void OpenURL(const char *url)
{
// Security check to (partially) avoid malicious code
if (strchr(url, '\'') != NULL) TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'] character");
else
{
char *cmd = (char *)RL_CALLOC(strlen(url) + 32, sizeof(char));
#if defined(_WIN32)
sprintf(cmd, "explorer \"%s\"", url);
#endif
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
sprintf(cmd, "xdg-open '%s'", url); // Alternatives: firefox, x-www-browser
#endif
#if defined(__APPLE__)
sprintf(cmd, "open '%s'", url);
#endif
int result = system(cmd);
if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could not be created");
RL_FREE(cmd);
}
}
|
O1
|
c
|
OpenURL:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x27, %esi
callq 0x91e0
testq %rax, %rax
je 0x74076
leaq 0x71a6c(%rip), %rsi # 0xe5acf
movl $0x4, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbfbcf
movq %r14, %rdi
callq 0x9230
leaq 0x20(%rax), %rdi
movl $0x1, %esi
callq 0x9330
movq %rax, %rbx
leaq 0x71a82(%rip), %rsi # 0xe5b18
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x90e0
movq %rbx, %rdi
callq 0x9440
cmpl $-0x1, %eax
jne 0x740c3
leaq 0x71a6f(%rip), %rsi # 0xe5b26
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfbcf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9650
|
OpenURL:
push r14
push rbx
push rax
mov r14, rdi
mov esi, 27h ; '''
call _strchr
test rax, rax
jz short loc_74076
lea rsi, aSystemProvided; "SYSTEM: Provided URL could be potential"...
mov edi, 4
xor eax, eax
add rsp, 8
pop rbx
pop r14
jmp TraceLog
loc_74076:
mov rdi, r14
call _strlen
lea rdi, [rax+20h]
mov esi, 1
call _calloc
mov rbx, rax
lea rsi, aXdgOpenS; "xdg-open '%s'"
mov rdi, rax
mov rdx, r14
xor eax, eax
call _sprintf
mov rdi, rbx
call _system
cmp eax, 0FFFFFFFFh
jnz short loc_740C3
lea rsi, aOpenurlChildPr; "OpenURL() child process could not be cr"...
mov edi, 4
xor eax, eax
call TraceLog
loc_740C3:
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
jmp _free
|
long long OpenURL(const char *a1)
{
int v1; // edx
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long v6; // rax
long long v7; // rbx
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
if ( strchr(a1, 39LL) )
return TraceLog(
4,
(unsigned int)"SYSTEM: Provided URL could be potentially malicious, avoid ['] character",
v1,
v2,
v3,
v4);
v6 = strlen(a1);
v7 = calloc(v6 + 32, 1LL);
sprintf(v7, "xdg-open '%s'", a1);
if ( (unsigned int)system(v7) == -1 )
TraceLog(4, (unsigned int)"OpenURL() child process could not be created", v8, v9, v10, v11);
return free(v7);
}
|
OpenURL:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV ESI,0x27
CALL 0x001091e0
TEST RAX,RAX
JZ 0x00174076
LEA RSI,[0x1e5acf]
MOV EDI,0x4
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001bfbcf
LAB_00174076:
MOV RDI,R14
CALL 0x00109230
LEA RDI,[RAX + 0x20]
MOV ESI,0x1
CALL 0x00109330
MOV RBX,RAX
LEA RSI,[0x1e5b18]
MOV RDI,RAX
MOV RDX,R14
XOR EAX,EAX
CALL 0x001090e0
MOV RDI,RBX
CALL 0x00109440
CMP EAX,-0x1
JNZ 0x001740c3
LEA RSI,[0x1e5b26]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfbcf
LAB_001740c3:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00109650
|
void OpenURL(char *param_1)
{
int iVar1;
char *pcVar2;
size_t sVar3;
pcVar2 = strchr(param_1,0x27);
if (pcVar2 != (char *)0x0) {
TraceLog(4,"SYSTEM: Provided URL could be potentially malicious, avoid [\'] character");
return;
}
sVar3 = strlen(param_1);
pcVar2 = (char *)calloc(sVar3 + 0x20,1);
sprintf(pcVar2,"xdg-open \'%s\'",param_1);
iVar1 = system(pcVar2);
if (iVar1 == -1) {
TraceLog(4,"OpenURL() child process could not be created");
}
free(pcVar2);
return;
}
|
|
65,480 |
test_rwkv_wkv6::build_graph(ggml_context*)
|
monkey531[P]llama/tests/test-backend-ops.cpp
|
ggml_tensor * build_graph(ggml_context * ctx) override {
const int64_t n_tokens = n_seq_tokens * n_seqs;
ggml_tensor * r = ggml_new_tensor(ctx, type, 3, std::vector<int64_t>{ head_size, head_count, n_tokens }.data());
ggml_tensor * k = ggml_new_tensor(ctx, type, 3, std::vector<int64_t>{ head_size, head_count, n_tokens }.data());
ggml_tensor * v = ggml_new_tensor(ctx, type, 3, std::vector<int64_t>{ head_size, head_count, n_tokens }.data());
ggml_tensor * tf = ggml_new_tensor(ctx, type, 2, std::vector<int64_t>{ head_size, head_count }.data());
ggml_tensor * td = ggml_new_tensor(ctx, type, 3, std::vector<int64_t>{ head_size, head_count, n_tokens }.data());
ggml_tensor * s = ggml_new_tensor(ctx, type, 2, std::vector<int64_t>{ head_size * head_size * head_count, n_seqs }.data());
ggml_tensor * out = ggml_rwkv_wkv6(ctx, k, v, r, tf, td, s);
return out;
}
|
O3
|
cpp
|
test_rwkv_wkv6::build_graph(ggml_context*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %r12
imulq 0x50(%rdi), %r12
movl 0x38(%rdi), %ebp
movdqu 0x40(%rdi), %xmm0
pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1]
leaq 0x30(%rsp), %rsi
movdqa %xmm0, (%rsi)
movq %r12, 0x10(%rsi)
leaq 0x18(%rsp), %rdi
leaq 0x17(%rsp), %rcx
movl $0x3, %edx
callq 0x2bb18
movq 0x18(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x3, %edx
callq 0xd080
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b8ae
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2c940
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movl 0x38(%r14), %ebp
movdqu 0x40(%r14), %xmm0
pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1]
leaq 0x30(%rsp), %rsi
movdqa %xmm0, (%rsi)
movq %r12, 0x10(%rsi)
leaq 0x18(%rsp), %rdi
leaq 0x17(%rsp), %rcx
movl $0x3, %edx
callq 0x2bb18
movq 0x18(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x3, %edx
callq 0xd080
movq %rax, %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b8ae
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2c9a9
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movl 0x38(%r14), %ebp
movdqu 0x40(%r14), %xmm0
pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1]
leaq 0x30(%rsp), %rsi
movdqa %xmm0, (%rsi)
movq %r12, 0x10(%rsi)
leaq 0x18(%rsp), %rdi
leaq 0x17(%rsp), %rcx
movl $0x3, %edx
callq 0x2bb18
movq 0x18(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x3, %edx
callq 0xd080
movq %rax, %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b8ae
movq %rbp, 0x50(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2ca17
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movl 0x38(%r14), %ebp
movdqu 0x40(%r14), %xmm0
pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1]
leaq 0x30(%rsp), %rsi
movdqa %xmm0, (%rsi)
leaq 0x18(%rsp), %rdi
leaq 0x17(%rsp), %rcx
movl $0x2, %edx
callq 0x2bb18
movq %r13, 0x48(%rsp)
movq 0x18(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x2, %edx
callq 0xd080
movq %rax, %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b8ae
movq %r15, %r13
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2ca84
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movl 0x38(%r14), %r15d
movdqu 0x40(%r14), %xmm0
pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1]
leaq 0x30(%rsp), %rsi
movdqa %xmm0, (%rsi)
movq %r12, 0x10(%rsi)
leaq 0x18(%rsp), %rdi
leaq 0x17(%rsp), %rcx
movl $0x3, %edx
callq 0x2bb18
movq 0x18(%rsp), %rcx
movq %rbx, %rdi
movl %r15d, %esi
movl $0x3, %edx
callq 0xd080
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b8ae
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2caee
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movl 0x38(%r14), %r12d
movq 0x48(%r14), %rax
imulq %rax, %rax
imulq 0x40(%r14), %rax
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movq 0x58(%r14), %rax
movq %rax, 0x8(%rsi)
leaq 0x18(%rsp), %rdi
leaq 0x17(%rsp), %rcx
movl $0x2, %edx
callq 0x2bb18
movq 0x18(%rsp), %rcx
movq %rbx, %rdi
movl %r12d, %esi
movl $0x2, %edx
callq 0xd080
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b8ae
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2cb5d
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movq %r12, (%rsp)
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r13, %rcx
movq %rbp, %r8
movq %r15, %r9
callq 0xd8d0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2cb95
jmp 0x2cb95
jmp 0x2cb95
jmp 0x2cb95
jmp 0x2cb95
movq %rax, %rbx
jmp 0x2cbbe
jmp 0x2cba4
jmp 0x2cba4
jmp 0x2cba4
jmp 0x2cba4
jmp 0x2cba4
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2cbbe
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0xd5e0
movq %rbx, %rdi
callq 0xdb00
|
_ZN14test_rwkv_wkv611build_graphEP12ggml_context:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rsi
mov r14, rdi
mov r12, [rdi+58h]
imul r12, [rdi+50h]
mov ebp, [rdi+38h]
movdqu xmm0, xmmword ptr [rdi+40h]
pshufd xmm0, xmm0, 4Eh ; 'N'
lea rsi, [rsp+88h+var_58]
movdqa xmmword ptr [rsi], xmm0
mov [rsi+10h], r12
lea rdi, [rsp+88h+var_70]
lea rcx, [rsp+88h+var_71]
mov edx, 3
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
mov rcx, [rsp+88h+var_70]
mov rdi, rbx
mov esi, ebp
mov edx, 3
call _ggml_new_tensor
mov r15, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, [rsp+88h+var_70]; void *
test rdi, rdi
jz short loc_2C940
mov rsi, [rsp+88h+var_60]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C940:
mov ebp, [r14+38h]
movdqu xmm0, xmmword ptr [r14+40h]
pshufd xmm0, xmm0, 4Eh ; 'N'
lea rsi, [rsp+88h+var_58]
movdqa xmmword ptr [rsi], xmm0
mov [rsi+10h], r12
lea rdi, [rsp+88h+var_70]
lea rcx, [rsp+88h+var_71]
mov edx, 3
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
mov rcx, [rsp+88h+var_70]
mov rdi, rbx
mov esi, ebp
mov edx, 3
call _ggml_new_tensor
mov r13, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, [rsp+88h+var_70]; void *
test rdi, rdi
jz short loc_2C9A9
mov rsi, [rsp+88h+var_60]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2C9A9:
mov ebp, [r14+38h]
movdqu xmm0, xmmword ptr [r14+40h]
pshufd xmm0, xmm0, 4Eh ; 'N'
lea rsi, [rsp+88h+var_58]
movdqa xmmword ptr [rsi], xmm0
mov [rsi+10h], r12
lea rdi, [rsp+88h+var_70]
lea rcx, [rsp+88h+var_71]
mov edx, 3
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
mov rcx, [rsp+88h+var_70]
mov rdi, rbx
mov esi, ebp
mov edx, 3
call _ggml_new_tensor
mov rbp, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov [rsp+88h+var_38], rbp
mov rdi, [rsp+88h+var_70]; void *
test rdi, rdi
jz short loc_2CA17
mov rsi, [rsp+88h+var_60]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CA17:
mov ebp, [r14+38h]
movdqu xmm0, xmmword ptr [r14+40h]
pshufd xmm0, xmm0, 4Eh ; 'N'
lea rsi, [rsp+88h+var_58]
movdqa xmmword ptr [rsi], xmm0
lea rdi, [rsp+88h+var_70]
lea rcx, [rsp+88h+var_71]
mov edx, 2
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
mov [rsp+88h+var_40], r13
mov rcx, [rsp+88h+var_70]
mov rdi, rbx
mov esi, ebp
mov edx, 2
call _ggml_new_tensor
mov rbp, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov r13, r15
mov rdi, [rsp+88h+var_70]; void *
test rdi, rdi
jz short loc_2CA84
mov rsi, [rsp+88h+var_60]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CA84:
mov r15d, [r14+38h]
movdqu xmm0, xmmword ptr [r14+40h]
pshufd xmm0, xmm0, 4Eh ; 'N'
lea rsi, [rsp+88h+var_58]
movdqa xmmword ptr [rsi], xmm0
mov [rsi+10h], r12
lea rdi, [rsp+88h+var_70]
lea rcx, [rsp+88h+var_71]
mov edx, 3
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
mov rcx, [rsp+88h+var_70]
mov rdi, rbx
mov esi, r15d
mov edx, 3
call _ggml_new_tensor
mov r15, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, [rsp+88h+var_70]; void *
test rdi, rdi
jz short loc_2CAEE
mov rsi, [rsp+88h+var_60]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CAEE:
mov r12d, [r14+38h]
mov rax, [r14+48h]
imul rax, rax
imul rax, [r14+40h]
lea rsi, [rsp+88h+var_58]
mov [rsi], rax
mov rax, [r14+58h]
mov [rsi+8], rax
lea rdi, [rsp+88h+var_70]
lea rcx, [rsp+88h+var_71]
mov edx, 2
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
mov rcx, [rsp+88h+var_70]
mov rdi, rbx
mov esi, r12d
mov edx, 2
call _ggml_new_tensor
mov r12, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, [rsp+88h+var_70]; void *
test rdi, rdi
jz short loc_2CB5D
mov rsi, [rsp+88h+var_60]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CB5D:
mov [rsp+88h+var_88], r12
mov rdi, rbx
mov rsi, [rsp+88h+var_40]
mov rdx, [rsp+88h+var_38]
mov rcx, r13
mov r8, rbp
mov r9, r15
call _ggml_rwkv_wkv6
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_2CB95
jmp short loc_2CB95
jmp short loc_2CB95
jmp short loc_2CB95
jmp short $+2
loc_2CB95:
mov rbx, rax
jmp short loc_2CBBE
jmp short loc_2CBA4
jmp short loc_2CBA4
jmp short loc_2CBA4
jmp short loc_2CBA4
jmp short $+2
loc_2CBA4:
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
test rdi, rdi
jz short loc_2CBBE
mov rsi, [rsp+arg_20]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CBBE:
mov rdi, rbx
call __Unwind_Resume
|
long long test_rwkv_wkv6::build_graph(const __m128i *a1, long long a2)
{
long long v2; // r12
unsigned __int32 v3; // ebp
long long v4; // r15
unsigned __int32 v5; // ebp
long long v6; // r13
unsigned __int32 v7; // ebp
long long v8; // rbp
unsigned __int32 v9; // ebp
long long v10; // rbp
long long v11; // r13
unsigned __int32 v12; // r15d
long long v13; // r15
unsigned __int32 v14; // r12d
long long v15; // r12
void *v17[2]; // [rsp+18h] [rbp-70h] BYREF
long long v18; // [rsp+28h] [rbp-60h]
__m128i v19; // [rsp+30h] [rbp-58h] BYREF
long long v20; // [rsp+40h] [rbp-48h]
long long v21; // [rsp+48h] [rbp-40h]
long long v22; // [rsp+50h] [rbp-38h]
v2 = a1[5].m128i_i64[0] * a1[5].m128i_i64[1];
v3 = a1[3].m128i_u32[2];
v19 = _mm_shuffle_epi32(_mm_loadu_si128(a1 + 4), 78);
v20 = v2;
std::vector<long>::vector((long long)v17, (long long)&v19, 3LL);
v4 = ggml_new_tensor(a2, v3, 3LL);
test_case::add_sentinel((long long)a1, a2);
if ( v17[0] )
operator delete(v17[0], v18 - (unsigned long long)v17[0]);
v5 = a1[3].m128i_u32[2];
v19 = _mm_shuffle_epi32(_mm_loadu_si128(a1 + 4), 78);
v20 = v2;
std::vector<long>::vector((long long)v17, (long long)&v19, 3LL);
v6 = ggml_new_tensor(a2, v5, 3LL);
test_case::add_sentinel((long long)a1, a2);
if ( v17[0] )
operator delete(v17[0], v18 - (unsigned long long)v17[0]);
v7 = a1[3].m128i_u32[2];
v19 = _mm_shuffle_epi32(_mm_loadu_si128(a1 + 4), 78);
v20 = v2;
std::vector<long>::vector((long long)v17, (long long)&v19, 3LL);
v8 = ggml_new_tensor(a2, v7, 3LL);
test_case::add_sentinel((long long)a1, a2);
v22 = v8;
if ( v17[0] )
operator delete(v17[0], v18 - (unsigned long long)v17[0]);
v9 = a1[3].m128i_u32[2];
v19 = _mm_shuffle_epi32(_mm_loadu_si128(a1 + 4), 78);
std::vector<long>::vector((long long)v17, (long long)&v19, 2LL);
v21 = v6;
v10 = ggml_new_tensor(a2, v9, 2LL);
test_case::add_sentinel((long long)a1, a2);
v11 = v4;
if ( v17[0] )
operator delete(v17[0], v18 - (unsigned long long)v17[0]);
v12 = a1[3].m128i_u32[2];
v19 = _mm_shuffle_epi32(_mm_loadu_si128(a1 + 4), 78);
v20 = v2;
std::vector<long>::vector((long long)v17, (long long)&v19, 3LL);
v13 = ggml_new_tensor(a2, v12, 3LL);
test_case::add_sentinel((long long)a1, a2);
if ( v17[0] )
operator delete(v17[0], v18 - (unsigned long long)v17[0]);
v14 = a1[3].m128i_u32[2];
v19.m128i_i64[0] = a1[4].m128i_i64[0] * a1[4].m128i_i64[1] * a1[4].m128i_i64[1];
v19.m128i_i64[1] = a1[5].m128i_i64[1];
std::vector<long>::vector((long long)v17, (long long)&v19, 2LL);
v15 = ggml_new_tensor(a2, v14, 2LL);
test_case::add_sentinel((long long)a1, a2);
if ( v17[0] )
operator delete(v17[0], v18 - (unsigned long long)v17[0]);
return ggml_rwkv_wkv6(a2, v21, v22, v11, v10, v13, v15);
}
|
build_graph:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RSI
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x58]
IMUL R12,qword ptr [RDI + 0x50]
MOV EBP,dword ptr [RDI + 0x38]
MOVDQU XMM0,xmmword ptr [RDI + 0x40]
PSHUFD XMM0,XMM0,0x4e
LEA RSI,[RSP + 0x30]
MOVDQA xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],R12
LAB_0012c8f3:
LEA RDI,[RSP + 0x18]
LEA RCX,[RSP + 0x17]
MOV EDX,0x3
CALL 0x0012bb18
MOV RCX,qword ptr [RSP + 0x18]
LAB_0012c90c:
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,0x3
CALL 0x0010d080
MOV R15,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b8ae
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012c940
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x0010d5e0
LAB_0012c940:
MOV EBP,dword ptr [R14 + 0x38]
MOVDQU XMM0,xmmword ptr [R14 + 0x40]
PSHUFD XMM0,XMM0,0x4e
LEA RSI,[RSP + 0x30]
MOVDQA xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],R12
LAB_0012c95c:
LEA RDI,[RSP + 0x18]
LEA RCX,[RSP + 0x17]
MOV EDX,0x3
CALL 0x0012bb18
MOV RCX,qword ptr [RSP + 0x18]
LAB_0012c975:
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,0x3
CALL 0x0010d080
MOV R13,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b8ae
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012c9a9
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x0010d5e0
LAB_0012c9a9:
MOV EBP,dword ptr [R14 + 0x38]
MOVDQU XMM0,xmmword ptr [R14 + 0x40]
PSHUFD XMM0,XMM0,0x4e
LEA RSI,[RSP + 0x30]
MOVDQA xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],R12
LAB_0012c9c5:
LEA RDI,[RSP + 0x18]
LEA RCX,[RSP + 0x17]
MOV EDX,0x3
CALL 0x0012bb18
MOV RCX,qword ptr [RSP + 0x18]
LAB_0012c9de:
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,0x3
CALL 0x0010d080
MOV RBP,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b8ae
MOV qword ptr [RSP + 0x50],RBP
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012ca17
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x0010d5e0
LAB_0012ca17:
MOV EBP,dword ptr [R14 + 0x38]
MOVDQU XMM0,xmmword ptr [R14 + 0x40]
PSHUFD XMM0,XMM0,0x4e
LEA RSI,[RSP + 0x30]
MOVDQA xmmword ptr [RSI],XMM0
LAB_0012ca2f:
LEA RDI,[RSP + 0x18]
LEA RCX,[RSP + 0x17]
MOV EDX,0x2
CALL 0x0012bb18
MOV qword ptr [RSP + 0x48],R13
MOV RCX,qword ptr [RSP + 0x18]
LAB_0012ca4d:
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,0x2
CALL 0x0010d080
MOV RBP,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b8ae
MOV R13,R15
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012ca84
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x0010d5e0
LAB_0012ca84:
MOV R15D,dword ptr [R14 + 0x38]
MOVDQU XMM0,xmmword ptr [R14 + 0x40]
PSHUFD XMM0,XMM0,0x4e
LEA RSI,[RSP + 0x30]
MOVDQA xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],R12
LAB_0012caa0:
LEA RDI,[RSP + 0x18]
LEA RCX,[RSP + 0x17]
MOV EDX,0x3
CALL 0x0012bb18
MOV RCX,qword ptr [RSP + 0x18]
LAB_0012cab9:
MOV RDI,RBX
MOV ESI,R15D
MOV EDX,0x3
CALL 0x0010d080
MOV R15,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b8ae
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012caee
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x0010d5e0
LAB_0012caee:
MOV R12D,dword ptr [R14 + 0x38]
MOV RAX,qword ptr [R14 + 0x48]
IMUL RAX,RAX
IMUL RAX,qword ptr [R14 + 0x40]
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSI],RAX
MOV RAX,qword ptr [R14 + 0x58]
MOV qword ptr [RSI + 0x8],RAX
LAB_0012cb0f:
LEA RDI,[RSP + 0x18]
LEA RCX,[RSP + 0x17]
MOV EDX,0x2
CALL 0x0012bb18
MOV RCX,qword ptr [RSP + 0x18]
LAB_0012cb28:
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,0x2
CALL 0x0010d080
MOV R12,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b8ae
LAB_0012cb46:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0012cb5d
MOV RSI,qword ptr [RSP + 0x28]
SUB RSI,RDI
CALL 0x0010d5e0
LAB_0012cb5d:
MOV qword ptr [RSP],R12
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
MOV RCX,R13
MOV R8,RBP
MOV R9,R15
CALL 0x0010d8d0
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* test_rwkv_wkv6::build_graph(ggml_context*) */
void __thiscall test_rwkv_wkv6::build_graph(test_rwkv_wkv6 *this,ggml_context *param_1)
{
int1 auVar1 [16];
int4 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
long lVar7;
int1 local_71;
void *local_70 [2];
long local_60;
int1 local_58 [16];
long local_48;
int8 local_40;
int8 local_38;
lVar7 = *(long *)(this + 0x58) * *(long *)(this + 0x50);
uVar2 = *(int4 *)(this + 0x38);
auVar1 = *(int1 (*) [16])(this + 0x40);
local_58._0_8_ = auVar1._8_8_;
local_58._8_4_ = auVar1._0_4_;
local_58._12_4_ = auVar1._4_4_;
/* try { // try from 0012c8f3 to 0012c906 has its CatchHandler @ 0012cb95 */
local_48 = lVar7;
std::vector<long,std::allocator<long>>::vector
((vector<long,std::allocator<long>> *)local_70,local_58,3,&local_71);
/* try { // try from 0012c90c to 0012c928 has its CatchHandler @ 0012cba4 */
uVar3 = ggml_new_tensor(param_1,uVar2,3,local_70[0]);
test_case::add_sentinel((test_case *)this,param_1);
if (local_70[0] != (void *)0x0) {
operator_delete(local_70[0],local_60 - (long)local_70[0]);
}
uVar2 = *(int4 *)(this + 0x38);
auVar1 = *(int1 (*) [16])(this + 0x40);
local_58._0_8_ = auVar1._8_8_;
local_58._8_4_ = auVar1._0_4_;
local_58._12_4_ = auVar1._4_4_;
/* try { // try from 0012c95c to 0012c96f has its CatchHandler @ 0012cb93 */
local_48 = lVar7;
std::vector<long,std::allocator<long>>::vector
((vector<long,std::allocator<long>> *)local_70,local_58,3,&local_71);
/* try { // try from 0012c975 to 0012c991 has its CatchHandler @ 0012cba2 */
uVar4 = ggml_new_tensor(param_1,uVar2,3,local_70[0]);
test_case::add_sentinel((test_case *)this,param_1);
if (local_70[0] != (void *)0x0) {
operator_delete(local_70[0],local_60 - (long)local_70[0]);
}
uVar2 = *(int4 *)(this + 0x38);
auVar1 = *(int1 (*) [16])(this + 0x40);
local_58._0_8_ = auVar1._8_8_;
local_58._8_4_ = auVar1._0_4_;
local_58._12_4_ = auVar1._4_4_;
/* try { // try from 0012c9c5 to 0012c9d8 has its CatchHandler @ 0012cb91 */
local_48 = lVar7;
std::vector<long,std::allocator<long>>::vector
((vector<long,std::allocator<long>> *)local_70,local_58,3,&local_71);
/* try { // try from 0012c9de to 0012c9fa has its CatchHandler @ 0012cba0 */
uVar5 = ggml_new_tensor(param_1,uVar2,3,local_70[0]);
test_case::add_sentinel((test_case *)this,param_1);
local_38 = uVar5;
if (local_70[0] != (void *)0x0) {
operator_delete(local_70[0],local_60 - (long)local_70[0]);
}
uVar2 = *(int4 *)(this + 0x38);
auVar1 = *(int1 (*) [16])(this + 0x40);
local_58._0_8_ = auVar1._8_8_;
local_58._8_4_ = auVar1._0_4_;
local_58._12_4_ = auVar1._4_4_;
/* try { // try from 0012ca2f to 0012ca42 has its CatchHandler @ 0012cb8f */
std::vector<long,std::allocator<long>>::vector
((vector<long,std::allocator<long>> *)local_70,local_58,2,&local_71);
local_40 = uVar4;
/* try { // try from 0012ca4d to 0012ca69 has its CatchHandler @ 0012cb9e */
uVar4 = ggml_new_tensor(param_1,uVar2,2,local_70[0]);
test_case::add_sentinel((test_case *)this,param_1);
if (local_70[0] != (void *)0x0) {
operator_delete(local_70[0],local_60 - (long)local_70[0]);
}
uVar2 = *(int4 *)(this + 0x38);
auVar1 = *(int1 (*) [16])(this + 0x40);
local_58._0_8_ = auVar1._8_8_;
local_58._8_4_ = auVar1._0_4_;
local_58._12_4_ = auVar1._4_4_;
/* try { // try from 0012caa0 to 0012cab3 has its CatchHandler @ 0012cb8d */
local_48 = lVar7;
std::vector<long,std::allocator<long>>::vector
((vector<long,std::allocator<long>> *)local_70,local_58,3,&local_71);
/* try { // try from 0012cab9 to 0012cad6 has its CatchHandler @ 0012cb9c */
uVar5 = ggml_new_tensor(param_1,uVar2,3,local_70[0]);
test_case::add_sentinel((test_case *)this,param_1);
if (local_70[0] != (void *)0x0) {
operator_delete(local_70[0],local_60 - (long)local_70[0]);
}
uVar2 = *(int4 *)(this + 0x38);
local_58._8_8_ = *(int8 *)(this + 0x58);
local_58._0_8_ = *(long *)(this + 0x48) * *(long *)(this + 0x48) * *(long *)(this + 0x40);
/* try { // try from 0012cb0f to 0012cb22 has its CatchHandler @ 0012cb8b */
std::vector<long,std::allocator<long>>::vector
((vector<long,std::allocator<long>> *)local_70,local_58,2,&local_71);
/* try { // try from 0012cb28 to 0012cb45 has its CatchHandler @ 0012cb9a */
uVar6 = ggml_new_tensor(param_1,uVar2,2,local_70[0]);
test_case::add_sentinel((test_case *)this,param_1);
if (local_70[0] != (void *)0x0) {
operator_delete(local_70[0],local_60 - (long)local_70[0]);
}
ggml_rwkv_wkv6(param_1,local_40,local_38,uVar3,uVar4,uVar5,uVar6);
return;
}
|
|
65,481 |
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
|
llama.cpp/common/json.hpp
|
void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0xd0881
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x5119e(%rip), %rsi # 0x121a11
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0x7eea5
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_D0881
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_D0881:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; this
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
|
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
_QWORD *a1,
__m128i a2)
{
long long v3; // rax
if ( (a2.m128i_i64[0] & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2),
(long long)(a1 + 10),
a2);
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
|
dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x001d0881
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x221a11]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_001d0881:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x0017eea5
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,double param_1)
{
serializer<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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x001d087f. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x001d08ab. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
|
|
65,482 |
JS_ToQuotedString
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_ToQuotedString(JSContext *ctx, JSValue val1)
{
JSValue val;
JSString *p;
int i;
uint32_t c;
StringBuffer b_s, *b = &b_s;
char buf[16];
val = JS_ToStringCheckObject(ctx, val1);
if (JS_IsException(val))
return val;
p = JS_VALUE_GET_STRING(val);
if (string_buffer_init(ctx, b, p->len + 2))
goto fail;
if (string_buffer_putc8(b, '\"'))
goto fail;
for(i = 0; i < p->len; ) {
c = string_getc(p, &i);
switch(c) {
case '\t':
c = 't';
goto quote;
case '\r':
c = 'r';
goto quote;
case '\n':
c = 'n';
goto quote;
case '\b':
c = 'b';
goto quote;
case '\f':
c = 'f';
goto quote;
case '\"':
case '\\':
quote:
if (string_buffer_putc8(b, '\\'))
goto fail;
if (string_buffer_putc8(b, c))
goto fail;
break;
default:
if (c < 32 || is_surrogate(c)) {
snprintf(buf, sizeof(buf), "\\u%04x", c);
if (string_buffer_write8(b, (uint8_t*)buf, 6))
goto fail;
} else {
if (string_buffer_putc(b, c))
goto fail;
}
break;
}
}
if (string_buffer_putc8(b, '\"'))
goto fail;
JS_FreeValue(ctx, val);
return string_buffer_end(b);
fail:
JS_FreeValue(ctx, val);
string_buffer_free(b);
return JS_EXCEPTION;
}
|
O0
|
c
|
JS_ToQuotedString:
subq $0xa8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x76ac0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x8e767
movq 0x70(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x8e996
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x68(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %edx
addl $0x2, %edx
callq 0x56930
cmpl $0x0, %eax
je 0x8e7a1
jmp 0x8e95e
movq 0x38(%rsp), %rdi
movl $0x22, %esi
callq 0x8a830
cmpl $0x0, %eax
je 0x8e7ba
jmp 0x8e95e
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
movq 0x68(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jge 0x8e915
movq 0x68(%rsp), %rdi
leaq 0x64(%rsp), %rsi
callq 0x8be50
movl %eax, 0x60(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x8, %eax
je 0x8e860
jmp 0x8e800
movl 0xc(%rsp), %eax
subl $0x9, %eax
je 0x8e842
jmp 0x8e80b
movl 0xc(%rsp), %eax
subl $0xa, %eax
je 0x8e856
jmp 0x8e816
movl 0xc(%rsp), %eax
subl $0xc, %eax
je 0x8e86a
jmp 0x8e821
movl 0xc(%rsp), %eax
subl $0xd, %eax
je 0x8e84c
jmp 0x8e82c
movl 0xc(%rsp), %eax
subl $0x22, %eax
je 0x8e874
jmp 0x8e837
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0x8e874
jmp 0x8e8a9
movl $0x74, 0x60(%rsp)
jmp 0x8e876
movl $0x72, 0x60(%rsp)
jmp 0x8e876
movl $0x6e, 0x60(%rsp)
jmp 0x8e876
movl $0x62, 0x60(%rsp)
jmp 0x8e876
movl $0x66, 0x60(%rsp)
jmp 0x8e876
jmp 0x8e876
movq 0x38(%rsp), %rdi
movl $0x5c, %esi
callq 0x8a830
cmpl $0x0, %eax
je 0x8e88f
jmp 0x8e95e
movq 0x38(%rsp), %rdi
movl 0x60(%rsp), %esi
callq 0x8a830
cmpl $0x0, %eax
je 0x8e8a7
jmp 0x8e95e
jmp 0x8e910
cmpl $0x20, 0x60(%rsp)
jb 0x8e8be
movl 0x60(%rsp), %edi
callq 0x8c3b0
cmpl $0x0, %eax
je 0x8e8f7
leaq 0x20(%rsp), %rdi
movl 0x60(%rsp), %ecx
movl $0x10, %esi
leaq 0x865af(%rip), %rdx # 0x114e82
movb $0x0, %al
callq 0xe2f0
movq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x6, %edx
callq 0x75e10
cmpl $0x0, %eax
je 0x8e8f5
jmp 0x8e95e
jmp 0x8e90e
movq 0x38(%rsp), %rdi
movl 0x60(%rsp), %esi
callq 0x53d70
cmpl $0x0, %eax
je 0x8e90c
jmp 0x8e95e
jmp 0x8e90e
jmp 0x8e910
jmp 0x8e7c2
movq 0x38(%rsp), %rdi
movl $0x22, %esi
callq 0x8a830
cmpl $0x0, %eax
je 0x8e92b
jmp 0x8e95e
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x29f80
movq 0x38(%rsp), %rdi
callq 0x53df0
movq %rax, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
jmp 0x8e996
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x29f80
movq 0x38(%rsp), %rdi
callq 0x587a0
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nop
|
JS_ToQuotedString:
sub rsp, 0A8h
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_28], rdi
lea rax, [rsp+0A8h+var_68]
mov [rsp+0A8h+var_70], rax
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
call JS_ToStringCheckObject
mov [rsp+0A8h+var_98], rax
mov [rsp+0A8h+var_90], rdx
mov rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_38], rax
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_30], rax
mov rdi, [rsp+0A8h+var_38]
mov rsi, [rsp+0A8h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_8E767
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_30]
mov [rsp+0A8h+var_8], rax
jmp loc_8E996
loc_8E767:
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_40], rax
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_70]
mov rax, [rsp+0A8h+var_40]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov edx, eax
add edx, 2
call string_buffer_init
cmp eax, 0
jz short loc_8E7A1
jmp loc_8E95E
loc_8E7A1:
mov rdi, [rsp+0A8h+var_70]
mov esi, 22h ; '"'
call string_buffer_putc8
cmp eax, 0
jz short loc_8E7BA
jmp loc_8E95E
loc_8E7BA:
mov [rsp+0A8h+var_44], 0
loc_8E7C2:
mov eax, [rsp+0A8h+var_44]
mov rcx, [rsp+0A8h+var_40]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
cmp eax, ecx
jge loc_8E915
mov rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_44]
call string_getc
mov [rsp+0A8h+var_48], eax
mov eax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_9C], eax
sub eax, 8
jz short loc_8E860
jmp short $+2
loc_8E800:
mov eax, [rsp+0A8h+var_9C]
sub eax, 9
jz short loc_8E842
jmp short $+2
loc_8E80B:
mov eax, [rsp+0A8h+var_9C]
sub eax, 0Ah
jz short loc_8E856
jmp short $+2
loc_8E816:
mov eax, [rsp+0A8h+var_9C]
sub eax, 0Ch
jz short loc_8E86A
jmp short $+2
loc_8E821:
mov eax, [rsp+0A8h+var_9C]
sub eax, 0Dh
jz short loc_8E84C
jmp short $+2
loc_8E82C:
mov eax, [rsp+0A8h+var_9C]
sub eax, 22h ; '"'
jz short loc_8E874
jmp short $+2
loc_8E837:
mov eax, [rsp+0A8h+var_9C]
sub eax, 5Ch ; '\'
jz short loc_8E874
jmp short loc_8E8A9
loc_8E842:
mov [rsp+0A8h+var_48], 74h ; 't'
jmp short loc_8E876
loc_8E84C:
mov [rsp+0A8h+var_48], 72h ; 'r'
jmp short loc_8E876
loc_8E856:
mov [rsp+0A8h+var_48], 6Eh ; 'n'
jmp short loc_8E876
loc_8E860:
mov [rsp+0A8h+var_48], 62h ; 'b'
jmp short loc_8E876
loc_8E86A:
mov [rsp+0A8h+var_48], 66h ; 'f'
jmp short loc_8E876
loc_8E874:
jmp short $+2
loc_8E876:
mov rdi, [rsp+0A8h+var_70]
mov esi, 5Ch ; '\'
call string_buffer_putc8
cmp eax, 0
jz short loc_8E88F
jmp loc_8E95E
loc_8E88F:
mov rdi, [rsp+0A8h+var_70]
mov esi, [rsp+0A8h+var_48]
call string_buffer_putc8
cmp eax, 0
jz short loc_8E8A7
jmp loc_8E95E
loc_8E8A7:
jmp short loc_8E910
loc_8E8A9:
cmp [rsp+0A8h+var_48], 20h ; ' '
jb short loc_8E8BE
mov edi, [rsp+0A8h+var_48]
call is_surrogate
cmp eax, 0
jz short loc_8E8F7
loc_8E8BE:
lea rdi, [rsp+0A8h+var_88]
mov ecx, [rsp+0A8h+var_48]
mov esi, 10h
lea rdx, aU04x; "\\u%04x"
mov al, 0
call _snprintf
mov rdi, [rsp+0A8h+var_70]
lea rsi, [rsp+0A8h+var_88]
mov edx, 6
call string_buffer_write8
cmp eax, 0
jz short loc_8E8F5
jmp short loc_8E95E
loc_8E8F5:
jmp short loc_8E90E
loc_8E8F7:
mov rdi, [rsp+0A8h+var_70]
mov esi, [rsp+0A8h+var_48]
call string_buffer_putc
cmp eax, 0
jz short loc_8E90C
jmp short loc_8E95E
loc_8E90C:
jmp short $+2
loc_8E90E:
jmp short $+2
loc_8E910:
jmp loc_8E7C2
loc_8E915:
mov rdi, [rsp+0A8h+var_70]
mov esi, 22h ; '"'
call string_buffer_putc8
cmp eax, 0
jz short loc_8E92B
jmp short loc_8E95E
loc_8E92B:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_38]
mov rdx, [rsp+0A8h+var_30]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_70]
call string_buffer_end
mov [rsp+0A8h+var_10], rax
mov [rsp+0A8h+var_8], rdx
jmp short loc_8E996
loc_8E95E:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_38]
mov rdx, [rsp+0A8h+var_30]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_70]
call string_buffer_free
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
loc_8E996:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
|
long long JS_ToQuotedString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rcx
long long v27; // rdx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
__m128 v31; // xmm4
__m128 v32; // xmm5
long long v33; // rdx
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
long long v39; // rdx
_BYTE v41[24]; // [rsp+20h] [rbp-88h] BYREF
long long *v42; // [rsp+38h] [rbp-70h]
char v43; // [rsp+40h] [rbp-68h] BYREF
unsigned int v44; // [rsp+60h] [rbp-48h]
int v45; // [rsp+64h] [rbp-44h] BYREF
long long v46; // [rsp+68h] [rbp-40h]
long long v47; // [rsp+70h] [rbp-38h]
long long v48; // [rsp+78h] [rbp-30h]
long long v49; // [rsp+80h] [rbp-28h]
long long v50; // [rsp+88h] [rbp-20h]
long long v51; // [rsp+90h] [rbp-18h]
long long v52; // [rsp+98h] [rbp-10h]
long long v53; // [rsp+A0h] [rbp-8h]
v50 = a2;
v51 = a3;
v49 = a1;
v42 = (long long *)&v43;
v47 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v48 = v14;
if ( !JS_IsException_1(v47, v14) )
{
v46 = v47;
if ( (unsigned int)string_buffer_init(v49, (long long)v42, (*(_DWORD *)(v47 + 4) & 0x7FFFFFFFu) + 2)
|| (unsigned int)string_buffer_putc8((long long)v42, 0x22u, a7, a8, a9, a10, v19, v20, a13, a14, v15, v16, v17, v18) )
{
goto LABEL_31;
}
v45 = 0;
while ( 1 )
{
v26 = *(_QWORD *)(v46 + 4) & 0x7FFFFFFFLL;
if ( v45 >= (int)v26 )
{
if ( !(unsigned int)string_buffer_putc8(
(long long)v42,
0x22u,
a7,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v21,
v26,
v22,
v23) )
{
JS_FreeValue(v49, v47, v48);
v52 = string_buffer_end((long long)v42);
v53 = v39;
return v52;
}
LABEL_31:
JS_FreeValue(v49, v47, v48);
string_buffer_free(v42);
LODWORD(v52) = 0;
v53 = 6LL;
return v52;
}
v44 = string_getc(v46, &v45);
if ( v44 == 8 )
break;
switch ( v44 )
{
case 9u:
v44 = 116;
goto LABEL_20;
case 0xAu:
v44 = 110;
goto LABEL_20;
case 0xCu:
v44 = 102;
LABEL_20:
if ( (unsigned int)string_buffer_putc8(
(long long)v42,
0x5Cu,
a7,
a8,
a9,
a10,
v31,
v32,
a13,
a14,
v27,
v28,
v29,
v30)
|| (unsigned int)string_buffer_putc8(
(long long)v42,
v44,
a7,
a8,
a9,
a10,
v37,
v38,
a13,
a14,
v33,
v34,
v35,
v36) )
{
goto LABEL_31;
}
break;
case 0xDu:
v44 = 114;
goto LABEL_20;
case 0x22u:
case 0x5Cu:
goto LABEL_20;
default:
if ( v44 < 0x20 || is_surrogate(v44) )
{
snprintf(v41, 16LL, "\\u%04x", v44);
if ( (unsigned int)string_buffer_write8((long long)v42, (long long)v41, 6) )
goto LABEL_31;
}
else if ( (unsigned int)string_buffer_putc((long long)v42, v44) )
{
goto LABEL_31;
}
break;
}
}
v44 = 98;
goto LABEL_20;
}
v52 = v47;
v53 = v48;
return v52;
}
|
JS_ToQuotedString:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x80],RDI
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
CALL 0x00176ac0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0018e767
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x0018e996
LAB_0018e767:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EDX,EAX
ADD EDX,0x2
CALL 0x00156930
CMP EAX,0x0
JZ 0x0018e7a1
JMP 0x0018e95e
LAB_0018e7a1:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x22
CALL 0x0018a830
CMP EAX,0x0
JZ 0x0018e7ba
JMP 0x0018e95e
LAB_0018e7ba:
MOV dword ptr [RSP + 0x64],0x0
LAB_0018e7c2:
MOV EAX,dword ptr [RSP + 0x64]
MOV RCX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
CMP EAX,ECX
JGE 0x0018e915
MOV RDI,qword ptr [RSP + 0x68]
LEA RSI,[RSP + 0x64]
CALL 0x0018be50
MOV dword ptr [RSP + 0x60],EAX
MOV EAX,dword ptr [RSP + 0x60]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x8
JZ 0x0018e860
JMP 0x0018e800
LAB_0018e800:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x9
JZ 0x0018e842
JMP 0x0018e80b
LAB_0018e80b:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xa
JZ 0x0018e856
JMP 0x0018e816
LAB_0018e816:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xc
JZ 0x0018e86a
JMP 0x0018e821
LAB_0018e821:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xd
JZ 0x0018e84c
JMP 0x0018e82c
LAB_0018e82c:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x22
JZ 0x0018e874
JMP 0x0018e837
LAB_0018e837:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x5c
JZ 0x0018e874
JMP 0x0018e8a9
LAB_0018e842:
MOV dword ptr [RSP + 0x60],0x74
JMP 0x0018e876
LAB_0018e84c:
MOV dword ptr [RSP + 0x60],0x72
JMP 0x0018e876
LAB_0018e856:
MOV dword ptr [RSP + 0x60],0x6e
JMP 0x0018e876
LAB_0018e860:
MOV dword ptr [RSP + 0x60],0x62
JMP 0x0018e876
LAB_0018e86a:
MOV dword ptr [RSP + 0x60],0x66
JMP 0x0018e876
LAB_0018e874:
JMP 0x0018e876
LAB_0018e876:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x5c
CALL 0x0018a830
CMP EAX,0x0
JZ 0x0018e88f
JMP 0x0018e95e
LAB_0018e88f:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x60]
CALL 0x0018a830
CMP EAX,0x0
JZ 0x0018e8a7
JMP 0x0018e95e
LAB_0018e8a7:
JMP 0x0018e910
LAB_0018e8a9:
CMP dword ptr [RSP + 0x60],0x20
JC 0x0018e8be
MOV EDI,dword ptr [RSP + 0x60]
CALL 0x0018c3b0
CMP EAX,0x0
JZ 0x0018e8f7
LAB_0018e8be:
LEA RDI,[RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x60]
MOV ESI,0x10
LEA RDX,[0x214e82]
MOV AL,0x0
CALL 0x0010e2f0
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x20]
MOV EDX,0x6
CALL 0x00175e10
CMP EAX,0x0
JZ 0x0018e8f5
JMP 0x0018e95e
LAB_0018e8f5:
JMP 0x0018e90e
LAB_0018e8f7:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x60]
CALL 0x00153d70
CMP EAX,0x0
JZ 0x0018e90c
JMP 0x0018e95e
LAB_0018e90c:
JMP 0x0018e90e
LAB_0018e90e:
JMP 0x0018e910
LAB_0018e910:
JMP 0x0018e7c2
LAB_0018e915:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x22
CALL 0x0018a830
CMP EAX,0x0
JZ 0x0018e92b
JMP 0x0018e95e
LAB_0018e92b:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00153df0
MOV qword ptr [RSP + 0x98],RAX
MOV qword ptr [RSP + 0xa0],RDX
JMP 0x0018e996
LAB_0018e95e:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001587a0
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
LAB_0018e996:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16] JS_ToQuotedString(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int1 auVar2 [16];
char local_88 [24];
int1 *local_70;
int1 local_68 [32];
uint local_48;
int local_44;
long local_40;
int1 local_38 [16];
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_70 = local_68;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_38 = JS_ToStringCheckObject(param_1,param_2,param_3);
iVar1 = JS_IsException(local_38._0_8_,local_38._8_8_);
if (iVar1 == 0) {
local_40 = local_38._0_8_;
iVar1 = string_buffer_init(local_28,local_70,
((uint)*(int8 *)(local_38._0_8_ + 4) & 0x7fffffff) + 2);
if (iVar1 == 0) {
iVar1 = string_buffer_putc8(local_70,0x22);
if (iVar1 == 0) {
local_44 = 0;
do {
while( true ) {
if ((int)((uint)*(int8 *)(local_40 + 4) & 0x7fffffff) <= local_44) {
iVar1 = string_buffer_putc8(local_70,0x22);
if (iVar1 == 0) {
JS_FreeValue(local_28,local_38._0_8_,local_38._8_8_);
auVar2 = string_buffer_end(local_70);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
goto LAB_0018e996;
}
goto LAB_0018e95e;
}
local_48 = string_getc(local_40,&local_44);
if (local_48 != 8) break;
local_48 = 0x62;
LAB_0018e876:
iVar1 = string_buffer_putc8(local_70,0x5c);
if (iVar1 != 0) goto LAB_0018e95e;
iVar1 = string_buffer_putc8(local_70,local_48);
if (iVar1 != 0) goto LAB_0018e95e;
}
if (local_48 == 9) {
local_48 = 0x74;
goto LAB_0018e876;
}
if (local_48 == 10) {
local_48 = 0x6e;
goto LAB_0018e876;
}
if (local_48 == 0xc) {
local_48 = 0x66;
goto LAB_0018e876;
}
if (local_48 == 0xd) {
local_48 = 0x72;
goto LAB_0018e876;
}
if ((local_48 == 0x22) || (local_48 == 0x5c)) goto LAB_0018e876;
if (local_48 < 0x20) {
LAB_0018e8be:
snprintf(local_88,0x10,"\\u%04x",(ulong)local_48);
iVar1 = string_buffer_write8(local_70,local_88,6);
}
else {
iVar1 = is_surrogate(local_48);
if (iVar1 != 0) goto LAB_0018e8be;
iVar1 = string_buffer_putc(local_70,local_48);
}
} while (iVar1 == 0);
}
}
LAB_0018e95e:
JS_FreeValue(local_28,local_38._0_8_,local_38._8_8_);
string_buffer_free(local_70);
local_10 = 0;
local_8 = 6;
}
else {
local_10 = local_38._0_4_;
uStack_c = local_38._4_4_;
local_8 = local_38._8_8_;
}
LAB_0018e996:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
|
|
65,483 |
ma_check_index_cond
|
eloqsql/storage/maria/ma_key.c
|
check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr,
uchar *record)
{
check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (_ma_put_key_in_record(info, keynr, FALSE, record))
{
/* Impossible case; Can only happen if bug in code */
_ma_print_error(info, HA_ERR_CRASHED, 0);
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
res= CHECK_ERROR;
}
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
}
return res;
}
|
O0
|
c
|
ma_check_index_cond:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x6f8(%rax)
je 0x46704
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
callq 0x46010
cmpl $0x0, %eax
je 0x466c6
movq -0x8(%rbp), %rdi
movl $0x7e, %esi
xorl %edx, %edx
callq 0x42150
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
callq 0xfc1b0
movl $0x7e, (%rax)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0x46702
movq -0x8(%rbp), %rax
movq 0x6f8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x700(%rcx), %rdi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x2, %eax
jne 0x46700
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
callq 0xfc1b0
movl $0x89, (%rax)
jmp 0x46702
jmp 0x46704
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
ma_check_index_cond:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 1
mov rax, [rbp+var_8]
cmp qword ptr [rax+6F8h], 0
jz loc_46704
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rcx, [rbp+var_18]
xor edx, edx
call _ma_put_key_in_record
cmp eax, 0
jz short loc_466C6
mov rdi, [rbp+var_8]
mov esi, 7Eh ; '~'
xor edx, edx
call _ma_print_error
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_1C], 0FFFFFFFFh
jmp short loc_46702
loc_466C6:
mov rax, [rbp+var_8]
mov rax, [rax+6F8h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+700h]
call rax
mov [rbp+var_1C], eax
cmp eax, 2
jnz short loc_46700
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 89h
loc_46700:
jmp short $+2
loc_46702:
jmp short $+2
loc_46704:
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
|
long long ma_check_index_cond(long long a1, unsigned int a2, long long a3)
{
long long v3; // rcx
long long v4; // r8
int v5; // r9d
unsigned int v7; // [rsp+4h] [rbp-1Ch]
v7 = 1;
if ( *(_QWORD *)(a1 + 1784) )
{
if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) )
{
ma_print_error((_DWORD *)a1, 126, 0, v3, v4, v5);
*(_QWORD *)(a1 + 152) = -1LL;
*(_DWORD *)my_thread_var() = 126;
return (unsigned int)-1;
}
else
{
v7 = (*(long long ( **)(_QWORD))(a1 + 1784))(*(_QWORD *)(a1 + 1792));
if ( v7 == 2 )
{
*(_QWORD *)(a1 + 152) = -1LL;
*(_DWORD *)my_thread_var() = 137;
}
}
}
return v7;
}
|
ma_check_index_cond:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x6f8],0x0
JZ 0x00146704
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
CALL 0x00146010
CMP EAX,0x0
JZ 0x001466c6
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x7e
XOR EDX,EDX
CALL 0x00142150
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
CALL 0x001fc1b0
MOV dword ptr [RAX],0x7e
MOV dword ptr [RBP + -0x1c],0xffffffff
JMP 0x00146702
LAB_001466c6:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x6f8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x700]
CALL RAX
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x2
JNZ 0x00146700
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
CALL 0x001fc1b0
MOV dword ptr [RAX],0x89
LAB_00146700:
JMP 0x00146702
LAB_00146702:
JMP 0x00146704
LAB_00146704:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int ma_check_index_cond(long param_1,int4 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int4 local_24;
local_24 = 1;
if (*(long *)(param_1 + 0x6f8) != 0) {
iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3);
if (iVar1 == 0) {
local_24 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700));
if (local_24 == 2) {
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x89;
}
}
else {
_ma_print_error(param_1,0x7e,0);
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_24 = -1;
}
}
return local_24;
}
|
|
65,484 |
ma_check_index_cond
|
eloqsql/storage/maria/ma_key.c
|
check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr,
uchar *record)
{
check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (_ma_put_key_in_record(info, keynr, FALSE, record))
{
/* Impossible case; Can only happen if bug in code */
_ma_print_error(info, HA_ERR_CRASHED, 0);
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
res= CHECK_ERROR;
}
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
}
return res;
}
|
O3
|
c
|
ma_check_index_cond:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x6f8(%rdi)
je 0x42b31
movq %rdx, %rcx
movq %rdi, %rbx
xorl %edx, %edx
callq 0x426f1
testl %eax, %eax
je 0x42b39
movl $0x7e, %r15d
movq %rbx, %rdi
movl $0x7e, %esi
xorl %edx, %edx
callq 0x4050e
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x42b5a
movl $0x1, %r14d
jmp 0x42b6d
movq 0x700(%rbx), %rdi
callq *0x6f8(%rbx)
movl %eax, %r14d
cmpl $0x2, %eax
jne 0x42b6d
movl $0x2, %r14d
movl $0x89, %r15d
movq $-0x1, 0x98(%rbx)
callq 0xa63fe
movl %r15d, (%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
ma_check_index_cond:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp qword ptr [rdi+6F8h], 0
jz short loc_42B31
mov rcx, rdx
mov rbx, rdi
xor edx, edx
call _ma_put_key_in_record
test eax, eax
jz short loc_42B39
mov r15d, 7Eh ; '~'
mov rdi, rbx
mov esi, 7Eh ; '~'
xor edx, edx
call _ma_print_error
mov r14d, 0FFFFFFFFh
jmp short loc_42B5A
loc_42B31:
mov r14d, 1
jmp short loc_42B6D
loc_42B39:
mov rdi, [rbx+700h]
call qword ptr [rbx+6F8h]
mov r14d, eax
cmp eax, 2
jnz short loc_42B6D
mov r14d, 2
mov r15d, 89h
loc_42B5A:
mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov [rax], r15d
loc_42B6D:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ma_check_index_cond(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
int v7; // r15d
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
unsigned int v11; // r14d
if ( *(_QWORD *)(a1 + 1784) )
{
v3 = a1;
if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) )
{
v7 = 126;
a2 = 126LL;
ma_print_error((_DWORD *)a1, 126, 0, v4, v5, v6);
v11 = -1;
LABEL_7:
*(_QWORD *)(v3 + 152) = -1LL;
*(_DWORD *)my_thread_var(a1, a2, v8, v9, v10) = v7;
return v11;
}
a1 = *(_QWORD *)(a1 + 1792);
v11 = (*(long long ( **)(long long))(v3 + 1784))(a1);
if ( v11 == 2 )
{
v11 = 2;
v7 = 137;
goto LABEL_7;
}
}
else
{
return 1;
}
return v11;
}
|
ma_check_index_cond:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP qword ptr [RDI + 0x6f8],0x0
JZ 0x00142b31
MOV RCX,RDX
MOV RBX,RDI
XOR EDX,EDX
CALL 0x001426f1
TEST EAX,EAX
JZ 0x00142b39
MOV R15D,0x7e
MOV RDI,RBX
MOV ESI,0x7e
XOR EDX,EDX
CALL 0x0014050e
MOV R14D,0xffffffff
JMP 0x00142b5a
LAB_00142b31:
MOV R14D,0x1
JMP 0x00142b6d
LAB_00142b39:
MOV RDI,qword ptr [RBX + 0x700]
CALL qword ptr [RBX + 0x6f8]
MOV R14D,EAX
CMP EAX,0x2
JNZ 0x00142b6d
MOV R14D,0x2
MOV R15D,0x89
LAB_00142b5a:
MOV qword ptr [RBX + 0x98],-0x1
CALL 0x001a63fe
MOV dword ptr [RAX],R15D
LAB_00142b6d:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int ma_check_index_cond(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int4 uVar3;
if (*(long *)(param_1 + 0x6f8) == 0) {
iVar1 = 1;
}
else {
iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3);
if (iVar1 == 0) {
iVar1 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700));
if (iVar1 != 2) {
return iVar1;
}
iVar1 = 2;
uVar3 = 0x89;
}
else {
uVar3 = 0x7e;
_ma_print_error(param_1,0x7e,0);
iVar1 = -1;
}
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = uVar3;
}
return iVar1;
}
|
|
65,485 |
PFS_buffer_scalable_container<PFS_setup_actor, 128, 1024, PFS_buffer_default_array<PFS_setup_actor>, PFS_buffer_default_allocator<PFS_setup_actor>>::deallocate(PFS_setup_actor*)
|
eloqsql/storage/perfschema/pfs_buffer_container.h
|
void deallocate(value_type *safe_pfs)
{
/* Find the containing page */
PFS_opaque_container_page *opaque_page= safe_pfs->m_page;
array_type *page= reinterpret_cast<array_type *> (opaque_page);
/* Mark the object free */
safe_pfs->m_lock.allocated_to_free();
/* Flag the containing page as not full. */
page->m_full= false;
/* Flag the overall container as not full. */
m_full= false;
}
|
O0
|
c
|
PFS_buffer_scalable_container<PFS_setup_actor, 128, 1024, PFS_buffer_default_array<PFS_setup_actor>, PFS_buffer_default_allocator<PFS_setup_actor>>::deallocate(PFS_setup_actor*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x300(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2d8b0
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movb $0x0, (%rcx)
movb $0x0, 0x9(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN29PFS_buffer_scalable_containerI15PFS_setup_actorLi128ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE10deallocateEPS0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+300h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]; this
call _ZN8pfs_lock17allocated_to_freeEv; pfs_lock::allocated_to_free(void)
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
mov byte ptr [rcx], 0
mov byte ptr [rax+9], 0
add rsp, 30h
pop rbp
retn
|
long long PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>>::deallocate(
long long a1,
pfs_lock *a2)
{
long long result; // rax
_BYTE *v3; // [rsp+10h] [rbp-20h]
v3 = (_BYTE *)*((_QWORD *)a2 + 96);
pfs_lock::allocated_to_free(a2);
result = a1;
*v3 = 0;
*(_BYTE *)(a1 + 9) = 0;
return result;
}
|
deallocate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x300]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012d8b0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RCX],0x0
MOV byte ptr [RAX + 0x9],0x0
ADD RSP,0x30
POP RBP
RET
|
/* PFS_buffer_scalable_container<PFS_setup_actor, 128, 1024,
PFS_buffer_default_array<PFS_setup_actor>, PFS_buffer_default_allocator<PFS_setup_actor>
>::deallocate(PFS_setup_actor*) */
void __thiscall
PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>>
::deallocate(PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>>
*this,PFS_setup_actor *param_1)
{
int1 *puVar1;
puVar1 = *(int1 **)(param_1 + 0x300);
pfs_lock::allocated_to_free((pfs_lock *)param_1);
*puVar1 = 0;
this[9] = (PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>>
)0x0;
return;
}
|
|
65,486 |
ethash_keccak256
|
corpus-core[P]colibri-stateless/build_O0/_deps/ethhash_external-src/lib/keccak/keccak.c
|
union ethash_hash256 ethash_keccak256(const uint8_t* data, size_t size)
{
union ethash_hash256 hash;
keccak(hash.word64s, 256, data, size);
return hash;
}
|
O0
|
c
|
ethash_keccak256:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movq %rdi, %rax
movq %rax, -0x158(%rbp)
movq %rsi, -0x148(%rbp)
movq %rdx, -0x150(%rbp)
movq -0x148(%rbp), %rcx
movq -0x150(%rbp), %rax
movq %rdi, -0x28(%rbp)
movq $0x100, -0x30(%rbp) # imm = 0x100
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rcx
shlq %rcx
movl $0x640, %eax # imm = 0x640
subq %rcx, %rax
shrq $0x3, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x68(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x140(%rbp), %rdi
xorl %esi, %esi
movl $0xc8, %edx
callq 0x23140
movq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
jb 0x99334
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
shrq $0x3, %rcx
cmpq %rcx, %rax
jae 0x99313
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x58(%rbp), %rax
xorq -0x140(%rbp,%rax,8), %rcx
movq %rcx, -0x140(%rbp,%rax,8)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x992bd
leaq -0x140(%rbp), %rdi
callq *0x9e0c8(%rip) # 0x1373e8
movq -0x50(%rbp), %rcx
movq -0x40(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x992ab
leaq -0x140(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x8, -0x40(%rbp)
jb 0x9938d
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x60(%rbp), %rax
xorq (%rax), %rcx
movq %rcx, (%rax)
movq -0x60(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
subq $0x8, %rax
movq %rax, -0x40(%rbp)
jmp 0x9933f
jmp 0x9938f
cmpq $0x0, -0x40(%rbp)
jbe 0x993c8
movq -0x38(%rbp), %rax
movb (%rax), %cl
movq -0x70(%rbp), %rax
movb %cl, (%rax)
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x9938f
movq -0x70(%rbp), %rax
movb $0x1, (%rax)
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rax
xorq (%rax), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
shrq $0x3, %rax
subq $0x1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq -0x140(%rbp,%rax,8), %rcx
movq %rcx, -0x140(%rbp,%rax,8)
leaq -0x140(%rbp), %rdi
callq *0x9dfd8(%rip) # 0x1373e8
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
shrq $0x3, %rcx
cmpq %rcx, %rax
jae 0x9944f
movq -0x58(%rbp), %rax
movq -0x140(%rbp,%rax,8), %rdx
movq -0x28(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x99418
movq -0x158(%rbp), %rax
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
nop
|
ethash_keccak256:
push rbp
mov rbp, rsp
sub rsp, 160h
mov rax, rdi
mov [rbp+var_158], rax
mov [rbp+var_148], rsi
mov [rbp+var_150], rdx
mov rcx, [rbp+var_148]
mov rax, [rbp+var_150]
mov [rbp+var_28], rdi
mov [rbp+var_30], 100h
mov [rbp+var_38], rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
shr rax, 3
mov [rbp+var_48], rax
mov rcx, [rbp+var_30]
shl rcx, 1
mov eax, 640h
sub rax, rcx
shr rax, 3
mov [rbp+var_50], rax
mov [rbp+var_68], 0
lea rax, [rbp+var_68]
mov [rbp+var_70], rax
lea rdi, [rbp+var_140]
xor esi, esi
mov edx, 0C8h
call _memset
loc_992AB:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_50]
jb short loc_99334
mov [rbp+var_58], 0
loc_992BD:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
shr rcx, 3
cmp rax, rcx
jnb short loc_99313
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
mov rax, [rbp+var_58]
xor rcx, [rbp+rax*8+var_140]
mov [rbp+rax*8+var_140], rcx
mov rax, [rbp+var_38]
add rax, 8
mov [rbp+var_38], rax
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_58], rax
jmp short loc_992BD
loc_99313:
lea rdi, [rbp+var_140]
call cs:keccakf1600_best
mov rcx, [rbp+var_50]
mov rax, [rbp+var_40]
sub rax, rcx
mov [rbp+var_40], rax
jmp loc_992AB
loc_99334:
lea rax, [rbp+var_140]
mov [rbp+var_60], rax
loc_9933F:
cmp [rbp+var_40], 8
jb short loc_9938D
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rcx, [rbp+var_10]
mov rax, [rbp+var_60]
xor rcx, [rax]
mov [rax], rcx
mov rax, [rbp+var_60]
add rax, 8
mov [rbp+var_60], rax
mov rax, [rbp+var_38]
add rax, 8
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
sub rax, 8
mov [rbp+var_40], rax
jmp short loc_9933F
loc_9938D:
jmp short $+2
loc_9938F:
cmp [rbp+var_40], 0
jbe short loc_993C8
mov rax, [rbp+var_38]
mov cl, [rax]
mov rax, [rbp+var_70]
mov [rax], cl
mov rax, [rbp+var_70]
add rax, 1
mov [rbp+var_70], rax
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_9938F
loc_993C8:
mov rax, [rbp+var_70]
mov byte ptr [rax], 1
mov rcx, [rbp+var_68]
mov rax, [rbp+var_60]
xor rcx, [rax]
mov [rax], rcx
mov rax, [rbp+var_50]
shr rax, 3
sub rax, 1
mov rcx, 8000000000000000h
xor rcx, [rbp+rax*8+var_140]
mov [rbp+rax*8+var_140], rcx
lea rdi, [rbp+var_140]
call cs:keccakf1600_best
mov [rbp+var_58], 0
loc_99418:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
shr rcx, 3
cmp rax, rcx
jnb short loc_9944F
mov rax, [rbp+var_58]
mov rdx, [rbp+rax*8+var_140]
mov rax, [rbp+var_28]
mov rcx, [rbp+var_58]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_58], rax
jmp short loc_99418
loc_9944F:
mov rax, [rbp+var_158]
add rsp, 160h
pop rbp
retn
|
long long ethash_keccak256(long long a1, char *a2, unsigned long long a3)
{
_QWORD v4[26]; // [rsp+20h] [rbp-140h] BYREF
char *v5; // [rsp+F0h] [rbp-70h]
long long v6; // [rsp+F8h] [rbp-68h] BYREF
_QWORD *v7; // [rsp+100h] [rbp-60h]
unsigned long long i; // [rsp+108h] [rbp-58h]
unsigned long long v9; // [rsp+110h] [rbp-50h]
unsigned long long v10; // [rsp+118h] [rbp-48h]
unsigned long long v11; // [rsp+120h] [rbp-40h]
char *v12; // [rsp+128h] [rbp-38h]
long long v13; // [rsp+130h] [rbp-30h]
long long v14; // [rsp+138h] [rbp-28h]
long long v15; // [rsp+140h] [rbp-20h]
char *v16; // [rsp+148h] [rbp-18h]
long long v17; // [rsp+150h] [rbp-10h]
char *v18; // [rsp+158h] [rbp-8h]
v14 = a1;
v13 = 256LL;
v12 = a2;
v11 = a3;
v10 = 32LL;
v9 = 136LL;
v6 = 0LL;
v5 = (char *)&v6;
memset(v4, 0LL, 200LL);
while ( v11 >= v9 )
{
for ( i = 0LL; i < v9 >> 3; ++i )
{
v16 = v12;
v15 = *(_QWORD *)v12;
v4[i] ^= v15;
v12 += 8;
}
keccakf1600_best();
v11 -= v9;
}
v7 = v4;
while ( v11 >= 8 )
{
v18 = v12;
v17 = *(_QWORD *)v12;
*v7++ ^= v17;
v12 += 8;
v11 -= 8LL;
}
qmemcpy(v5, v12, v11);
v12 += v11;
v5 += v11;
v11 = 0LL;
*v5 = 1;
*v7 ^= v6;
v4[(v9 >> 3) - 1] ^= 0x8000000000000000LL;
keccakf1600_best();
for ( i = 0LL; i < v10 >> 3; ++i )
*(_QWORD *)(v14 + 8 * i) = v4[i];
return a1;
}
|
ethash_keccak256:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV RAX,RDI
MOV qword ptr [RBP + -0x158],RAX
MOV qword ptr [RBP + -0x148],RSI
MOV qword ptr [RBP + -0x150],RDX
MOV RCX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],0x100
MOV qword ptr [RBP + -0x38],RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x3
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x30]
SHL RCX,0x1
MOV EAX,0x640
SUB RAX,RCX
SHR RAX,0x3
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x68],0x0
LEA RAX,[RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x140]
XOR ESI,ESI
MOV EDX,0xc8
CALL 0x00123140
LAB_001992ab:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x50]
JC 0x00199334
MOV qword ptr [RBP + -0x58],0x0
LAB_001992bd:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SHR RCX,0x3
CMP RAX,RCX
JNC 0x00199313
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x58]
XOR RCX,qword ptr [RBP + RAX*0x8 + -0x140]
MOV qword ptr [RBP + RAX*0x8 + -0x140],RCX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x8
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001992bd
LAB_00199313:
LEA RDI,[RBP + -0x140]
CALL qword ptr [0x002373e8]
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001992ab
LAB_00199334:
LEA RAX,[RBP + -0x140]
MOV qword ptr [RBP + -0x60],RAX
LAB_0019933f:
CMP qword ptr [RBP + -0x40],0x8
JC 0x0019938d
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x60]
XOR RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x8
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x8
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,0x8
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0019933f
LAB_0019938d:
JMP 0x0019938f
LAB_0019938f:
CMP qword ptr [RBP + -0x40],0x0
JBE 0x001993c8
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x70]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x1
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0019938f
LAB_001993c8:
MOV RAX,qword ptr [RBP + -0x70]
MOV byte ptr [RAX],0x1
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x60]
XOR RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x3
SUB RAX,0x1
MOV RCX,-0x8000000000000000
XOR RCX,qword ptr [RBP + RAX*0x8 + -0x140]
MOV qword ptr [RBP + RAX*0x8 + -0x140],RCX
LEA RDI,[RBP + -0x140]
CALL qword ptr [0x002373e8]
MOV qword ptr [RBP + -0x58],0x0
LAB_00199418:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
SHR RCX,0x3
CMP RAX,RCX
JNC 0x0019944f
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x140]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00199418
LAB_0019944f:
MOV RAX,qword ptr [RBP + -0x158]
ADD RSP,0x160
POP RBP
RET
|
long ethash_keccak256(long param_1,ulong *param_2,ulong param_3)
{
long lVar1;
ulong local_148 [26];
ulong *local_78;
ulong local_70;
ulong *local_68;
ulong local_60;
ulong local_58;
ulong local_50;
ulong local_48;
ulong *local_40;
int8 local_38;
long local_30;
ulong local_28;
ulong *local_20;
ulong local_18;
ulong *local_10;
local_38 = 0x100;
local_50 = 0x20;
local_58 = 0x88;
local_70 = 0;
local_78 = &local_70;
local_48 = param_3;
local_40 = param_2;
local_30 = param_1;
memset(local_148,0,200);
for (; local_58 <= local_48; local_48 = local_48 - local_58) {
for (local_60 = 0; local_60 < local_58 >> 3; local_60 = local_60 + 1) {
local_20 = local_40;
local_28 = *local_40;
local_148[local_60] = *local_40 ^ local_148[local_60];
local_40 = local_40 + 1;
}
(*(code *)keccakf1600_best)(local_148);
}
local_68 = local_148;
for (; 7 < local_48; local_48 = local_48 - 8) {
local_10 = local_40;
local_18 = *local_40;
*local_68 = *local_40 ^ *local_68;
local_68 = local_68 + 1;
local_40 = local_40 + 1;
}
for (; local_48 != 0; local_48 = local_48 - 1) {
*(char *)local_78 = (char)*local_40;
local_78 = (ulong *)((long)local_78 + 1);
local_40 = (ulong *)((long)local_40 + 1);
}
*(int1 *)local_78 = 1;
*local_68 = local_70 ^ *local_68;
lVar1 = (local_58 >> 3) - 1;
local_148[lVar1] = local_148[lVar1] ^ 0x8000000000000000;
(*(code *)keccakf1600_best)(local_148);
for (local_60 = 0; local_60 < local_50 >> 3; local_60 = local_60 + 1) {
*(ulong *)(local_30 + local_60 * 8) = local_148[local_60];
}
return param_1;
}
|
|
65,487 |
asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock, asio::wait_traits<std::chrono::_V2::system_clock>>>::up_heap(unsigned long)
|
aimrt_mujoco_sim/_deps/asio-src/asio/include/asio/detail/timer_queue.hpp
|
void up_heap(std::size_t index)
{
while (index > 0)
{
std::size_t parent = (index - 1) / 2;
if (!Time_Traits::less_than(heap_[index].time_, heap_[parent].time_))
break;
swap_heap(index, parent);
index = parent;
}
}
|
O3
|
cpp
|
asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock, asio::wait_traits<std::chrono::_V2::system_clock>>>::up_heap(unsigned long):
testq %rsi, %rsi
je 0xf4b13
movq 0x18(%rdi), %rax
leaq -0x1(%rsi), %rcx
movq %rcx, %rdx
shrq %rdx
movq %rsi, %r8
shlq $0x4, %r8
movq %rdx, %r9
shlq $0x4, %r9
movq (%rax,%r8), %r10
cmpq (%rax,%r9), %r10
jge 0xf4b13
leaq (%rax,%r8), %r10
addq %r9, %rax
movups (%r10), %xmm0
movaps %xmm0, -0x18(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%r10)
movq 0x18(%rdi), %rax
movaps -0x18(%rsp), %xmm0
movups %xmm0, (%rax,%r9)
movq 0x18(%rdi), %rax
movq 0x8(%rax,%r8), %r8
movq %rsi, 0x10(%r8)
movq 0x8(%rax,%r9), %rsi
movq %rdx, 0x10(%rsi)
movq %rdx, %rsi
cmpq $0x1, %rcx
ja 0xf4aad
retq
|
_ZN4asio6detail11timer_queueINS0_18chrono_time_traitsINSt6chrono3_V212system_clockENS_11wait_traitsIS5_EEEEE7up_heapEm:
test rsi, rsi
jz short locret_F4B13
mov rax, [rdi+18h]
loc_F4AAD:
lea rcx, [rsi-1]
mov rdx, rcx
shr rdx, 1
mov r8, rsi
shl r8, 4
mov r9, rdx
shl r9, 4
mov r10, [rax+r8]
cmp r10, [rax+r9]
jge short locret_F4B13
lea r10, [rax+r8]
add rax, r9
movups xmm0, xmmword ptr [r10]
movaps [rsp+var_18], xmm0
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [r10], xmm0
mov rax, [rdi+18h]
movaps xmm0, [rsp+var_18]
movups xmmword ptr [rax+r9], xmm0
mov rax, [rdi+18h]
mov r8, [rax+r8+8]
mov [r8+10h], rsi
mov rsi, [rax+r9+8]
mov [rsi+10h], rdx
mov rsi, rdx
cmp rcx, 1
ja short loc_F4AAD
locret_F4B13:
retn
|
void asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>>::up_heap(
long long a1,
unsigned long long a2)
{
long long v2; // rax
unsigned long long v3; // rcx
unsigned long long v4; // r9
__int128 v5; // [rsp+0h] [rbp-18h]
if ( a2 )
{
v2 = *(_QWORD *)(a1 + 24);
do
{
v3 = a2 - 1;
v4 = 16 * ((a2 - 1) >> 1);
if ( *(_QWORD *)(v2 + 16 * a2) >= *(_QWORD *)(v2 + v4) )
break;
v5 = *(_OWORD *)(v2 + 16 * a2);
*(_OWORD *)(v2 + 16 * a2) = *(_OWORD *)(v4 + v2);
*(_OWORD *)(*(_QWORD *)(a1 + 24) + v4) = v5;
v2 = *(_QWORD *)(a1 + 24);
*(_QWORD *)(*(_QWORD *)(v2 + 16 * a2 + 8) + 16LL) = a2;
*(_QWORD *)(*(_QWORD *)(v2 + v4 + 8) + 16LL) = (a2 - 1) >> 1;
a2 = (a2 - 1) >> 1;
}
while ( v3 > 1 );
}
}
|
up_heap:
TEST RSI,RSI
JZ 0x001f4b13
MOV RAX,qword ptr [RDI + 0x18]
LAB_001f4aad:
LEA RCX,[RSI + -0x1]
MOV RDX,RCX
SHR RDX,0x1
MOV R8,RSI
SHL R8,0x4
MOV R9,RDX
SHL R9,0x4
MOV R10,qword ptr [RAX + R8*0x1]
CMP R10,qword ptr [RAX + R9*0x1]
JGE 0x001f4b13
LEA R10,[RAX + R8*0x1]
ADD RAX,R9
MOVUPS XMM0,xmmword ptr [R10]
MOVAPS xmmword ptr [RSP + -0x18],XMM0
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [R10],XMM0
MOV RAX,qword ptr [RDI + 0x18]
MOVAPS XMM0,xmmword ptr [RSP + -0x18]
MOVUPS xmmword ptr [RAX + R9*0x1],XMM0
MOV RAX,qword ptr [RDI + 0x18]
MOV R8,qword ptr [RAX + R8*0x1 + 0x8]
MOV qword ptr [R8 + 0x10],RSI
MOV RSI,qword ptr [RAX + R9*0x1 + 0x8]
MOV qword ptr [RSI + 0x10],RDX
MOV RSI,RDX
CMP RCX,0x1
JA 0x001f4aad
LAB_001f4b13:
RET
|
/* asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,
asio::wait_traits<std::chrono::_V2::system_clock> > >::up_heap(unsigned long) */
void __thiscall
asio::detail::
timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>>
::up_heap(timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>>
*this,ulong param_1)
{
ulong uVar1;
int8 *puVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
long lVar6;
ulong uVar7;
long lVar8;
long lVar9;
if (param_1 != 0) {
lVar6 = *(long *)(this + 0x18);
do {
uVar1 = param_1 - 1;
uVar7 = uVar1 >> 1;
lVar8 = param_1 * 0x10;
lVar9 = uVar7 * 0x10;
if (*(long *)(lVar6 + lVar9) <= *(long *)(lVar6 + lVar8)) {
return;
}
puVar2 = (int8 *)(lVar6 + lVar8);
uVar3 = *puVar2;
uVar4 = puVar2[1];
uVar5 = ((int8 *)(lVar6 + lVar9))[1];
*puVar2 = *(int8 *)(lVar6 + lVar9);
puVar2[1] = uVar5;
lVar6 = *(long *)(this + 0x18);
*(int8 *)(lVar6 + lVar9) = uVar3;
((int8 *)(lVar6 + lVar9))[1] = uVar4;
lVar6 = *(long *)(this + 0x18);
*(ulong *)(*(long *)(lVar6 + 8 + lVar8) + 0x10) = param_1;
*(ulong *)(*(long *)(lVar6 + 8 + lVar9) + 0x10) = uVar7;
param_1 = uVar7;
} while (1 < uVar1);
}
return;
}
|
|
65,488 |
ggml_numa_init
|
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
|
void ggml_numa_init(enum ggml_numa_strategy numa_flag) {
if (g_state.numa.n_nodes > 0) {
fprintf(stderr, "ggml_numa_init: NUMA already initialized\n");
return;
}
#if defined(__gnu_linux__)
struct stat st;
char path[256];
int rv;
// set numa scheme
g_state.numa.numa_strategy = numa_flag;
GGML_PRINT_DEBUG("numa strategy %u\n",g_state.numa.numa_strategy);
g_state.numa.cpuset = ggml_get_numa_affinity();
// enumerate nodes
while (g_state.numa.n_nodes < GGML_NUMA_MAX_NODES) {
rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u", g_state.numa.n_nodes);
GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path));
if (stat(path, &st) != 0) { break; }
++g_state.numa.n_nodes;
}
// enumerate CPUs
while (g_state.numa.total_cpus < GGML_NUMA_MAX_CPUS) {
rv = snprintf(path, sizeof(path), "/sys/devices/system/cpu/cpu%u", g_state.numa.total_cpus);
GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path));
if (stat(path, &st) != 0) { break; }
++g_state.numa.total_cpus;
}
GGML_PRINT_DEBUG("found %u numa nodes, %u CPUs\n", g_state.numa.n_nodes, g_state.numa.total_cpus);
// figure out which node we're on
uint current_cpu;
int getcpu_ret = 0;
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 33) || defined(__COSMOPOLITAN__)
getcpu_ret = getcpu(¤t_cpu, &g_state.numa.current_node);
#else
// old glibc doesn't have a wrapper for this call. Fall back on direct syscall
# if !defined(SYS_getcpu) && defined(SYS_get_cpu)
# define SYS_getcpu SYS_get_cpu // some older glibc versions use this name
# endif
getcpu_ret = syscall(SYS_getcpu, ¤t_cpu, &g_state.numa.current_node);
#endif
if (g_state.numa.n_nodes < 1 || g_state.numa.total_cpus < 1 || getcpu_ret != 0) {
g_state.numa.n_nodes = 0;
return;
}
GGML_PRINT_DEBUG("found our process on numa node %u, CPU %u\n", g_state.numa.current_node, current_cpu);
for (uint32_t n = 0; n < g_state.numa.n_nodes; ++n) {
struct ggml_numa_node * node = &g_state.numa.nodes[n];
GGML_PRINT_DEBUG("CPUs on node %u:", n);
node->n_cpus = 0;
for (uint32_t c = 0; c < g_state.numa.total_cpus; ++c) {
rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u/cpu%u", n, c);
GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path));
if (stat(path, &st) == 0) {
node->cpus[node->n_cpus++] = c;
GGML_PRINT_DEBUG(" %u", c);
}
}
GGML_PRINT_DEBUG("\n");
}
if (ggml_is_numa()) {
FILE *fptr = fopen("/proc/sys/kernel/numa_balancing", "r");
if (fptr != NULL) {
char buf[42];
if (fgets(buf, sizeof(buf), fptr) && strncmp(buf, "0\n", sizeof(buf)) != 0) {
GGML_LOG_WARN("/proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance\n");
}
fclose(fptr);
}
}
#else
UNUSED(numa_flag);
// TODO
#endif
}
|
O2
|
c
|
ggml_numa_init:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp # imm = 0x1D8
cmpl $0x0, 0x54889(%rip) # 0x5d734
jne 0x913d
movl %edi, 0x50859(%rip) # 0x59710
callq 0x8580
vxorps %xmm0, %xmm0, %xmm0
leaq 0xd0(%rsp), %rbx
vmovups %ymm0, (%rbx)
vmovups %ymm0, 0x20(%rbx)
vmovups %ymm0, 0x40(%rbx)
vmovups %ymm0, 0x60(%rbx)
movl $0x80, %esi
movq %rax, %rdi
movq %rbx, %rdx
vzeroupper
callq 0x8b20
vmovups (%rbx), %ymm0
vmovups 0x20(%rbx), %ymm1
vmovups 0x40(%rbx), %ymm2
vmovups 0x60(%rbx), %ymm3
vmovups %ymm0, 0x54837(%rip) # 0x5d740
vmovups %ymm1, 0x5484f(%rip) # 0x5d760
vmovups %ymm2, 0x54867(%rip) # 0x5d780
vmovups %ymm3, 0x5487f(%rip) # 0x5d7a0
movl 0x5480d(%rip), %ecx # 0x5d734
leaq 0x3d80c(%rip), %r14 # 0x4673a
leaq 0x40(%rsp), %r15
cmpl $0x7, %ecx
ja 0x8f79
movl $0x100, %esi # imm = 0x100
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
vzeroupper
callq 0x89b0
decl %eax
cmpl $0xff, %eax
jae 0x918b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x85a0
testl %eax, %eax
jne 0x8f79
movl 0x547c5(%rip), %ecx # 0x5d734
incl %ecx
movl %ecx, 0x547bd(%rip) # 0x5d734
jmp 0x8f33
movl 0x547b9(%rip), %ecx # 0x5d738
leaq 0x3d868(%rip), %rbx # 0x467ee
leaq 0xd0(%rsp), %r14
leaq 0x40(%rsp), %r15
cmpl $0x1ff, %ecx # imm = 0x1FF
ja 0x8fdc
movl $0x100, %esi # imm = 0x100
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
vzeroupper
callq 0x89b0
decl %eax
cmpl $0xff, %eax
jae 0x91a7
movq %r14, %rdi
movq %r15, %rsi
callq 0x85a0
testl %eax, %eax
jne 0x8fdc
movl 0x54766(%rip), %ecx # 0x5d738
incl %ecx
movl %ecx, 0x5475e(%rip) # 0x5d738
jmp 0x8f93
leaq 0x54759(%rip), %rsi # 0x5d73c
leaq 0xc(%rsp), %rdi
vzeroupper
callq 0x8430
movl 0x5473e(%rip), %edx # 0x5d734
testl %edx, %edx
je 0x90bc
movl 0x54734(%rip), %ecx # 0x5d738
testl %ecx, %ecx
je 0x90bc
testl %eax, %eax
jne 0x90bc
leaq 0x3d7f1(%rip), %rbx # 0x4680c
leaq 0xd0(%rsp), %r14
leaq 0x40(%rsp), %r15
xorl %r12d, %r12d
movl %edx, %eax
cmpq %rax, %r12
jae 0x90c5
imulq $0x804, %r12, %rax # imm = 0x804
leaq 0x506cc(%rip), %rdx # 0x59710
leaq (%rax,%rdx), %r13
addq $0x4, %r13
andl $0x0, 0x800(%r13)
xorl %ebp, %ebp
cmpl %ecx, %ebp
jae 0x90ae
movl $0x100, %esi # imm = 0x100
movq %r14, %rdi
movq %rbx, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x89b0
decl %eax
cmpl $0xff, %eax
jae 0x916a
movq %r14, %rdi
movq %r15, %rsi
callq 0x85a0
testl %eax, %eax
jne 0x90a4
movl 0x800(%r13), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x800(%r13)
movl %ebp, (%r13,%rax,4)
incl %ebp
movl 0x5468c(%rip), %ecx # 0x5d738
jmp 0x9056
incq %r12
movl 0x5467d(%rip), %edx # 0x5d734
jmp 0x902b
andl $0x0, 0x54671(%rip) # 0x5d734
jmp 0x912b
cmpl $0x1, %edx
jbe 0x912b
leaq 0x3d761(%rip), %rdi # 0x46832
leaq 0x3e558(%rip), %rsi # 0x47630
callq 0x8760
testq %rax, %rax
je 0x912b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
pushq $0x2a
popq %rsi
movq %rax, %rdx
callq 0x8950
testq %rax, %rax
je 0x9123
leaq 0x3d751(%rip), %rsi # 0x46852
leaq 0x10(%rsp), %rdi
pushq $0x3
popq %rdx
callq 0x8690
testl %eax, %eax
je 0x9123
leaq 0x3d73c(%rip), %rsi # 0x46855
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x82e0
movq %rbx, %rdi
callq 0x8640
addq $0x1d8, %rsp # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4fe7c(%rip), %rax # 0x58fc0
movq (%rax), %rcx
leaq 0x3d5c2(%rip), %rdi # 0x46710
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
addq $0x1d8, %rsp # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8c70
leaq 0x3d5e9(%rip), %rdi # 0x4675a
leaq 0x3d639(%rip), %rdx # 0x467b1
leaq 0x3d649(%rip), %rcx # 0x467c8
movl $0x92f, %esi # imm = 0x92F
xorl %eax, %eax
callq 0x8a30
leaq 0x3d5c8(%rip), %rdi # 0x4675a
leaq 0x3d618(%rip), %rdx # 0x467b1
leaq 0x3d628(%rip), %rcx # 0x467c8
movl $0x906, %esi # imm = 0x906
jmp 0x9184
leaq 0x3d5ac(%rip), %rdi # 0x4675a
leaq 0x3d5fc(%rip), %rdx # 0x467b1
leaq 0x3d60c(%rip), %rcx # 0x467c8
movl $0x90e, %esi # imm = 0x90E
jmp 0x9184
|
ggml_numa_init:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1D8h
cmp cs:dword_5D734, 0
jnz loc_913D
mov cs:g_state, edi
call _pthread_self
vxorps xmm0, xmm0, xmm0
lea rbx, [rsp+208h+var_138]
vmovups ymmword ptr [rbx], ymm0
vmovups ymmword ptr [rbx+20h], ymm0
vmovups ymmword ptr [rbx+40h], ymm0
vmovups ymmword ptr [rbx+60h], ymm0
mov esi, 80h
mov rdi, rax
mov rdx, rbx
vzeroupper
call _pthread_getaffinity_np
vmovups ymm0, ymmword ptr [rbx]
vmovups ymm1, ymmword ptr [rbx+20h]
vmovups ymm2, ymmword ptr [rbx+40h]
vmovups ymm3, ymmword ptr [rbx+60h]
vmovups cs:ymmword_5D740, ymm0
vmovups cs:ymmword_5D760, ymm1
vmovups cs:ymmword_5D780, ymm2
vmovups cs:ymmword_5D7A0, ymm3
mov ecx, cs:dword_5D734
lea r14, aSysDevicesSyst; "/sys/devices/system/node/node%u"
lea r15, [rsp+208h+var_1C8]
loc_8F33:
cmp ecx, 7
ja short loc_8F79
mov esi, 100h
mov rdi, rbx
mov rdx, r14
xor eax, eax
vzeroupper
call _snprintf
dec eax
cmp eax, 0FFh
jnb loc_918B
mov rdi, rbx
mov rsi, r15
call _stat
test eax, eax
jnz short loc_8F79
mov ecx, cs:dword_5D734
inc ecx
mov cs:dword_5D734, ecx
jmp short loc_8F33
loc_8F79:
mov ecx, cs:dword_5D738
lea rbx, aSysDevicesSyst_0; "/sys/devices/system/cpu/cpu%u"
lea r14, [rsp+208h+var_138]
lea r15, [rsp+208h+var_1C8]
loc_8F93:
cmp ecx, 1FFh
ja short loc_8FDC
mov esi, 100h
mov rdi, r14
mov rdx, rbx
xor eax, eax
vzeroupper
call _snprintf
dec eax
cmp eax, 0FFh
jnb loc_91A7
mov rdi, r14
mov rsi, r15
call _stat
test eax, eax
jnz short loc_8FDC
mov ecx, cs:dword_5D738
inc ecx
mov cs:dword_5D738, ecx
jmp short loc_8F93
loc_8FDC:
lea rsi, dword_5D73C
lea rdi, [rsp+208h+var_1FC]
vzeroupper
call _getcpu
mov edx, cs:dword_5D734
test edx, edx
jz loc_90BC
mov ecx, cs:dword_5D738
test ecx, ecx
jz loc_90BC
test eax, eax
jnz loc_90BC
lea rbx, aSysDevicesSyst_1; "/sys/devices/system/node/node%u/cpu%u"
lea r14, [rsp+208h+var_138]
lea r15, [rsp+208h+var_1C8]
xor r12d, r12d
loc_902B:
mov eax, edx
cmp r12, rax
jnb loc_90C5
imul rax, r12, 804h
lea rdx, g_state
lea r13, [rax+rdx]
add r13, 4
and dword ptr [r13+800h], 0
xor ebp, ebp
loc_9056:
cmp ebp, ecx
jnb short loc_90AE
mov esi, 100h
mov rdi, r14
mov rdx, rbx
mov ecx, r12d
mov r8d, ebp
xor eax, eax
call _snprintf
dec eax
cmp eax, 0FFh
jnb loc_916A
mov rdi, r14
mov rsi, r15
call _stat
test eax, eax
jnz short loc_90A4
mov eax, [r13+800h]
lea ecx, [rax+1]
mov [r13+800h], ecx
mov [r13+rax*4+0], ebp
loc_90A4:
inc ebp
mov ecx, cs:dword_5D738
jmp short loc_9056
loc_90AE:
inc r12
mov edx, cs:dword_5D734
jmp loc_902B
loc_90BC:
and cs:dword_5D734, 0
jmp short loc_912B
loc_90C5:
cmp edx, 1
jbe short loc_912B
lea rdi, aProcSysKernelN; "/proc/sys/kernel/numa_balancing"
lea rsi, aDstNe0Nr+0Fh; "r"
call _fopen
test rax, rax
jz short loc_912B
mov rbx, rax
lea rdi, [rsp+208h+var_1F8]
push 2Ah ; '*'
pop rsi
mov rdx, rax
call _fgets
test rax, rax
jz short loc_9123
lea rsi, a0; "0\n"
lea rdi, [rsp+208h+var_1F8]
push 3
pop rdx
call _bcmp
test eax, eax
jz short loc_9123
lea rsi, aProcSysKernelN_0; "/proc/sys/kernel/numa_balancing is enab"...
push 3
pop rdi
xor eax, eax
call _ggml_log_internal
loc_9123:
mov rdi, rbx
call _fclose
loc_912B:
add rsp, 1D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_913D:
mov rax, cs:stderr_ptr
mov rcx, [rax]
lea rdi, aGgmlNumaInitNu; "ggml_numa_init: NUMA already initialize"...
push 29h ; ')'
pop rsi
push 1
pop rdx
add rsp, 1D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _fwrite
loc_916A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)"
mov esi, 92Fh
loc_9184:
xor eax, eax
call _ggml_abort
loc_918B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)"
mov esi, 906h
jmp short loc_9184
loc_91A7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)"
mov esi, 90Eh
jmp short loc_9184
|
long long ggml_numa_init(int a1, __m128 _XMM0)
{
long long v3; // rax
unsigned int i; // ecx
unsigned int j; // ecx
long long result; // rax
unsigned int v13; // edx
unsigned int v14; // ecx
unsigned long long m; // r12
unsigned int n; // ebp
long long v17; // rax
long long v18; // rbx
long long k; // rsi
char v20[4]; // [rsp+Ch] [rbp-1FCh] BYREF
_BYTE v21[48]; // [rsp+10h] [rbp-1F8h] BYREF
_BYTE v22[144]; // [rsp+40h] [rbp-1C8h] BYREF
_BYTE v23[312]; // [rsp+D0h] [rbp-138h] BYREF
if ( dword_5D734 )
return fwrite("ggml_numa_init: NUMA already initialized\n", 41LL, 1LL, stderr);
g_state[0] = a1;
v3 = pthread_self();
__asm { vxorps xmm0, xmm0, xmm0 }
_RBX = v23;
__asm
{
vmovups ymmword ptr [rbx], ymm0
vmovups ymmword ptr [rbx+20h], ymm0
vmovups ymmword ptr [rbx+40h], ymm0
vmovups ymmword ptr [rbx+60h], ymm0
vzeroupper
}
pthread_getaffinity_np(v3, 128LL, v23, *(double *)&_XMM0);
__asm
{
vmovups ymm0, ymmword ptr [rbx]
vmovups ymm1, ymmword ptr [rbx+20h]
vmovups ymm2, ymmword ptr [rbx+40h]
vmovups ymm3, ymmword ptr [rbx+60h]
vmovups cs:ymmword_5D740, ymm0
vmovups cs:ymmword_5D760, ymm1
vmovups cs:ymmword_5D780, ymm2
vmovups cs:ymmword_5D7A0, ymm3
}
for ( i = dword_5D734; i <= 7; i = ++dword_5D734 )
{
__asm { vzeroupper }
if ( (unsigned int)snprintf(v23, 256LL, "/sys/devices/system/node/node%u", i) - 1 >= 0xFF )
goto LABEL_35;
if ( (unsigned int)stat(v23, v22) )
break;
}
for ( j = dword_5D738; j <= 0x1FF; j = ++dword_5D738 )
{
__asm { vzeroupper }
if ( (unsigned int)snprintf(v23, 256LL, "/sys/devices/system/cpu/cpu%u", j) - 1 >= 0xFF )
{
for ( k = 2318LL; ; k = 2310LL )
{
LABEL_34:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c",
k,
"GGML_ASSERT(%s) failed",
"rv > 0 && (unsigned)rv < sizeof(path)");
LABEL_35:
;
}
}
if ( (unsigned int)stat(v23, v22) )
break;
}
__asm { vzeroupper }
result = getcpu(v20, &dword_5D73C);
v13 = dword_5D734;
if ( dword_5D734 && (v14 = dword_5D738) != 0 && !(_DWORD)result )
{
for ( m = 0LL; ; ++m )
{
result = v13;
if ( m >= v13 )
break;
g_state[513 * m + 513] = 0;
for ( n = 0; n < v14; ++n )
{
if ( (unsigned int)snprintf(v23, 256LL, "/sys/devices/system/node/node%u/cpu%u", m, n) - 1 >= 0xFF )
{
k = 2351LL;
goto LABEL_34;
}
if ( !(unsigned int)stat(v23, v22) )
{
v17 = (unsigned int)g_state[513 * m + 513];
g_state[513 * m + 513] = v17 + 1;
g_state[513 * m + 1 + v17] = n;
}
v14 = dword_5D738;
}
v13 = dword_5D734;
}
if ( v13 > 1 )
{
result = fopen("/proc/sys/kernel/numa_balancing", "r");
if ( result )
{
v18 = result;
if ( fgets(v21, 42LL, result) && (unsigned int)bcmp(v21, "0\n", 3LL) )
ggml_log_internal(
3LL,
"/proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance\n");
return fclose(v18);
}
}
}
else
{
dword_5D734 = 0;
}
return result;
}
|
ggml_numa_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1d8
CMP dword ptr [0x0015d734],0x0
JNZ 0x0010913d
MOV dword ptr [0x00159710],EDI
CALL 0x00108580
VXORPS XMM0,XMM0,XMM0
LEA RBX,[RSP + 0xd0]
VMOVUPS ymmword ptr [RBX],YMM0
VMOVUPS ymmword ptr [RBX + 0x20],YMM0
VMOVUPS ymmword ptr [RBX + 0x40],YMM0
VMOVUPS ymmword ptr [RBX + 0x60],YMM0
MOV ESI,0x80
MOV RDI,RAX
MOV RDX,RBX
VZEROUPPER
CALL 0x00108b20
VMOVUPS YMM0,ymmword ptr [RBX]
VMOVUPS YMM1,ymmword ptr [RBX + 0x20]
VMOVUPS YMM2,ymmword ptr [RBX + 0x40]
VMOVUPS YMM3,ymmword ptr [RBX + 0x60]
VMOVUPS ymmword ptr [0x0015d740],YMM0
VMOVUPS ymmword ptr [0x0015d760],YMM1
VMOVUPS ymmword ptr [0x0015d780],YMM2
VMOVUPS ymmword ptr [0x0015d7a0],YMM3
MOV ECX,dword ptr [0x0015d734]
LEA R14,[0x14673a]
LEA R15,[RSP + 0x40]
LAB_00108f33:
CMP ECX,0x7
JA 0x00108f79
MOV ESI,0x100
MOV RDI,RBX
MOV RDX,R14
XOR EAX,EAX
VZEROUPPER
CALL 0x001089b0
DEC EAX
CMP EAX,0xff
JNC 0x0010918b
MOV RDI,RBX
MOV RSI,R15
CALL 0x001085a0
TEST EAX,EAX
JNZ 0x00108f79
MOV ECX,dword ptr [0x0015d734]
INC ECX
MOV dword ptr [0x0015d734],ECX
JMP 0x00108f33
LAB_00108f79:
MOV ECX,dword ptr [0x0015d738]
LEA RBX,[0x1467ee]
LEA R14,[RSP + 0xd0]
LEA R15,[RSP + 0x40]
LAB_00108f93:
CMP ECX,0x1ff
JA 0x00108fdc
MOV ESI,0x100
MOV RDI,R14
MOV RDX,RBX
XOR EAX,EAX
VZEROUPPER
CALL 0x001089b0
DEC EAX
CMP EAX,0xff
JNC 0x001091a7
MOV RDI,R14
MOV RSI,R15
CALL 0x001085a0
TEST EAX,EAX
JNZ 0x00108fdc
MOV ECX,dword ptr [0x0015d738]
INC ECX
MOV dword ptr [0x0015d738],ECX
JMP 0x00108f93
LAB_00108fdc:
LEA RSI,[0x15d73c]
LEA RDI,[RSP + 0xc]
VZEROUPPER
CALL 0x00108430
MOV EDX,dword ptr [0x0015d734]
TEST EDX,EDX
JZ 0x001090bc
MOV ECX,dword ptr [0x0015d738]
TEST ECX,ECX
JZ 0x001090bc
TEST EAX,EAX
JNZ 0x001090bc
LEA RBX,[0x14680c]
LEA R14,[RSP + 0xd0]
LEA R15,[RSP + 0x40]
XOR R12D,R12D
LAB_0010902b:
MOV EAX,EDX
CMP R12,RAX
JNC 0x001090c5
IMUL RAX,R12,0x804
LEA RDX,[0x159710]
LEA R13,[RAX + RDX*0x1]
ADD R13,0x4
AND dword ptr [R13 + 0x800],0x0
XOR EBP,EBP
LAB_00109056:
CMP EBP,ECX
JNC 0x001090ae
MOV ESI,0x100
MOV RDI,R14
MOV RDX,RBX
MOV ECX,R12D
MOV R8D,EBP
XOR EAX,EAX
CALL 0x001089b0
DEC EAX
CMP EAX,0xff
JNC 0x0010916a
MOV RDI,R14
MOV RSI,R15
CALL 0x001085a0
TEST EAX,EAX
JNZ 0x001090a4
MOV EAX,dword ptr [R13 + 0x800]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R13 + 0x800],ECX
MOV dword ptr [R13 + RAX*0x4],EBP
LAB_001090a4:
INC EBP
MOV ECX,dword ptr [0x0015d738]
JMP 0x00109056
LAB_001090ae:
INC R12
MOV EDX,dword ptr [0x0015d734]
JMP 0x0010902b
LAB_001090bc:
AND dword ptr [0x0015d734],0x0
JMP 0x0010912b
LAB_001090c5:
CMP EDX,0x1
JBE 0x0010912b
LEA RDI,[0x146832]
LEA RSI,[0x147630]
CALL 0x00108760
TEST RAX,RAX
JZ 0x0010912b
MOV RBX,RAX
LEA RDI,[RSP + 0x10]
PUSH 0x2a
POP RSI
MOV RDX,RAX
CALL 0x00108950
TEST RAX,RAX
JZ 0x00109123
LEA RSI,[0x146852]
LEA RDI,[RSP + 0x10]
PUSH 0x3
POP RDX
CALL 0x00108690
TEST EAX,EAX
JZ 0x00109123
LEA RSI,[0x146855]
PUSH 0x3
POP RDI
XOR EAX,EAX
CALL 0x001082e0
LAB_00109123:
MOV RDI,RBX
CALL 0x00108640
LAB_0010912b:
ADD RSP,0x1d8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010913d:
MOV RAX,qword ptr [0x00158fc0]
MOV RCX,qword ptr [RAX]
LEA RDI,[0x146710]
PUSH 0x29
POP RSI
PUSH 0x1
POP RDX
ADD RSP,0x1d8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00108c70
LAB_0010916a:
LEA RDI,[0x14675a]
LEA RDX,[0x1467b1]
LEA RCX,[0x1467c8]
MOV ESI,0x92f
LAB_00109184:
XOR EAX,EAX
CALL 0x00108a30
LAB_0010918b:
LEA RDI,[0x14675a]
LEA RDX,[0x1467b1]
LEA RCX,[0x1467c8]
MOV ESI,0x906
JMP 0x00109184
LAB_001091a7:
LEA RDI,[0x14675a]
LEA RDX,[0x1467b1]
LEA RCX,[0x1467c8]
MOV ESI,0x90e
JMP 0x00109184
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_numa_init(int4 param_1)
{
int iVar1;
pthread_t __th;
FILE *__stream;
char *pcVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
int8 uVar6;
ulong uVar7;
int1 local_1fc [4];
char local_1f8 [48];
stat local_1c8;
int1 local_138 [40];
__cpu_mask _Stack_110;
__cpu_mask _Stack_108;
__cpu_mask _Stack_100;
int1 local_f8 [32];
int1 local_d8 [32];
if (DAT_0015d734 != 0) {
fwrite("ggml_numa_init: NUMA already initialized\n",0x29,1,*(FILE **)PTR_stderr_00158fc0);
return;
}
g_state = param_1;
__th = pthread_self();
local_138._0_32_ = ZEXT1632(ZEXT816(0) << 0x40);
local_f8 = ZEXT1632(ZEXT816(0) << 0x40);
unique0x1000045e = local_138._0_32_;
local_d8 = local_f8;
pthread_getaffinity_np(__th,0x80,(cpu_set_t *)local_138);
_DAT_0015d740 = local_138._0_8_;
_Ram000000000015d748 = local_138._8_8_;
_Ram000000000015d750 = local_138._16_8_;
_Ram000000000015d758 = local_138._24_8_;
_DAT_0015d760 = local_138._32_8_;
_Ram000000000015d768 = _Stack_110;
_Ram000000000015d770 = _Stack_108;
_Ram000000000015d778 = _Stack_100;
_DAT_0015d780 = local_f8._0_8_;
_Ram000000000015d788 = local_f8._8_8_;
_Ram000000000015d790 = local_f8._16_8_;
_Ram000000000015d798 = local_f8._24_8_;
_DAT_0015d7a0 = local_d8._0_8_;
_Ram000000000015d7a8 = local_d8._8_8_;
_Ram000000000015d7b0 = local_d8._16_8_;
_Ram000000000015d7b8 = local_d8._24_8_;
for (; DAT_0015d734 < 8; DAT_0015d734 = DAT_0015d734 + 1) {
iVar1 = snprintf((char *)local_138,0x100,"/sys/devices/system/node/node%u");
if (0xfe < iVar1 - 1U) {
uVar6 = 0x906;
goto LAB_00109184;
}
iVar1 = stat((char *)local_138,&local_1c8);
if (iVar1 != 0) break;
}
for (; DAT_0015d738 < 0x200; DAT_0015d738 = DAT_0015d738 + 1) {
iVar1 = snprintf(local_138,0x100,"/sys/devices/system/cpu/cpu%u");
if (0xfe < iVar1 - 1U) {
uVar6 = 0x90e;
LAB_00109184:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c"
,uVar6,"GGML_ASSERT(%s) failed","rv > 0 && (unsigned)rv < sizeof(path)");
}
iVar1 = stat(local_138,&local_1c8);
if (iVar1 != 0) break;
}
iVar1 = getcpu(local_1fc,&DAT_0015d73c);
if (((DAT_0015d734 == 0) || (DAT_0015d738 == 0)) || (iVar1 != 0)) {
DAT_0015d734 = 0;
return;
}
uVar7 = 0;
uVar3 = DAT_0015d738;
do {
if (DAT_0015d734 <= uVar7) {
if (DAT_0015d734 < 2) {
return;
}
__stream = fopen("/proc/sys/kernel/numa_balancing","r");
if (__stream == (FILE *)0x0) {
return;
}
pcVar2 = fgets(local_1f8,0x2a,__stream);
if ((pcVar2 != (char *)0x0) && (iVar1 = bcmp(local_1f8,&DAT_00146852,3), iVar1 != 0)) {
ggml_log_internal(3,
"/proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance\n"
);
}
fclose(__stream);
return;
}
(&DAT_00159f14)[uVar7 * 0x201] = 0;
uVar5 = 0;
while (uVar4 = (uint)uVar5, uVar4 < uVar3) {
iVar1 = snprintf(local_138,0x100,"/sys/devices/system/node/node%u/cpu%u",uVar7 & 0xffffffff,
uVar5);
if (0xfe < iVar1 - 1U) {
uVar6 = 0x92f;
goto LAB_00109184;
}
iVar1 = stat(local_138,&local_1c8);
if (iVar1 == 0) {
uVar3 = (&DAT_00159f14)[uVar7 * 0x201];
(&DAT_00159f14)[uVar7 * 0x201] = uVar3 + 1;
*(uint *)(&DAT_00159714 + (ulong)uVar3 * 4 + uVar7 * 0x804) = uVar4;
}
uVar3 = DAT_0015d738;
uVar5 = (ulong)(uVar4 + 1);
}
uVar7 = uVar7 + 1;
} while( true );
}
|
|
65,489 |
ft_add_word
|
eloqsql/storage/myisam/ft_parser.c
|
static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
{
TREE *wtree;
FT_WORD w;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
DBUG_ENTER("ft_add_word");
wtree= ft_param->wtree;
if (param->flags & MYSQL_FTFLAGS_NEED_COPY)
{
uchar *ptr;
DBUG_ASSERT(wtree->with_delete == 0);
ptr= (uchar *)alloc_root(ft_param->mem_root, word_len);
memcpy(ptr, word, word_len);
w.pos= ptr;
}
else
w.pos= (uchar*) word;
w.len= word_len;
if (!tree_insert(wtree, &w, 0, wtree->custom_arg))
{
delete_tree(wtree, 0);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
|
O3
|
c
|
ft_add_word:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq 0x18(%rdi), %rax
movq (%rax), %rbx
testb $0x1, 0x34(%rdi)
jne 0x499ec
movslq %edx, %r15
jmp 0x49a0f
movq 0x8(%rax), %rdi
movslq %edx, %r15
movq %r15, %rsi
callq 0x588f3
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x282c0
movq %r12, %r14
leaq -0x38(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x10(%rsi)
movq 0x230(%rbx), %rcx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x61a8e
testq %rax, %rax
jne 0x49a43
movq %rbx, %rdi
xorl %esi, %esi
callq 0x619a6
movl $0x1, %r14d
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
ft_add_word:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov r14, rsi
mov rax, [rdi+18h]
mov rbx, [rax]
test byte ptr [rdi+34h], 1
jnz short loc_499EC
movsxd r15, edx
jmp short loc_49A0F
loc_499EC:
mov rdi, [rax+8]
movsxd r15, edx
mov rsi, r15
call alloc_root
mov r12, rax
mov rdi, rax
mov rsi, r14
mov rdx, r15
call _memcpy
mov r14, r12
loc_49A0F:
lea rsi, [rbp+var_38]
mov [rsi], r14
mov [rsi+10h], r15
mov rcx, [rbx+230h]
xor r14d, r14d
mov rdi, rbx
xor edx, edx
call tree_insert
test rax, rax
jnz short loc_49A43
mov rdi, rbx
xor esi, esi
call delete_tree
mov r14d, 1
loc_49A43:
mov eax, r14d
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ft_add_word(long long a1, long long a2, int a3)
{
long long v3; // r14
long long *v4; // rax
long long v5; // rbx
long long v6; // r15
long long v7; // r12
unsigned int v8; // r14d
_QWORD v10[7]; // [rsp+8h] [rbp-38h] BYREF
v3 = a2;
v4 = *(long long **)(a1 + 24);
v5 = *v4;
v6 = a3;
if ( (*(_BYTE *)(a1 + 52) & 1) != 0 )
{
v7 = alloc_root(v4[1], a3);
memcpy(v7, a2, v6);
v3 = v7;
}
v10[0] = v3;
v10[2] = v6;
v8 = 0;
if ( !tree_insert(v5, v10, 0LL, *(_QWORD *)(v5 + 560)) )
{
delete_tree(v5, 0LL);
return 1;
}
return v8;
}
|
ft_add_word:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RAX,qword ptr [RDI + 0x18]
MOV RBX,qword ptr [RAX]
TEST byte ptr [RDI + 0x34],0x1
JNZ 0x001499ec
MOVSXD R15,EDX
JMP 0x00149a0f
LAB_001499ec:
MOV RDI,qword ptr [RAX + 0x8]
MOVSXD R15,EDX
MOV RSI,R15
CALL 0x001588f3
MOV R12,RAX
MOV RDI,RAX
MOV RSI,R14
MOV RDX,R15
CALL 0x001282c0
MOV R14,R12
LAB_00149a0f:
LEA RSI,[RBP + -0x38]
MOV qword ptr [RSI],R14
MOV qword ptr [RSI + 0x10],R15
MOV RCX,qword ptr [RBX + 0x230]
XOR R14D,R14D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00161a8e
TEST RAX,RAX
JNZ 0x00149a43
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001619a6
MOV R14D,0x1
LAB_00149a43:
MOV EAX,R14D
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
bool ft_add_word(long param_1,void *param_2,int param_3)
{
long lVar1;
void *__dest;
long lVar2;
void *local_40 [2];
long local_30;
lVar1 = **(long **)(param_1 + 0x18);
if ((*(byte *)(param_1 + 0x34) & 1) != 0) {
__dest = (void *)alloc_root((*(long **)(param_1 + 0x18))[1],(long)param_3);
memcpy(__dest,param_2,(long)param_3);
param_2 = __dest;
}
local_30 = (long)param_3;
local_40[0] = param_2;
lVar2 = tree_insert(lVar1,local_40,0,*(int8 *)(lVar1 + 0x230));
if (lVar2 == 0) {
delete_tree(lVar1,0);
}
return lVar2 == 0;
}
|
|
65,490 |
mi_unpack_index_tuple
|
eloqsql/storage/myisam/mi_key.c
|
static
int mi_unpack_index_tuple(MI_INFO *info, uint keynr, uchar *record)
{
if (_mi_put_key_in_record(info, keynr, FALSE, record))
{
/* Impossible case; Can only happen if bug in code */
mi_print_error(info->s, HA_ERR_CRASHED);
info->lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
return 1;
}
return 0;
}
|
O3
|
c
|
mi_unpack_index_tuple:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rcx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x337b6
testl %eax, %eax
je 0x33cd5
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x32f6a
movq $-0x1, 0x170(%rbx)
callq 0x5cfd2
movl $0x7e, (%rax)
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
mi_unpack_index_tuple:
push rbp
mov rbp, rsp
push r14
push rbx
mov rcx, rdx
mov rbx, rdi
xor r14d, r14d
xor edx, edx
call _mi_put_key_in_record
test eax, eax
jz short loc_33CD5
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov r14d, 1
loc_33CD5:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
|
long long mi_unpack_index_tuple(_QWORD *a1, unsigned int a2, long long a3)
{
unsigned int v3; // r14d
long long v4; // rsi
long long v5; // rdx
v3 = 0;
if ( (unsigned int)mi_put_key_in_record((long long)a1, a2, 0, a3) )
{
v4 = *(_QWORD *)(*a1 + 616LL);
mi_report_error(126, v4);
a1[46] = -1LL;
*(_DWORD *)my_thread_var(126LL, v4, v5) = 126;
return 1;
}
return v3;
}
|
mi_unpack_index_tuple:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RCX,RDX
MOV RBX,RDI
XOR R14D,R14D
XOR EDX,EDX
CALL 0x001337b6
TEST EAX,EAX
JZ 0x00133cd5
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x00132f6a
MOV qword ptr [RBX + 0x170],-0x1
CALL 0x0015cfd2
MOV dword ptr [RAX],0x7e
MOV R14D,0x1
LAB_00133cd5:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
bool mi_unpack_index_tuple(long *param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
iVar1 = _mi_put_key_in_record(param_1,param_2,0,param_3);
if (iVar1 != 0) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
param_1[0x2e] = -1;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
}
return iVar1 != 0;
}
|
|
65,491 |
pagecache_unlock
|
eloqsql/storage/maria/ma_pagecache.c
|
void pagecache_unlock(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
LSN first_REDO_LSN_for_page,
LSN lsn, my_bool was_changed)
{
PAGECACHE_BLOCK_LINK *block;
int page_st;
DBUG_ENTER("pagecache_unlock");
DBUG_PRINT("enter", ("fd: %u page: %lu %s %s",
(uint) file->file, (ulong) pageno,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
/* we do not allow any lock/pin increasing here */
DBUG_ASSERT(pin != PAGECACHE_PIN);
DBUG_ASSERT(lock != PAGECACHE_LOCK_READ && lock != PAGECACHE_LOCK_WRITE);
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
/*
As soon as we keep lock cache can be used, and we have lock because want
to unlock.
*/
DBUG_ASSERT(pagecache->can_be_used);
inc_counter_for_resize_op(pagecache);
/* See NOTE for pagecache_unlock about registering requests */
block= find_block(pagecache, file, pageno, 0, 0, 0,
pin == PAGECACHE_PIN_LEFT_UNPINNED, FALSE, &page_st);
PCBLOCK_INFO(block);
DBUG_ASSERT(block != 0 && page_st == PAGE_READ);
if (first_REDO_LSN_for_page)
{
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE_UNLOCK);
DBUG_ASSERT(pin == PAGECACHE_UNPIN);
pagecache_set_block_rec_lsn(block, first_REDO_LSN_for_page);
}
if (lsn != LSN_IMPOSSIBLE)
check_and_set_lsn(pagecache, lsn, block);
/* if we lock for write we must link the block to changed blocks */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0 ||
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED));
/*
if was_changed then status should be PCBLOCK_DIRECT_W or marked
as dirty
*/
DBUG_ASSERT(!was_changed || (block->status & PCBLOCK_DIRECT_W) ||
(block->status & PCBLOCK_CHANGED));
if ((block->status & PCBLOCK_DIRECT_W) &&
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ))
{
if (!(block->status & PCBLOCK_CHANGED) && was_changed)
link_to_changed_list(pagecache, block);
block->status&= ~PCBLOCK_DIRECT_W;
DBUG_PRINT("info", ("Drop PCBLOCK_DIRECT_W for block: %p", block));
}
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
{
DBUG_ASSERT(0); /* should not happend */
}
remove_reader(block);
/*
Link the block into the LRU chain if it's the last submitted request
for the block and block will not be pinned.
See NOTE for pagecache_unlock about registering requests.
*/
if (pin != PAGECACHE_PIN_LEFT_PINNED)
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
pagecache_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movl %r8d, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movb 0x18(%rbp), %al
movb %al, -0x29(%rbp)
movq 0x10(%rbp), %rbx
addq $0xc8, %rdi
cmpq $0x0, 0x108(%r14)
movq %rdi, -0x40(%rbp)
jne 0x3275d
callq 0x29220
incq 0x68(%r14)
xorl %eax, %eax
cmpl $0x1, -0x30(%rbp)
sete %al
subq $0x8, %rsp
leaq -0x44(%rbp), %r10
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq $0x0
pushq %rax
callq 0x327ac
addq $0x20, %rsp
movq %rax, %r13
testq %r12, %r12
je 0x32613
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
cmpq %rax, 0x88(%r13)
jne 0x32613
movq %r12, 0x88(%r13)
testq %rbx, %rbx
je 0x32626
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x32df6
movl -0x34(%rbp), %edx
movl %edx, %eax
andl $-0x2, %eax
cmpl $0x6, %eax
jne 0x326c1
movzwl 0x74(%r13), %eax
movzwl %ax, %ecx
movl %ecx, %esi
andl $0x40, %esi
je 0x326c1
cmpb $0x0, -0x29(%rbp)
je 0x326b7
andl $0x20, %ecx
jne 0x326b7
movq %r13, %rax
addq $0x10, %rax
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rcx
testq %rsi, %rsi
je 0x3266e
movq %rcx, 0x18(%rsi)
movq (%rax), %rsi
jmp 0x32670
xorl %esi, %esi
movq %rsi, (%rcx)
movq 0x128(%r14), %rcx
movq 0x20(%r13), %rdi
movl 0x28(%r14), %esi
decl %esi
andl 0x28(%rdi), %esi
leaq (%rcx,%rsi,8), %rcx
movq %rcx, 0x18(%r13)
movq (%rcx), %rsi
movq %rsi, 0x10(%r13)
testq %rsi, %rsi
je 0x3269f
movq %rax, 0x18(%rsi)
movq %r13, (%rcx)
orb $0x20, 0x74(%r13)
incq 0x58(%r14)
incq 0x168(%r14)
movzwl 0x74(%r13), %eax
andl $0xffbf, %eax # imm = 0xFFBF
movw %ax, 0x74(%r13)
movq %r14, %rdi
movq %r13, %rsi
movl -0x30(%rbp), %ecx
callq 0x32eb3
movq 0x20(%r13), %rax
decl 0x68(%rax)
jne 0x326f6
movq 0x28(%r13), %rbx
testq %rbx, %rbx
je 0x326f6
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
jne 0x32785
movq %rbx, %rdi
callq 0x295c0
cmpl $0x0, -0x30(%rbp)
je 0x3270c
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x33023
decq 0x68(%r14)
jne 0x3273a
movq 0x110(%r14), %rax
testq %rax, %rax
je 0x3273a
movq 0x88(%rax), %rbx
movq 0x38(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x3279a
movq %rbx, %rdi
callq 0x295c0
movq 0x108(%r14), %rdi
testq %rdi, %rdi
jne 0x32773
movq -0x40(%rbp), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291e0
leaq 0xa8130(%rip), %rsi # 0xda894
movl $0xc97, %edx # imm = 0xC97
callq 0x2eb8f
jmp 0x325bd
leaq 0x355946(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x32746
leaq 0x355934(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x326ee
leaq 0x35591f(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x32732
|
pagecache_unlock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r9
mov [rbp+var_30], r8d
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov al, [rbp+arg_8]
mov [rbp+var_29], al
mov rbx, [rbp+arg_0]
add rdi, 0C8h
cmp qword ptr [r14+108h], 0
mov [rbp+var_40], rdi
jnz loc_3275D
call _pthread_mutex_lock
loc_325BD:
inc qword ptr [r14+68h]
xor eax, eax
cmp [rbp+var_30], 1
setz al
sub rsp, 8
lea r10, [rbp+var_44]
mov rdi, r14
mov rsi, r15
mov rdx, r13
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
push r10
push 0
push rax
call find_block
add rsp, 20h
mov r13, rax
test r12, r12
jz short loc_32613
mov rax, 0FFFFFFFFFFFFFFh
cmp [r13+88h], rax
jnz short loc_32613
mov [r13+88h], r12
loc_32613:
test rbx, rbx
jz short loc_32626
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call check_and_set_lsn
loc_32626:
mov edx, [rbp+var_34]
mov eax, edx
and eax, 0FFFFFFFEh
cmp eax, 6
jnz loc_326C1
movzx eax, word ptr [r13+74h]
movzx ecx, ax
mov esi, ecx
and esi, 40h
jz short loc_326C1
cmp [rbp+var_29], 0
jz short loc_326B7
and ecx, 20h
jnz short loc_326B7
mov rax, r13
add rax, 10h
mov rsi, [r13+10h]
mov rcx, [r13+18h]
test rsi, rsi
jz short loc_3266E
mov [rsi+18h], rcx
mov rsi, [rax]
jmp short loc_32670
loc_3266E:
xor esi, esi
loc_32670:
mov [rcx], rsi
mov rcx, [r14+128h]
mov rdi, [r13+20h]
mov esi, [r14+28h]
dec esi
and esi, [rdi+28h]
lea rcx, [rcx+rsi*8]
mov [r13+18h], rcx
mov rsi, [rcx]
mov [r13+10h], rsi
test rsi, rsi
jz short loc_3269F
mov [rsi+18h], rax
loc_3269F:
mov [rcx], r13
or byte ptr [r13+74h], 20h
inc qword ptr [r14+58h]
inc qword ptr [r14+168h]
movzx eax, word ptr [r13+74h]
loc_326B7:
and eax, 0FFBFh
mov [r13+74h], ax
loc_326C1:
mov rdi, r14
mov rsi, r13
mov ecx, [rbp+var_30]
call make_lock_and_pin
mov rax, [r13+20h]
dec dword ptr [rax+68h]
jnz short loc_326F6
mov rbx, [r13+28h]
test rbx, rbx
jz short loc_326F6
mov rdi, [rbx+30h]
test rdi, rdi
jnz loc_32785
loc_326EE:
mov rdi, rbx
call _pthread_cond_signal
loc_326F6:
cmp [rbp+var_30], 0
jz short loc_3270C
mov rdi, r14
mov rsi, r13
mov edx, 1
call unreg_request
loc_3270C:
dec qword ptr [r14+68h]
jnz short loc_3273A
mov rax, [r14+110h]
test rax, rax
jz short loc_3273A
mov rbx, [rax+88h]
mov rdi, [rbx+38h]
add rbx, 8
test rdi, rdi
jnz short loc_3279A
loc_32732:
mov rdi, rbx
call _pthread_cond_signal
loc_3273A:
mov rdi, [r14+108h]
test rdi, rdi
jnz short loc_32773
loc_32746:
mov rdi, [rbp+var_40]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_3275D:
lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0C97h
call psi_mutex_lock
jmp loc_325BD
loc_32773:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_32746
loc_32785:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_326EE
loc_3279A:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_32732
|
long long pagecache_unlock(
long long a1,
int a2,
int a3,
unsigned int a4,
unsigned int a5,
long long a6,
long long a7,
char a8)
{
long long v11; // rdi
bool v12; // zf
long long block; // r13
long long v14; // rdx
__int16 v15; // ax
long long *v16; // rax
long long v17; // rsi
_QWORD *v18; // rcx
long long v19; // rsi
long long *v20; // rcx
long long v21; // rsi
long long v22; // rax
long long v23; // rbx
long long v24; // rax
long long v25; // rbx
long long v26; // rdi
long long v27; // rbx
char v29[4]; // [rsp+Ch] [rbp-44h] BYREF
long long v30; // [rsp+10h] [rbp-40h]
unsigned int v31; // [rsp+1Ch] [rbp-34h]
unsigned int v32; // [rsp+20h] [rbp-30h]
char v33; // [rsp+27h] [rbp-29h]
v32 = a5;
v31 = a4;
v33 = a8;
v11 = a1 + 200;
v12 = *(_QWORD *)(a1 + 264) == 0LL;
v30 = v11;
if ( v12 )
pthread_mutex_lock(v11);
else
psi_mutex_lock(v11, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0xC97u);
++*(_QWORD *)(a1 + 104);
block = find_block(a1, a2, a3, 0, 0, 0, v32 == 1, 0, (long long)v29);
if ( a6 && *(_QWORD *)(block + 136) == 0xFFFFFFFFFFFFFFLL )
*(_QWORD *)(block + 136) = a6;
if ( a7 )
check_and_set_lsn(a1, a7, block);
v14 = v31;
if ( (v31 & 0xFFFFFFFE) == 6 )
{
v15 = *(_WORD *)(block + 116);
if ( (v15 & 0x40) != 0 )
{
if ( v33 && (*(_WORD *)(block + 116) & 0x20) == 0 )
{
v16 = (long long *)(block + 16);
v17 = *(_QWORD *)(block + 16);
v18 = *(_QWORD **)(block + 24);
if ( v17 )
{
*(_QWORD *)(v17 + 24) = v18;
v19 = *v16;
}
else
{
v19 = 0LL;
}
*v18 = v19;
v20 = (long long *)(*(_QWORD *)(a1 + 296)
+ 8LL * (*(_DWORD *)(*(_QWORD *)(block + 32) + 40LL) & (unsigned int)(*(_DWORD *)(a1 + 40) - 1)));
*(_QWORD *)(block + 24) = v20;
v21 = *v20;
*(_QWORD *)(block + 16) = *v20;
if ( v21 )
*(_QWORD *)(v21 + 24) = v16;
*v20 = block;
*(_BYTE *)(block + 116) |= 0x20u;
++*(_QWORD *)(a1 + 88);
++*(_QWORD *)(a1 + 360);
v15 = *(_WORD *)(block + 116);
}
*(_WORD *)(block + 116) = v15 & 0xFFBF;
}
}
make_lock_and_pin(a1, block, v14, v32);
v22 = *(_QWORD *)(block + 32);
v12 = (*(_DWORD *)(v22 + 104))-- == 1;
if ( v12 )
{
v23 = *(_QWORD *)(block + 40);
if ( v23 )
{
if ( *(_QWORD *)(v23 + 48) )
PSI_server[46]();
pthread_cond_signal(v23);
}
}
if ( v32 )
unreg_request(a1, block, 1LL);
v12 = (*(_QWORD *)(a1 + 104))-- == 1LL;
if ( v12 )
{
v24 = *(_QWORD *)(a1 + 272);
if ( v24 )
{
v25 = *(_QWORD *)(v24 + 136);
v26 = *(_QWORD *)(v25 + 56);
v27 = v25 + 8;
if ( v26 )
PSI_server[46]();
pthread_cond_signal(v27);
}
}
if ( *(_QWORD *)(a1 + 264) )
PSI_server[44]();
return pthread_mutex_unlock(v30);
}
|
pagecache_unlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R9
MOV dword ptr [RBP + -0x30],R8D
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV AL,byte ptr [RBP + 0x18]
MOV byte ptr [RBP + -0x29],AL
MOV RBX,qword ptr [RBP + 0x10]
ADD RDI,0xc8
CMP qword ptr [R14 + 0x108],0x0
MOV qword ptr [RBP + -0x40],RDI
JNZ 0x0013275d
CALL 0x00129220
LAB_001325bd:
INC qword ptr [R14 + 0x68]
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x1
SETZ AL
SUB RSP,0x8
LEA R10,[RBP + -0x44]
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
PUSH R10
PUSH 0x0
PUSH RAX
CALL 0x001327ac
ADD RSP,0x20
MOV R13,RAX
TEST R12,R12
JZ 0x00132613
MOV RAX,0xffffffffffffff
CMP qword ptr [R13 + 0x88],RAX
JNZ 0x00132613
MOV qword ptr [R13 + 0x88],R12
LAB_00132613:
TEST RBX,RBX
JZ 0x00132626
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x00132df6
LAB_00132626:
MOV EDX,dword ptr [RBP + -0x34]
MOV EAX,EDX
AND EAX,0xfffffffe
CMP EAX,0x6
JNZ 0x001326c1
MOVZX EAX,word ptr [R13 + 0x74]
MOVZX ECX,AX
MOV ESI,ECX
AND ESI,0x40
JZ 0x001326c1
CMP byte ptr [RBP + -0x29],0x0
JZ 0x001326b7
AND ECX,0x20
JNZ 0x001326b7
MOV RAX,R13
ADD RAX,0x10
MOV RSI,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
TEST RSI,RSI
JZ 0x0013266e
MOV qword ptr [RSI + 0x18],RCX
MOV RSI,qword ptr [RAX]
JMP 0x00132670
LAB_0013266e:
XOR ESI,ESI
LAB_00132670:
MOV qword ptr [RCX],RSI
MOV RCX,qword ptr [R14 + 0x128]
MOV RDI,qword ptr [R13 + 0x20]
MOV ESI,dword ptr [R14 + 0x28]
DEC ESI
AND ESI,dword ptr [RDI + 0x28]
LEA RCX,[RCX + RSI*0x8]
MOV qword ptr [R13 + 0x18],RCX
MOV RSI,qword ptr [RCX]
MOV qword ptr [R13 + 0x10],RSI
TEST RSI,RSI
JZ 0x0013269f
MOV qword ptr [RSI + 0x18],RAX
LAB_0013269f:
MOV qword ptr [RCX],R13
OR byte ptr [R13 + 0x74],0x20
INC qword ptr [R14 + 0x58]
INC qword ptr [R14 + 0x168]
MOVZX EAX,word ptr [R13 + 0x74]
LAB_001326b7:
AND EAX,0xffbf
MOV word ptr [R13 + 0x74],AX
LAB_001326c1:
MOV RDI,R14
MOV RSI,R13
MOV ECX,dword ptr [RBP + -0x30]
CALL 0x00132eb3
MOV RAX,qword ptr [R13 + 0x20]
DEC dword ptr [RAX + 0x68]
JNZ 0x001326f6
MOV RBX,qword ptr [R13 + 0x28]
TEST RBX,RBX
JZ 0x001326f6
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JNZ 0x00132785
LAB_001326ee:
MOV RDI,RBX
CALL 0x001295c0
LAB_001326f6:
CMP dword ptr [RBP + -0x30],0x0
JZ 0x0013270c
MOV RDI,R14
MOV RSI,R13
MOV EDX,0x1
CALL 0x00133023
LAB_0013270c:
DEC qword ptr [R14 + 0x68]
JNZ 0x0013273a
MOV RAX,qword ptr [R14 + 0x110]
TEST RAX,RAX
JZ 0x0013273a
MOV RBX,qword ptr [RAX + 0x88]
MOV RDI,qword ptr [RBX + 0x38]
ADD RBX,0x8
TEST RDI,RDI
JNZ 0x0013279a
LAB_00132732:
MOV RDI,RBX
CALL 0x001295c0
LAB_0013273a:
MOV RDI,qword ptr [R14 + 0x108]
TEST RDI,RDI
JNZ 0x00132773
LAB_00132746:
MOV RDI,qword ptr [RBP + -0x40]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291e0
LAB_0013275d:
LEA RSI,[0x1da894]
MOV EDX,0xc97
CALL 0x0012eb8f
JMP 0x001325bd
LAB_00132773:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00132746
LAB_00132785:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001326ee
LAB_0013279a:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x00132732
|
void pagecache_unlock(long param_1,int8 param_2,int8 param_3,uint param_4,int param_5,
long param_6,long param_7,char param_8)
{
int *piVar1;
long *plVar2;
int8 *puVar3;
long lVar4;
pthread_cond_t *__cond;
ushort uVar5;
long lVar6;
int8 uVar7;
int1 local_4c [4];
pthread_mutex_t *local_48;
uint local_3c;
int local_38;
char local_31;
local_31 = param_8;
local_48 = (pthread_mutex_t *)(param_1 + 200);
local_3c = param_4;
local_38 = param_5;
if (*(long *)(param_1 + 0x108) == 0) {
pthread_mutex_lock(local_48);
}
else {
psi_mutex_lock(local_48,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xc97);
}
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1;
lVar6 = find_block(param_1,param_2,param_3,0,0,0,local_38 == 1,0,local_4c);
if ((param_6 != 0) && (*(long *)(lVar6 + 0x88) == 0xffffffffffffff)) {
*(long *)(lVar6 + 0x88) = param_6;
}
if (param_7 != 0) {
check_and_set_lsn(param_1,param_7,lVar6);
}
if (((local_3c & 0xfffffffe) == 6) && (uVar5 = *(ushort *)(lVar6 + 0x74), (uVar5 & 0x40) != 0)) {
if ((local_31 != '\0') && ((uVar5 & 0x20) == 0)) {
puVar3 = *(int8 **)(lVar6 + 0x18);
if (*(long *)(lVar6 + 0x10) == 0) {
uVar7 = 0;
}
else {
*(int8 **)(*(long *)(lVar6 + 0x10) + 0x18) = puVar3;
uVar7 = *(int8 *)(lVar6 + 0x10);
}
*puVar3 = uVar7;
plVar2 = (long *)(*(long *)(param_1 + 0x128) +
(ulong)(*(int *)(param_1 + 0x28) - 1U &
*(uint *)(*(long *)(lVar6 + 0x20) + 0x28)) * 8);
*(long **)(lVar6 + 0x18) = plVar2;
lVar4 = *plVar2;
*(long *)(lVar6 + 0x10) = lVar4;
if (lVar4 != 0) {
*(int8 **)(lVar4 + 0x18) = (int8 *)(lVar6 + 0x10);
}
*plVar2 = lVar6;
*(byte *)(lVar6 + 0x74) = *(byte *)(lVar6 + 0x74) | 0x20;
*(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1;
*(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + 1;
uVar5 = *(ushort *)(lVar6 + 0x74);
}
*(ushort *)(lVar6 + 0x74) = uVar5 & 0xffbf;
}
make_lock_and_pin(param_1,lVar6,local_3c,local_38);
piVar1 = (int *)(*(long *)(lVar6 + 0x20) + 0x68);
*piVar1 = *piVar1 + -1;
if ((*piVar1 == 0) &&
(__cond = *(pthread_cond_t **)(lVar6 + 0x28), __cond != (pthread_cond_t *)0x0)) {
if (__cond[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(__cond);
}
if (local_38 != 0) {
unreg_request(param_1,lVar6,1);
}
plVar2 = (long *)(param_1 + 0x68);
*plVar2 = *plVar2 + -1;
if ((*plVar2 == 0) && (*(long *)(param_1 + 0x110) != 0)) {
lVar6 = *(long *)(*(long *)(param_1 + 0x110) + 0x88);
if (*(long *)(lVar6 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar6 + 8));
}
if (*(long *)(param_1 + 0x108) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(local_48);
return;
}
|
|
65,492 |
lf_hash_iterate
|
eloqsql/mysys/lf_hash.cc
|
int lf_hash_iterate(LF_HASH *hash, LF_PINS *pins,
my_hash_walk_action action, void *argument)
{
CURSOR cursor;
uint bucket= 0;
int res;
LF_SLIST **el;
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (unlikely(!el))
return 0; /* if there's no bucket==0, the hash is empty */
if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins)))
return 0; /* if there's no bucket==0, the hash is empty */
res= l_find(el, 0, 0, (uchar*)argument, 0, &cursor, pins, action);
lf_unpin(pins, 2);
lf_unpin(pins, 1);
lf_unpin(pins, 0);
return res;
}
|
O3
|
cpp
|
lf_hash_iterate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, -0x30(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x2f2ba
testq %rax, %rax
je 0x2fac8
movq %rax, %r12
cmpq $0x0, (%rax)
jne 0x2fa97
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x2f5c8
testl %eax, %eax
jne 0x2fac8
xorl %r14d, %r14d
leaq -0x48(%rbp), %r9
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
xorl %r8d, %r8d
pushq -0x30(%rbp)
pushq %rbx
callq 0x2fada
popq %rcx
popq %rdx
xorl %ecx, %ecx
xchgq %rcx, 0x10(%rbx)
xorl %ecx, %ecx
xchgq %rcx, 0x8(%rbx)
movl %eax, %r13d
xchgq %r14, (%rbx)
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
lf_hash_iterate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov [rbp+var_30], rdx
mov rbx, rsi
mov r14, rdi
xor r13d, r13d
xor esi, esi
call lf_dynarray_lvalue
test rax, rax
jz short loc_2FAC8
mov r12, rax
cmp qword ptr [rax], 0
jnz short loc_2FA97
xor r13d, r13d
mov rdi, r14
mov rsi, r12
xor edx, edx
mov rcx, rbx
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
test eax, eax
jnz short loc_2FAC8
loc_2FA97:
xor r14d, r14d
lea r9, [rbp+var_48]
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r15
xor r8d, r8d
push [rbp+var_30]
push rbx
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
pop rcx
pop rdx
xor ecx, ecx
xchg rcx, [rbx+10h]
xor ecx, ecx
xchg rcx, [rbx+8]
mov r13d, eax
xchg r14, [rbx]
loc_2FAC8:
mov eax, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long lf_hash_iterate(long long a1, volatile long long *a2, long long a3, int a4)
{
unsigned int v5; // r13d
volatile signed long long *v6; // rax
int v7; // r12d
unsigned int v8; // eax
char v10; // [rsp+8h] [rbp-48h] BYREF
long long v11; // [rsp+20h] [rbp-30h]
v11 = a3;
v5 = 0;
v6 = (volatile signed long long *)lf_dynarray_lvalue(a1, 0);
if ( v6 )
{
v7 = (int)v6;
if ( *v6 || (v5 = 0, !(unsigned int)initialize_bucket(a1, v6, 0, (long long)a2)) )
{
v8 = l_find(v7, 0, 0, a4, 0, (unsigned int)&v10, (long long)a2, v11);
_InterlockedExchange64(a2 + 2, 0LL);
_InterlockedExchange64(a2 + 1, 0LL);
v5 = v8;
_InterlockedExchange64(a2, 0LL);
}
}
return v5;
}
|
lf_hash_iterate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV qword ptr [RBP + -0x30],RDX
MOV RBX,RSI
MOV R14,RDI
XOR R13D,R13D
XOR ESI,ESI
CALL 0x0012f2ba
TEST RAX,RAX
JZ 0x0012fac8
MOV R12,RAX
CMP qword ptr [RAX],0x0
JNZ 0x0012fa97
XOR R13D,R13D
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
MOV RCX,RBX
CALL 0x0012f5c8
TEST EAX,EAX
JNZ 0x0012fac8
LAB_0012fa97:
XOR R14D,R14D
LEA R9,[RBP + -0x48]
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R15
XOR R8D,R8D
PUSH qword ptr [RBP + -0x30]
PUSH RBX
CALL 0x0012fada
POP RCX
POP RDX
XOR ECX,ECX
XCHG qword ptr [RBX + 0x10],RCX
XOR ECX,ECX
XCHG qword ptr [RBX + 0x8],RCX
MOV R13D,EAX
XCHG qword ptr [RBX],R14
LAB_0012fac8:
MOV EAX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
lf_hash_iterate(st_lf_hash *param_1,LF_PINS *param_2,_func_char_void_ptr_void_ptr *param_3,
uchar *param_4)
{
int iVar1;
int4 uVar2;
LF_SLIST **ppLVar3;
CURSOR local_50 [24];
_func_char_void_ptr_void_ptr *local_38;
uVar2 = 0;
local_38 = param_3;
ppLVar3 = (LF_SLIST **)lf_dynarray_lvalue();
if (ppLVar3 != (LF_SLIST **)0x0) {
if ((*ppLVar3 == (LF_SLIST *)0x0) &&
(iVar1 = initialize_bucket(param_1,ppLVar3,0,param_2), iVar1 != 0)) {
return 0;
}
uVar2 = l_find(ppLVar3,(charset_info_st *)0x0,0,param_4,0,local_50,param_2,local_38);
LOCK();
*(int8 *)(param_2 + 0x10) = 0;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 8) = 0;
UNLOCK();
LOCK();
*(int8 *)param_2 = 0;
UNLOCK();
}
return uVar2;
}
|
|
65,493 |
ResnetBlock::calculate_mem_size(ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
size_t calculate_mem_size(ggml_type wtype) {
double mem_size = 0;
mem_size += 2 * in_channels * ggml_type_sizef(GGML_TYPE_F32); // norm1_w/b
mem_size += out_channels * in_channels * 3 * 3 * ggml_type_sizef(GGML_TYPE_F16); // conv1_w
mem_size += 4 * out_channels * ggml_type_sizef(GGML_TYPE_F32); // conv1_b/norm2_w/norm2_b/conv2_b
mem_size += out_channels * out_channels * 3 * 3 * ggml_type_sizef(GGML_TYPE_F16); // conv2_w
if (out_channels != in_channels) {
mem_size += out_channels * in_channels * 1 * 1 * ggml_type_sizef(GGML_TYPE_F16); // nin_shortcut_w
mem_size += out_channels * ggml_type_sizef(GGML_TYPE_F32); // nin_shortcut_b
}
return static_cast<size_t>(mem_size);
}
|
O0
|
cpp
|
ResnetBlock::calculate_mem_size(ggml_type):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
movl (%rax), %eax
shll %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x18(%rsp)
xorl %edi, %edi
callq 0x11b030
movq 0x30(%rsp), %rcx
movaps %xmm0, %xmm2
movsd 0x18(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movl 0x4(%rcx), %eax
imull (%rcx), %eax
imull $0x3, %eax, %eax
imull $0x3, %eax, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x1, %edi
callq 0x11b030
movq 0x30(%rsp), %rax
movaps %xmm0, %xmm2
movsd 0x20(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movl 0x4(%rax), %eax
shll $0x2, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
xorl %edi, %edi
callq 0x11b030
movq 0x30(%rsp), %rcx
movaps %xmm0, %xmm2
movsd 0x28(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movl 0x4(%rcx), %eax
imull 0x4(%rcx), %eax
imull $0x3, %eax, %eax
imull $0x3, %eax, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x38(%rsp)
movl $0x1, %edi
callq 0x11b030
movq 0x30(%rsp), %rcx
movaps %xmm0, %xmm2
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movl 0x4(%rcx), %eax
cmpl (%rcx), %eax
je 0x4a092
movq 0x30(%rsp), %rcx
movl 0x4(%rcx), %eax
imull (%rcx), %eax
shll $0x0, %eax
shll $0x0, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x1, %edi
callq 0x11b030
movq 0x30(%rsp), %rax
movaps %xmm0, %xmm2
movsd 0x8(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %edi, %edi
callq 0x11b030
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x1351d0(%rip), %xmm2 # 0x17f270
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN11ResnetBlock18calculate_mem_sizeE9ggml_type:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_C], esi
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_28], rax
xorps xmm0, xmm0
movsd [rsp+58h+var_18], xmm0
mov eax, [rax]
shl eax, 1
cvtsi2sd xmm0, eax
movsd [rsp+58h+var_40], xmm0
xor edi, edi
call ggml_type_sizef
mov rcx, [rsp+58h+var_28]
movaps xmm2, xmm0
movsd xmm0, [rsp+58h+var_40]
movsd xmm1, [rsp+58h+var_18]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+58h+var_18], xmm0
mov eax, [rcx+4]
imul eax, [rcx]
imul eax, 3
imul eax, 3
cvtsi2sd xmm0, eax
movsd [rsp+58h+var_38], xmm0
mov edi, 1
call ggml_type_sizef
mov rax, [rsp+58h+var_28]
movaps xmm2, xmm0
movsd xmm0, [rsp+58h+var_38]
movsd xmm1, [rsp+58h+var_18]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+58h+var_18], xmm0
mov eax, [rax+4]
shl eax, 2
cvtsi2sd xmm0, eax
movsd [rsp+58h+var_30], xmm0
xor edi, edi
call ggml_type_sizef
mov rcx, [rsp+58h+var_28]
movaps xmm2, xmm0
movsd xmm0, [rsp+58h+var_30]
movsd xmm1, [rsp+58h+var_18]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+58h+var_18], xmm0
mov eax, [rcx+4]
imul eax, [rcx+4]
imul eax, 3
imul eax, 3
cvtsi2sd xmm0, eax
movsd [rsp+58h+var_20], xmm0
mov edi, 1
call ggml_type_sizef
mov rcx, [rsp+58h+var_28]
movaps xmm2, xmm0
movsd xmm0, [rsp+58h+var_20]
movsd xmm1, [rsp+58h+var_18]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+58h+var_18], xmm0
mov eax, [rcx+4]
cmp eax, [rcx]
jz short loc_4A092
mov rcx, [rsp+58h+var_28]
mov eax, [rcx+4]
imul eax, [rcx]
shl eax, 0
shl eax, 0
cvtsi2sd xmm0, eax
movsd [rsp+58h+var_50], xmm0
mov edi, 1
call ggml_type_sizef
mov rax, [rsp+58h+var_28]
movaps xmm2, xmm0
movsd xmm0, [rsp+58h+var_50]
movsd xmm1, [rsp+58h+var_18]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+58h+var_18], xmm0
cvtsi2sd xmm0, dword ptr [rax+4]
movsd [rsp+58h+var_48], xmm0
xor edi, edi
call ggml_type_sizef
movaps xmm2, xmm0
movsd xmm0, [rsp+58h+var_48]
movsd xmm1, [rsp+58h+var_18]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rsp+58h+var_18], xmm0
loc_4A092:
movsd xmm0, [rsp+58h+var_18]
movsd xmm2, cs:qword_17F270
movaps xmm1, xmm0
subsd xmm1, xmm2
cvttsd2si rcx, xmm1
cvttsd2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
add rsp, 58h
retn
|
long long ResnetBlock::calculate_mem_size(_DWORD *a1)
{
double v1; // xmm2_8
double v3; // [rsp+8h] [rbp-50h]
double v4; // [rsp+10h] [rbp-48h]
double v5; // [rsp+18h] [rbp-40h]
double v6; // [rsp+20h] [rbp-38h]
double v7; // [rsp+28h] [rbp-30h]
double v9; // [rsp+38h] [rbp-20h]
double v10; // [rsp+40h] [rbp-18h]
double v11; // [rsp+40h] [rbp-18h]
double v12; // [rsp+40h] [rbp-18h]
double v13; // [rsp+40h] [rbp-18h]
v5 = (double)(2 * *a1);
v10 = v5 * ggml_type_sizef(0LL) + 0.0;
v6 = (double)(9 * *a1 * a1[1]);
v11 = v6 * ggml_type_sizef(1LL) + v10;
v7 = (double)(4 * a1[1]);
v12 = v7 * ggml_type_sizef(0LL) + v11;
v9 = (double)(9 * a1[1] * a1[1]);
v13 = v9 * ggml_type_sizef(1LL) + v12;
if ( a1[1] != *a1 )
{
v3 = (double)(*a1 * a1[1]);
v1 = ggml_type_sizef(1LL);
v4 = (double)(int)a1[1];
v13 = v4 * ggml_type_sizef(0LL) + v3 * v1 + v13;
}
return (unsigned int)(int)v13;
}
|
calculate_mem_size:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ESI
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x30],RAX
XORPS XMM0,XMM0
MOVSD qword ptr [RSP + 0x40],XMM0
MOV EAX,dword ptr [RAX]
SHL EAX,0x1
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x18],XMM0
XOR EDI,EDI
CALL 0x0021b030
MOV RCX,qword ptr [RSP + 0x30]
MOVAPS XMM2,XMM0
MOVSD XMM0,qword ptr [RSP + 0x18]
MOVSD XMM1,qword ptr [RSP + 0x40]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0x40],XMM0
MOV EAX,dword ptr [RCX + 0x4]
IMUL EAX,dword ptr [RCX]
IMUL EAX,EAX,0x3
IMUL EAX,EAX,0x3
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x20],XMM0
MOV EDI,0x1
CALL 0x0021b030
MOV RAX,qword ptr [RSP + 0x30]
MOVAPS XMM2,XMM0
MOVSD XMM0,qword ptr [RSP + 0x20]
MOVSD XMM1,qword ptr [RSP + 0x40]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0x40],XMM0
MOV EAX,dword ptr [RAX + 0x4]
SHL EAX,0x2
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x28],XMM0
XOR EDI,EDI
CALL 0x0021b030
MOV RCX,qword ptr [RSP + 0x30]
MOVAPS XMM2,XMM0
MOVSD XMM0,qword ptr [RSP + 0x28]
MOVSD XMM1,qword ptr [RSP + 0x40]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0x40],XMM0
MOV EAX,dword ptr [RCX + 0x4]
IMUL EAX,dword ptr [RCX + 0x4]
IMUL EAX,EAX,0x3
IMUL EAX,EAX,0x3
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x38],XMM0
MOV EDI,0x1
CALL 0x0021b030
MOV RCX,qword ptr [RSP + 0x30]
MOVAPS XMM2,XMM0
MOVSD XMM0,qword ptr [RSP + 0x38]
MOVSD XMM1,qword ptr [RSP + 0x40]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0x40],XMM0
MOV EAX,dword ptr [RCX + 0x4]
CMP EAX,dword ptr [RCX]
JZ 0x0014a092
MOV RCX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RCX + 0x4]
IMUL EAX,dword ptr [RCX]
SHL EAX,0x0
SHL EAX,0x0
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x8],XMM0
MOV EDI,0x1
CALL 0x0021b030
MOV RAX,qword ptr [RSP + 0x30]
MOVAPS XMM2,XMM0
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD XMM1,qword ptr [RSP + 0x40]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0x40],XMM0
CVTSI2SD XMM0,dword ptr [RAX + 0x4]
MOVSD qword ptr [RSP + 0x10],XMM0
XOR EDI,EDI
CALL 0x0021b030
MOVAPS XMM2,XMM0
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x40]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0x40],XMM0
LAB_0014a092:
MOVSD XMM0,qword ptr [RSP + 0x40]
MOVSD XMM2,qword ptr [0x0027f270]
MOVAPS XMM1,XMM0
SUBSD XMM1,XMM2
CVTTSD2SI RCX,XMM1
CVTTSD2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
ADD RSP,0x58
RET
|
/* ResnetBlock::calculate_mem_size(ggml_type) */
ulong ResnetBlock::calculate_mem_size(int *param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
double dVar7;
double dVar8;
double dVar9;
double dVar10;
double local_18;
iVar1 = *param_1;
dVar7 = (double)ggml_type_sizef(0);
iVar2 = param_1[1];
iVar3 = *param_1;
dVar8 = (double)ggml_type_sizef(1);
iVar4 = param_1[1];
dVar9 = (double)ggml_type_sizef(0);
iVar5 = param_1[1];
iVar6 = param_1[1];
dVar10 = (double)ggml_type_sizef(1);
local_18 = (double)(iVar5 * iVar6 * 9) * dVar10 +
(double)(iVar4 << 2) * dVar9 +
(double)(iVar2 * iVar3 * 9) * dVar8 + (double)(iVar1 << 1) * dVar7 + 0.0;
if (param_1[1] != *param_1) {
iVar1 = param_1[1];
iVar2 = *param_1;
dVar7 = (double)ggml_type_sizef(1);
iVar3 = param_1[1];
dVar8 = (double)ggml_type_sizef(0);
local_18 = (double)iVar3 * dVar8 + (double)(iVar1 * iVar2) * dVar7 + local_18;
}
return (long)local_18 | (long)(local_18 - DAT_0027f270) & (long)local_18 >> 0x3f;
}
|
|
65,494 |
ResnetBlock::calculate_mem_size(ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
size_t calculate_mem_size(ggml_type wtype) {
double mem_size = 0;
mem_size += 2 * in_channels * ggml_type_sizef(GGML_TYPE_F32); // norm1_w/b
mem_size += out_channels * in_channels * 3 * 3 * ggml_type_sizef(GGML_TYPE_F16); // conv1_w
mem_size += 4 * out_channels * ggml_type_sizef(GGML_TYPE_F32); // conv1_b/norm2_w/norm2_b/conv2_b
mem_size += out_channels * out_channels * 3 * 3 * ggml_type_sizef(GGML_TYPE_F16); // conv2_w
if (out_channels != in_channels) {
mem_size += out_channels * in_channels * 1 * 1 * ggml_type_sizef(GGML_TYPE_F16); // nin_shortcut_w
mem_size += out_channels * ggml_type_sizef(GGML_TYPE_F32); // nin_shortcut_b
}
return static_cast<size_t>(mem_size);
}
|
O2
|
cpp
|
ResnetBlock::calculate_mem_size(ggml_type):
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
addl %eax, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %edi, %edi
callq 0x67bc7
mulsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
movl 0x4(%rbx), %eax
imull (%rbx), %eax
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
leal (%rax,%rax,8), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0x67bc7
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x4(%rbx), %eax
shll $0x2, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %edi, %edi
callq 0x67bc7
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movl %ebp, %edi
callq 0x67bc7
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
cmpl %eax, %ecx
je 0x2412c
imull %ecx, %eax
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x8(%rsp)
pushq $0x1
popq %rdi
movapd %xmm0, 0x10(%rsp)
callq 0x67bc7
mulsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
cvtsi2sdl 0x4(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %edi, %edi
callq 0x67bc7
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
subsd 0x75894(%rip), %xmm0 # 0x999d0
cvttsd2si %xmm0, %rax
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
|
_ZN11ResnetBlock18calculate_mem_sizeE9ggml_type:
push rbp
push rbx
sub rsp, 28h
mov rbx, rdi
mov eax, [rdi]
add eax, eax
cvtsi2sd xmm0, eax
movsd [rsp+38h+var_30], xmm0
xor edi, edi
call ggml_type_sizef
mulsd xmm0, [rsp+38h+var_30]
xorpd xmm1, xmm1
mov eax, [rbx+4]
imul eax, [rbx]
addsd xmm1, xmm0
movsd [rsp+38h+var_30], xmm1
lea eax, [rax+rax*8]
cvtsi2sd xmm0, eax
movsd qword ptr [rsp+38h+var_28], xmm0
push 1
pop rbp
mov edi, ebp
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+38h+var_28]
addsd xmm0, [rsp+38h+var_30]
movsd [rsp+38h+var_30], xmm0
mov eax, [rbx+4]
shl eax, 2
cvtsi2sd xmm0, eax
movsd qword ptr [rsp+38h+var_28], xmm0
xor edi, edi
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+38h+var_28]
addsd xmm0, [rsp+38h+var_30]
movsd [rsp+38h+var_30], xmm0
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
cvtsi2sd xmm0, eax
movsd qword ptr [rsp+38h+var_28], xmm0
mov edi, ebp
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+38h+var_28]
addsd xmm0, [rsp+38h+var_30]
mov eax, [rbx]
mov ecx, [rbx+4]
cmp ecx, eax
jz short loc_2412C
imul eax, ecx
cvtsi2sd xmm1, eax
movsd [rsp+38h+var_30], xmm1
push 1
pop rdi
movapd [rsp+38h+var_28], xmm0
call ggml_type_sizef
mulsd xmm0, [rsp+38h+var_30]
addsd xmm0, qword ptr [rsp+38h+var_28]
movsd [rsp+38h+var_30], xmm0
cvtsi2sd xmm0, dword ptr [rbx+4]
movsd qword ptr [rsp+38h+var_28], xmm0
xor edi, edi
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+38h+var_28]
addsd xmm0, [rsp+38h+var_30]
loc_2412C:
cvttsd2si rcx, xmm0
mov rdx, rcx
subsd xmm0, cs:qword_999D0
cvttsd2si rax, xmm0
sar rdx, 3Fh
and rax, rdx
or rax, rcx
add rsp, 28h
pop rbx
pop rbp
retn
|
long long ResnetBlock::calculate_mem_size(int *a1)
{
double v2; // xmm0_8
int v3; // eax
int v4; // ecx
double v6; // [rsp+8h] [rbp-30h]
double v7; // [rsp+8h] [rbp-30h]
double v8; // [rsp+8h] [rbp-30h]
double v9; // [rsp+8h] [rbp-30h]
double v10; // [rsp+8h] [rbp-30h]
double v11; // [rsp+10h] [rbp-28h]
double v12; // [rsp+10h] [rbp-28h]
double v13; // [rsp+10h] [rbp-28h]
double v14; // [rsp+10h] [rbp-28h]
v6 = (double)(2 * *a1);
v7 = ggml_type_sizef(0LL) * v6 + 0.0;
v11 = (double)(9 * *a1 * a1[1]);
v8 = ggml_type_sizef(1LL) * v11 + v7;
v12 = (double)(4 * a1[1]);
v9 = ggml_type_sizef(0LL) * v12 + v8;
v13 = (double)(9 * a1[1] * a1[1]);
v2 = ggml_type_sizef(1LL) * v13 + v9;
v4 = a1[1];
if ( v4 != *a1 )
{
v3 = *a1;
v10 = ggml_type_sizef(1LL) * (double)(v4 * v3) + v2;
v14 = (double)a1[1];
v2 = ggml_type_sizef(0LL) * v14 + v10;
}
return (unsigned int)(int)v2;
}
|
calculate_mem_size:
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
ADD EAX,EAX
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x8],XMM0
XOR EDI,EDI
CALL 0x00167bc7
MULSD XMM0,qword ptr [RSP + 0x8]
XORPD XMM1,XMM1
MOV EAX,dword ptr [RBX + 0x4]
IMUL EAX,dword ptr [RBX]
ADDSD XMM1,XMM0
MOVSD qword ptr [RSP + 0x8],XMM1
LEA EAX,[RAX + RAX*0x8]
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x10],XMM0
PUSH 0x1
POP RBP
MOV EDI,EBP
CALL 0x00167bc7
MULSD XMM0,qword ptr [RSP + 0x10]
ADDSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [RSP + 0x8],XMM0
MOV EAX,dword ptr [RBX + 0x4]
SHL EAX,0x2
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x10],XMM0
XOR EDI,EDI
CALL 0x00167bc7
MULSD XMM0,qword ptr [RSP + 0x10]
ADDSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [RSP + 0x8],XMM0
MOV EAX,dword ptr [RBX + 0x4]
IMUL EAX,EAX
LEA EAX,[RAX + RAX*0x8]
CVTSI2SD XMM0,EAX
MOVSD qword ptr [RSP + 0x10],XMM0
MOV EDI,EBP
CALL 0x00167bc7
MULSD XMM0,qword ptr [RSP + 0x10]
ADDSD XMM0,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x4]
CMP ECX,EAX
JZ 0x0012412c
IMUL EAX,ECX
CVTSI2SD XMM1,EAX
MOVSD qword ptr [RSP + 0x8],XMM1
PUSH 0x1
POP RDI
MOVAPD xmmword ptr [RSP + 0x10],XMM0
CALL 0x00167bc7
MULSD XMM0,qword ptr [RSP + 0x8]
ADDSD XMM0,qword ptr [RSP + 0x10]
MOVSD qword ptr [RSP + 0x8],XMM0
CVTSI2SD XMM0,dword ptr [RBX + 0x4]
MOVSD qword ptr [RSP + 0x10],XMM0
XOR EDI,EDI
CALL 0x00167bc7
MULSD XMM0,qword ptr [RSP + 0x10]
ADDSD XMM0,qword ptr [RSP + 0x8]
LAB_0012412c:
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SUBSD XMM0,qword ptr [0x001999d0]
CVTTSD2SI RAX,XMM0
SAR RDX,0x3f
AND RAX,RDX
OR RAX,RCX
ADD RSP,0x28
POP RBX
POP RBP
RET
|
/* ResnetBlock::calculate_mem_size(ggml_type) */
ulong ResnetBlock::calculate_mem_size(int *param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
double dVar6;
double dVar7;
double dVar8;
double dVar9;
iVar1 = *param_1;
dVar6 = (double)ggml_type_sizef(0);
iVar2 = param_1[1];
iVar3 = *param_1;
dVar7 = (double)ggml_type_sizef(1);
iVar4 = param_1[1];
dVar8 = (double)ggml_type_sizef(0);
iVar5 = param_1[1];
dVar9 = (double)ggml_type_sizef(1);
dVar6 = dVar9 * (double)(iVar5 * iVar5 * 9) +
dVar8 * (double)(iVar4 << 2) +
dVar7 * (double)(iVar2 * iVar3 * 9) + dVar6 * (double)(iVar1 * 2) + 0.0;
iVar1 = *param_1;
iVar2 = param_1[1];
if (iVar2 != iVar1) {
dVar7 = (double)ggml_type_sizef(1);
iVar3 = param_1[1];
dVar8 = (double)ggml_type_sizef(0);
dVar6 = dVar8 * (double)iVar3 + dVar7 * (double)(iVar1 * iVar2) + dVar6;
}
return (long)(dVar6 - DAT_001999d0) & (long)dVar6 >> 0x3f | (long)dVar6;
}
|
|
65,495 |
ResnetBlock::calculate_mem_size(ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
size_t calculate_mem_size(ggml_type wtype) {
double mem_size = 0;
mem_size += 2 * in_channels * ggml_type_sizef(GGML_TYPE_F32); // norm1_w/b
mem_size += out_channels * in_channels * 3 * 3 * ggml_type_sizef(GGML_TYPE_F16); // conv1_w
mem_size += 4 * out_channels * ggml_type_sizef(GGML_TYPE_F32); // conv1_b/norm2_w/norm2_b/conv2_b
mem_size += out_channels * out_channels * 3 * 3 * ggml_type_sizef(GGML_TYPE_F16); // conv2_w
if (out_channels != in_channels) {
mem_size += out_channels * in_channels * 1 * 1 * ggml_type_sizef(GGML_TYPE_F16); // nin_shortcut_w
mem_size += out_channels * ggml_type_sizef(GGML_TYPE_F32); // nin_shortcut_b
}
return static_cast<size_t>(mem_size);
}
|
O3
|
cpp
|
ResnetBlock::calculate_mem_size(ggml_type):
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
addl %eax, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %edi, %edi
callq 0x8cf2e
mulsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
movl 0x4(%rbx), %eax
imull (%rbx), %eax
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
leal (%rax,%rax,8), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x1, %edi
callq 0x8cf2e
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x4(%rbx), %eax
shll $0x2, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %edi, %edi
callq 0x8cf2e
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x4(%rbx), %eax
imull %eax, %eax
leal (%rax,%rax,8), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x1, %edi
callq 0x8cf2e
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
cmpl %eax, %ecx
je 0x3a05b
imull %ecx, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x8(%rsp)
movl $0x1, %edi
movapd %xmm0, 0x10(%rsp)
callq 0x8cf2e
mulsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %edi, %edi
callq 0x8cf2e
mulsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
subsd 0x82a45(%rip), %xmm0 # 0xbcab0
cvttsd2si %xmm0, %rax
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rcx, %rax
addq $0x20, %rsp
popq %rbx
retq
|
_ZN11ResnetBlock18calculate_mem_sizeE9ggml_type:
push rbx
sub rsp, 20h
mov rbx, rdi
mov eax, [rdi]
add eax, eax
cvtsi2sd xmm0, eax
movsd [rsp+28h+var_20], xmm0
xor edi, edi
call ggml_type_sizef
mulsd xmm0, [rsp+28h+var_20]
xorpd xmm1, xmm1
mov eax, [rbx+4]
imul eax, [rbx]
addsd xmm1, xmm0
movsd [rsp+28h+var_20], xmm1
lea eax, [rax+rax*8]
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
movsd qword ptr [rsp+28h+var_18], xmm0
mov edi, 1
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+28h+var_18]
addsd xmm0, [rsp+28h+var_20]
movsd [rsp+28h+var_20], xmm0
mov eax, [rbx+4]
shl eax, 2
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
movsd qword ptr [rsp+28h+var_18], xmm0
xor edi, edi
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+28h+var_18]
addsd xmm0, [rsp+28h+var_20]
movsd [rsp+28h+var_20], xmm0
mov eax, [rbx+4]
imul eax, eax
lea eax, [rax+rax*8]
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
movsd qword ptr [rsp+28h+var_18], xmm0
mov edi, 1
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+28h+var_18]
addsd xmm0, [rsp+28h+var_20]
mov eax, [rbx]
mov ecx, [rbx+4]
cmp ecx, eax
jz short loc_3A05B
imul eax, ecx
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
movsd [rsp+28h+var_20], xmm1
mov edi, 1
movapd [rsp+28h+var_18], xmm0
call ggml_type_sizef
mulsd xmm0, [rsp+28h+var_20]
addsd xmm0, qword ptr [rsp+28h+var_18]
movsd [rsp+28h+var_20], xmm0
xorps xmm0, xmm0
cvtsi2sd xmm0, dword ptr [rbx+4]
movsd qword ptr [rsp+28h+var_18], xmm0
xor edi, edi
call ggml_type_sizef
mulsd xmm0, qword ptr [rsp+28h+var_18]
addsd xmm0, [rsp+28h+var_20]
loc_3A05B:
cvttsd2si rcx, xmm0
mov rdx, rcx
subsd xmm0, cs:qword_BCAB0
cvttsd2si rax, xmm0
sar rdx, 3Fh
and rax, rdx
or rax, rcx
add rsp, 20h
pop rbx
retn
|
long long ResnetBlock::calculate_mem_size(int *a1)
{
double v2; // xmm0_8
int v3; // eax
int v4; // ecx
double v6; // [rsp+8h] [rbp-20h]
double v7; // [rsp+8h] [rbp-20h]
double v8; // [rsp+8h] [rbp-20h]
double v9; // [rsp+8h] [rbp-20h]
double v10; // [rsp+8h] [rbp-20h]
double v11; // [rsp+10h] [rbp-18h]
double v12; // [rsp+10h] [rbp-18h]
double v13; // [rsp+10h] [rbp-18h]
double v14; // [rsp+10h] [rbp-18h]
v6 = (double)(2 * *a1);
v7 = ggml_type_sizef(0LL) * v6 + 0.0;
v11 = (double)(9 * *a1 * a1[1]);
v8 = ggml_type_sizef(1LL) * v11 + v7;
v12 = (double)(4 * a1[1]);
v9 = ggml_type_sizef(0LL) * v12 + v8;
v13 = (double)(9 * a1[1] * a1[1]);
v2 = ggml_type_sizef(1LL) * v13 + v9;
v4 = a1[1];
if ( v4 != *a1 )
{
v3 = *a1;
v10 = ggml_type_sizef(1LL) * (double)(v4 * v3) + v2;
v14 = (double)a1[1];
v2 = ggml_type_sizef(0LL) * v14 + v10;
}
return (unsigned int)(int)v2;
}
| |||
65,496 |
minja::Parser::parseMathPow()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
}
|
O3
|
cpp
|
minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8a91c
cmpq $0x0, (%rbx)
je 0x8a86e
leaq 0x30(%rsp), %rbp
leaq 0x20(%rsp), %r13
leaq 0xa2292(%rip), %rax # 0x12c978
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movq %rbp, 0x20(%rsp)
movq %r13, %rdi
leaq 0x679a3(%rip), %rsi # 0xf20a1
leaq 0x6799e(%rip), %rdx # 0xf20a3
callq 0x22b0c
movq %rsp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x86b4e
movq (%rsp), %rdi
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8a73d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8a754
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1ba20
testq %r15, %r15
je 0x8a828
movq %r13, %rdi
movq %r14, %rsi
callq 0x8a91c
cmpq $0x0, 0x20(%rsp)
je 0x8a83a
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x8a79e
movq 0xa37f0(%rip), %rcx # 0x12df80
cmpb $0x0, (%rcx)
je 0x8a79a
incl 0x8(%rax)
jmp 0x8a79e
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movl $0x58, %edi
callq 0x1b9f0
movq %rax, %r15
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r15)
movq 0x40(%rsp), %rax
movq %rax, (%r15)
movq %r15, %r12
addq $0x10, %r12
movq %r12, %rdi
movq %rsp, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0x4, %r8d
callq 0x985aa
movq %r12, (%rbx)
movq 0x8(%rbx), %rdi
movq %r15, 0x8(%rbx)
testq %rdi, %rdi
je 0x8a801
callq 0x70324
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8a810
callq 0x70324
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8a6ef
callq 0x70324
jmp 0x8a6ef
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b4f0
movq %rax, %r15
leaq 0x67856(%rip), %rsi # 0xf20a4
movq %rax, %rdi
callq 0x1b380
movq 0xa378b(%rip), %rsi # 0x12dfe8
movq 0xa36f4(%rip), %rdx # 0x12df58
movq %r15, %rdi
callq 0x1c150
jmp 0x8a8a0
movl $0x10, %edi
callq 0x1b4f0
movq %rax, %r15
leaq 0x677f3(%rip), %rsi # 0xf2075
movq %rax, %rdi
callq 0x1b380
movq 0xa3757(%rip), %rsi # 0x12dfe8
movq 0xa36c0(%rip), %rdx # 0x12df58
movq %r15, %rdi
callq 0x1c150
jmp 0x8a8e6
movq %rax, %r14
movq %r15, %rdi
callq 0x1b770
jmp 0x8a905
movq %rax, %r14
jmp 0x8a8d5
movq %rax, %r14
movq %r15, %rdi
callq 0x1b770
jmp 0x8a8d5
jmp 0x8a8e6
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8a8d5
callq 0x70324
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8a905
callq 0x70324
jmp 0x8a905
movq %rax, %r14
jmp 0x8a905
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8a905
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8a913
callq 0x70324
movq %r14, %rdi
callq 0x1c1e0
nop
|
_ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_8A86E
lea rbp, [rsp+78h+var_48]
lea r13, [rsp+78h+var_58]
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [rsp+78h+var_38], rax
loc_8A6EF:
mov [rsp+78h+var_58], rbp
mov rdi, r13
lea rsi, asc_F20A1; "**"
lea rdx, asc_F20A1+2; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, rsp
mov rsi, r14
mov rdx, r13
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+78h+var_78]; void *
mov r15, [rsp+78h+var_70]
lea rax, [rsp+78h+var_68]
cmp rdi, rax
jz short loc_8A73D
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A73D:
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_8A754
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A754:
test r15, r15
jz loc_8A828
mov rdi, r13; this
mov rsi, r14
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+78h+var_58], 0
jz loc_8A83A
mov rax, [r14]
mov [rsp+78h+var_78], rax
mov rax, [r14+8]
mov [rsp+78h+var_70], rax
test rax, rax
jz short loc_8A79E
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8A79A
inc dword ptr [rax+8]
jmp short loc_8A79E
loc_8A79A:
lock inc dword ptr [rax+8]
loc_8A79E:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_68], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rax, 100000001h
mov [r15+8], rax
mov rax, [rsp+78h+var_38]
mov [r15], rax
mov r12, r15
add r12, 10h
mov rdi, r12
mov rsi, rsp
mov rdx, rbx
mov rcx, r13
mov r8d, 4
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r12
mov rdi, [rbx+8]
mov [rbx+8], r15
test rdi, rdi
jz short loc_8A801
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8A801:
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_8A810
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8A810:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz loc_8A6EF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_8A6EF
loc_8A828:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8A83A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_8A8A0
loc_8A86E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_8A8A0:
jmp short loc_8A8E6
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8A905
mov r14, rax
jmp short loc_8A8D5
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8A8D5
jmp short loc_8A8E6
mov r14, rax
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_8A8D5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8A8D5:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_8A905
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8A905
loc_8A8E6:
mov r14, rax
jmp short loc_8A905
mov r14, rax
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_8A905
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A905:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_8A913
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8A913:
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseMathPow(volatile signed __int32 **this, long long a2)
{
volatile signed __int32 *v3; // r15
volatile signed __int32 *v4; // rax
long long **v5; // r15
volatile signed __int32 *v6; // rdi
std::runtime_error *v8; // r15
std::runtime_error *exception; // r15
void *v10; // [rsp+0h] [rbp-78h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-70h]
long long v12; // [rsp+10h] [rbp-68h] BYREF
void *v13; // [rsp+20h] [rbp-58h] BYREF
volatile signed __int32 *v14; // [rsp+28h] [rbp-50h]
_QWORD v15[2]; // [rsp+30h] [rbp-48h] BYREF
long long *v16; // [rsp+40h] [rbp-38h]
minja::Parser::parseMathPlusMinus((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v16 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
while ( 1 )
{
v13 = v15;
std::string::_M_construct<char const*>((long long)&v13, "**", (long long)"");
minja::Parser::consumeToken(&v10, a2, (_BYTE **)&v13, 1u);
v3 = v11;
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( v13 != v15 )
operator delete(v13, v15[0] + 1LL);
if ( !v3 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v13);
if ( !v13 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'math pow' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v10 = *(void **)a2;
v4 = *(volatile signed __int32 **)(a2 + 8);
v11 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v12 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16);
v5 = (long long **)operator new(0x58uLL);
v5[1] = (long long *)0x100000001LL;
*v5 = v16;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 2, &v10, this, &v13, 4LL);
*this = (volatile signed __int32 *)(v5 + 2);
v6 = this[1];
this[1] = (volatile signed __int32 *)v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
}
return (minja::Parser *)this;
}
|
parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
CALL 0x0018a91c
CMP qword ptr [RBX],0x0
JZ 0x0018a86e
LEA RBP,[RSP + 0x30]
LEA R13,[RSP + 0x20]
LEA RAX,[0x22c978]
ADD RAX,0x10
MOV qword ptr [RSP + 0x40],RAX
LAB_0018a6ef:
MOV qword ptr [RSP + 0x20],RBP
LAB_0018a6f4:
MOV RDI,R13
LEA RSI,[0x1f20a1]
LEA RDX,[0x1f20a3]
CALL 0x00122b0c
LAB_0018a70a:
MOV RDI,RSP
MOV RSI,R14
MOV RDX,R13
MOV ECX,0x1
CALL 0x00186b4e
MOV RDI,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018a73d
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011ba20
LAB_0018a73d:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,RBP
JZ 0x0018a754
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011ba20
LAB_0018a754:
TEST R15,R15
JZ 0x0018a828
LAB_0018a75d:
MOV RDI,R13
MOV RSI,R14
CALL 0x0018a91c
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0018a83a
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x0018a79e
MOV RCX,qword ptr [0x0022df80]
CMP byte ptr [RCX],0x0
JZ 0x0018a79a
INC dword ptr [RAX + 0x8]
JMP 0x0018a79e
LAB_0018a79a:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018a79e:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LAB_0018a7ab:
MOV EDI,0x58
CALL 0x0011b9f0
LAB_0018a7b5:
MOV R15,RAX
MOV RAX,0x100000001
MOV qword ptr [R15 + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [R15],RAX
MOV R12,R15
ADD R12,0x10
MOV RDI,R12
MOV RSI,RSP
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0x4
CALL 0x001985aa
MOV qword ptr [RBX],R12
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],R15
TEST RDI,RDI
JZ 0x0018a801
CALL 0x00170324
LAB_0018a801:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018a810
CALL 0x00170324
LAB_0018a810:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0018a6ef
CALL 0x00170324
JMP 0x0018a6ef
LAB_0018a828:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018a83a:
MOV EDI,0x10
CALL 0x0011b4f0
MOV R15,RAX
LAB_0018a847:
LEA RSI,[0x1f20a4]
MOV RDI,RAX
CALL 0x0011b380
LAB_0018a856:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df58]
MOV RDI,R15
CALL 0x0011c150
LAB_0018a86e:
MOV EDI,0x10
CALL 0x0011b4f0
MOV R15,RAX
LAB_0018a87b:
LEA RSI,[0x1f2075]
MOV RDI,RAX
CALL 0x0011b380
LAB_0018a88a:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df58]
MOV RDI,R15
CALL 0x0011c150
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long local_68 [2];
long *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48 [2];
int **local_38;
parseMathPlusMinus();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018a87b to 0018a889 has its CatchHandler @ 0018a8a2 */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression");
/* try { // try from 0018a88a to 0018a89f has its CatchHandler @ 0018a8a0 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df58);
}
local_38 = &PTR___Sp_counted_ptr_inplace_0022c988;
while( true ) {
local_58 = local_48;
/* try { // try from 0018a6f4 to 0018a709 has its CatchHandler @ 0018a8e6 */
std::__cxx11::string::_M_construct<char_const*>(&local_58,&DAT_001f20a1,&DAT_001f20a3);
/* try { // try from 0018a70a to 0018a71c has its CatchHandler @ 0018a8eb */
consumeToken(&local_78);
p_Var1 = local_70;
if (local_78 != local_68) {
operator_delete(local_78,local_68[0] + 1);
}
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break;
/* try { // try from 0018a75d to 0018a767 has its CatchHandler @ 0018a8c1 */
parseMathPlusMinus();
if (local_58 == (long *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018a847 to 0018a855 has its CatchHandler @ 0018a8b4 */
std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression");
/* try { // try from 0018a856 to 0018a86b has its CatchHandler @ 0018a8af */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df58);
}
local_78 = (long *)*in_RSI;
local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
}
}
local_68[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 0018a7ab to 0018a7b4 has its CatchHandler @ 0018a8c3 */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = local_38;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_78);
*in_RDI = (long)(puVar2 + 2);
p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar2;
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1);
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
}
return;
}
|
|
65,497 |
my_thread_global_end
|
eloqsql/mysys/my_thr_init.c
|
void my_thread_global_end(void)
{
struct timespec abstime;
my_bool all_threads_killed= 1;
set_timespec(abstime, my_thread_end_wait_time);
mysql_mutex_lock(&THR_LOCK_threads);
while (THR_thread_count > 0)
{
int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads,
&abstime);
if (error == ETIMEDOUT || error == ETIME)
{
#ifdef HAVE_PTHREAD_KILL
/*
We shouldn't give an error here, because if we don't have
pthread_kill(), programs like mysqld can't ensure that all threads
are killed when we enter here.
*/
if (THR_thread_count)
fprintf(stderr,
"Error in my_thread_global_end(): %d threads didn't exit\n",
THR_thread_count);
#endif
all_threads_killed= 0;
break;
}
}
mysql_mutex_unlock(&THR_LOCK_threads);
my_thread_destroy_common_mutex();
/*
Only destroy the mutex & conditions if we don't have other threads around
that could use them.
*/
if (all_threads_killed)
{
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done= 0;
}
|
O0
|
c
|
my_thread_global_end:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb $0x1, -0x11(%rbp)
callq 0x30980
movq %rax, -0x28(%rbp)
imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8
leaq 0x1ac6ac(%rip), %rcx # 0x1d5360
movl (%rcx), %ecx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x8(%rbp)
leaq 0x3648d1(%rip), %rdi # 0x38d5c0
leaq 0x56cad(%rip), %rsi # 0x7f9a3
movl $0xce, %edx
callq 0x28da0
leaq 0x3646b9(%rip), %rax # 0x38d3c0
cmpl $0x0, (%rax)
jbe 0x28d74
leaq 0x36493d(%rip), %rdi # 0x38d650
leaq 0x3648a6(%rip), %rsi # 0x38d5c0
leaq -0x10(%rbp), %rdx
leaq 0x56c7e(%rip), %rcx # 0x7f9a3
movl $0xd2, %r8d
callq 0x28e10
movl %eax, -0x2c(%rbp)
cmpl $0x6e, -0x2c(%rbp)
je 0x28d3f
cmpl $0x3e, -0x2c(%rbp)
jne 0x28d72
leaq 0x36467a(%rip), %rax # 0x38d3c0
cmpl $0x0, (%rax)
je 0x28d6c
movq 0x1ac28e(%rip), %rax # 0x1d4fe0
movq (%rax), %rdi
leaq 0x364664(%rip), %rax # 0x38d3c0
movl (%rax), %edx
leaq 0x56c7b(%rip), %rsi # 0x7f9e0
movb $0x0, %al
callq 0x24440
movb $0x0, -0x11(%rbp)
jmp 0x28d74
jmp 0x28d00
leaq 0x364845(%rip), %rdi # 0x38d5c0
callq 0x28e90
callq 0x28770
cmpb $0x0, -0x11(%rbp)
je 0x28d90
callq 0x28820
movb $0x0, 0x3648f1(%rip) # 0x38d688
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_thread_global_end:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_11], 1
call my_hrtime
mov [rbp+var_28], rax
imul rax, [rbp+var_28], 3E8h
lea rcx, my_thread_end_wait_time
mov ecx, [rcx]
imul rcx, 3B9ACA00h
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_8], rdx
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0CEh
call inline_mysql_mutex_lock
loc_28D00:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jbe short loc_28D74
lea rdi, THR_COND_threads
lea rsi, THR_LOCK_threads
lea rdx, [rbp+var_10]
lea rcx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 0D2h
call inline_mysql_cond_timedwait
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 6Eh ; 'n'
jz short loc_28D3F
cmp [rbp+var_2C], 3Eh ; '>'
jnz short loc_28D72
loc_28D3F:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jz short loc_28D6C
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, THR_thread_count
mov edx, [rax]
lea rsi, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"...
mov al, 0
call _fprintf
loc_28D6C:
mov [rbp+var_11], 0
jmp short loc_28D74
loc_28D72:
jmp short loc_28D00
loc_28D74:
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock
call my_thread_destroy_common_mutex
cmp [rbp+var_11], 0
jz short loc_28D90
call my_thread_destroy_internal_mutex
loc_28D90:
mov cs:my_thread_global_init_done, 0
add rsp, 30h
pop rbp
retn
|
long long my_thread_global_end()
{
long long result; // rax
int v1; // [rsp+4h] [rbp-2Ch]
unsigned long long v2; // [rsp+10h] [rbp-20h]
char v3; // [rsp+1Fh] [rbp-11h]
_QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF
v3 = 1;
v2 = 1000000000LL * my_thread_end_wait_time + 1000 * my_hrtime();
v4[0] = v2 / 0x3B9ACA00;
v4[1] = v2 % 0x3B9ACA00;
inline_mysql_mutex_lock(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 206LL);
while ( THR_thread_count )
{
v1 = inline_mysql_cond_timedwait(
&THR_COND_threads,
&THR_LOCK_threads,
v4,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
210LL);
if ( v1 == 110 || v1 == 62 )
{
if ( THR_thread_count )
fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count);
v3 = 0;
break;
}
}
inline_mysql_mutex_unlock(&THR_LOCK_threads);
result = my_thread_destroy_common_mutex();
if ( v3 )
result = my_thread_destroy_internal_mutex();
my_thread_global_init_done = 0;
return result;
}
|
my_thread_global_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV byte ptr [RBP + -0x11],0x1
CALL 0x00130980
MOV qword ptr [RBP + -0x28],RAX
IMUL RAX,qword ptr [RBP + -0x28],0x3e8
LEA RCX,[0x2d5360]
MOV ECX,dword ptr [RCX]
IMUL RCX,RCX,0x3b9aca00
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x8],RDX
LEA RDI,[0x48d5c0]
LEA RSI,[0x17f9a3]
MOV EDX,0xce
CALL 0x00128da0
LAB_00128d00:
LEA RAX,[0x48d3c0]
CMP dword ptr [RAX],0x0
JBE 0x00128d74
LEA RDI,[0x48d650]
LEA RSI,[0x48d5c0]
LEA RDX,[RBP + -0x10]
LEA RCX,[0x17f9a3]
MOV R8D,0xd2
CALL 0x00128e10
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x6e
JZ 0x00128d3f
CMP dword ptr [RBP + -0x2c],0x3e
JNZ 0x00128d72
LAB_00128d3f:
LEA RAX,[0x48d3c0]
CMP dword ptr [RAX],0x0
JZ 0x00128d6c
MOV RAX,qword ptr [0x002d4fe0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0x48d3c0]
MOV EDX,dword ptr [RAX]
LEA RSI,[0x17f9e0]
MOV AL,0x0
CALL 0x00124440
LAB_00128d6c:
MOV byte ptr [RBP + -0x11],0x0
JMP 0x00128d74
LAB_00128d72:
JMP 0x00128d00
LAB_00128d74:
LEA RDI,[0x48d5c0]
CALL 0x00128e90
CALL 0x00128770
CMP byte ptr [RBP + -0x11],0x0
JZ 0x00128d90
CALL 0x00128820
LAB_00128d90:
MOV byte ptr [0x0048d688],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_thread_global_end(void)
{
bool bVar1;
int iVar2;
long lVar3;
ulong local_18;
ulong local_10;
bVar1 = true;
lVar3 = my_hrtime();
local_10 = lVar3 * 1000 + (ulong)my_thread_end_wait_time * 1000000000;
local_18 = local_10 / 1000000000;
local_10 = local_10 % 1000000000;
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xce);
do {
if (THR_thread_count == 0) goto LAB_00128d74;
iVar2 = inline_mysql_cond_timedwait
(THR_COND_threads,THR_LOCK_threads,&local_18,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2);
} while ((iVar2 != 0x6e) && (iVar2 != 0x3e));
if (THR_thread_count != 0) {
fprintf(*(FILE **)PTR_stderr_002d4fe0,
"Error in my_thread_global_end(): %d threads didn\'t exit\n",(ulong)THR_thread_count);
}
bVar1 = false;
LAB_00128d74:
inline_mysql_mutex_unlock(THR_LOCK_threads);
my_thread_destroy_common_mutex();
if (bVar1) {
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done = 0;
return;
}
|
|
65,498 |
mysql_rollback_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_rollback_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_rollback,
(parms->mysql),
parms->mysql,
my_bool,
r_my_bool)
}
|
O3
|
c
|
mysql_rollback_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x480(%rdi), %rax
movq 0x28(%rax), %rbx
callq 0x232d9
movb %al, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_rollback_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+480h]
mov rbx, [rax+28h]
call mysql_rollback
mov [rbx+8], al
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_rollback_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL);
result = mysql_rollback(v1);
*(_BYTE *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_rollback_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x001232d9
MOV byte ptr [RBX + 0x8],AL
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_rollback_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_rollback();
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
65,499 |
eval_tokens(llama_context*, std::vector<int, std::allocator<int>>, int, int*)
|
monkey531[P]llama/examples/llava/minicpmv-cli.cpp
|
static bool eval_tokens(struct llama_context * ctx_llama, std::vector<llama_token> tokens, int n_batch, int * n_past) {
int N = (int) tokens.size();
for (int i = 0; i < N; i += n_batch) {
int n_eval = (int) tokens.size() - i;
if (n_eval > n_batch) {
n_eval = n_batch;
}
if (llama_decode(ctx_llama, llama_batch_get_one(&tokens[i], n_eval))) {
LOG_ERR("%s : failed to eval. token %d/%d (batch size %d, n_past %d)\n", __func__, i, N, n_batch, *n_past);
return false;
}
*n_past += n_eval;
}
return true;
}
|
O3
|
cpp
|
eval_tokens(llama_context*, std::vector<int, std::allocator<int>>, int, int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, 0x48(%rsp)
movq %rdi, 0x68(%rsp)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
shrq $0x2, %rax
movq %rax, 0x40(%rsp)
testl %eax, %eax
jle 0x23f23
movl %edx, %ebp
movq %rsi, %r12
movslq %edx, %rcx
movq 0x40(%rsp), %rax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq %rax, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
leaq (,%rcx,4), %rax
movq %rax, 0x50(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%r12), %rsi
movq 0x8(%r12), %rbx
subq %rsi, %rbx
shrq $0x2, %rbx
addl %r15d, %ebx
cmpl %ebp, %ebx
cmovgel %ebp, %ebx
addq %r14, %rsi
leaq 0x70(%rsp), %rdi
movl %ebx, %edx
callq 0x1e100
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x70(%rsp), %xmm0
movups 0x80(%rsp), %xmm1
movups 0x90(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x68(%rsp), %rdi
callq 0x1e400
testl %eax, %eax
jne 0x23edc
movq 0x48(%rsp), %rax
addl %ebx, (%rax)
addq 0x60(%rsp), %r13
addq 0x50(%rsp), %r14
subl %ebp, %r15d
cmpq 0x58(%rsp), %r13
jl 0x23e5a
jmp 0x23f23
leaq 0x1339c5(%rip), %rax # 0x1578a8
cmpl $0x0, (%rax)
js 0x23f23
negl %r15d
callq 0xef023
movq 0x48(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x8(%rsp)
movl %ebp, (%rsp)
leaq 0xe564f(%rip), %rdx # 0x109554
leaq 0xe5685(%rip), %rcx # 0x109591
movq %rax, %rdi
movl $0x4, %esi
movl %r15d, %r8d
movq 0x40(%rsp), %r9
xorl %eax, %eax
callq 0xef0c0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZL11eval_tokensP13llama_contextSt6vectorIiSaIiEEiPi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov [rsp+0D8h+var_90], rcx
mov [rsp+0D8h+var_70], rdi
mov rax, [rsi+8]
sub rax, [rsi]
shr rax, 2
mov [rsp+0D8h+var_98], rax
test eax, eax
jle loc_23F23
mov ebp, edx
mov r12, rsi
movsxd rcx, edx
mov rax, [rsp+0D8h+var_98]
and eax, 7FFFFFFFh
mov [rsp+0D8h+var_80], rax
mov [rsp+0D8h+var_78], rcx
lea rax, ds:0[rcx*4]
mov [rsp+0D8h+var_88], rax
xor r15d, r15d
xor r14d, r14d
xor r13d, r13d
loc_23E5A:
mov rsi, [r12]
mov rbx, [r12+8]
sub rbx, rsi
shr rbx, 2
add ebx, r15d
cmp ebx, ebp
cmovge ebx, ebp
add rsi, r14
lea rdi, [rsp+0D8h+var_68]
mov edx, ebx
call _llama_batch_get_one
mov rax, [rsp+0D8h+var_38]
mov [rsp+0D8h+var_A8], rax
movups xmm0, [rsp+0D8h+var_68]
movups xmm1, [rsp+0D8h+var_58]
movups xmm2, [rsp+0D8h+var_48]
movups [rsp+0D8h+var_B8], xmm2
movups [rsp+0D8h+var_C8], xmm1
movups [rsp+0D8h+var_D8], xmm0
mov rdi, [rsp+0D8h+var_70]
call _llama_decode
test eax, eax
jnz short loc_23EDC
mov rax, [rsp+0D8h+var_90]
add [rax], ebx
add r13, [rsp+0D8h+var_78]
add r14, [rsp+0D8h+var_88]
sub r15d, ebp
cmp r13, [rsp+0D8h+var_80]
jl short loc_23E5A
jmp short loc_23F23
loc_23EDC:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_23F23
neg r15d
call _Z15common_log_mainv; common_log_main(void)
mov rcx, [rsp+0D8h+var_90]
mov ecx, [rcx]
mov dword ptr [rsp+0D8h+var_D8+8], ecx
mov dword ptr [rsp+0D8h+var_D8], ebp
lea rdx, aSFailedToEvalT; "%s : failed to eval. token %d/%d (batch"...
lea rcx, aEvalTokens; "eval_tokens"
mov rdi, rax
mov esi, 4
mov r8d, r15d
mov r9, [rsp+0D8h+var_98]
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_23F23:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
void * eval_tokens(long long a1, _QWORD *a2, int a3, _DWORD *a4)
{
void *result; // rax
int v7; // r15d
long long v8; // r14
long long v9; // r13
unsigned int v10; // ebx
long long v11; // rsi
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
int v16; // eax
int v17; // [rsp+40h] [rbp-98h]
long long v19; // [rsp+50h] [rbp-88h]
long long v20; // [rsp+60h] [rbp-78h]
_QWORD v21[13]; // [rsp+70h] [rbp-68h] BYREF
result = (void *)((a2[1] - *a2) >> 2);
v17 = (int)result;
if ( (int)result > 0 )
{
v20 = a3;
v19 = 4LL * a3;
v7 = 0;
v8 = 0LL;
v9 = 0LL;
while ( 1 )
{
v10 = v7 + ((a2[1] - *a2) >> 2);
if ( (int)v10 >= a3 )
v10 = a3;
v11 = v8 + *a2;
llama_batch_get_one(v21, v11, v10);
if ( (unsigned int)llama_decode(
a1,
v11,
v12,
v13,
v14,
v15,
v21[0],
v21[1],
v21[2],
v21[3],
v21[4],
v21[5],
v21[6]) )
break;
result = a4;
*a4 += v10;
v9 += v20;
v8 += v19;
v7 -= a3;
if ( v9 >= (v17 & 0x7FFFFFFFu) )
return result;
}
result = &common_log_verbosity_thold;
if ( common_log_verbosity_thold >= 0 )
{
v16 = common_log_main();
return (void *)common_log_add(
v16,
4,
(unsigned int)"%s : failed to eval. token %d/%d (batch size %d, n_past %d)\n",
(unsigned int)"eval_tokens",
-v7,
v17,
a3);
}
}
return result;
}
|
eval_tokens:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x68],RDI
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
SHR RAX,0x2
MOV qword ptr [RSP + 0x40],RAX
TEST EAX,EAX
JLE 0x00123f23
MOV EBP,EDX
MOV R12,RSI
MOVSXD RCX,EDX
MOV RAX,qword ptr [RSP + 0x40]
AND EAX,0x7fffffff
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RCX
LEA RAX,[RCX*0x4]
MOV qword ptr [RSP + 0x50],RAX
XOR R15D,R15D
XOR R14D,R14D
XOR R13D,R13D
LAB_00123e5a:
MOV RSI,qword ptr [R12]
MOV RBX,qword ptr [R12 + 0x8]
SUB RBX,RSI
SHR RBX,0x2
ADD EBX,R15D
CMP EBX,EBP
CMOVGE EBX,EBP
ADD RSI,R14
LEA RDI,[RSP + 0x70]
MOV EDX,EBX
CALL 0x0011e100
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x30],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x70]
MOVUPS XMM1,xmmword ptr [RSP + 0x80]
MOVUPS XMM2,xmmword ptr [RSP + 0x90]
MOVUPS xmmword ptr [RSP + 0x20],XMM2
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x0011e400
TEST EAX,EAX
JNZ 0x00123edc
MOV RAX,qword ptr [RSP + 0x48]
ADD dword ptr [RAX],EBX
ADD R13,qword ptr [RSP + 0x60]
ADD R14,qword ptr [RSP + 0x50]
SUB R15D,EBP
CMP R13,qword ptr [RSP + 0x58]
JL 0x00123e5a
JMP 0x00123f23
LAB_00123edc:
LEA RAX,[0x2578a8]
CMP dword ptr [RAX],0x0
JS 0x00123f23
NEG R15D
CALL 0x001ef023
MOV RCX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RSP + 0x8],ECX
MOV dword ptr [RSP],EBP
LEA RDX,[0x209554]
LEA RCX,[0x209591]
MOV RDI,RAX
MOV ESI,0x4
MOV R8D,R15D
MOV R9,qword ptr [RSP + 0x40]
XOR EAX,EAX
CALL 0x001ef0c0
LAB_00123f23:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* eval_tokens(llama_context*, std::vector<int, std::allocator<int> >, int, int*) */
void eval_tokens(int8 param_1,long *param_2,int param_3,int *param_4)
{
uint uVar1;
int iVar2;
ulong uVar3;
int8 uVar4;
int iVar5;
long lVar6;
long lVar7;
int iVar8;
int4 uVar9;
int4 uVar10;
int4 uVar11;
int4 uVar12;
int8 uVar13;
int1 local_68 [16];
int4 local_58;
int4 uStack_50;
int4 local_48;
int4 uStack_40;
int8 local_38;
uVar3 = (ulong)(param_2[1] - *param_2) >> 2;
uVar1 = (uint)uVar3;
if (0 < (int)uVar1) {
iVar8 = 0;
lVar7 = 0;
lVar6 = 0;
do {
iVar5 = (int)((ulong)(param_2[1] - *param_2) >> 2) + iVar8;
if (param_3 <= iVar5) {
iVar5 = param_3;
}
llama_batch_get_one(local_68,*param_2 + lVar7,iVar5);
uVar9 = local_58;
uVar10 = uStack_50;
uVar11 = local_48;
uVar12 = uStack_40;
uVar13 = local_38;
iVar2 = llama_decode(param_1);
if (iVar2 != 0) {
if (common_log_verbosity_thold < 0) {
return;
}
uVar4 = common_log_main();
common_log_add(uVar4,4,"%s : failed to eval. token %d/%d (batch size %d, n_past %d)\n",
"eval_tokens",-iVar8,uVar3,param_3,*param_4,uVar9,uVar10,uVar11,uVar12,uVar13
);
return;
}
*param_4 = *param_4 + iVar5;
lVar6 = lVar6 + param_3;
lVar7 = lVar7 + (long)param_3 * 4;
iVar8 = iVar8 - param_3;
} while (lVar6 < (long)(ulong)(uVar1 & 0x7fffffff));
}
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.