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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
57,000
|
ma_SHA1Init
|
eloqsql/libmariadb/libmariadb/ma_sha1.c
|
void ma_SHA1Init(_MA_SHA1_CTX * context)
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants.
*/
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
context->state[4] = 0xc3d2e1f0;
}
|
O0
|
c
|
ma_SHA1Init:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x67452301, (%rax) # imm = 0x67452301
movq -0x8(%rbp), %rax
movl $0xefcdab89, 0x4(%rax) # imm = 0xEFCDAB89
movq -0x8(%rbp), %rax
movl $0x98badcfe, 0x8(%rax) # imm = 0x98BADCFE
movq -0x8(%rbp), %rax
movl $0x10325476, 0xc(%rax) # imm = 0x10325476
movq -0x8(%rbp), %rax
movl $0xc3d2e1f0, 0x10(%rax) # imm = 0xC3D2E1F0
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_SHA1Init:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov dword ptr [rax+18h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+14h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax], 67452301h
mov rax, [rbp+var_8]
mov dword ptr [rax+4], 0EFCDAB89h
mov rax, [rbp+var_8]
mov dword ptr [rax+8], 98BADCFEh
mov rax, [rbp+var_8]
mov dword ptr [rax+0Ch], 10325476h
mov rax, [rbp+var_8]
mov dword ptr [rax+10h], 0C3D2E1F0h
pop rbp
retn
|
_DWORD * ma_SHA1Init(_DWORD *a1)
{
_DWORD *result; // rax
a1[6] = 0;
a1[5] = 0;
*a1 = 1732584193;
a1[1] = -271733879;
a1[2] = -1732584194;
a1[3] = 271733878;
result = a1;
a1[4] = -1009589776;
return result;
}
|
ma_SHA1Init:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x14],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x67452301
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x4],0xefcdab89
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8],0x98badcfe
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc],0x10325476
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],0xc3d2e1f0
POP RBP
RET
|
void ma_SHA1Init(int4 *param_1)
{
param_1[6] = 0;
param_1[5] = 0;
*param_1 = 0x67452301;
param_1[1] = 0xefcdab89;
param_1[2] = 0x98badcfe;
param_1[3] = 0x10325476;
param_1[4] = 0xc3d2e1f0;
return;
}
|
|
57,001
|
resolve_charset
|
eloqsql/mysys/charset.c
|
my_bool resolve_charset(const char *cs_name,
CHARSET_INFO *default_cs,
CHARSET_INFO **cs,
myf flags)
{
*cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, flags);
if (*cs == NULL)
{
*cs= default_cs;
return TRUE;
}
return FALSE;
}
|
O3
|
c
|
resolve_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0xc8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x12f0(%rip), %rax # 0x91f56
movq %rax, 0x80(%rdi)
leaq -0x12ef(%rip), %rax # 0x91f65
movq %rax, 0x88(%rdi)
leaq -0x12e2(%rip), %rax # 0x91f80
movq %rax, 0x90(%rdi)
leaq 0xcd46(%rip), %rax # 0x9ffb6
movq %rax, 0x98(%rdi)
leaq 0x2f2472(%rip), %rax # 0x3856f0
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x12f1(%rip), %rax # 0x91f9e
movq %rax, 0xa8(%rdi)
movl $0x20, %edx
callq 0x93098
movq %rax, %rcx
testq %rax, %rax
sete %al
cmovneq %rcx, %r14
movq %r14, (%rbx)
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x932cb
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29270
|
resolve_charset:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0C0h
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, [rbp+var_C8]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov edx, 20h ; ' '
call my_charset_get_by_name
mov rcx, rax
test rax, rax
setz al
cmovnz r14, rcx
mov [rbx], r14
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_932CB
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
loc_932CB:
call ___stack_chk_fail
|
bool resolve_charset(long long a1, long long a2, long long *a3, long long a4)
{
long long v6; // rcx
bool result; // al
char v8[128]; // [rsp+8h] [rbp-C8h] BYREF
long long ( *v9)(long long); // [rsp+88h] [rbp-48h]
long long ( *v10)(long long); // [rsp+90h] [rbp-40h]
long long ( *v11)(long long, long long, long long, long long, long long, long long); // [rsp+98h] [rbp-38h]
long long ( *v12)(_QWORD); // [rsp+A0h] [rbp-30h]
long long ( *v13)(); // [rsp+A8h] [rbp-28h]
long long ( *v14)(unsigned int *); // [rsp+B0h] [rbp-20h]
unsigned long long v15; // [rsp+B8h] [rbp-18h]
v15 = __readfsqword(0x28u);
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
v6 = my_charset_get_by_name((long long)v8, a1, 0x20u, a4);
result = v6 == 0;
if ( v6 )
a2 = v6;
*a3 = a2;
return result;
}
|
resolve_charset:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0xc8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x191f56]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x191f65]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x191f80]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x19ffb6]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x4856f0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x191f9e]
MOV qword ptr [RDI + 0xa8],RAX
MOV EDX,0x20
CALL 0x00193098
MOV RCX,RAX
TEST RAX,RAX
SETZ AL
CMOVNZ R14,RCX
MOV qword ptr [RBX],R14
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x001932cb
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
LAB_001932cb:
CALL 0x00129270
|
bool resolve_charset(int8 param_1,long param_2,long *param_3)
{
long lVar1;
long in_FS_OFFSET;
int1 local_d0 [128];
code *local_50;
code *local_48;
code *local_40;
code *local_38;
int *local_30;
code *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_d0[0] = 0;
local_50 = my_once_alloc_c;
local_48 = my_malloc_c;
local_40 = my_realloc_c;
local_38 = my_free;
local_30 = my_charset_error_reporter;
local_28 = add_collation;
lVar1 = my_charset_get_by_name(local_d0,param_1,0x20);
if (lVar1 != 0) {
param_2 = lVar1;
}
*param_3 = param_2;
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return lVar1 == 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,002
|
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!object) throw std::runtime_error("CallExpr.object is null");
auto obj = object->evaluate(context);
if (!obj.is_callable()) {
throw std::runtime_error("Object is not callable: " + obj.dump(2));
}
auto vargs = args.evaluate(context);
return obj.call(context, vargs);
}
|
O0
|
cpp
|
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq %rdx, 0x100(%rsp)
movq 0x108(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x20, %rdi
callq 0x10c380
testb $0x1, %al
jne 0x1376a4
movl $0x10, %edi
callq 0x5a690
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0xdaa89(%rip), %rsi # 0x2120eb
callq 0x5a480
jmp 0x137669
movq 0x8(%rsp), %rdi
movq 0x16b93b(%rip), %rsi # 0x2a2fb0
movq 0x16b8fc(%rip), %rdx # 0x2a2f78
callq 0x5ab00
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
callq 0x5af90
jmp 0x13786d
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
callq 0x1124b0
movq %rax, %rsi
movq 0x100(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x1124c0
leaq 0xa0(%rsp), %rdi
callq 0x132100
testb $0x1, %al
jne 0x1377ca
movb $0x1, 0x5f(%rsp)
movl $0x10, %edi
callq 0x5a690
movq %rax, (%rsp)
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x112e90
jmp 0x13770d
leaq 0xdac72(%rip), %rsi # 0x212386
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x622f0
jmp 0x137728
movq (%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a4d0
jmp 0x13773b
movq (%rsp), %rdi
movb $0x0, 0x5f(%rsp)
movq 0x16b865(%rip), %rsi # 0x2a2fb0
movq 0x16b826(%rip), %rdx # 0x2a2f78
callq 0x5ab00
jmp 0x13787a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x1377b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x1377a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x5b598
leaq 0x60(%rsp), %rdi
callq 0x5b598
testb $0x1, 0x5f(%rsp)
jne 0x1377bc
jmp 0x1377c5
movq (%rsp), %rdi
callq 0x5af90
jmp 0x137860
movq 0x20(%rsp), %rsi
addq $0x30, %rsi
movq 0x100(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x130180
jmp 0x1377e7
movq 0x10(%rsp), %rdi
movq 0x100(%rsp), %rdx
leaq 0xa0(%rsp), %rsi
leaq 0x28(%rsp), %rcx
callq 0x132120
jmp 0x137808
leaq 0x28(%rsp), %rdi
callq 0x1322f0
leaq 0xa0(%rsp), %rdi
callq 0x112960
movq 0x18(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x137860
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1322f0
leaq 0xa0(%rsp), %rdi
callq 0x112960
movq 0xf8(%rsp), %rdi
callq 0x5abc0
nopw (%rax,%rax)
|
_ZNK5minja8CallExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 118h
mov qword ptr [rsp+118h+var_108], rdi; int
mov rax, rdi
mov qword ptr [rsp+118h+var_100], rax; int
mov qword ptr [rsp+118h+var_8], rdi; int
mov [rsp+118h+var_10], rsi; int
mov qword ptr [rsp+118h+var_18], rdx; int
mov rdi, [rsp+118h+var_10]
mov [rsp+118h+var_F8], rdi; __int16
add rdi, 20h ; ' '
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_1376A4
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+118h+var_110], rax
lea rsi, aMethodcallexpr+6; char *
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_137669:
mov rdi, [rsp+118h+var_110]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+118h+var_110]; void *
mov rcx, rax
mov eax, edx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_24], eax
call ___cxa_free_exception
jmp loc_13786D
loc_1376A4:
mov rdi, [rsp+118h+var_F8]
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, qword ptr [rsp+118h+var_18]
lea rdi, [rsp+118h+var_78]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
lea rdi, [rsp+118h+var_78]; this
call _ZNK5minja5Value11is_callableEv; minja::Value::is_callable(void)
test al, 1
jnz loc_1377CA
mov [rsp+118h+var_B9], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov [rsp+118h+var_118], rax
lea rdi, [rsp+118h+var_B8]
lea rsi, [rsp+118h+var_78]
mov edx, 2
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
jmp short $+2
loc_13770D:
lea rsi, aObjectIsNotCal; "Object is not callable: "
lea rdi, [rsp+118h+var_98]
lea rdx, [rsp+118h+var_B8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_137728:
mov rdi, [rsp+118h+var_118]
lea rsi, [rsp+118h+var_98]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_13773B:
mov rdi, [rsp+118h+var_118]; void *
mov [rsp+118h+var_B9], 0
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_13787A
mov rcx, rax
mov eax, edx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_24], eax
jmp short loc_1377B3
mov rcx, rax
mov eax, edx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_24], eax
jmp short loc_1377A9
mov rcx, rax
mov eax, edx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_24], eax
lea rdi, [rsp+118h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1377A9:
lea rdi, [rsp+118h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1377B3:
test [rsp+118h+var_B9], 1
jnz short loc_1377BC
jmp short loc_1377C5
loc_1377BC:
mov rdi, [rsp+118h+var_118]; void *
call ___cxa_free_exception
loc_1377C5:
jmp loc_137860
loc_1377CA:
mov rsi, [rsp+118h+var_F8]
add rsi, 30h ; '0'; int
mov rdx, qword ptr [rsp+118h+var_18]; int
lea rdi, [rsp+118h+var_F0]; int
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short $+2
loc_1377E7:
mov rdi, qword ptr [rsp+118h+var_108]; int
mov rdx, qword ptr [rsp+118h+var_18]; int
lea rsi, [rsp+118h+var_78]; int
lea rcx, [rsp+118h+var_F0]; int
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
jmp short $+2
loc_137808:
lea rdi, [rsp+118h+var_F0]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
lea rdi, [rsp+118h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, qword ptr [rsp+118h+var_100]
add rsp, 118h
retn
mov rcx, rax
mov eax, edx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_24], eax
jmp short loc_137860
mov rcx, rax
mov eax, edx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_24], eax
lea rdi, [rsp+118h+var_F0]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
loc_137860:
lea rdi, [rsp+118h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_13786D:
mov rdi, [rsp+118h+var_20]
call __Unwind_Resume
loc_13787A:
nop word ptr [rax+rax+00h]
|
long long minja::CallExpr::do_evaluate(long long a1, _QWORD *a2, long long a3)
{
void (***v3)(void); // rax
void *v5; // [rsp+0h] [rbp-118h]
std::runtime_error *exception; // [rsp+8h] [rbp-110h]
int v7[13]; // [rsp+28h] [rbp-F0h] BYREF
char v8; // [rsp+5Fh] [rbp-B9h]
_BYTE v9[32]; // [rsp+60h] [rbp-B8h] BYREF
_BYTE v10[32]; // [rsp+80h] [rbp-98h] BYREF
int v11[21]; // [rsp+A0h] [rbp-78h] BYREF
int v12[2]; // [rsp+100h] [rbp-18h]
void *v13; // [rsp+108h] [rbp-10h]
int v14[2]; // [rsp+110h] [rbp-8h]
*(_QWORD *)v14 = a1;
v13 = a2;
*(_QWORD *)v12 = a3;
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(a2 + 4) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "CallExpr.object is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)(a2 + 4));
minja::Expression::evaluate((long long)v11, v3);
if ( !minja::Value::is_callable((minja::Value *)v11) )
{
v5 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)v11, 2u, 0);
std::operator+<char>((long long)v10, (long long)"Object is not callable: ", (long long)v9);
std::runtime_error::runtime_error(v5, v10);
v8 = 0;
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::ArgumentsExpression::evaluate((minja::ArgumentsValue *)v7, (long long)(a2 + 6), *(long long *)v12);
minja::Value::call(a1, (long long)v11, *(long long *)v12, (long long)v7);
minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7);
minja::Value::~Value((minja::Value *)v11);
return a1;
}
| |||
57,003
|
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!object) throw std::runtime_error("CallExpr.object is null");
auto obj = object->evaluate(context);
if (!obj.is_callable()) {
throw std::runtime_error("Object is not callable: " + obj.dump(2));
}
auto vargs = args.evaluate(context);
return obj.call(context, vargs);
}
|
O2
|
cpp
|
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x6ed18
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x62de2
cmpq $0x0, 0x30(%r12)
je 0x6ed48
addq $0x30, %r15
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x6ca88
leaq 0x50(%rsp), %rsi
movq %rsp, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6d804
movq %rsp, %rdi
callq 0x6d8e8
leaq 0x50(%rsp), %rdi
callq 0x63072
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %rbx
leaq 0x459ca(%rip), %rsi # 0xb46f4
movq %rax, %rdi
callq 0x23330
movq 0x8f2b7(%rip), %rsi # 0xfdff0
movq 0x8f218(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f40
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x2
popq %rdx
xorl %ecx, %ecx
callq 0x63260
leaq 0x45c21(%rip), %rsi # 0xb498f
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x2730b
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x23e70
xorl %ebp, %ebp
movq 0x8f25e(%rip), %rsi # 0xfdff0
movq 0x8f1bf(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f40
movq %rax, %r14
movq %rsp, %rdi
callq 0x24218
jmp 0x6edb4
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0x24218
testb %bpl, %bpl
jne 0x6edc8
jmp 0x6edef
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
jmp 0x6edef
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
jmp 0x6edf9
movq %rax, %r14
movq %rsp, %rdi
callq 0x6d8e8
jmp 0x6edef
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x63072
movq %r14, %rdi
callq 0x23fd0
nop
|
_ZNK5minja8CallExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0A0h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz short loc_6ED18
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+0C8h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz short loc_6ED48
add r15, 30h ; '0'
mov rdi, rsp
mov rsi, r15
mov rdx, r14
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
lea rsi, [rsp+0C8h+var_78]
mov rcx, rsp
mov rdi, rbx
mov rdx, r14
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov rdi, rsp; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6ED18:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aMethodcallexpr+6; char *
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6ED48:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0C8h+var_98]
lea rsi, [rsp+0C8h+var_78]
push 2
pop rdx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aObjectIsNotCal; "Object is not callable: "
mov rdi, rsp
lea rdx, [rsp+0C8h+var_98]
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
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6EDB4
mov r14, rax
mov bpl, 1
loc_6EDB4:
lea rdi, [rsp+0C8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6EDC8
jmp short loc_6EDEF
mov r14, rax
loc_6EDC8:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_6EDEF
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_6EDF9
mov r14, rax
mov rdi, rsp; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
jmp short loc_6EDEF
mov r14, rax
loc_6EDEF:
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6EDF9:
mov rdi, r14
call __Unwind_Resume
|
long long minja::CallExpr::do_evaluate(long long a1, long long a2)
{
void (***v3)(void); // rsi
std::runtime_error *exception; // rbx
void *v6; // rbx
_OWORD v7[3]; // [rsp+0h] [rbp-C8h] BYREF
_BYTE v8[32]; // [rsp+30h] [rbp-98h] BYREF
_BYTE v9[48]; // [rsp+50h] [rbp-78h] BYREF
long long v10; // [rsp+80h] [rbp-48h]
v3 = *(void (****)(void))(a2 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "CallExpr.object is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v9, v3);
if ( !v10 )
{
v6 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)v9, 2u, 0);
std::operator+<char>((long long)v7, (long long)"Object is not callable: ", (long long)v8);
std::runtime_error::runtime_error(v6, v7);
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::ArgumentsExpression::evaluate(v7, (void (*****)(void))(a2 + 48));
minja::Value::call(a1, (long long)v9);
minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7);
minja::Value::~Value((minja::Value *)v9);
return a1;
}
|
do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0016ed18
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x50]
MOV RDI,R12
CALL 0x00162de2
CMP qword ptr [R12 + 0x30],0x0
JZ 0x0016ed48
ADD R15,0x30
LAB_0016ecd2:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x0016ca88
LAB_0016ece0:
LEA RSI,[RSP + 0x50]
MOV RCX,RSP
MOV RDI,RBX
MOV RDX,R14
CALL 0x0016d804
LAB_0016ecf3:
MOV RDI,RSP
CALL 0x0016d8e8
LEA RDI,[RSP + 0x50]
CALL 0x00163072
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016ed18:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV RBX,RAX
LAB_0016ed23:
LEA RSI,[0x1b46f4]
MOV RDI,RAX
CALL 0x00123330
LAB_0016ed32:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f40
LAB_0016ed48:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV RBX,RAX
LAB_0016ed53:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
PUSH 0x2
POP RDX
XOR ECX,ECX
CALL 0x00163260
LAB_0016ed67:
LEA RSI,[0x1b498f]
MOV RDI,RSP
LEA RDX,[RSP + 0x30]
CALL 0x0012730b
MOV BPL,0x1
LAB_0016ed7e:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00123e70
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f40
|
/* minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
CallExpr * __thiscall minja::CallExpr::do_evaluate(CallExpr *this,shared_ptr *param_1)
{
runtime_error *prVar1;
ArgumentsExpression aAStack_c8 [48];
int1 local_98 [32];
Expression local_78 [48];
long local_48;
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016ed23 to 0016ed31 has its CatchHandler @ 0016edd2 */
std::runtime_error::runtime_error(prVar1,"CallExpr.object is null");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 0016ecd2 to 0016ecdf has its CatchHandler @ 0016edec */
ArgumentsExpression::evaluate(aAStack_c8,param_1 + 0x30);
/* try { // try from 0016ece0 to 0016ecf2 has its CatchHandler @ 0016eddf */
Value::call(this,(ArgumentsValue *)local_78);
ArgumentsValue::~ArgumentsValue((ArgumentsValue *)aAStack_c8);
Value::~Value((Value *)local_78);
return this;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016ed53 to 0016ed66 has its CatchHandler @ 0016edc5 */
Value::dump_abi_cxx11_((int)local_98,SUB81(local_78,0));
/* try { // try from 0016ed67 to 0016ed7a has its CatchHandler @ 0016edae */
std::operator+((char *)aAStack_c8,(string *)"Object is not callable: ");
/* try { // try from 0016ed7e to 0016eda0 has its CatchHandler @ 0016eda1 */
std::runtime_error::runtime_error(prVar1,(string *)aAStack_c8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
|
|
57,004
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json.hpp
|
T& operator[](const key_type& key)
{
return emplace(key, T{}).first->second;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movb $0x0, (%r15)
movq $0x0, 0x8(%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x58f20
movq %r15, %rdi
movl $0x1, %esi
callq 0x58f20
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x5faf2
movq %rax, %rbx
addq $0x20, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58f20
movq %r14, %rdi
callq 0x5e40e
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58f20
movq %r14, %rdi
callq 0x5e40e
movq %rbx, %rdi
callq 0x1af90
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
mov r15, rsp
mov byte ptr [r15], 0
mov qword ptr [r15+8], 0
mov rdi, r15
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, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rbx, rax
add rbx, 20h ; ' '
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[](
long long a1,
long long a2)
{
long long v2; // rbx
char v4[8]; // [rsp+0h] [rbp-28h] BYREF
long long v5; // [rsp+8h] [rbp-20h]
v4[0] = 0;
v5 = 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(v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v4);
v2 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
a1,
a2,
v4)
+ 32;
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(v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v4);
return v2;
}
|
operator[]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
MOV R15,RSP
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00158f20
MOV RDI,R15
MOV ESI,0x1
CALL 0x00158f20
LAB_0015fa5e:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0015faf2
LAB_0015fa6c:
MOV RBX,RAX
ADD RBX,0x20
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158f20
MOV RDI,R14
CALL 0x0015e40e
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::operator[](std::__cxx11::string const&) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::operator[](ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,string *param_1)
{
long lVar1;
bool bVar2;
basic_json local_28 [8];
int8 local_20;
local_28[0] = (basic_json)0x0;
local_20 = 0;
bVar2 = SUB81(local_28,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar2);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar2);
/* try { // try from 0015fa5e to 0015fa6b has its CatchHandler @ 0015fa95 */
lVar1 = emplace(this,param_1,local_28);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar2);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_28);
return lVar1 + 0x20;
}
|
|
57,005
|
pixie_thread_join
|
xtate/src/pixie/pixie-threads.c
|
void pixie_thread_join(size_t thread_handle) {
#if defined(_WIN32)
WaitForSingleObject((HANDLE)thread_handle, INFINITE);
#else
void *p;
pthread_join((pthread_t)thread_handle, &p);
#endif
}
|
O3
|
c
|
pixie_thread_join:
pushq %rax
movq %rsp, %rsi
callq 0x15360
popq %rax
retq
|
pixie_thread_join:
push rax
mov rsi, rsp
call _pthread_join
pop rax
retn
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> pixie_thread_join(long long a1)
{
long long v1; // [rsp-8h] [rbp-8h] BYREF
pthread_join(a1, &v1);
}
|
pixie_thread_join:
PUSH RAX
MOV RSI,RSP
CALL 0x00115360
POP RAX
RET
|
void * pixie_thread_join(pthread_t param_1)
{
void *in_RAX;
void *pvStack_8;
pvStack_8 = in_RAX;
pthread_join(param_1,&pvStack_8);
return pvStack_8;
}
|
|
57,006
|
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;
}
|
O3
|
c
|
my_thread_global_end:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x9e518
imulq $0x3e8, %rax, %rax # imm = 0x3E8
leaq 0x2e3e4d(%rip), %rcx # 0x385ba8
movl (%rcx), %ecx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rax, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rdx, -0x38(%rbp)
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rcx
movq %rcx, -0x30(%rbp)
leaq 0xb666d0(%rip), %rax # 0xc08468
cmpq $0x0, 0x40(%rax)
jne 0xa1e6e
leaq 0xb666be(%rip), %rdi # 0xc08468
callq 0x29200
leaq 0xb664b2(%rip), %r12 # 0xc08268
leaq 0xb6673b(%rip), %r14 # 0xc084f8
leaq 0xb666a4(%rip), %rbx # 0xc08468
leaq -0x38(%rbp), %r15
movl (%r12), %r13d
testl %r13d, %r13d
je 0xa1e34
cmpq $0x0, 0x30(%r14)
jne 0xa1df2
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x29660
cmpl $0x6e, %eax
je 0xa1e0f
cmpl $0x3e, %eax
jne 0xa1dc8
jmp 0xa1e0f
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
leaq 0x3a62e(%rip), %rcx # 0xdc430
movl $0xd2, %r8d
callq 0x2eef0
jmp 0xa1de6
movl (%r12), %ecx
testl %ecx, %ecx
je 0xa1e34
movq 0x2e2182(%rip), %rax # 0x383fa0
movq (%rax), %rdi
leaq 0x3a645(%rip), %rdx # 0xdc46d
movl $0x1, %esi
xorl %eax, %eax
callq 0x291e0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0xa1e78
leaq 0xb66624(%rip), %rdi # 0xc08468
callq 0x291c0
callq 0xa163c
testl %r13d, %r13d
jne 0xa1e58
callq 0xa179f
movb $0x0, 0xb666d1(%rip) # 0xc08530
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2efaa
jmp 0xa1daf
leaq 0x2e4191(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa1e3d
|
my_thread_global_end:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
call my_hrtime
imul rax, 3E8h
lea rcx, my_thread_end_wait_time
mov ecx, [rcx]
imul rcx, 3B9ACA00h
add rcx, rax
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
mov [rbp+var_38], rdx
imul rax, rdx, 3B9ACA00h
sub rcx, rax
mov [rbp+var_30], rcx
lea rax, THR_LOCK_threads
cmp qword ptr [rax+40h], 0
jnz loc_A1E6E
lea rdi, THR_LOCK_threads
call _pthread_mutex_lock
loc_A1DAF:
lea r12, THR_thread_count
lea r14, THR_COND_threads
lea rbx, THR_LOCK_threads
lea r15, [rbp+var_38]
loc_A1DC8:
mov r13d, [r12]
test r13d, r13d
jz short loc_A1E34
cmp qword ptr [r14+30h], 0
jnz short loc_A1DF2
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call _pthread_cond_timedwait
loc_A1DE6:
cmp eax, 6Eh ; 'n'
jz short loc_A1E0F
cmp eax, 3Eh ; '>'
jnz short loc_A1DC8
jmp short loc_A1E0F
loc_A1DF2:
mov rdi, r14
mov rsi, rbx
mov rdx, r15
lea rcx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 0D2h
call psi_cond_timedwait
jmp short loc_A1DE6
loc_A1E0F:
mov ecx, [r12]
test ecx, ecx
jz short loc_A1E34
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rdx, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_A1E34:
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_A1E78
loc_A1E3D:
lea rdi, THR_LOCK_threads
call _pthread_mutex_unlock
call my_thread_destroy_common_mutex
test r13d, r13d
jnz short loc_A1E58
call my_thread_destroy_internal_mutex
loc_A1E58:
mov cs:my_thread_global_init_done, 0
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A1E6E:
call my_thread_global_end_cold_1
jmp loc_A1DAF
loc_A1E78:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A1E3D
|
long long my_thread_global_end()
{
unsigned long long v0; // rax
int v1; // r13d
int v2; // eax
long long result; // rax
_QWORD v4[7]; // [rsp+8h] [rbp-38h] BYREF
v0 = my_hrtime();
v4[0] = (1000 * v0 + 1000000000LL * my_thread_end_wait_time) / 0x3B9ACA00;
v4[1] = (1000 * v0 + 1000000000LL * my_thread_end_wait_time) % 0x3B9ACA00;
if ( THR_LOCK_threads[8] )
my_thread_global_end_cold_1();
else
pthread_mutex_lock(THR_LOCK_threads);
while ( 1 )
{
v1 = THR_thread_count;
if ( !THR_thread_count )
break;
if ( THR_COND_threads[6] )
v2 = psi_cond_timedwait(
(long long)THR_COND_threads,
(long long)THR_LOCK_threads,
(long long)v4,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
0xD2u);
else
v2 = pthread_cond_timedwait(THR_COND_threads, THR_LOCK_threads, v4);
if ( v2 == 110 || v2 == 62 )
{
if ( THR_thread_count )
__fprintf_chk(stderr, 1LL, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count);
break;
}
}
if ( THR_LOCK_threads[8] )
PSI_server[44]();
pthread_mutex_unlock(THR_LOCK_threads);
result = my_thread_destroy_common_mutex();
if ( !v1 )
result = my_thread_destroy_internal_mutex();
my_thread_global_init_done = 0;
return result;
}
|
my_thread_global_end:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CALL 0x0019e518
IMUL RAX,RAX,0x3e8
LEA RCX,[0x485ba8]
MOV ECX,dword ptr [RCX]
IMUL RCX,RCX,0x3b9aca00
ADD RCX,RAX
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
MOV qword ptr [RBP + -0x38],RDX
IMUL RAX,RDX,0x3b9aca00
SUB RCX,RAX
MOV qword ptr [RBP + -0x30],RCX
LEA RAX,[0xd08468]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x001a1e6e
LEA RDI,[0xd08468]
CALL 0x00129200
LAB_001a1daf:
LEA R12,[0xd08268]
LEA R14,[0xd084f8]
LEA RBX,[0xd08468]
LEA R15,[RBP + -0x38]
LAB_001a1dc8:
MOV R13D,dword ptr [R12]
TEST R13D,R13D
JZ 0x001a1e34
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001a1df2
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x00129660
LAB_001a1de6:
CMP EAX,0x6e
JZ 0x001a1e0f
CMP EAX,0x3e
JNZ 0x001a1dc8
JMP 0x001a1e0f
LAB_001a1df2:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
LEA RCX,[0x1dc430]
MOV R8D,0xd2
CALL 0x0012eef0
JMP 0x001a1de6
LAB_001a1e0f:
MOV ECX,dword ptr [R12]
TEST ECX,ECX
JZ 0x001a1e34
MOV RAX,qword ptr [0x00483fa0]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x1dc46d]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001291e0
LAB_001a1e34:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001a1e78
LAB_001a1e3d:
LEA RDI,[0xd08468]
CALL 0x001291c0
CALL 0x001a163c
TEST R13D,R13D
JNZ 0x001a1e58
CALL 0x001a179f
LAB_001a1e58:
MOV byte ptr [0x00d08530],0x0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a1e6e:
CALL 0x0012efaa
JMP 0x001a1daf
LAB_001a1e78:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a1e3d
|
void my_thread_global_end(void)
{
int iVar1;
int iVar2;
long lVar3;
timespec local_40;
lVar3 = my_hrtime();
local_40.tv_nsec = (ulong)my_thread_end_wait_time * 1000000000 + lVar3 * 1000;
local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000;
local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000;
if (THR_LOCK_threads._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_threads);
}
else {
my_thread_global_end_cold_1();
}
do {
iVar1 = THR_thread_count;
if (THR_thread_count == 0) goto LAB_001a1e34;
if (THR_COND_threads._48_8_ == 0) {
iVar2 = pthread_cond_timedwait
((pthread_cond_t *)THR_COND_threads,(pthread_mutex_t *)THR_LOCK_threads,
&local_40);
}
else {
iVar2 = psi_cond_timedwait(THR_COND_threads,THR_LOCK_threads,&local_40,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2
);
}
} while ((iVar2 != 0x6e) && (iVar2 != 0x3e));
if (THR_thread_count != 0) {
__fprintf_chk(*(int8 *)PTR_stderr_00483fa0,1,
"Error in my_thread_global_end(): %d threads didn\'t exit\n");
}
LAB_001a1e34:
if (THR_LOCK_threads._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_threads);
my_thread_destroy_common_mutex();
if (iVar1 == 0) {
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done = 0;
return;
}
|
|
57,007
|
inline_mysql_file_open
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_open(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_open(filename, flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_open(filename, flags, myFlags);
return file;
}
|
O0
|
c
|
inline_mysql_file_open:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x2143a8(%rip), %rax # 0x2cdee0
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x2, %edx
leaq -0x40(%rbp), %r8
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%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 0xb9bd2
leaq 0x21435a(%rip), %rax # 0x2cdee0
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xfca00
movl %eax, -0x34(%rbp)
leaq 0x214329(%rip), %rax # 0x2cdee0
movq (%rax), %rax
movq 0x200(%rax), %rax
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
callq *%rax
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb9beb
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xfca00
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
inline_mysql_file_open_2:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_88]
mov edx, 2
lea r8, [rbp+var_40]
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 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_B9BD2
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+200h]
mov rdi, [rbp+var_40]
mov esi, [rbp+var_34]
call rax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
jmp short loc_B9BEB
loc_B9BD2:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov rdx, [rbp+var_30]
call my_open
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
loc_B9BEB:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
|
long long inline_mysql_file_open_2(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h] BYREF
unsigned int v9; // [rsp+5Ch] [rbp-34h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
long long v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+7Ch] [rbp-14h]
long long v14; // [rsp+80h] [rbp-10h]
unsigned int v15; // [rsp+88h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8);
if ( v8 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13);
v9 = my_open(v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9);
}
else
{
return (unsigned int)my_open(v12, v11, v10);
}
return v9;
}
|
inline_mysql_file_open:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3cdee0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x88]
MOV EDX,0x2
LEA R8,[RBP + -0x40]
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],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 0x001b9bd2
LEA RAX,[0x3cdee0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001fca00
MOV dword ptr [RBP + -0x34],EAX
LEA RAX,[0x3cdee0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x34]
CALL RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b9beb
LAB_001b9bd2:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001fca00
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
LAB_001b9beb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x90
POP RBP
RET
|
int4
inline_mysql_file_open
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int1 local_90 [72];
long local_48;
int4 local_3c;
int8 local_38;
int4 local_2c;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48);
if (local_48 == 0) {
local_c = my_open(local_28,local_2c,local_38);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c);
local_3c = my_open(local_28,local_2c,local_38);
(**(code **)(PSI_server + 0x200))(local_48,local_3c);
local_c = local_3c;
}
return local_c;
}
|
|
57,008
|
Balloc
|
eloqsql/libmariadb/libmariadb/ma_dtoa.c
|
static Bigint *Balloc(int k, Stack_alloc *alloc)
{
Bigint *rv;
DBUG_ASSERT(k <= Kmax);
if (k <= Kmax && alloc->freelist[k])
{
rv= alloc->freelist[k];
alloc->freelist[k]= rv->p.next;
}
else
{
int x, len;
x= 1 << k;
len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP);
if (alloc->free + len <= alloc->end)
{
rv= (Bigint*) alloc->free;
alloc->free+= len;
}
else
rv= (Bigint*) malloc(len);
rv->k= k;
rv->maxwds= x;
}
rv->sign= rv->wds= 0;
rv->p.x= (ULong*) (rv + 1);
return rv;
}
|
O0
|
c
|
Balloc:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0xf, -0x4(%rbp)
jg 0x99a4f
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
cmpq $0x0, 0x18(%rax,%rcx,8)
je 0x99a4f
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq %rdx, 0x18(%rax,%rcx,8)
jmp 0x99ad4
movl -0x4(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
shlq $0x2, %rax
addq $0x18, %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x20(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
ja 0x99ab3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x99ac0
movslq -0x20(%rbp), %rdi
callq 0x60aa0
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
Balloc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
cmp [rbp+var_4], 0Fh
jg short loc_99A4F
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_4]
cmp qword ptr [rax+rcx*8+18h], 0
jz short loc_99A4F
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_4]
mov rax, [rax+rcx*8+18h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rdx, [rax]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_4]
mov [rax+rcx*8+18h], rdx
jmp loc_99AD4
loc_99A4F:
mov ecx, [rbp+var_4]
mov eax, 1
shl eax, cl
mov [rbp+var_1C], eax
movsxd rax, [rbp+var_1C]
shl rax, 2
add rax, 18h
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_20]
add rax, rcx
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
ja short loc_99AB3
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_18], rax
mov edx, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rax+8]
movsxd rdx, edx
add rcx, rdx
mov [rax+8], rcx
jmp short loc_99AC0
loc_99AB3:
movsxd rdi, [rbp+var_20]
call _malloc
mov [rbp+var_18], rax
loc_99AC0:
mov ecx, [rbp+var_4]
mov rax, [rbp+var_18]
mov [rax+8], ecx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov [rax+0Ch], ecx
loc_99AD4:
mov rax, [rbp+var_18]
mov dword ptr [rax+14h], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+10h], 0
mov rcx, [rbp+var_18]
add rcx, 18h
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
|
long long Balloc(int a1, long long a2)
{
signed int v3; // [rsp+0h] [rbp-20h]
long long v4; // [rsp+8h] [rbp-18h]
if ( a1 <= 15 && *(_QWORD *)(a2 + 8LL * a1 + 24) )
{
v4 = *(_QWORD *)(a2 + 8LL * a1 + 24);
*(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)v4;
}
else
{
v3 = (4 * (1 << a1) + 31) & 0xFFFFFFF8;
if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) )
{
v4 = malloc(v3);
}
else
{
v4 = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v3 + v4;
}
*(_DWORD *)(v4 + 8) = a1;
*(_DWORD *)(v4 + 12) = 1 << a1;
}
*(_DWORD *)(v4 + 20) = 0;
*(_DWORD *)(v4 + 16) = 0;
*(_QWORD *)v4 = v4 + 24;
return v4;
}
|
Balloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
CMP dword ptr [RBP + -0x4],0xf
JG 0x00199a4f
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x4]
CMP qword ptr [RAX + RCX*0x8 + 0x18],0x0
JZ 0x00199a4f
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x4]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x4]
MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX
JMP 0x00199ad4
LAB_00199a4f:
MOV ECX,dword ptr [RBP + -0x4]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x1c],EAX
MOVSXD RAX,dword ptr [RBP + -0x1c]
SHL RAX,0x2
ADD RAX,0x18
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x20]
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JA 0x00199ab3
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EDX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
JMP 0x00199ac0
LAB_00199ab3:
MOVSXD RDI,dword ptr [RBP + -0x20]
CALL 0x00160aa0
MOV qword ptr [RBP + -0x18],RAX
LAB_00199ac0:
MOV ECX,dword ptr [RBP + -0x4]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xc],ECX
LAB_00199ad4:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x14],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x10],0x0
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
int8 * Balloc(int param_1,long param_2)
{
int iVar1;
uint uVar2;
int8 *local_20;
if ((param_1 < 0x10) && (*(long *)(param_2 + 0x18 + (long)param_1 * 8) != 0)) {
local_20 = *(int8 **)(param_2 + 0x18 + (long)param_1 * 8);
*(int8 *)(param_2 + 0x18 + (long)param_1 * 8) = *local_20;
}
else {
iVar1 = 1 << ((byte)param_1 & 0x1f);
uVar2 = iVar1 * 4 + 0x1fU & 0xfffffff8;
if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar2)) {
local_20 = (int8 *)malloc((long)(int)uVar2);
}
else {
local_20 = *(int8 **)(param_2 + 8);
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar2;
}
*(int *)(local_20 + 1) = param_1;
*(int *)((long)local_20 + 0xc) = iVar1;
}
*(int4 *)((long)local_20 + 0x14) = 0;
*(int4 *)(local_20 + 2) = 0;
*local_20 = local_20 + 3;
return local_20;
}
|
|
57,009
|
Balloc
|
eloqsql/libmariadb/libmariadb/ma_dtoa.c
|
static Bigint *Balloc(int k, Stack_alloc *alloc)
{
Bigint *rv;
DBUG_ASSERT(k <= Kmax);
if (k <= Kmax && alloc->freelist[k])
{
rv= alloc->freelist[k];
alloc->freelist[k]= rv->p.next;
}
else
{
int x, len;
x= 1 << k;
len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP);
if (alloc->free + len <= alloc->end)
{
rv= (Bigint*) alloc->free;
alloc->free+= len;
}
else
rv= (Bigint*) malloc(len);
rv->k= k;
rv->maxwds= x;
}
rv->sign= rv->wds= 0;
rv->p.x= (ULong*) (rv + 1);
return rv;
}
|
O3
|
c
|
Balloc:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0xf, %edi
jg 0x847e0
movslq %ebx, %rcx
movq 0x18(%rsi,%rcx,8), %rax
testq %rax, %rax
je 0x847e0
movq (%rax), %rdx
movq %rdx, 0x18(%rsi,%rcx,8)
jmp 0x8481b
movl $0x1, %r14d
movl %ebx, %ecx
shll %cl, %r14d
movl $0x4, %edx
shll %cl, %edx
addl $0x1f, %edx
andl $-0x8, %edx
movq 0x8(%rsi), %rax
movslq %edx, %rdi
leaq (%rax,%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jbe 0x84810
callq 0x5faf0
jmp 0x84814
movq %rcx, 0x8(%rsi)
movl %ebx, 0x8(%rax)
movl %r14d, 0xc(%rax)
movq $0x0, 0x10(%rax)
leaq 0x18(%rax), %rcx
movq %rcx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
|
Balloc:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, edi
cmp edi, 0Fh
jg short loc_847E0
movsxd rcx, ebx
mov rax, [rsi+rcx*8+18h]
test rax, rax
jz short loc_847E0
mov rdx, [rax]
mov [rsi+rcx*8+18h], rdx
jmp short loc_8481B
loc_847E0:
mov r14d, 1
mov ecx, ebx
shl r14d, cl
mov edx, 4
shl edx, cl
add edx, 1Fh
and edx, 0FFFFFFF8h
mov rax, [rsi+8]
movsxd rdi, edx
lea rcx, [rax+rdi]
cmp rcx, [rsi+10h]
jbe short loc_84810
call _malloc
jmp short loc_84814
loc_84810:
mov [rsi+8], rcx
loc_84814:
mov [rax+8], ebx
mov [rax+0Ch], r14d
loc_8481B:
mov qword ptr [rax+10h], 0
lea rcx, [rax+18h]
mov [rax], rcx
pop rbx
pop r14
pop rbp
retn
|
long long Balloc(int a1, long long a2)
{
long long result; // rax
long long v4; // rdi
if ( a1 <= 15 && (result = *(_QWORD *)(a2 + 8LL * a1 + 24)) != 0 )
{
*(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)result;
}
else
{
result = *(_QWORD *)(a2 + 8);
v4 = (int)(((4 << a1) + 31) & 0xFFFFFFF8);
if ( (unsigned long long)(result + v4) <= *(_QWORD *)(a2 + 16) )
*(_QWORD *)(a2 + 8) = result + v4;
else
result = malloc(v4);
*(_DWORD *)(result + 8) = a1;
*(_DWORD *)(result + 12) = 1 << a1;
}
*(_QWORD *)(result + 16) = 0LL;
*(_QWORD *)result = result + 24;
return result;
}
|
Balloc:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,EDI
CMP EDI,0xf
JG 0x001847e0
MOVSXD RCX,EBX
MOV RAX,qword ptr [RSI + RCX*0x8 + 0x18]
TEST RAX,RAX
JZ 0x001847e0
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSI + RCX*0x8 + 0x18],RDX
JMP 0x0018481b
LAB_001847e0:
MOV R14D,0x1
MOV ECX,EBX
SHL R14D,CL
MOV EDX,0x4
SHL EDX,CL
ADD EDX,0x1f
AND EDX,0xfffffff8
MOV RAX,qword ptr [RSI + 0x8]
MOVSXD RDI,EDX
LEA RCX,[RAX + RDI*0x1]
CMP RCX,qword ptr [RSI + 0x10]
JBE 0x00184810
CALL 0x0015faf0
JMP 0x00184814
LAB_00184810:
MOV qword ptr [RSI + 0x8],RCX
LAB_00184814:
MOV dword ptr [RAX + 0x8],EBX
MOV dword ptr [RAX + 0xc],R14D
LAB_0018481b:
MOV qword ptr [RAX + 0x10],0x0
LEA RCX,[RAX + 0x18]
MOV qword ptr [RAX],RCX
POP RBX
POP R14
POP RBP
RET
|
void Balloc(int param_1,long param_2)
{
ulong uVar1;
long *plVar2;
size_t __size;
if (param_1 < 0x10) {
plVar2 = *(long **)(param_2 + 0x18 + (long)param_1 * 8);
if (plVar2 != (long *)0x0) {
*(long *)(param_2 + 0x18 + (long)param_1 * 8) = *plVar2;
goto LAB_0018481b;
}
}
plVar2 = *(long **)(param_2 + 8);
__size = (size_t)(int)((4 << ((byte)param_1 & 0x1f)) + 0x1fU & 0xfffffff8);
uVar1 = (long)plVar2 + __size;
if (*(ulong *)(param_2 + 0x10) < uVar1) {
plVar2 = (long *)malloc(__size);
}
else {
*(ulong *)(param_2 + 8) = uVar1;
}
*(int *)(plVar2 + 1) = param_1;
*(int *)((long)plVar2 + 0xc) = 1 << ((byte)param_1 & 0x1f);
LAB_0018481b:
plVar2[2] = 0;
*plVar2 = (long)(plVar2 + 3);
return;
}
|
|
57,010
|
Item_cache_wrapper::get_tmp_table_item(THD*)
|
eloqsql/sql/item.cc
|
Item* Item_cache_wrapper::get_tmp_table_item(THD *thd)
{
if (!orig_item->with_sum_func() && !orig_item->const_item())
return new (thd->mem_root) Item_temptable_field(thd, result_field);
return copy_or_same(thd);
}
|
O0
|
cpp
|
Item_cache_wrapper::get_tmp_table_item(THD*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x70(%rax), %rdi
callq 0x95a770
testb $0x1, %al
jne 0xd36b3d
movq -0x48(%rbp), %rax
movq 0x70(%rax), %rdi
movq (%rdi), %rax
callq *0x208(%rax)
testb $0x1, %al
jne 0xd36b3d
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x60(%rbp)
movl $0x118, %edi # imm = 0x118
callq 0x87dea0
movq %rax, %rcx
movq %rcx, -0x58(%rbp)
movb $0x0, -0x29(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x50(%rbp)
je 0xd36b10
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movb $0x1, -0x29(%rbp)
movq -0x18(%rbp), %rsi
movq 0x68(%rax), %rdx
callq 0xa7c8d0
jmp 0xd36b06
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xd36b10
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd36b52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
testb $0x1, -0x29(%rbp)
jne 0xd36b2e
jmp 0xd36b3b
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x87df70
jmp 0xd36b5c
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq (%rdi), %rax
callq *0x2e0(%rax)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x775a20
nopw %cs:(%rax,%rax)
|
_ZN18Item_cache_wrapper18get_tmp_table_itemEP3THD:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rdi, [rax+70h]; this
call _ZNK4Item13with_sum_funcEv; Item::with_sum_func(void)
test al, 1
jnz loc_D36B3D
mov rax, [rbp+var_48]
mov rdi, [rax+70h]
mov rax, [rdi]
call qword ptr [rax+208h]
test al, 1
jnz loc_D36B3D
mov rax, [rbp+var_18]
mov rsi, [rax+28h]
mov [rbp+var_60], rsi
mov edi, 118h
call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_58], rcx
mov [rbp+var_29], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_50], rax
jz short loc_D36B10
mov rdi, [rbp+var_58]; this
mov rax, [rbp+var_48]
mov rcx, [rbp+var_60]
mov [rbp+var_20], rdi
mov [rbp+var_28], rcx
mov [rbp+var_29], 1
mov rsi, [rbp+var_18]; THD *
mov rdx, [rax+68h]; Field *
call _ZN20Item_temptable_fieldC2EP3THDP5Field; Item_temptable_field::Item_temptable_field(THD *,Field *)
jmp short $+2
loc_D36B06:
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
jmp short $+2
loc_D36B10:
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
jmp short loc_D36B52
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
test [rbp+var_29], 1
jnz short loc_D36B2E
jmp short loc_D36B3B
loc_D36B2E:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *)
loc_D36B3B:
jmp short loc_D36B5C
loc_D36B3D:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+2E0h]
mov [rbp+var_8], rax
loc_D36B52:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
loc_D36B5C:
mov rdi, [rbp+var_38]
call __Unwind_Resume
|
Item_temptable_field * Item_cache_wrapper::get_tmp_table_item(Item **this, THD *a2)
{
Item_temptable_field *v3; // [rsp+8h] [rbp-58h]
long long v4; // [rsp+10h] [rbp-50h]
if ( Item::with_sum_func(this[14])
|| ((*(long long ( **)(Item *))(*(_QWORD *)this[14] + 520LL))(this[14]) & 1) != 0 )
{
return (Item_temptable_field *)(*((long long ( **)(Item **, THD *))*this + 92))(this, a2);
}
v3 = (Item_temptable_field *)Item::operator new(280LL, *((_QWORD *)a2 + 5));
v4 = 0LL;
if ( v3 )
{
Item_temptable_field::Item_temptable_field(v3, a2, this[13]);
return v3;
}
return (Item_temptable_field *)v4;
}
|
table_type:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[0x154066b]
POP RBP
RET
|
/* ha_json_table::table_type() const */
char * ha_json_table::table_type(void)
{
return "JSON_TABLE function";
}
|
|
57,011
|
c4_state_get_pending_request
|
corpus-core[P]colibri-stateless/src/util/state.c
|
data_request_t* c4_state_get_pending_request(c4_state_t* state) {
data_request_t* data_request = state->requests;
while (data_request) {
if (c4_state_is_pending(data_request)) return data_request;
data_request = data_request->next;
}
return NULL;
}
|
O0
|
c
|
c4_state_get_pending_request:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xa6355
movq -0x18(%rbp), %rdi
callq 0xa6230
testb $0x1, %al
jne 0xa633d
jmp 0xa6347
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa635d
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xa6327
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
c4_state_get_pending_request:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
loc_A6327:
cmp [rbp+var_18], 0
jz short loc_A6355
mov rdi, [rbp+var_18]
call c4_state_is_pending
test al, 1
jnz short loc_A633D
jmp short loc_A6347
loc_A633D:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_A635D
loc_A6347:
mov rax, [rbp+var_18]
mov rax, [rax+50h]
mov [rbp+var_18], rax
jmp short loc_A6327
loc_A6355:
mov [rbp+var_8], 0
loc_A635D:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long c4_state_get_pending_request(long long *a1)
{
long long i; // [rsp+8h] [rbp-18h]
for ( i = *a1; i; i = *(_QWORD *)(i + 80) )
{
if ( (c4_state_is_pending(i) & 1) != 0 )
return i;
}
return 0LL;
}
|
c4_state_get_pending_request:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_001a6327:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001a6355
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001a6230
TEST AL,0x1
JNZ 0x001a633d
JMP 0x001a6347
LAB_001a633d:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a635d
LAB_001a6347:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001a6327
LAB_001a6355:
MOV qword ptr [RBP + -0x8],0x0
LAB_001a635d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long c4_state_get_pending_request(long *param_1)
{
ulong uVar1;
long local_20;
local_20 = *param_1;
while( true ) {
if (local_20 == 0) {
return 0;
}
uVar1 = c4_state_is_pending(local_20);
if ((uVar1 & 1) != 0) break;
local_20 = *(long *)(local_20 + 0x50);
}
return local_20;
}
|
|
57,012
|
js_cond_destroy
|
bluesky950520[P]quickjs/cutils.c
|
void js_cond_destroy(js_cond_t *cond) {
#if defined(__APPLE__) && defined(__MACH__)
/* It has been reported that destroying condition variables that have been
* signalled but not waited on can sometimes result in application crashes.
* See https://codereview.chromium.org/1323293005.
*/
pthread_mutex_t mutex;
struct timespec ts;
int err;
if (pthread_mutex_init(&mutex, NULL))
abort();
if (pthread_mutex_lock(&mutex))
abort();
ts.tv_sec = 0;
ts.tv_nsec = 1;
err = pthread_cond_timedwait_relative_np(cond, &mutex, &ts);
if (err != 0 && err != ETIMEDOUT)
abort();
if (pthread_mutex_unlock(&mutex))
abort();
if (pthread_mutex_destroy(&mutex))
abort();
#endif /* defined(__APPLE__) && defined(__MACH__) */
if (pthread_cond_destroy(cond))
abort();
}
|
O0
|
c
|
js_cond_destroy:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0xe780
cmpl $0x0, %eax
je 0x20ff8
callq 0xe090
popq %rax
retq
nopw (%rax,%rax)
|
js_cond_destroy:
push rax
mov [rsp+8+var_8], rdi
mov rdi, [rsp+8+var_8]
call _pthread_cond_destroy
cmp eax, 0
jz short loc_20FF8
call _abort
loc_20FF8:
pop rax
retn
|
long long js_cond_destroy(long long a1)
{
if ( (unsigned int)pthread_cond_destroy(a1) )
abort();
return a1;
}
|
js_cond_destroy:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x0010e780
CMP EAX,0x0
JZ 0x00120ff8
CALL 0x0010e090
LAB_00120ff8:
POP RAX
RET
|
pthread_cond_t * js_cond_destroy(pthread_cond_t *param_1)
{
int iVar1;
iVar1 = pthread_cond_destroy(param_1);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
return param_1;
}
|
|
57,013
|
js_cond_destroy
|
bluesky950520[P]quickjs/cutils.c
|
void js_cond_destroy(js_cond_t *cond) {
#if defined(__APPLE__) && defined(__MACH__)
/* It has been reported that destroying condition variables that have been
* signalled but not waited on can sometimes result in application crashes.
* See https://codereview.chromium.org/1323293005.
*/
pthread_mutex_t mutex;
struct timespec ts;
int err;
if (pthread_mutex_init(&mutex, NULL))
abort();
if (pthread_mutex_lock(&mutex))
abort();
ts.tv_sec = 0;
ts.tv_nsec = 1;
err = pthread_cond_timedwait_relative_np(cond, &mutex, &ts);
if (err != 0 && err != ETIMEDOUT)
abort();
if (pthread_mutex_unlock(&mutex))
abort();
if (pthread_mutex_destroy(&mutex))
abort();
#endif /* defined(__APPLE__) && defined(__MACH__) */
if (pthread_cond_destroy(cond))
abort();
}
|
O1
|
c
|
js_cond_destroy:
pushq %rax
callq 0xe790
testl %eax, %eax
jne 0x1c7e8
popq %rax
retq
callq 0xe090
|
js_cond_destroy:
push rax
call _pthread_cond_destroy
test eax, eax
jnz short loc_1C7E8
pop rax
retn
loc_1C7E8:
call _abort
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> js_cond_destroy(long long a1)
{
if ( (unsigned int)pthread_cond_destroy() )
abort(a1);
}
|
js_cond_destroy:
PUSH RAX
CALL 0x0010e790
TEST EAX,EAX
JNZ 0x0011c7e8
POP RAX
RET
LAB_0011c7e8:
CALL 0x0010e090
|
int8 js_cond_destroy(pthread_cond_t *param_1)
{
int iVar1;
int8 in_RAX;
iVar1 = pthread_cond_destroy(param_1);
if (iVar1 == 0) {
return in_RAX;
}
/* WARNING: Subroutine does not return */
abort();
}
|
|
57,014
|
js_cond_destroy
|
bluesky950520[P]quickjs/cutils.c
|
void js_cond_destroy(js_cond_t *cond) {
#if defined(__APPLE__) && defined(__MACH__)
/* It has been reported that destroying condition variables that have been
* signalled but not waited on can sometimes result in application crashes.
* See https://codereview.chromium.org/1323293005.
*/
pthread_mutex_t mutex;
struct timespec ts;
int err;
if (pthread_mutex_init(&mutex, NULL))
abort();
if (pthread_mutex_lock(&mutex))
abort();
ts.tv_sec = 0;
ts.tv_nsec = 1;
err = pthread_cond_timedwait_relative_np(cond, &mutex, &ts);
if (err != 0 && err != ETIMEDOUT)
abort();
if (pthread_mutex_unlock(&mutex))
abort();
if (pthread_mutex_destroy(&mutex))
abort();
#endif /* defined(__APPLE__) && defined(__MACH__) */
if (pthread_cond_destroy(cond))
abort();
}
|
O3
|
c
|
js_cond_destroy:
pushq %rax
callq 0xe790
testl %eax, %eax
jne 0x1d0e6
popq %rax
retq
callq 0xe090
|
js_cond_destroy:
push rax
call _pthread_cond_destroy
test eax, eax
jnz short loc_1D0E6
pop rax
retn
loc_1D0E6:
call _abort
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> js_cond_destroy(long long a1)
{
if ( (unsigned int)pthread_cond_destroy() )
abort(a1);
}
|
js_cond_destroy:
PUSH RAX
CALL 0x0010e790
TEST EAX,EAX
JNZ 0x0011d0e6
POP RAX
RET
LAB_0011d0e6:
CALL 0x0010e090
|
int8 js_cond_destroy(pthread_cond_t *param_1)
{
int iVar1;
int8 in_RAX;
iVar1 = pthread_cond_destroy(param_1);
if (iVar1 == 0) {
return in_RAX;
}
/* WARNING: Subroutine does not return */
abort();
}
|
|
57,015
|
ma_get_buffer_offset
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static void *ma_get_buffer_offset(MYSQL_STMT *stmt, enum enum_field_types type,
void *buffer, unsigned long row_nr)
{
if (stmt->param_callback)
return buffer;
if (stmt->array_size)
{
int len;
if (stmt->row_size)
return (void *)((char *)buffer + stmt->row_size * row_nr);
len= mysql_ps_fetch_functions[type].pack_len;
if (len > 0)
return (void *)((char *)buffer + len * row_nr);
return ((void **)buffer)[row_nr];
}
return buffer;
}
|
O0
|
c
|
ma_get_buffer_offset:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x390(%rax)
je 0x271be
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x27245
movq -0x10(%rbp), %rax
cmpl $0x0, 0x368(%rax)
je 0x2723d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x370(%rax)
je 0x271f6
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x370(%rcx), %rcx
imulq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x27245
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x3925e(%rip), %rax # 0x60460
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0x2722b
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x27245
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x27245
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
|
ma_get_buffer_offset:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+390h], 0
jz short loc_271BE
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp loc_27245
loc_271BE:
mov rax, [rbp+var_10]
cmp dword ptr [rax+368h], 0
jz short loc_2723D
mov rax, [rbp+var_10]
cmp qword ptr [rax+370h], 0
jz short loc_271F6
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx+370h]
imul rcx, [rbp+var_28]
add rax, rcx
mov [rbp+var_8], rax
jmp short loc_27245
loc_271F6:
mov eax, [rbp+var_14]
mov ecx, eax
lea rax, mysql_ps_fetch_functions
imul rcx, 18h
add rax, rcx
mov eax, [rax+8]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jle short loc_2722B
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_2C]
imul rcx, [rbp+var_28]
add rax, rcx
mov [rbp+var_8], rax
jmp short loc_27245
loc_2722B:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
jmp short loc_27245
loc_2723D:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_27245:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long ma_get_buffer_offset(long long a1, int a2, long long a3, long long a4)
{
int v5; // [rsp+0h] [rbp-2Ch]
if ( *(_QWORD *)(a1 + 912) )
return a3;
if ( !*(_DWORD *)(a1 + 872) )
return a3;
if ( *(_QWORD *)(a1 + 880) )
return a4 * *(_QWORD *)(a1 + 880) + a3;
v5 = mysql_ps_fetch_functions[6 * a2 + 2];
if ( v5 <= 0 )
return *(_QWORD *)(a3 + 8 * a4);
else
return a4 * v5 + a3;
}
|
ma_get_buffer_offset:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x390],0x0
JZ 0x001271be
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127245
LAB_001271be:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x368],0x0
JZ 0x0012723d
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x370],0x0
JZ 0x001271f6
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x370]
IMUL RCX,qword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127245
LAB_001271f6:
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,EAX
LEA RAX,[0x160460]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JLE 0x0012722b
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x2c]
IMUL RCX,qword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127245
LAB_0012722b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127245
LAB_0012723d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00127245:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
long ma_get_buffer_offset(long param_1,uint param_2,long param_3,long param_4)
{
long local_10;
local_10 = param_3;
if ((*(long *)(param_1 + 0x390) == 0) && (*(int *)(param_1 + 0x368) != 0)) {
if (*(long *)(param_1 + 0x370) == 0) {
if ((int)(&DAT_00160468)[(ulong)param_2 * 6] < 1) {
local_10 = *(long *)(param_3 + param_4 * 8);
}
else {
local_10 = param_3 + (int)(&DAT_00160468)[(ulong)param_2 * 6] * param_4;
}
}
else {
local_10 = param_3 + *(long *)(param_1 + 0x370) * param_4;
}
}
return local_10;
}
|
|
57,016
|
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
|
ng-log[P]ng-log/src/symbolize.cc
|
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count,
const size_t offset) {
NGLOG_SAFE_ASSERT(fd >= 0);
NGLOG_SAFE_ASSERT(count <=
static_cast<size_t>(std::numeric_limits<ssize_t>::max()));
char* buf0 = reinterpret_cast<char*>(buf);
size_t num_bytes = 0;
while (num_bytes < count) {
ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes,
m = static_cast<off_t>(offset + num_bytes)] {
return pread(fd, p, n, m);
});
if (len < 0) { // There was an error other than EINTR.
return -1;
}
if (len == 0) { // Reached EOF.
break;
}
num_bytes += static_cast<size_t>(len);
}
NGLOG_SAFE_ASSERT(num_bytes <= count);
return static_cast<ssize_t>(num_bytes);
}
|
O3
|
cpp
|
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %edi, %edi
js 0x215aa
testq %rdx, %rdx
js 0x215aa
movl %edi, %ebp
xorl %r14d, %r14d
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, %r13
subq %r14, %r13
jbe 0x215a5
leaq (%rsi,%r14), %r15
movq %rcx, %rbx
leaq (%r14,%rcx), %r12
movl %ebp, %edi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x7680
cmpq $-0x1, %rax
jne 0x21570
callq 0x7050
cmpl $0x4, (%rax)
je 0x2154e
jmp 0x215af
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leal (%rcx,%rcx,2), %edi
movl $0x0, %ecx
cmovleq %rcx, %rax
movl $0x1, %ecx
cmovsl %ecx, %edi
addq %rax, %r14
testl %edi, %edi
movq %rbx, %rcx
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
je 0x2153b
cmpl $0x3, %edi
jne 0x215af
cmpq %rdx, %r14
jbe 0x215b6
callq 0x72b0
movq $-0x1, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
test edi, edi
js loc_215AA
test rdx, rdx
js short loc_215AA
mov ebp, edi
xor r14d, r14d
mov [rsp+48h+var_38], rdx
mov [rsp+48h+var_40], rsi
loc_2153B:
mov r13, rdx
sub r13, r14
jbe short loc_215A5
lea r15, [rsi+r14]
mov rbx, rcx
lea r12, [r14+rcx]
loc_2154E:
mov edi, ebp
mov rsi, r15
mov rdx, r13
mov rcx, r12
call _pread
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_21570
call ___errno_location
cmp dword ptr [rax], 4
jz short loc_2154E
jmp short loc_215AF
loc_21570:
xor ecx, ecx
test rax, rax
setz cl
lea edi, [rcx+rcx*2]
mov ecx, 0
cmovle rax, rcx
mov ecx, 1
cmovs edi, ecx
add r14, rax
test edi, edi
mov rcx, rbx
mov rdx, [rsp+48h+var_38]
mov rsi, [rsp+48h+var_40]
jz short loc_2153B
cmp edi, 3
jnz short loc_215AF
loc_215A5:
cmp r14, rdx
jbe short loc_215B6
loc_215AA:
call _abort
loc_215AF:
mov r14, 0FFFFFFFFFFFFFFFFh
loc_215B6:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long nglog::tools::ReadFromOffset(unsigned long long this, long long a2, char *a3, long long a4)
{
unsigned int v4; // ebp
unsigned long long v5; // r14
char *v6; // r13
long long v7; // rbx
long long v8; // r12
long long v9; // rax
bool v10; // sf
long long v12; // [rsp+8h] [rbp-40h]
char *v13; // [rsp+10h] [rbp-38h]
if ( (this & 0x80000000) != 0LL || (long long)a3 < 0 )
LABEL_16:
abort(this);
v4 = this;
v5 = 0LL;
v13 = a3;
v12 = a2;
do
{
v6 = &a3[-v5];
if ( (unsigned long long)a3 <= v5 )
goto LABEL_15;
v7 = a4;
v8 = v5 + a4;
while ( 1 )
{
v9 = pread(v4, a2 + v5, v6, v8);
if ( v9 != -1 )
break;
if ( *(_DWORD *)__errno_location(v4) != 4 )
return -1LL;
}
v10 = v9 < 0;
this = 3 * (unsigned int)(v9 == 0);
if ( v9 <= 0 )
v9 = 0LL;
if ( v10 )
this = 1LL;
v5 += v9;
a4 = v7;
a3 = v13;
a2 = v12;
}
while ( !(_DWORD)this );
if ( (_DWORD)this != 3 )
return -1LL;
LABEL_15:
if ( v5 > (unsigned long long)a3 )
goto LABEL_16;
return v5;
}
|
ReadFromOffset:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
TEST EDI,EDI
JS 0x001215aa
TEST RDX,RDX
JS 0x001215aa
MOV EBP,EDI
XOR R14D,R14D
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x8],RSI
LAB_0012153b:
MOV R13,RDX
SUB R13,R14
JBE 0x001215a5
LEA R15,[RSI + R14*0x1]
MOV RBX,RCX
LEA R12,[R14 + RCX*0x1]
LAB_0012154e:
MOV EDI,EBP
MOV RSI,R15
MOV RDX,R13
MOV RCX,R12
CALL 0x00107680
CMP RAX,-0x1
JNZ 0x00121570
CALL 0x00107050
CMP dword ptr [RAX],0x4
JZ 0x0012154e
JMP 0x001215af
LAB_00121570:
XOR ECX,ECX
TEST RAX,RAX
SETZ CL
LEA EDI,[RCX + RCX*0x2]
MOV ECX,0x0
CMOVLE RAX,RCX
MOV ECX,0x1
CMOVS EDI,ECX
ADD R14,RAX
TEST EDI,EDI
MOV RCX,RBX
MOV RDX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
JZ 0x0012153b
CMP EDI,0x3
JNZ 0x001215af
LAB_001215a5:
CMP R14,RDX
JBE 0x001215b6
LAB_001215aa:
CALL 0x001072b0
LAB_001215af:
MOV R14,-0x1
LAB_001215b6:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */
ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4)
{
char cVar1;
long lVar2;
int *piVar3;
ulong uVar4;
bool bVar5;
bool bVar6;
if ((-1 < param_1) && (-1 < (long)param_3)) {
uVar4 = 0;
do {
if (param_3 < uVar4 || param_3 - uVar4 == 0) goto LAB_001215a5;
while (lVar2 = pread(param_1,(void *)((long)param_2 + uVar4),param_3 - uVar4,uVar4 + param_4),
lVar2 == -1) {
piVar3 = __errno_location();
if (*piVar3 != 4) goto LAB_001215af;
}
bVar6 = lVar2 < 0;
bVar5 = lVar2 == 0;
if (lVar2 < 1) {
lVar2 = 0;
}
cVar1 = bVar5 * '\x03';
if (bVar6) {
cVar1 = '\x01';
}
uVar4 = uVar4 + lVar2;
} while (cVar1 == '\0');
if (cVar1 == '\x03') {
LAB_001215a5:
if (param_3 < uVar4) goto LAB_001215aa;
}
else {
LAB_001215af:
uVar4 = 0xffffffffffffffff;
}
return uVar4;
}
LAB_001215aa:
/* WARNING: Subroutine does not return */
abort();
}
|
|
57,017
|
init_dynamic_array2
|
eloqsql/mysys/array.c
|
my_bool init_dynamic_array2(PSI_memory_key psi_key, DYNAMIC_ARRAY *array,
uint element_size, void *init_buffer,
uint init_alloc, uint alloc_increment, myf my_flags)
{
DBUG_ENTER("init_dynamic_array2");
if (!alloc_increment)
{
alloc_increment=MY_MAX((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
}
array->elements=0;
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
array->m_psi_key= psi_key;
array->malloc_flags= my_flags;
DBUG_ASSERT((my_flags & MY_INIT_BUFFER_USED) == 0);
if ((array->buffer= init_buffer))
{
array->malloc_flags|= MY_INIT_BUFFER_USED;
DBUG_RETURN(FALSE);
}
/*
Since the dynamic array is usable even if allocation fails here malloc
should not throw an error
*/
if (init_alloc &&
!(array->buffer= (uchar*) my_malloc(psi_key, element_size*init_alloc,
MYF(my_flags))))
array->max_element=0;
DBUG_RETURN(FALSE);
}
|
O0
|
c
|
init_dynamic_array2:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0xda5c2
movl $0x1ff8, %eax # imm = 0x1FF8
xorl %edx, %edx
divl -0x14(%rbp)
cmpl $0x10, %eax
jbe 0xda596
movl $0x1ff8, %eax # imm = 0x1FF8
xorl %edx, %edx
divl -0x14(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xda5a0
movl $0x10, %eax
movl %eax, -0x2c(%rbp)
jmp 0xda5a0
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x8, -0x24(%rbp)
jbe 0xda5c0
movl -0x28(%rbp), %eax
movl -0x24(%rbp), %ecx
shll %ecx
cmpl %ecx, %eax
jbe 0xda5c0
movl -0x24(%rbp), %eax
shll %eax
movl %eax, -0x28(%rbp)
jmp 0xda5c2
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0xda603
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xda62d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x100, %rcx # imm = 0x100
movq %rcx, 0x20(%rax)
movb $0x0, -0x1(%rbp)
jmp 0xda668
cmpl $0x0, -0x24(%rbp)
je 0xda662
movl -0x8(%rbp), %edi
movl -0x14(%rbp), %eax
imull -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
movq 0x10(%rbp), %rdx
callq 0xf3820
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0xda662
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
jmp 0xda664
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
init_dynamic_array2:
push rbp
mov rbp, rsp
sub rsp, 30h
mov rax, [rbp+arg_0]
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
cmp [rbp+var_28], 0
jnz short loc_DA5C2
mov eax, 1FF8h
xor edx, edx
div [rbp+var_14]
cmp eax, 10h
jbe short loc_DA596
mov eax, 1FF8h
xor edx, edx
div [rbp+var_14]
mov [rbp+var_2C], eax
jmp short loc_DA5A0
loc_DA596:
mov eax, 10h
mov [rbp+var_2C], eax
jmp short $+2
loc_DA5A0:
mov eax, [rbp+var_2C]
mov [rbp+var_28], eax
cmp [rbp+var_24], 8
jbe short loc_DA5C0
mov eax, [rbp+var_28]
mov ecx, [rbp+var_24]
shl ecx, 1
cmp eax, ecx
jbe short loc_DA5C0
mov eax, [rbp+var_24]
shl eax, 1
mov [rbp+var_28], eax
loc_DA5C0:
jmp short $+2
loc_DA5C2:
mov rax, [rbp+var_10]
mov dword ptr [rax+8], 0
mov ecx, [rbp+var_24]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
mov ecx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+10h], ecx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov ecx, [rbp+var_8]
mov rax, [rbp+var_10]
mov [rax+18h], ecx
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
jmp short $+2
loc_DA603:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jz short loc_DA62D
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
or rcx, 100h
mov [rax+20h], rcx
mov [rbp+var_1], 0
jmp short loc_DA668
loc_DA62D:
cmp [rbp+var_24], 0
jz short loc_DA662
mov edi, [rbp+var_8]
mov eax, [rbp+var_14]
imul eax, [rbp+var_24]
mov eax, eax
mov esi, eax
mov rdx, [rbp+arg_0]
call my_malloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_DA662
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 0
loc_DA662:
jmp short $+2
loc_DA664:
mov [rbp+var_1], 0
loc_DA668:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char init_dynamic_array2(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
int a6,
long long a7)
{
long long v7; // rax
unsigned int v9; // [rsp+4h] [rbp-2Ch]
int v10; // [rsp+8h] [rbp-28h]
v10 = a6;
if ( !a6 )
{
v9 = 0x1FF8 / a3 <= 0x10 ? 16 : 0x1FF8 / a3;
v10 = v9;
if ( a5 > 8 && v9 > 2 * a5 )
v10 = 2 * a5;
}
*(_DWORD *)(a2 + 8) = 0;
*(_DWORD *)(a2 + 12) = a5;
*(_DWORD *)(a2 + 16) = v10;
*(_DWORD *)(a2 + 20) = a3;
*(_DWORD *)(a2 + 24) = a1;
*(_QWORD *)(a2 + 32) = a7;
*(_QWORD *)a2 = a4;
if ( a4 )
{
*(_QWORD *)(a2 + 32) |= 0x100uLL;
}
else if ( a5 )
{
v7 = my_malloc(a1, a5 * a3, a7);
*(_QWORD *)a2 = v7;
if ( !v7 )
*(_DWORD *)(a2 + 12) = 0;
}
return 0;
}
|
init_dynamic_array2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
CMP dword ptr [RBP + -0x28],0x0
JNZ 0x001da5c2
MOV EAX,0x1ff8
XOR EDX,EDX
DIV dword ptr [RBP + -0x14]
CMP EAX,0x10
JBE 0x001da596
MOV EAX,0x1ff8
XOR EDX,EDX
DIV dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001da5a0
LAB_001da596:
MOV EAX,0x10
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001da5a0
LAB_001da5a0:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x24],0x8
JBE 0x001da5c0
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x24]
SHL ECX,0x1
CMP EAX,ECX
JBE 0x001da5c0
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
LAB_001da5c0:
JMP 0x001da5c2
LAB_001da5c2:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],0x0
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV ECX,dword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x001da603
LAB_001da603:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001da62d
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x100
MOV qword ptr [RAX + 0x20],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001da668
LAB_001da62d:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x001da662
MOV EDI,dword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x14]
IMUL EAX,dword ptr [RBP + -0x24]
MOV EAX,EAX
MOV ESI,EAX
MOV RDX,qword ptr [RBP + 0x10]
CALL 0x001f3820
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001da662
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0x0
LAB_001da662:
JMP 0x001da664
LAB_001da664:
MOV byte ptr [RBP + -0x1],0x0
LAB_001da668:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int8
init_dynamic_array2(int4 param_1,long *param_2,uint param_3,long param_4,uint param_5,
uint param_6,long param_7)
{
long lVar1;
uint local_34;
uint local_30;
local_30 = param_6;
if (param_6 == 0) {
if ((uint)(0x1ff8 / (ulong)param_3) < 0x11) {
local_34 = 0x10;
}
else {
local_34 = (uint)(0x1ff8 / (ulong)param_3);
}
local_30 = local_34;
if ((8 < param_5) && (param_5 * 2 < local_34)) {
local_30 = param_5 << 1;
}
}
*(int4 *)(param_2 + 1) = 0;
*(uint *)((long)param_2 + 0xc) = param_5;
*(uint *)(param_2 + 2) = local_30;
*(uint *)((long)param_2 + 0x14) = param_3;
*(int4 *)(param_2 + 3) = param_1;
param_2[4] = param_7;
*param_2 = param_4;
if (param_4 == 0) {
if (param_5 != 0) {
lVar1 = my_malloc(param_1,param_3 * param_5,param_7);
*param_2 = lVar1;
if (lVar1 == 0) {
*(int4 *)((long)param_2 + 0xc) = 0;
}
}
}
else {
param_2[4] = param_2[4] | 0x100;
}
return 0;
}
|
|
57,018
|
mi_open_keyfile
|
eloqsql/storage/myisam/mi_open.c
|
int mi_open_keyfile(MYISAM_SHARE *share)
{
if ((share->kfile= mysql_file_open(mi_key_file_kfile,
share->unique_file_name,
share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
MYF(MY_NOSYMLINKS | MY_WME))) < 0)
return 1;
return 0;
}
|
O3
|
c
|
mi_open_keyfile:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0xb86188(%rip), %rax # 0xc0bb7c
movl (%rax), %esi
movq 0x258(%rdi), %r15
movl $0xa0000, %r14d # imm = 0xA0000
orl 0x358(%rdi), %r14d
leaq 0x30b4c7(%rip), %r13 # 0x390ed8
movq (%r13), %rax
leaq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %r12
movl $0x2, %edx
movq %r15, %rcx
movq %r12, %r8
callq *0x148(%rax)
movq %rax, (%r12)
testq %rax, %rax
jne 0x85a67
movl $0x210, %edx # imm = 0x210
movq %r15, %rdi
movl %r14d, %esi
callq 0xa755c
movl %eax, %r14d
movl %r14d, 0x350(%rbx)
shrl $0x1f, %r14d
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rcx
leaq 0x5e9c3(%rip), %rsi # 0xe4435
movq %rax, %rdi
movl $0x504, %edx # imm = 0x504
callq *0x1f0(%rcx)
movl $0x210, %edx # imm = 0x210
movq %r15, %rdi
movl %r14d, %esi
callq 0xa755c
movl %eax, %r14d
movq (%r13), %rax
movq -0x30(%rbp), %rdi
movl %r14d, %esi
callq *0x200(%rax)
jmp 0x85a4a
|
mi_open_keyfile:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
lea rax, mi_key_file_kfile
mov esi, [rax]
mov r15, [rdi+258h]
mov r14d, 0A0000h
or r14d, [rdi+358h]
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_78]
lea r12, [rbp+var_30]
mov edx, 2
mov rcx, r15
mov r8, r12
call qword ptr [rax+148h]
mov [r12], rax
test rax, rax
jnz short loc_85A67
mov edx, 210h
mov rdi, r15
mov esi, r14d
call my_open
mov r14d, eax
loc_85A4A:
mov [rbx+350h], r14d
shr r14d, 1Fh
mov eax, r14d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_85A67:
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, 504h
call qword ptr [rcx+1F0h]
mov edx, 210h
mov rdi, r15
mov esi, r14d
call my_open
mov r14d, eax
mov rax, [r13+0]
mov rdi, [rbp+var_30]
mov esi, r14d
call qword ptr [rax+200h]
jmp short loc_85A4A
|
long long mi_open_keyfile(long long a1)
{
long long v1; // r15
unsigned int v2; // r14d
long long v3; // rax
long long v4; // r14
_BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF
long long v7[6]; // [rsp+50h] [rbp-30h] BYREF
v1 = *(_QWORD *)(a1 + 600);
v2 = *(_DWORD *)(a1 + 856) | 0xA0000;
v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(
v6,
mi_key_file_kfile,
2LL,
v1,
v7);
v7[0] = v3;
if ( v3 )
{
((void ( *)(long long, const char *, long long))PSI_server[62])(
v3,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
1284LL);
v4 = (unsigned int)my_open(v1, v2, 528LL);
((void ( *)(long long, long long))PSI_server[64])(v7[0], v4);
}
else
{
LODWORD(v4) = my_open(v1, v2, 528LL);
}
*(_DWORD *)(a1 + 848) = v4;
return (unsigned int)v4 >> 31;
}
|
mi_open_keyfile:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
LEA RAX,[0xd0bb7c]
MOV ESI,dword ptr [RAX]
MOV R15,qword ptr [RDI + 0x258]
MOV R14D,0xa0000
OR R14D,dword ptr [RDI + 0x358]
LEA R13,[0x490ed8]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x78]
LEA R12,[RBP + -0x30]
MOV EDX,0x2
MOV RCX,R15
MOV R8,R12
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R12],RAX
TEST RAX,RAX
JNZ 0x00185a67
MOV EDX,0x210
MOV RDI,R15
MOV ESI,R14D
CALL 0x001a755c
MOV R14D,EAX
LAB_00185a4a:
MOV dword ptr [RBX + 0x350],R14D
SHR R14D,0x1f
MOV EAX,R14D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00185a67:
MOV RCX,qword ptr [R13]
LEA RSI,[0x1e4435]
MOV RDI,RAX
MOV EDX,0x504
CALL qword ptr [RCX + 0x1f0]
MOV EDX,0x210
MOV RDI,R15
MOV ESI,R14D
CALL 0x001a755c
MOV R14D,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,R14D
CALL qword ptr [RAX + 0x200]
JMP 0x00185a4a
|
uint mi_open_keyfile(long param_1)
{
int8 uVar1;
uint uVar2;
int1 local_80 [72];
long local_38;
uVar1 = *(int8 *)(param_1 + 600);
uVar2 = *(uint *)(param_1 + 0x358) | 0xa0000;
local_38 = (**(code **)(PSI_server + 0x148))(local_80,mi_key_file_kfile,2,uVar1,&local_38);
if (local_38 == 0) {
uVar2 = my_open(uVar1,uVar2,0x210);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_38,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x504);
uVar2 = my_open(uVar1,uVar2,0x210);
(**(code **)(PSI_server + 0x200))(local_38,uVar2);
}
*(uint *)(param_1 + 0x350) = uVar2;
return uVar2 >> 0x1f;
}
|
|
57,019
|
js_bound_function_finalizer
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_bound_function_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSBoundFunction *bf = p->u.bound_function;
int i;
JS_FreeValueRT(rt, bf->func_obj);
JS_FreeValueRT(rt, bf->this_val);
for(i = 0; i < bf->argc; i++) {
JS_FreeValueRT(rt, bf->argv[i]);
}
js_free_rt(rt, bf);
}
|
O0
|
c
|
js_bound_function_finalizer:
subq $0x38, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x22a50
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
callq 0x22a50
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x5a061
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
addq $0x28, %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x22a50
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x5a020
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x206a0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_bound_function_finalizer:
sub rsp, 38h
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_8], rdx
mov [rsp+38h+var_18], rdi
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_20]
mov rax, [rax+30h]
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_18]
mov rax, [rsp+38h+var_28]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValueRT
mov rdi, [rsp+38h+var_18]
mov rax, [rsp+38h+var_28]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
call JS_FreeValueRT
mov [rsp+38h+var_2C], 0
loc_5A020:
mov eax, [rsp+38h+var_2C]
mov rcx, [rsp+38h+var_28]
cmp eax, [rcx+20h]
jge short loc_5A061
mov rdi, [rsp+38h+var_18]
mov rax, [rsp+38h+var_28]
add rax, 28h ; '('
movsxd rcx, [rsp+38h+var_2C]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValueRT
mov eax, [rsp+38h+var_2C]
add eax, 1
mov [rsp+38h+var_2C], eax
jmp short loc_5A020
loc_5A061:
mov rdi, [rsp+38h+var_18]
mov rsi, [rsp+38h+var_28]
call js_free_rt
add rsp, 38h
retn
|
void js_bound_function_finalizer(long long a1, long long a2)
{
int i; // [rsp+Ch] [rbp-2Ch]
long long v3; // [rsp+10h] [rbp-28h]
v3 = *(_QWORD *)(a2 + 48);
JS_FreeValueRT(a1, *(_DWORD **)v3, *(_QWORD *)(v3 + 8));
JS_FreeValueRT(a1, *(_DWORD **)(v3 + 16), *(_QWORD *)(v3 + 24));
for ( i = 0; i < *(_DWORD *)(v3 + 32); ++i )
JS_FreeValueRT(a1, *(_DWORD **)(16LL * i + v3 + 40), *(_QWORD *)(16LL * i + v3 + 40 + 8));
js_free_rt(a1, v3);
}
|
js_bound_function_finalizer:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00122a50
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00122a50
MOV dword ptr [RSP + 0xc],0x0
LAB_0015a020:
MOV EAX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX + 0x20]
JGE 0x0015a061
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x28
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00122a50
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0015a020
LAB_0015a061:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001206a0
ADD RSP,0x38
RET
|
void js_bound_function_finalizer(int8 param_1,long param_2)
{
int8 *puVar1;
int local_2c;
puVar1 = *(int8 **)(param_2 + 0x30);
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
for (local_2c = 0; local_2c < *(int *)(puVar1 + 4); local_2c = local_2c + 1) {
JS_FreeValueRT(param_1,puVar1[(long)local_2c * 2 + 5],(puVar1 + (long)local_2c * 2 + 5)[1]);
}
js_free_rt(param_1,puVar1);
return;
}
|
|
57,020
|
Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&)
|
untodesu[P]voxelius/game/shared/dimension.cc
|
Chunk *Dimension::create_chunk(const chunk_pos &cpos)
{
auto it = m_chunkmap.find(cpos);
if(it != m_chunkmap.cend()) {
// Chunk already exists
return it->second;
}
auto entity = chunks.create();
auto chunk = new Chunk(entity, this);
auto &component = chunks.emplace<ChunkComponent>(entity);
component.chunk = chunk;
component.cpos = cpos;
ChunkCreateEvent event;
event.dimension = this;
event.chunk = chunk;
event.cpos = cpos;
globals::dispatcher.trigger(event);
return m_chunkmap.insert_or_assign(cpos, std::move(chunk)).first->second;
}
|
O0
|
cpp
|
Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x98(%rbp)
addq $0x2c8, %rdi # imm = 0x2C8
movq -0x18(%rbp), %rsi
callq 0x1498c0
movq -0x98(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x2c8, %rdi # imm = 0x2C8
callq 0x149940
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x149910
testb $0x1, %al
jne 0x148f8c
jmp 0x148fa2
leaq -0x20(%rbp), %rdi
callq 0x149970
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1490c4
movq -0x98(%rbp), %rdi
addq $0x8, %rdi
callq 0x149990
movl %eax, -0x2c(%rbp)
movl $0x2020, %edi # imm = 0x2020
callq 0x2c2d0
movq -0x98(%rbp), %rdx
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
movl -0x2c(%rbp), %esi
callq 0x13fe90
jmp 0x148fdd
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x8, %rdi
movl -0x2c(%rbp), %esi
callq 0x1499c0
movq %rax, %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq -0x38(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq %rdx, 0x10(%rcx)
movq -0x18(%rbp), %rdx
movq -0x50(%rbp), %rcx
movl 0x8(%rdx), %esi
movl %esi, 0x8(%rcx)
movq (%rdx), %rdx
movq %rdx, (%rcx)
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, -0x60(%rbp)
movq (%rax), %rax
movq %rax, -0x68(%rbp)
leaq 0x3c7a03(%rip), %rdi # 0x510a50
leaq -0x70(%rbp), %rsi
callq 0x149a30
movq -0x98(%rbp), %rdi
addq $0x2c8, %rdi # imm = 0x2C8
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x149a70
movb %dl, -0x88(%rbp)
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x80(%rbp)
movb -0x88(%rbp), %al
movb %al, -0x78(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x149970
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1490c4
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x2020, %esi # imm = 0x2020
callq 0x2c200
jmp 0x1490d1
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2cbe0
nopw (%rax,%rax)
|
_ZN9Dimension12create_chunkERKN3glm3vecILi3EiLNS0_9qualifierE0EEE:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov [rbp+var_98], rdi
add rdi, 2C8h
mov rsi, [rbp+var_18]
call _ZN7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE4findIS4_EENSB_8iteratorERKT_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find<glm::vec<3,int,(glm::qualifier)0>>(glm::vec<3,int,(glm::qualifier)0> const&)
mov rdi, [rbp+var_98]
mov [rbp+var_20], rax
add rdi, 2C8h
call _ZNK7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE4cendEv; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::cend(void)
mov [rbp+var_28], rax
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_28]
call _ZNK7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE8iteratorneERKNSB_14const_iteratorE; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::iterator::operator!=(emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::const_iterator const&)
test al, 1
jnz short loc_148F8C
jmp short loc_148FA2
loc_148F8C:
lea rdi, [rbp+var_20]
call _ZNK7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE8iteratorptEv; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::iterator::operator->(void)
mov rax, [rax+10h]
mov [rbp+var_8], rax
jmp loc_1490C4
loc_148FA2:
mov rdi, [rbp+var_98]
add rdi, 8
call _ZN4entt14basic_registryINS_6entityESaIS1_EE6createEv; entt::basic_registry<entt::entity,std::allocator<entt::entity>>::create(void)
mov [rbp+var_2C], eax
mov edi, 2020h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, [rbp+var_98]
mov rdi, rax
mov rax, rdi
mov [rbp+var_A0], rax
mov esi, [rbp+var_2C]
call _ZN5ChunkC2EN4entt6entityEP9Dimension; Chunk::Chunk(entt::entity,Dimension *)
jmp short $+2
loc_148FDD:
mov rdi, [rbp+var_98]
mov rax, [rbp+var_A0]
mov [rbp+var_38], rax
add rdi, 8
mov esi, [rbp+var_2C]
call _ZN4entt14basic_registryINS_6entityESaIS1_EE7emplaceI14ChunkComponentJEEEDcS1_DpOT0_
mov rcx, rax
mov rax, [rbp+var_98]
mov [rbp+var_50], rcx
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_50]
mov [rcx+10h], rdx
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_50]
mov esi, [rdx+8]
mov [rcx+8], esi
mov rdx, [rdx]
mov [rcx], rdx
mov [rbp+var_70], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov ecx, [rax+8]
mov [rbp+var_60], ecx
mov rax, [rax]
mov [rbp+var_68], rax
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
lea rsi, [rbp+var_70]
call _ZN4entt16basic_dispatcherISaIvEE7triggerIR16ChunkCreateEventEEvOT_; entt::basic_dispatcher<std::allocator<void>>::trigger<ChunkCreateEvent &>(ChunkCreateEvent &)
mov rdi, [rbp+var_98]
add rdi, 2C8h
mov rsi, [rbp+var_18]
lea rdx, [rbp+var_38]
call _ZN7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE16insert_or_assignERKS4_OS6_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::insert_or_assign(glm::vec<3,int,(glm::qualifier)0> const&,Chunk *&&)
mov [rbp+var_88], dl
mov [rbp+var_90], rax
mov rax, [rbp+var_90]
mov [rbp+var_80], rax
mov al, [rbp+var_88]
mov [rbp+var_78], al
lea rdi, [rbp+var_80]
call _ZNK7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE8iteratorptEv; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::iterator::operator->(void)
mov rax, [rax+10h]
mov [rbp+var_8], rax
jmp short loc_1490C4
mov rdi, [rbp+var_A0]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
mov esi, 2020h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1490D1
loc_1490C4:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
loc_1490D1:
mov rdi, [rbp+var_40]
call __Unwind_Resume
|
long long Dimension::create_chunk(long long a1, long long a2)
{
_QWORD *v2; // rdx
_QWORD *v3; // rcx
char v4; // dl
void *v6; // [rsp+0h] [rbp-A0h]
long long v7; // [rsp+20h] [rbp-80h] BYREF
char v8; // [rsp+28h] [rbp-78h]
_QWORD v9[2]; // [rsp+30h] [rbp-70h] BYREF
int v10; // [rsp+40h] [rbp-60h]
void *v11; // [rsp+48h] [rbp-58h]
long long v12; // [rsp+50h] [rbp-50h]
void *v13; // [rsp+68h] [rbp-38h] BYREF
unsigned int v14; // [rsp+74h] [rbp-2Ch]
long long v15; // [rsp+78h] [rbp-28h] BYREF
long long v16; // [rsp+80h] [rbp-20h] BYREF
long long v17; // [rsp+88h] [rbp-18h]
long long v18; // [rsp+90h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find<glm::vec<3,int,(glm::qualifier)0>>(
a1 + 712,
a2);
v15 = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::cend(a1 + 712);
if ( (emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::iterator::operator!=(
&v16,
&v15) & 1) != 0 )
return *(_QWORD *)(emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::iterator::operator->(&v16)
+ 16);
v14 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::create(a1 + 8);
v6 = (void *)operator new(0x2020uLL);
Chunk::Chunk((long long)v6, v14, a1);
v13 = v6;
v12 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::emplace<ChunkComponent>(a1 + 8, v14);
*(_QWORD *)(v12 + 16) = v6;
v2 = (_QWORD *)v17;
v3 = (_QWORD *)v12;
*(_DWORD *)(v12 + 8) = *(_DWORD *)(v17 + 8);
*v3 = *v2;
v9[0] = a1;
v11 = v13;
v10 = *(_DWORD *)(v17 + 8);
v9[1] = *(_QWORD *)v17;
entt::basic_dispatcher<std::allocator<void>>::trigger<ChunkCreateEvent &>(&globals::dispatcher, v9);
v7 = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::insert_or_assign(
a1 + 712,
v17,
&v13);
v8 = v4;
return *(_QWORD *)(emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::iterator::operator->(&v7)
+ 16);
}
| |||
57,021
|
Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&)
|
untodesu[P]voxelius/game/shared/dimension.cc
|
Chunk *Dimension::create_chunk(const chunk_pos &cpos)
{
auto it = m_chunkmap.find(cpos);
if(it != m_chunkmap.cend()) {
// Chunk already exists
return it->second;
}
auto entity = chunks.create();
auto chunk = new Chunk(entity, this);
auto &component = chunks.emplace<ChunkComponent>(entity);
component.chunk = chunk;
component.cpos = cpos;
ChunkCreateEvent event;
event.dimension = this;
event.chunk = chunk;
event.cpos = cpos;
globals::dispatcher.trigger(event);
return m_chunkmap.insert_or_assign(cpos, std::move(chunk)).first->second;
}
|
O1
|
cpp
|
Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x2c8(%rdi), %r14
movq %r14, %rdi
callq 0x75caa
cmpl 0x2e8(%r15), %eax
jne 0x749dd
leaq 0xb0(%r15), %rdi
callq 0x75d86
movl %eax, %ebp
movl $0x2020, %edi # imm = 0x2020
callq 0x268b0
movq %rax, %r13
movq %rax, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x72460
leaq 0x8(%r15), %rdi
leaq 0x10(%rsp), %r12
movq %r13, (%r12)
movl %ebp, %esi
callq 0x74f0a
movq (%r12), %r13
movq %r13, 0x10(%rax)
movl 0x8(%rbx), %ecx
movl %ecx, 0x8(%rax)
movq (%rbx), %rcx
movq %rcx, (%rax)
movl 0x8(%rbx), %eax
movl %eax, 0x8(%rsp)
movq (%rbx), %rax
movq %rax, (%rsp)
leaq 0x1ebe75(%rip), %rdi # 0x260810
movl $0xc11435c2, %esi # imm = 0xC11435C2
callq 0x3c7b8
leaq 0x18(%rsp), %rsi
movq %r15, (%rsi)
movq (%rsp), %rcx
movq %rcx, 0x8(%rsi)
movl 0x8(%rsp), %ecx
movl %ecx, 0x10(%rsi)
movq %r13, 0x18(%rsi)
leaq 0x8(%rax), %rdi
callq 0x3c9d4
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x75dd4
movq 0x10(%rax), %rax
jmp 0x749ef
cltq
movq 0x2d0(%r15), %rcx
leaq (%rax,%rax,2), %rax
movq 0x10(%rcx,%rax,8), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x2020, %esi # imm = 0x2020
movq %r13, %rdi
callq 0x268d0
movq %rbx, %rdi
callq 0x26fe0
|
_ZN9Dimension12create_chunkERKN3glm3vecILi3EiLNS0_9qualifierE0EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov r15, rdi
lea r14, [rdi+2C8h]
mov rdi, r14
call _ZNK7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE16find_filled_slotIS4_EEjRKT_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>(glm::vec<3,int,(glm::qualifier)0> const&)
cmp eax, [r15+2E8h]
jnz loc_749DD
lea rdi, [r15+0B0h]
call _ZN4entt16basic_sigh_mixinINS_13basic_storageINS_6entityES2_SaIS2_EvEENS_14basic_registryIS2_S3_EEE7emplaceEv; entt::basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>::emplace(void)
mov ebp, eax
mov edi, 2020h; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rdi, rax
mov esi, ebp
mov rdx, r15
call _ZN5ChunkC2EN4entt6entityEP9Dimension; Chunk::Chunk(entt::entity,Dimension *)
lea rdi, [r15+8]
lea r12, [rsp+68h+var_58]
mov [r12], r13
mov esi, ebp
call _ZN4entt14basic_registryINS_6entityESaIS1_EE7emplaceI14ChunkComponentJEEEDcS1_DpOT0_
mov r13, [r12]
mov [rax+10h], r13
mov ecx, [rbx+8]
mov [rax+8], ecx
mov rcx, [rbx]
mov [rax], rcx
mov eax, [rbx+8]
mov [rsp+68h+var_60], eax
mov rax, [rbx]
mov [rsp+68h+var_68], rax
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
mov esi, 0C11435C2h
call _ZN4entt16basic_dispatcherISaIvEE6assureI16ChunkCreateEventEERNS_8internal18dispatcher_handlerIT_S1_EEj; entt::basic_dispatcher<std::allocator<void>>::assure<ChunkCreateEvent>(uint)
lea rsi, [rsp+68h+var_50]
mov [rsi], r15
mov rcx, [rsp+68h+var_68]
mov [rsi+8], rcx
mov ecx, [rsp+68h+var_60]
mov [rsi+10h], ecx
mov [rsi+18h], r13
lea rdi, [rax+8]
call _ZNK4entt4sighIFvR16ChunkCreateEventESaIvEE7publishES2_; entt::sigh<void ()(ChunkCreateEvent &),std::allocator<void>>::publish(ChunkCreateEvent &)
mov rdi, r14
mov rsi, rbx
mov rdx, r12
call _ZN7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE9do_assignIRKS4_S6_EESt4pairINSB_8iteratorEbEOT_OT0_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::do_assign<glm::vec<3,int,(glm::qualifier)0> const&,Chunk *>(glm::vec<3,int,(glm::qualifier)0> const&,Chunk * &&)
mov rax, [rax+10h]
jmp short loc_749EF
loc_749DD:
cdqe
mov rcx, [r15+2D0h]
lea rax, [rax+rax*2]
mov rax, [rcx+rax*8+10h]
loc_749EF:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 2020h; unsigned __int64
mov rdi, r13; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
|
long long Dimension::create_chunk(long long a1, long long *a2)
{
int v2; // eax
unsigned int v3; // ebp
long long v4; // r13
long long v5; // rax
long long v6; // r13
long long v7; // rax
long long v9; // [rsp+0h] [rbp-68h]
int v10; // [rsp+8h] [rbp-60h]
long long v11; // [rsp+10h] [rbp-58h] BYREF
_QWORD v12[2]; // [rsp+18h] [rbp-50h] BYREF
int v13; // [rsp+28h] [rbp-40h]
long long v14; // [rsp+30h] [rbp-38h]
v2 = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>(a1 + 712);
if ( v2 != *(_DWORD *)(a1 + 744) )
return *(_QWORD *)(*(_QWORD *)(a1 + 720) + 24LL * v2 + 16);
v3 = entt::basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>::emplace(a1 + 176);
v4 = operator new(0x2020uLL);
Chunk::Chunk(v4, v3, a1);
v11 = v4;
v5 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::emplace<ChunkComponent>(a1 + 8, v3);
v6 = v11;
*(_QWORD *)(v5 + 16) = v11;
*(_DWORD *)(v5 + 8) = *((_DWORD *)a2 + 2);
*(_QWORD *)v5 = *a2;
v10 = *((_DWORD *)a2 + 2);
v9 = *a2;
v7 = entt::basic_dispatcher<std::allocator<void>>::assure<ChunkCreateEvent>(globals::dispatcher, -1055640126);
v12[0] = a1;
v12[1] = v9;
v13 = v10;
v14 = v6;
entt::sigh<void ()(ChunkCreateEvent &),std::allocator<void>>::publish((_QWORD *)(v7 + 8), (long long)v12);
return *(_QWORD *)(emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::do_assign<glm::vec<3,int,(glm::qualifier)0> const&,Chunk *>(
a1 + 712,
a2,
&v11)
+ 16);
}
|
create_chunk:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RDI + 0x2c8]
MOV RDI,R14
CALL 0x00175caa
CMP EAX,dword ptr [R15 + 0x2e8]
JNZ 0x001749dd
LEA RDI,[R15 + 0xb0]
CALL 0x00175d86
MOV EBP,EAX
MOV EDI,0x2020
CALL 0x001268b0
MOV R13,RAX
LAB_00174951:
MOV RDI,RAX
MOV ESI,EBP
MOV RDX,R15
CALL 0x00172460
LAB_0017495e:
LEA RDI,[R15 + 0x8]
LEA R12,[RSP + 0x10]
MOV qword ptr [R12],R13
MOV ESI,EBP
CALL 0x00174f0a
MOV R13,qword ptr [R12]
MOV qword ptr [RAX + 0x10],R13
MOV ECX,dword ptr [RBX + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV RCX,qword ptr [RBX]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBX + 0x8]
MOV dword ptr [RSP + 0x8],EAX
MOV RAX,qword ptr [RBX]
MOV qword ptr [RSP],RAX
LEA RDI,[0x360810]
MOV ESI,0xc11435c2
CALL 0x0013c7b8
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],R15
MOV RCX,qword ptr [RSP]
MOV qword ptr [RSI + 0x8],RCX
MOV ECX,dword ptr [RSP + 0x8]
MOV dword ptr [RSI + 0x10],ECX
MOV qword ptr [RSI + 0x18],R13
LEA RDI,[RAX + 0x8]
CALL 0x0013c9d4
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
CALL 0x00175dd4
MOV RAX,qword ptr [RAX + 0x10]
JMP 0x001749ef
LAB_001749dd:
CDQE
MOV RCX,qword ptr [R15 + 0x2d0]
LEA RAX,[RAX + RAX*0x2]
MOV RAX,qword ptr [RCX + RAX*0x8 + 0x10]
LAB_001749ef:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&) */
int8 __thiscall Dimension::create_chunk(Dimension *this,vec *param_1)
{
uint uVar1;
int4 uVar2;
Chunk *pCVar3;
_func_decltype_auto *p_Var4;
dispatcher_handler *pdVar5;
long lVar6;
int8 uVar7;
Chunk *local_58;
Dimension *local_50;
int8 local_48;
int4 local_40;
Chunk *local_38;
uVar1 = emhash8::
HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>
((HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
*)(this + 0x2c8),param_1);
if (uVar1 == *(uint *)(this + 0x2e8)) {
uVar2 = entt::
basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>
::emplace((basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>
*)(this + 0xb0));
pCVar3 = (Chunk *)operator_new(0x2020);
/* try { // try from 00174951 to 0017495d has its CatchHandler @ 001749fe */
Chunk::Chunk(pCVar3,uVar2,this);
local_58 = pCVar3;
p_Var4 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
emplace<ChunkComponent>
((basic_registry<entt::entity,std::allocator<entt::entity>> *)(this + 8),
uVar2);
pCVar3 = local_58;
*(Chunk **)(p_Var4 + 0x10) = local_58;
*(int4 *)(p_Var4 + 8) = *(int4 *)(param_1 + 8);
*(int8 *)p_Var4 = *(int8 *)param_1;
uVar2 = *(int4 *)(param_1 + 8);
uVar7 = *(int8 *)param_1;
pdVar5 = entt::basic_dispatcher<std::allocator<void>>::assure<ChunkCreateEvent>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0xc11435c2);
local_38 = pCVar3;
local_50 = this;
local_48 = uVar7;
local_40 = uVar2;
entt::sigh<void(ChunkCreateEvent&),std::allocator<void>>::publish
((sigh<void(ChunkCreateEvent&),std::allocator<void>> *)(pdVar5 + 8),
(ChunkCreateEvent *)&local_50);
lVar6 = emhash8::
HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
::do_assign<glm::vec<3,int,(glm::qualifier)0>const&,Chunk*>
((HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
*)(this + 0x2c8),param_1,&local_58);
uVar7 = *(int8 *)(lVar6 + 0x10);
}
else {
uVar7 = *(int8 *)(*(long *)(this + 0x2d0) + 0x10 + (long)(int)uVar1 * 0x18);
}
return uVar7;
}
|
|
57,022
|
Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&)
|
untodesu[P]voxelius/game/shared/dimension.cc
|
Chunk *Dimension::create_chunk(const chunk_pos &cpos)
{
auto it = m_chunkmap.find(cpos);
if(it != m_chunkmap.cend()) {
// Chunk already exists
return it->second;
}
auto entity = chunks.create();
auto chunk = new Chunk(entity, this);
auto &component = chunks.emplace<ChunkComponent>(entity);
component.chunk = chunk;
component.cpos = cpos;
ChunkCreateEvent event;
event.dimension = this;
event.chunk = chunk;
event.cpos = cpos;
globals::dispatcher.trigger(event);
return m_chunkmap.insert_or_assign(cpos, std::move(chunk)).first->second;
}
|
O3
|
cpp
|
Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x2c8(%rdi), %r14
movq %r14, %rdi
callq 0x766b0
cmpl 0x2e8(%r15), %eax
jne 0x754b1
leaq 0xb0(%r15), %rdi
callq 0x76774
movl %eax, %ebp
movl $0x2020, %edi # imm = 0x2020
callq 0x268c0
movq %rax, %r12
movq %rax, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x72ee0
leaq 0x8(%r15), %rdi
movq %rsp, %r13
movq %r12, (%r13)
movl %ebp, %esi
callq 0x759d8
movq %r12, 0x10(%rax)
movq (%rbx), %rcx
movq %rcx, (%rax)
movl 0x8(%rbx), %ecx
movl %ecx, 0x8(%rax)
movl 0x8(%rbx), %eax
leaq 0x8(%rsp), %rbp
movl %eax, 0x10(%rbp)
movq (%rbx), %rax
movq %rax, 0x8(%rbp)
leaq 0x1e73a1(%rip), %rdi # 0x25c820
movl $0xc11435c2, %esi # imm = 0xC11435C2
callq 0x3c7dc
movq %r15, (%rbp)
movq %r12, 0x18(%rbp)
leaq 0x8(%rax), %rdi
movq %rbp, %rsi
callq 0x3ca00
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x767c2
movq 0x10(%rax), %rax
jmp 0x754c3
cltq
movq 0x2d0(%r15), %rcx
leaq (%rax,%rax,2), %rax
movq 0x10(%rcx,%rax,8), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x2020, %esi # imm = 0x2020
movq %r12, %rdi
callq 0x268e0
movq %rbx, %rdi
callq 0x26ff0
|
_ZN9Dimension12create_chunkERKN3glm3vecILi3EiLNS0_9qualifierE0EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
mov r15, rdi
lea r14, [rdi+2C8h]
mov rdi, r14
call _ZNK7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE16find_filled_slotIS4_EEjRKT_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>(glm::vec<3,int,(glm::qualifier)0> const&)
cmp eax, [r15+2E8h]
jnz loc_754B1
lea rdi, [r15+0B0h]
call _ZN4entt16basic_sigh_mixinINS_13basic_storageINS_6entityES2_SaIS2_EvEENS_14basic_registryIS2_S3_EEE7emplaceEv; entt::basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>::emplace(void)
mov ebp, eax
mov edi, 2020h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rdi, rax
mov esi, ebp
mov rdx, r15
call _ZN5ChunkC2EN4entt6entityEP9Dimension; Chunk::Chunk(entt::entity,Dimension *)
lea rdi, [r15+8]
mov r13, rsp
mov [r13+0], r12
mov esi, ebp
call _ZN4entt14basic_registryINS_6entityESaIS1_EE7emplaceI14ChunkComponentJEEEDcS1_DpOT0_
mov [rax+10h], r12
mov rcx, [rbx]
mov [rax], rcx
mov ecx, [rbx+8]
mov [rax+8], ecx
mov eax, [rbx+8]
lea rbp, [rsp+58h+var_50]
mov [rbp+10h], eax
mov rax, [rbx]
mov [rbp+8], rax
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
mov esi, 0C11435C2h
call _ZN4entt16basic_dispatcherISaIvEE6assureI16ChunkCreateEventEERNS_8internal18dispatcher_handlerIT_S1_EEj; entt::basic_dispatcher<std::allocator<void>>::assure<ChunkCreateEvent>(uint)
mov [rbp+0], r15
mov [rbp+18h], r12
lea rdi, [rax+8]
mov rsi, rbp
call _ZNK4entt4sighIFvR16ChunkCreateEventESaIvEE7publishES2_; entt::sigh<void ()(ChunkCreateEvent &),std::allocator<void>>::publish(ChunkCreateEvent &)
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call _ZN7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE9do_assignIRKS4_S6_EESt4pairINSB_8iteratorEbEOT_OT0_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::do_assign<glm::vec<3,int,(glm::qualifier)0> const&,Chunk *>(glm::vec<3,int,(glm::qualifier)0> const&,Chunk * &&)
mov rax, [rax+10h]
jmp short loc_754C3
loc_754B1:
cdqe
mov rcx, [r15+2D0h]
lea rax, [rax+rax*2]
mov rax, [rcx+rax*8+10h]
loc_754C3:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 2020h; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
|
long long Dimension::create_chunk(long long a1, long long a2)
{
int v2; // eax
unsigned int v3; // ebp
long long v4; // r12
long long v5; // rax
long long v6; // rax
long long v8; // [rsp+0h] [rbp-58h] BYREF
_QWORD v9[2]; // [rsp+8h] [rbp-50h] BYREF
int v10; // [rsp+18h] [rbp-40h]
long long v11; // [rsp+20h] [rbp-38h]
v2 = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>(a1 + 712);
if ( v2 != *(_DWORD *)(a1 + 744) )
return *(_QWORD *)(*(_QWORD *)(a1 + 720) + 24LL * v2 + 16);
v3 = entt::basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>::emplace(a1 + 176);
v4 = operator new(0x2020uLL);
Chunk::Chunk(v4, v3, a1);
v8 = v4;
v5 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::emplace<ChunkComponent>(a1 + 8, v3);
*(_QWORD *)(v5 + 16) = v4;
*(_QWORD *)v5 = *(_QWORD *)a2;
*(_DWORD *)(v5 + 8) = *(_DWORD *)(a2 + 8);
v10 = *(_DWORD *)(a2 + 8);
v9[1] = *(_QWORD *)a2;
v6 = entt::basic_dispatcher<std::allocator<void>>::assure<ChunkCreateEvent>(globals::dispatcher, -1055640126);
v9[0] = a1;
v11 = v4;
entt::sigh<void ()(ChunkCreateEvent &),std::allocator<void>>::publish((_QWORD *)(v6 + 8), (long long)v9);
return *(_QWORD *)(emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::do_assign<glm::vec<3,int,(glm::qualifier)0> const&,Chunk *>(
a1 + 712,
a2,
&v8)
+ 16);
}
|
create_chunk:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RDI + 0x2c8]
MOV RDI,R14
CALL 0x001766b0
CMP EAX,dword ptr [R15 + 0x2e8]
JNZ 0x001754b1
LEA RDI,[R15 + 0xb0]
CALL 0x00176774
MOV EBP,EAX
MOV EDI,0x2020
CALL 0x001268c0
MOV R12,RAX
LAB_00175437:
MOV RDI,RAX
MOV ESI,EBP
MOV RDX,R15
CALL 0x00172ee0
LAB_00175444:
LEA RDI,[R15 + 0x8]
MOV R13,RSP
MOV qword ptr [R13],R12
MOV ESI,EBP
CALL 0x001759d8
MOV qword ptr [RAX + 0x10],R12
MOV RCX,qword ptr [RBX]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBX + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV EAX,dword ptr [RBX + 0x8]
LEA RBP,[RSP + 0x8]
MOV dword ptr [RBP + 0x10],EAX
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBP + 0x8],RAX
LEA RDI,[0x35c820]
MOV ESI,0xc11435c2
CALL 0x0013c7dc
MOV qword ptr [RBP],R15
MOV qword ptr [RBP + 0x18],R12
LEA RDI,[RAX + 0x8]
MOV RSI,RBP
CALL 0x0013ca00
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x001767c2
MOV RAX,qword ptr [RAX + 0x10]
JMP 0x001754c3
LAB_001754b1:
CDQE
MOV RCX,qword ptr [R15 + 0x2d0]
LEA RAX,[RAX + RAX*0x2]
MOV RAX,qword ptr [RCX + RAX*0x8 + 0x10]
LAB_001754c3:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Dimension::create_chunk(glm::vec<3, int, (glm::qualifier)0> const&) */
int8 __thiscall Dimension::create_chunk(Dimension *this,vec *param_1)
{
uint uVar1;
int4 uVar2;
Chunk *pCVar3;
_func_decltype_auto *p_Var4;
dispatcher_handler *pdVar5;
long lVar6;
int8 uVar7;
Chunk *local_58;
Dimension *local_50;
int8 local_48;
int4 local_40;
Chunk *local_38;
uVar1 = emhash8::
HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>
((HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
*)(this + 0x2c8),param_1);
if (uVar1 == *(uint *)(this + 0x2e8)) {
uVar2 = entt::
basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>
::emplace((basic_sigh_mixin<entt::basic_storage<entt::entity,entt::entity,std::allocator<entt::entity>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>
*)(this + 0xb0));
pCVar3 = (Chunk *)operator_new(0x2020);
/* try { // try from 00175437 to 00175443 has its CatchHandler @ 001754d2 */
Chunk::Chunk(pCVar3,uVar2,this);
local_58 = pCVar3;
p_Var4 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
emplace<ChunkComponent>
((basic_registry<entt::entity,std::allocator<entt::entity>> *)(this + 8),
uVar2);
*(Chunk **)(p_Var4 + 0x10) = pCVar3;
*(int8 *)p_Var4 = *(int8 *)param_1;
*(int4 *)(p_Var4 + 8) = *(int4 *)(param_1 + 8);
local_40 = *(int4 *)(param_1 + 8);
local_48 = *(int8 *)param_1;
pdVar5 = entt::basic_dispatcher<std::allocator<void>>::assure<ChunkCreateEvent>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0xc11435c2);
local_50 = this;
local_38 = pCVar3;
entt::sigh<void(ChunkCreateEvent&),std::allocator<void>>::publish
((sigh<void(ChunkCreateEvent&),std::allocator<void>> *)(pdVar5 + 8),
(ChunkCreateEvent *)&local_50);
lVar6 = emhash8::
HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
::do_assign<glm::vec<3,int,(glm::qualifier)0>const&,Chunk*>
((HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>
*)(this + 0x2c8),param_1,&local_58);
uVar7 = *(int8 *)(lVar6 + 0x10);
}
else {
uVar7 = *(int8 *)(*(long *)(this + 0x2d0) + 0x10 + (long)(int)uVar1 * 0x18);
}
return uVar7;
}
|
|
57,023
|
find_longest_bitstream
|
eloqsql/storage/myisam/mi_packrec.c
|
static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
}
|
O0
|
c
|
find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xbdd17
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0xbdcf4
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xbdd04
jmp 0xbdcf6
jmp 0xbdcf8
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0xbdda2
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xbdca0
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xbdd9c
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0xbdd60
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xbdd6d
jmp 0xbdd62
jmp 0xbdd64
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0xbdda2
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xbdca0
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0xbdd90
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xbdd96
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
find_longest_bitstream_0:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 1
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_BDD17
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
ja short loc_BDCF4
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jnz short loc_BDD04
loc_BDCF4:
jmp short $+2
loc_BDCF6:
jmp short $+2
loc_BDCF8:
mov [rbp+var_4], 200h
jmp loc_BDDA2
loc_BDD04:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
call find_longest_bitstream_0
add eax, 1
mov [rbp+var_1C], eax
loc_BDD17:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_BDD9C
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
ja short loc_BDD60
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jnz short loc_BDD6D
loc_BDD60:
jmp short $+2
loc_BDD62:
jmp short $+2
loc_BDD64:
mov [rbp+var_4], 200h
jmp short loc_BDDA2
loc_BDD6D:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
call find_longest_bitstream_0
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jbe short loc_BDD90
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
jmp short loc_BDD96
loc_BDD90:
mov eax, [rbp+var_20]
mov [rbp+var_34], eax
loc_BDD96:
mov eax, [rbp+var_34]
mov [rbp+var_1C], eax
loc_BDD9C:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_BDDA2:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long find_longest_bitstream_0(unsigned __int16 *a1, unsigned long long a2)
{
unsigned __int16 *v4; // [rsp+10h] [rbp-30h]
unsigned __int16 *v5; // [rsp+18h] [rbp-28h]
unsigned int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
unsigned __int16 *v8; // [rsp+30h] [rbp-10h]
v7 = 1;
if ( (*a1 & 0x8000) != 0 )
{
LABEL_6:
v8 = a1 + 1;
if ( (a1[1] & 0x8000) == 0 )
{
v4 = &v8[*v8];
if ( (unsigned long long)v4 > a2 || v4 == v8 )
return 512;
v6 = find_longest_bitstream_0(v4, a2) + 1;
if ( v7 <= v6 )
return v6;
else
return v7;
}
return v7;
}
v5 = &a1[*a1];
if ( (unsigned long long)v5 <= a2 && v5 != a1 )
{
v7 = find_longest_bitstream_0(v5, a2) + 1;
goto LABEL_6;
}
return 512;
}
|
find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001bdd17
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001bdcf4
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001bdd04
LAB_001bdcf4:
JMP 0x001bdcf6
LAB_001bdcf6:
JMP 0x001bdcf8
LAB_001bdcf8:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x001bdda2
LAB_001bdd04:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001bdca0
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_001bdd17:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001bdd9c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001bdd60
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001bdd6d
LAB_001bdd60:
JMP 0x001bdd62
LAB_001bdd62:
JMP 0x001bdd64
LAB_001bdd64:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x001bdda2
LAB_001bdd6d:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001bdca0
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JBE 0x001bdd90
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001bdd96
LAB_001bdd90:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x34],EAX
LAB_001bdd96:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001bdd9c:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001bdda2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
uint find_longest_bitstream(ushort *param_1,ushort *param_2)
{
int iVar1;
ushort *puVar2;
uint local_3c;
uint local_24;
local_24 = 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_24 = iVar1 + 1;
}
param_1 = param_1 + 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_3c = iVar1 + 1;
if (local_3c < local_24) {
local_3c = local_24;
}
local_24 = local_3c;
}
return local_24;
}
|
|
57,024
|
find_longest_bitstream
|
eloqsql/storage/myisam/mi_packrec.c
|
static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
}
|
O3
|
c
|
find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movswq (%rdi), %rax
testq %rax, %rax
js 0x83dc8
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
seta %cl
testw %ax, %ax
sete %al
orb %cl, %al
movl $0x200, %eax # imm = 0x200
jne 0x83e0b
movq %rbx, %rsi
callq 0x83d86
movl %eax, %r15d
incl %r15d
jmp 0x83dce
movl $0x1, %r15d
movswq 0x2(%r14), %rax
testq %rax, %rax
js 0x83e08
addq $0x2, %r14
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
setbe %cl
testw %ax, %ax
setne %dl
movl $0x200, %eax # imm = 0x200
testb %cl, %dl
je 0x83e0b
movq %rbx, %rsi
callq 0x83d86
incl %eax
cmpl %eax, %r15d
cmoval %r15d, %eax
jmp 0x83e0b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
find_longest_bitstream_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movsx rax, word ptr [rdi]
test rax, rax
js short loc_83DC8
lea rdi, [r14+rax*2]
cmp rdi, rbx
setnbe cl
test ax, ax
setz al
or al, cl
mov eax, 200h
jnz short loc_83E0B
mov rsi, rbx
call find_longest_bitstream_0
mov r15d, eax
inc r15d
jmp short loc_83DCE
loc_83DC8:
mov r15d, 1
loc_83DCE:
movsx rax, word ptr [r14+2]
test rax, rax
js short loc_83E08
add r14, 2
lea rdi, [r14+rax*2]
cmp rdi, rbx
setbe cl
test ax, ax
setnz dl
mov eax, 200h
test dl, cl
jz short loc_83E0B
mov rsi, rbx
call find_longest_bitstream_0
inc eax
cmp r15d, eax
cmova eax, r15d
jmp short loc_83E0B
loc_83E08:
mov eax, r15d
loc_83E0B:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long find_longest_bitstream_0(__int16 *a1, unsigned long long a2)
{
long long v3; // rax
__int16 *v4; // rdi
bool v5; // zf
long long result; // rax
unsigned int v7; // r15d
long long v8; // rax
unsigned long long v9; // rdi
bool v10; // dl
v3 = *a1;
if ( v3 < 0 )
{
v7 = 1;
}
else
{
v4 = &a1[v3];
v5 = (unsigned long long)v4 <= a2 && (_WORD)v3 != 0;
result = 512LL;
if ( !v5 )
return result;
v7 = find_longest_bitstream_0(v4) + 1;
}
v8 = a1[1];
if ( v8 < 0 )
return v7;
v9 = (unsigned long long)&a1[v8 + 1];
v10 = (_WORD)v8 != 0;
result = 512LL;
if ( v9 <= a2 && v10 )
{
result = (unsigned int)find_longest_bitstream_0(v9) + 1;
if ( v7 > (unsigned int)result )
return v7;
}
return result;
}
|
find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVSX RAX,word ptr [RDI]
TEST RAX,RAX
JS 0x00183dc8
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETA CL
TEST AX,AX
SETZ AL
OR AL,CL
MOV EAX,0x200
JNZ 0x00183e0b
MOV RSI,RBX
CALL 0x00183d86
MOV R15D,EAX
INC R15D
JMP 0x00183dce
LAB_00183dc8:
MOV R15D,0x1
LAB_00183dce:
MOVSX RAX,word ptr [R14 + 0x2]
TEST RAX,RAX
JS 0x00183e08
ADD R14,0x2
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETBE CL
TEST AX,AX
SETNZ DL
MOV EAX,0x200
TEST DL,CL
JZ 0x00183e0b
MOV RSI,RBX
CALL 0x00183d86
INC EAX
CMP R15D,EAX
CMOVA EAX,R15D
JMP 0x00183e0b
LAB_00183e08:
MOV EAX,R15D
LAB_00183e0b:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
uint find_longest_bitstream(short *param_1,short *param_2)
{
short sVar1;
int iVar2;
uint uVar3;
uint uVar4;
sVar1 = *param_1;
if ((long)sVar1 < 0) {
uVar4 = 1;
}
else {
if (sVar1 == 0 || param_2 < param_1 + sVar1) {
return 0x200;
}
iVar2 = find_longest_bitstream(param_1 + sVar1,param_2);
uVar4 = iVar2 + 1;
}
sVar1 = param_1[1];
uVar3 = uVar4;
if (-1 < (long)sVar1) {
uVar3 = 0x200;
if (sVar1 != 0 && param_1 + (long)sVar1 + 1 <= param_2) {
iVar2 = find_longest_bitstream(param_1 + (long)sVar1 + 1,param_2);
uVar3 = iVar2 + 1U;
if (iVar2 + 1U < uVar4) {
uVar3 = uVar4;
}
}
}
return uVar3;
}
|
|
57,025
|
register_memory_class(char const*, unsigned int, int)
|
eloqsql/storage/perfschema/pfs_instr_class.cc
|
PFS_memory_key register_memory_class(const char *name, uint name_length,
int flags)
{
/* See comments in register_mutex_class */
uint32 index;
PFS_memory_class *entry;
REGISTER_CLASS_BODY_PART(index, memory_class_array, memory_class_max,
name, name_length)
index= PFS_atomic::add_u32(&memory_class_dirty_count, 1);
if (index < memory_class_max)
{
entry= &memory_class_array[index];
init_instr_class(entry, name, name_length, flags, PFS_CLASS_MEMORY);
entry->m_event_name_index= index;
entry->m_enabled= false; /* disabled by default */
/* Set user-defined configuration options for this instrument */
configure_instr_class(entry);
entry->m_timed= false; /* Immutable */
PFS_atomic::add_u32(&memory_class_allocated_count, 1);
return (index + 1);
}
if (pfs_enabled)
memory_class_lost++;
return 0;
}
|
O3
|
cpp
|
register_memory_class(char const*, unsigned int, int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x2c(%rbp)
movl %esi, %r15d
movq %rdi, -0x38(%rbp)
movq 0x360463(%rip), %r14 # 0x391440
movl %esi, %r13d
testq %r14, %r14
je 0x31029
movq 0x360cec(%rip), %r12 # 0x391cd8
movl $0x1, %ebx
xorl %eax, %eax
leaq (%rax,%rax,2), %rdi
shlq $0x6, %rdi
cmpl %r15d, 0x94(%r12,%rdi)
jne 0x31020
addq %r12, %rdi
addq $0x14, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x26170
testl %eax, %eax
je 0x310e2
movl %ebx, %eax
incl %ebx
cmpq %rax, %r14
ja 0x30ff3
movl $0x1, %ebx
lock
xaddl %ebx, 0x360c9e(%rip) # 0x391cd4
cmpq %rbx, 0x360403(%rip) # 0x391440
jbe 0x310d0
movq 0x360c8e(%rip), %r14 # 0x391cd8
leaq (%rbx,%rbx,2), %r12
shlq $0x6, %r12
leaq (%r14,%r12), %rdi
movq %rdi, -0x40(%rbp)
movl $0xa0, %edx
xorl %esi, %esi
callq 0x261c0
addq %r12, %r14
addq $0x14, %r14
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x261a0
xorl %ecx, %ecx
movb %cl, 0x7f(%r14)
movl %r15d, 0x80(%r14)
movl -0x2c(%rbp), %eax
movl %eax, -0xc(%r14)
movw $0x101, -0x10(%r14) # imm = 0x101
movl $0xd, -0x14(%r14)
movq 0x2e8ff2(%rip), %rax # 0x31a098
movq %rax, 0x84(%r14)
movl %ebx, -0x4(%r14)
movb %cl, -0x10(%r14)
xorl %r15d, %r15d
movq -0x40(%rbp), %rdi
callq 0x2f9da
movb %r15b, -0xf(%r14)
lock
incl 0x360c04(%rip) # 0x391cd0
incl %ebx
jmp 0x310e2
xorl %ebx, %ebx
cmpb $0x0, 0x2e8f47(%rip) # 0x31a020
je 0x310e2
incq 0x360366(%rip) # 0x391448
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z21register_memory_classPKcji:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_2C], edx
mov r15d, esi
mov [rbp+var_38], rdi
mov r14, cs:memory_class_max
mov r13d, esi
test r14, r14
jz short loc_31029
mov r12, cs:_ZL18memory_class_array; memory_class_array
mov ebx, 1
xor eax, eax
loc_30FF3:
lea rdi, [rax+rax*2]
shl rdi, 6
cmp [r12+rdi+94h], r15d
jnz short loc_31020
add rdi, r12
add rdi, 14h
mov rsi, [rbp+var_38]
mov rdx, r13
call _strncmp
test eax, eax
jz loc_310E2
loc_31020:
mov eax, ebx
inc ebx
cmp r14, rax
ja short loc_30FF3
loc_31029:
mov ebx, 1
lock xadd cs:_ZL24memory_class_dirty_count, ebx; memory_class_dirty_count
cmp cs:memory_class_max, rbx
jbe loc_310D0
mov r14, cs:_ZL18memory_class_array; memory_class_array
lea r12, [rbx+rbx*2]
shl r12, 6
lea rdi, [r14+r12]
mov [rbp+var_40], rdi
mov edx, 0A0h
xor esi, esi
call _memset
add r14, r12
add r14, 14h
mov rdi, r14
mov rsi, [rbp+var_38]
mov rdx, r13
call _strncpy
xor ecx, ecx
mov [r14+7Fh], cl
mov [r14+80h], r15d
mov eax, [rbp+var_2C]
mov [r14-0Ch], eax
mov word ptr [r14-10h], 101h
mov dword ptr [r14-14h], 0Dh
mov rax, cs:off_31A098
mov [r14+84h], rax
mov [r14-4], ebx
mov [r14-10h], cl
xor r15d, r15d
mov rdi, [rbp+var_40]
call _ZL21configure_instr_classP15PFS_instr_class; configure_instr_class(PFS_instr_class *)
mov [r14-0Fh], r15b
lock inc cs:_ZL28memory_class_allocated_count; memory_class_allocated_count
inc ebx
jmp short loc_310E2
loc_310D0:
xor ebx, ebx
cmp cs:pfs_enabled, 0
jz short loc_310E2
inc cs:memory_class_lost
loc_310E2:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long register_memory_class(const char *a1, unsigned int a2, int a3)
{
unsigned long long v3; // r14
long long v4; // r12
unsigned int v5; // ebx
unsigned long long v6; // rax
unsigned long long v7; // rbx
long long v8; // r14
long long v9; // r14
long long v11; // [rsp+0h] [rbp-40h]
v3 = memory_class_max;
if ( memory_class_max )
{
v4 = memory_class_array;
v5 = 1;
v6 = 0LL;
while ( *(_DWORD *)(v4 + 192 * v6 + 148) != a2 || (unsigned int)strncmp(v4 + 192 * v6 + 20, a1, a2) )
{
v6 = v5++;
if ( v3 <= v6 )
goto LABEL_6;
}
}
else
{
LABEL_6:
v7 = (unsigned int)_InterlockedExchangeAdd(&memory_class_dirty_count, 1u);
if ( memory_class_max <= v7 )
{
v5 = 0;
if ( pfs_enabled )
++memory_class_lost;
}
else
{
v8 = memory_class_array;
v11 = memory_class_array + 192 * v7;
memset(v11, 0LL, 160LL);
v9 = 192 * v7 + v8 + 20;
strncpy(v9, a1, a2);
*(_BYTE *)(v9 + 127) = 0;
*(_DWORD *)(v9 + 128) = a2;
*(_DWORD *)(v9 - 12) = a3;
*(_WORD *)(v9 - 16) = 257;
*(_DWORD *)(v9 - 20) = 13;
*(int **)(v9 + 132) = off_31A098[0];
*(_DWORD *)(v9 - 4) = v7;
*(_BYTE *)(v9 - 16) = 0;
configure_instr_class(v11);
*(_BYTE *)(v9 - 15) = 0;
_InterlockedIncrement(&memory_class_allocated_count);
return (unsigned int)(v7 + 1);
}
}
return v5;
}
|
register_memory_class:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x2c],EDX
MOV R15D,ESI
MOV qword ptr [RBP + -0x38],RDI
MOV R14,qword ptr [0x00491440]
MOV R13D,ESI
TEST R14,R14
JZ 0x00131029
MOV R12,qword ptr [0x00491cd8]
MOV EBX,0x1
XOR EAX,EAX
LAB_00130ff3:
LEA RDI,[RAX + RAX*0x2]
SHL RDI,0x6
CMP dword ptr [R12 + RDI*0x1 + 0x94],R15D
JNZ 0x00131020
ADD RDI,R12
ADD RDI,0x14
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R13
CALL 0x00126170
TEST EAX,EAX
JZ 0x001310e2
LAB_00131020:
MOV EAX,EBX
INC EBX
CMP R14,RAX
JA 0x00130ff3
LAB_00131029:
MOV EBX,0x1
XADD.LOCK dword ptr [0x00491cd4],EBX
CMP qword ptr [0x00491440],RBX
JBE 0x001310d0
MOV R14,qword ptr [0x00491cd8]
LEA R12,[RBX + RBX*0x2]
SHL R12,0x6
LEA RDI,[R14 + R12*0x1]
MOV qword ptr [RBP + -0x40],RDI
MOV EDX,0xa0
XOR ESI,ESI
CALL 0x001261c0
ADD R14,R12
ADD R14,0x14
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R13
CALL 0x001261a0
XOR ECX,ECX
MOV byte ptr [R14 + 0x7f],CL
MOV dword ptr [R14 + 0x80],R15D
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [R14 + -0xc],EAX
MOV word ptr [R14 + -0x10],0x101
MOV dword ptr [R14 + -0x14],0xd
MOV RAX,qword ptr [0x0041a098]
MOV qword ptr [R14 + 0x84],RAX
MOV dword ptr [R14 + -0x4],EBX
MOV byte ptr [R14 + -0x10],CL
XOR R15D,R15D
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0012f9da
MOV byte ptr [R14 + -0xf],R15B
INC.LOCK dword ptr [0x00491cd0]
INC EBX
JMP 0x001310e2
LAB_001310d0:
XOR EBX,EBX
CMP byte ptr [0x0041a020],0x0
JZ 0x001310e2
INC qword ptr [0x00491448]
LAB_001310e2:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* register_memory_class(char const*, unsigned int, int) */
ulong register_memory_class(char *param_1,uint param_2,int param_3)
{
PFS_instr_class *__s;
bool bVar1;
uint uVar2;
long lVar3;
int iVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
int4 *puVar9;
lVar3 = memory_class_array;
uVar7 = memory_class_max;
if (memory_class_max != 0) {
uVar5 = 0;
uVar6 = 1;
do {
if ((*(uint *)(lVar3 + 0x94 + uVar5 * 0xc0) == param_2) &&
(iVar4 = strncmp((char *)(uVar5 * 0xc0 + lVar3 + 0x14),param_1,(ulong)param_2), iVar4 == 0)
) {
return uVar6;
}
bVar1 = uVar6 < uVar7;
uVar5 = uVar6;
uVar6 = (ulong)((int)uVar6 + 1);
} while (bVar1);
}
lVar3 = memory_class_array;
uVar2 = memory_class_dirty_count;
LOCK();
iVar4 = memory_class_dirty_count + 1;
UNLOCK();
if (memory_class_dirty_count < memory_class_max) {
lVar8 = (ulong)memory_class_dirty_count * 0xc0;
__s = (PFS_instr_class *)(memory_class_array + lVar8);
memory_class_dirty_count = iVar4;
memset(__s,0,0xa0);
puVar9 = (int4 *)(lVar3 + lVar8);
strncpy((char *)(puVar9 + 5),param_1,(ulong)param_2);
*(int1 *)((long)puVar9 + 0x93) = 0;
puVar9[0x25] = param_2;
puVar9[2] = param_3;
*(int2 *)(puVar9 + 1) = 0x101;
*puVar9 = 0xd;
*(int8 *)(puVar9 + 0x26) = class_timers._104_8_;
puVar9[4] = uVar2;
*(int1 *)(puVar9 + 1) = 0;
configure_instr_class(__s);
*(int1 *)((long)puVar9 + 5) = 0;
LOCK();
memory_class_allocated_count = memory_class_allocated_count + 1;
UNLOCK();
uVar7 = (ulong)(uVar2 + 1);
}
else {
uVar7 = 0;
memory_class_dirty_count = iVar4;
if (pfs_enabled != '\0') {
memory_class_lost = memory_class_lost + 1;
}
}
return uVar7;
}
|
|
57,026
|
my_delete
|
eloqsql/mysys/my_delete.c
|
int my_delete(const char *name, myf MyFlags)
{
int err;
DBUG_ENTER("my_delete");
DBUG_PRINT("my",("name %s MyFlags %lu", name, MyFlags));
#ifdef _WIN32
err = my_win_unlink(name);
#else
if (MyFlags & MY_NOSYMLINKS)
err= unlink_nosymlinks(name);
else
err= unlink(name);
#endif
if ((MyFlags & MY_IGNORE_ENOENT) && errno == ENOENT)
DBUG_RETURN(0);
if (err)
{
my_errno= errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_DELETE, MYF(ME_BELL), name, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(name, MyFlags))
err= -1;
DBUG_RETURN(err);
}
|
O0
|
c
|
my_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
jmp 0xf0b12
movq -0x18(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0xf0b30
movq -0x10(%rbp), %rdi
callq 0xf0bf0
movl %eax, -0x1c(%rbp)
jmp 0xf0b3c
movq -0x10(%rbp), %rdi
callq 0x2a1d0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0xf0b62
callq 0x2a760
cmpl $0x2, (%rax)
jne 0xf0b62
jmp 0xf0b56
movl $0x0, -0x4(%rbp)
jmp 0xf0be3
cmpl $0x0, -0x1c(%rbp)
je 0xf0bb0
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x20(%rbp)
callq 0xf7440
movl -0x20(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0xf0bae
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x2a760
movq -0x28(%rbp), %rdx
movl (%rax), %ecx
movl $0x6, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xf0ef0
jmp 0xf0bdb
movq -0x18(%rbp), %rax
andq $0x8000, %rax # imm = 0x8000
cmpq $0x0, %rax
je 0xf0bd9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf70e0
cmpl $0x0, %eax
je 0xf0bd9
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0xf0bdb
jmp 0xf0bdd
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_delete:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
jmp short $+2
loc_F0B12:
mov rax, [rbp+var_18]
and rax, 200h
cmp rax, 0
jz short loc_F0B30
mov rdi, [rbp+var_10]
call unlink_nosymlinks
mov [rbp+var_1C], eax
jmp short loc_F0B3C
loc_F0B30:
mov rdi, [rbp+var_10]
call _unlink
mov [rbp+var_1C], eax
loc_F0B3C:
mov rax, [rbp+var_18]
and rax, 20h
cmp rax, 0
jz short loc_F0B62
call ___errno_location
cmp dword ptr [rax], 2
jnz short loc_F0B62
jmp short $+2
loc_F0B56:
mov [rbp+var_4], 0
jmp loc_F0BE3
loc_F0B62:
cmp [rbp+var_1C], 0
jz short loc_F0BB0
call ___errno_location
mov eax, [rax]
mov [rbp+var_20], eax
call _my_thread_var
mov ecx, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_18]
and rax, 18h
cmp rax, 0
jz short loc_F0BAE
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
call ___errno_location
mov rdx, [rbp+var_28]
mov ecx, [rax]
mov edi, 6
mov esi, 4
mov al, 0
call my_error
loc_F0BAE:
jmp short loc_F0BDB
loc_F0BB0:
mov rax, [rbp+var_18]
and rax, 8000h
cmp rax, 0
jz short loc_F0BD9
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_sync_dir_by_file
cmp eax, 0
jz short loc_F0BD9
mov [rbp+var_1C], 0FFFFFFFFh
loc_F0BD9:
jmp short $+2
loc_F0BDB:
jmp short $+2
loc_F0BDD:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_F0BE3:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_delete(long long a1, const char *a2)
{
_DWORD *v2; // rax
int v3; // r8d
int v4; // r9d
int v6; // [rsp+10h] [rbp-20h]
unsigned int v7; // [rsp+14h] [rbp-1Ch]
if ( ((unsigned __int16)a2 & 0x200) != 0 )
v7 = unlink_nosymlinks(a1);
else
v7 = unlink(a1);
if ( ((unsigned __int8)a2 & 0x20) != 0 && *(_DWORD *)__errno_location() == 2 )
{
return 0;
}
else
{
if ( v7 )
{
v6 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, a2) = v6;
if ( ((unsigned __int8)a2 & 0x18) != 0 )
{
v2 = (_DWORD *)__errno_location();
my_error(6, 4, a1, *v2, v3, v4);
}
}
else if ( ((unsigned __int16)a2 & 0x8000) != 0 && (unsigned int)my_sync_dir_by_file(a1, a2) )
{
return (unsigned int)-1;
}
return v7;
}
}
|
my_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
JMP 0x001f0b12
LAB_001f0b12:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x200
CMP RAX,0x0
JZ 0x001f0b30
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001f0bf0
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001f0b3c
LAB_001f0b30:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012a1d0
MOV dword ptr [RBP + -0x1c],EAX
LAB_001f0b3c:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x20
CMP RAX,0x0
JZ 0x001f0b62
CALL 0x0012a760
CMP dword ptr [RAX],0x2
JNZ 0x001f0b62
JMP 0x001f0b56
LAB_001f0b56:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f0be3
LAB_001f0b62:
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x001f0bb0
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x20],EAX
CALL 0x001f7440
MOV ECX,dword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001f0bae
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x0012a760
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX]
MOV EDI,0x6
MOV ESI,0x4
MOV AL,0x0
CALL 0x001f0ef0
LAB_001f0bae:
JMP 0x001f0bdb
LAB_001f0bb0:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x8000
CMP RAX,0x0
JZ 0x001f0bd9
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001f70e0
CMP EAX,0x0
JZ 0x001f0bd9
MOV dword ptr [RBP + -0x1c],0xffffffff
LAB_001f0bd9:
JMP 0x001f0bdb
LAB_001f0bdb:
JMP 0x001f0bdd
LAB_001f0bdd:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001f0be3:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_delete(char *param_1,ulong param_2)
{
int iVar1;
int *piVar2;
int local_24;
int local_c;
if ((param_2 & 0x200) == 0) {
local_24 = unlink(param_1);
}
else {
local_24 = unlink_nosymlinks(param_1);
}
if (((param_2 & 0x20) == 0) || (piVar2 = __errno_location(), *piVar2 != 2)) {
if (local_24 == 0) {
if (((param_2 & 0x8000) != 0) && (iVar1 = my_sync_dir_by_file(param_1,param_2), iVar1 != 0)) {
local_24 = -1;
}
}
else {
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if ((param_2 & 0x18) != 0) {
piVar2 = __errno_location();
my_error(6,4,param_1,*piVar2);
}
}
local_c = local_24;
}
else {
local_c = 0;
}
return local_c;
}
|
|
57,027
|
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>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t)
|
llama.cpp/common/json.hpp
|
serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{}
|
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>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
movq %r15, 0x8(%rdi)
movups (%rsi), %xmm0
movq %r15, 0x8(%rsi)
movups %xmm0, (%rdi)
movq %r15, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x20100
movq %rax, 0x50(%r14)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xcf77c
movb (%rcx), %r15b
movb %r15b, 0x58(%r14)
movq (%rax), %rax
testq %rax, %rax
je 0xcf78c
movb (%rax), %al
jmp 0xcf78e
xorl %eax, %eax
leaq 0x8(%r14), %r15
movb %al, 0x59(%r14)
leaq 0x5a(%r14), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x20500
movb %bpl, 0x25a(%r14)
leaq 0x260(%r14), %rdi
leaq 0x270(%r14), %rax
movq %rax, 0x260(%r14)
movsbl %bpl, %edx
movl $0x200, %esi # imm = 0x200
callq 0x209d0
movl %ebx, 0x280(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x70a5a
movq %rbx, %rdi
callq 0x20af0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, ecx
mov ebp, edx
mov r14, rdi
xor r15d, r15d
mov [rdi+8], r15
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], r15
movups xmmword ptr [rdi], xmm0
mov [rsi], r15
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [r14+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_CF77C
mov r15b, [rcx]
loc_CF77C:
mov [r14+58h], r15b
mov rax, [rax]
test rax, rax
jz short loc_CF78C
mov al, [rax]
jmp short loc_CF78E
loc_CF78C:
xor eax, eax
loc_CF78E:
lea r15, [r14+8]
mov [r14+59h], al
lea rdi, [r14+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [r14+25Ah], bpl
lea rdi, [r14+260h]
lea rax, [r14+270h]
mov [r14+260h], rax
movsx edx, bpl
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [r14+280h], ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
|
long long 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>>::serializer(
long long a1,
__int128 *a2,
char a3,
int a4)
{
char v6; // r15
__int128 v7; // xmm0
long long v8; // rax
char *v9; // rcx
char *v10; // rax
char v11; // al
long long result; // rax
v6 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
v7 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v7;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v8 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v8;
v9 = *(char **)(v8 + 8);
if ( v9 )
v6 = *v9;
*(_BYTE *)(a1 + 88) = v6;
v10 = *(char **)v8;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
|
serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ECX
MOV EBP,EDX
MOV R14,RDI
XOR R15D,R15D
MOV qword ptr [RDI + 0x8],R15
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],R15
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSI],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x00120100
MOV qword ptr [R14 + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x001cf77c
MOV R15B,byte ptr [RCX]
LAB_001cf77c:
MOV byte ptr [R14 + 0x58],R15B
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001cf78c
MOV AL,byte ptr [RAX]
JMP 0x001cf78e
LAB_001cf78c:
XOR EAX,EAX
LAB_001cf78e:
LEA R15,[R14 + 0x8]
MOV byte ptr [R14 + 0x59],AL
LEA RDI,[R14 + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x00120500
MOV byte ptr [R14 + 0x25a],BPL
LEA RDI,[R14 + 0x260]
LEA RAX,[R14 + 0x270]
MOV qword ptr [R14 + 0x260],RAX
LAB_001cf7c2:
MOVSX EDX,BPL
MOV ESI,0x200
CALL 0x001209d0
LAB_001cf7d0:
MOV dword ptr [R14 + 0x280],EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* 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>
>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
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>>
::serializer(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,int8 *param_2,
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>>
param_3,int4 param_4)
{
int8 uVar1;
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>>
sVar2;
lconv *plVar3;
sVar2 = (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>>
)0x0;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar3 = localeconv();
*(lconv **)(this + 0x50) = plVar3;
if ((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>>
*)plVar3->thousands_sep !=
(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>>
*)0x0) {
sVar2 = *(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>>
*)plVar3->thousands_sep;
}
this[0x58] = sVar2;
if ((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>>
*)plVar3->decimal_point ==
(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>>
*)0x0) {
sVar2 = (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>>
)0x0;
}
else {
sVar2 = *(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>>
*)plVar3->decimal_point;
}
this[0x59] = sVar2;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(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 + 0x260) = this + 0x270;
/* try { // try from 001cf7c2 to 001cf7cf has its CatchHandler @ 001cf7e2 */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
|
|
57,028
|
FileDescriptor::read(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
|
minnow/util/file_descriptor.cc
|
void FileDescriptor::read( vector<string>& buffers )
{
if ( buffers.empty() ) {
return;
}
buffers.back().clear();
buffers.back().resize( kReadBufferSize );
vector<iovec> iovecs;
iovecs.reserve( buffers.size() );
size_t total_size = 0;
for ( const auto& x : buffers ) {
iovecs.push_back( { const_cast<char*>( x.data() ), x.size() } ); // NOLINT(*-const-cast)
total_size += x.size();
}
const ssize_t bytes_read = ::readv( fd_num(), iovecs.data(), static_cast<int>( iovecs.size() ) );
if ( bytes_read < 0 ) {
if ( internal_fd_->non_blocking_ and ( errno == EAGAIN or errno == EINPROGRESS ) ) {
buffers.clear();
return;
}
throw unix_error { "read" };
}
register_read();
if ( bytes_read > static_cast<ssize_t>( total_size ) ) {
throw runtime_error( "read() read more than requested" );
}
size_t remaining_size = bytes_read;
for ( auto& buf : buffers ) {
if ( remaining_size >= buf.size() ) {
remaining_size -= buf.size();
} else {
buf.resize( remaining_size );
remaining_size = 0;
}
}
}
|
O0
|
cpp
|
FileDescriptor::read(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16d00
testb $0x1, %al
jne 0x161fd
jmp 0x16202
jmp 0x16598
movq -0x10(%rbp), %rdi
callq 0x16d40
movq %rax, %rdi
callq 0xd6d0
movq -0x10(%rbp), %rdi
callq 0x16d40
movq %rax, %rdi
movl $0x4000, %esi # imm = 0x4000
callq 0xcc30
leaq -0x28(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x16d80
movq -0x10(%rbp), %rdi
callq 0x16ea0
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x16da0
jmp 0x16253
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x16ec0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x16ef0
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x16f20
xorb $-0x1, %al
testb $0x1, %al
jne 0x16292
jmp 0x162f5
leaq -0x50(%rbp), %rdi
callq 0x16f60
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x6730
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rdi
callq 0x6750
movq %rax, -0x68(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x16f80
jmp 0x162c8
movq -0x60(%rbp), %rdi
callq 0x6750
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x16fb0
jmp 0x1627d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x165a1
movq -0xc0(%rbp), %rdi
callq 0x12410
movl %eax, -0xcc(%rbp)
jmp 0x16309
leaq -0x28(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x16fd0
movq -0xe8(%rbp), %rdi
movq %rax, -0xe0(%rbp)
callq 0x16ff0
movl -0xcc(%rbp), %edi
movq -0xe0(%rbp), %rsi
movl %eax, %edx
callq 0x50f0
movq %rax, -0xd8(%rbp)
jmp 0x16349
movq -0xd8(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jge 0x16424
movq -0xc0(%rbp), %rdi
callq 0xd170
testb $0x1, 0x6(%rax)
je 0x1639a
callq 0x5030
cmpl $0xb, (%rax)
je 0x16385
callq 0x5030
cmpl $0x73, (%rax)
jne 0x1639a
movq -0x10(%rbp), %rdi
callq 0x17010
movl $0x1, -0x7c(%rbp)
jmp 0x1658f
movl $0x48, %edi
callq 0x5140
movq %rax, -0xf0(%rbp)
movq %rax, -0xf8(%rbp)
leaq 0x535a(%rip), %rsi # 0x1b713
leaq -0x90(%rbp), %rdi
callq 0xed90
callq 0x5030
movq -0xf0(%rbp), %rdi
movl (%rax), %ecx
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x125d0
jmp 0x163e8
movq -0xf8(%rbp), %rdi
leaq 0x12792(%rip), %rsi # 0x28b88
leaq -0x3dbd(%rip), %rdx # 0x12640
callq 0x53d0
jmp 0x165b3
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x51f0
jmp 0x165a1
movq -0xc0(%rbp), %rdi
callq 0x16cd0
jmp 0x16432
movq -0x78(%rbp), %rax
cmpq -0x40(%rbp), %rax
jle 0x1649d
movl $0x10, %edi
callq 0x5140
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x100(%rbp)
leaq 0x52be(%rip), %rsi # 0x1b718
callq 0x50e0
jmp 0x16461
movq -0x100(%rbp), %rdi
movq 0x12b69(%rip), %rsi # 0x28fd8
movq 0x12b1a(%rip), %rdx # 0x28f90
callq 0x53d0
jmp 0x165b3
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x51f0
jmp 0x165a1
movq -0x78(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x16ec0
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x16ef0
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x16f20
xorb $-0x1, %al
testb $0x1, %al
jne 0x164f7
jmp 0x16588
leaq -0xa8(%rbp), %rdi
callq 0x16f60
movq %rax, -0xb8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x6750
movq %rax, %rcx
movq -0x108(%rbp), %rax
cmpq %rcx, %rax
jb 0x16555
movq -0xb8(%rbp), %rdi
callq 0x6750
movq %rax, %rcx
movq -0x98(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x98(%rbp)
jmp 0x16575
movq -0xb8(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0xcc30
jmp 0x1656a
movq $0x0, -0x98(%rbp)
jmp 0x16577
leaq -0xa8(%rbp), %rdi
callq 0x16fb0
jmp 0x164d9
movl $0x0, -0x7c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x17030
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x17030
movq -0x30(%rbp), %rdi
callq 0x53f0
nopw %cs:(%rax,%rax)
|
_ZN14FileDescriptor4readERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE:
push rbp
mov rbp, rsp
sub rsp, 110h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_C0], rax
mov rdi, [rbp+var_10]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void)
test al, 1
jnz short loc_161FD
jmp short loc_16202
loc_161FD:
jmp loc_16598
loc_16202:
mov rdi, [rbp+var_10]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv; std::vector<std::string>::back(void)
mov rdi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv; std::string::clear(void)
mov rdi, [rbp+var_10]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv; std::vector<std::string>::back(void)
mov rdi, rax
mov esi, 4000h
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
lea rdi, [rbp+var_28]
mov [rbp+var_C8], rdi
call _ZNSt6vectorI5iovecSaIS0_EEC2Ev; std::vector<iovec>::vector(void)
mov rdi, [rbp+var_10]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rdi, [rbp+var_C8]
mov rsi, rax
call _ZNSt6vectorI5iovecSaIS0_EE7reserveEm; std::vector<iovec>::reserve(ulong)
jmp short $+2
loc_16253:
mov [rbp+var_40], 0
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rdi, [rbp+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rbp+var_50], rax
mov rdi, [rbp+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rbp+var_58], rax
loc_1627D:
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_58]
call _ZN9__gnu_cxxeqIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_16292
jmp short loc_162F5
loc_16292:
lea rdi, [rbp+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void)
mov [rbp+var_60], rax
mov rdi, [rbp+var_60]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov [rbp+var_70], rax
mov rdi, [rbp+var_60]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov [rbp+var_68], rax
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_70]
call _ZNSt6vectorI5iovecSaIS0_EE9push_backEOS0_; std::vector<iovec>::push_back(iovec&&)
jmp short $+2
loc_162C8:
mov rdi, [rbp+var_60]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
add rax, [rbp+var_40]
mov [rbp+var_40], rax
lea rdi, [rbp+var_50]
call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void)
jmp short loc_1627D
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
jmp loc_165A1
loc_162F5:
mov rdi, [rbp+var_C0]; this
call _ZNK14FileDescriptor6fd_numEv; FileDescriptor::fd_num(void)
mov [rbp+var_CC], eax
jmp short $+2
loc_16309:
lea rdi, [rbp+var_28]
mov [rbp+var_E8], rdi
call _ZNSt6vectorI5iovecSaIS0_EE4dataEv; std::vector<iovec>::data(void)
mov rdi, [rbp+var_E8]
mov [rbp+var_E0], rax
call _ZNKSt6vectorI5iovecSaIS0_EE4sizeEv; std::vector<iovec>::size(void)
mov edi, [rbp+var_CC]
mov rsi, [rbp+var_E0]
mov edx, eax
call _readv
mov [rbp+var_D8], rax
jmp short $+2
loc_16349:
mov rax, [rbp+var_D8]
mov [rbp+var_78], rax
cmp [rbp+var_78], 0
jge loc_16424
mov rdi, [rbp+var_C0]
call _ZNKSt19__shared_ptr_accessIN14FileDescriptor9FDWrapperELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<FileDescriptor::FDWrapper,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
test byte ptr [rax+6], 1
jz short loc_1639A
call ___errno_location
cmp dword ptr [rax], 0Bh
jz short loc_16385
call ___errno_location
cmp dword ptr [rax], 73h ; 's'
jnz short loc_1639A
loc_16385:
mov rdi, [rbp+var_10]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5clearEv; std::vector<std::string>::clear(void)
mov [rbp+var_7C], 1
jmp loc_1658F
loc_1639A:
mov edi, 48h ; 'H'; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_F0], rax
mov [rbp+var_F8], rax
lea rsi, aRead_0; "read"
lea rdi, [rbp+var_90]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
call ___errno_location
mov rdi, [rbp+var_F0]
mov ecx, [rax]
mov rsi, [rbp+var_90]
mov rdx, [rbp+var_88]
call _ZN10unix_errorC2ESt17basic_string_viewIcSt11char_traitsIcEEi; unix_error::unix_error(std::string_view,int)
jmp short $+2
loc_163E8:
mov rdi, [rbp+var_F8]; void *
lea rsi, _ZTI10unix_error; lptinfo
lea rdx, _ZN10unix_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_165B3
mov rdi, [rbp+var_F8]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
call ___cxa_free_exception
jmp loc_165A1
loc_16424:
mov rdi, [rbp+var_C0]; this
call _ZN14FileDescriptor13register_readEv; FileDescriptor::register_read(void)
jmp short $+2
loc_16432:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_40]
jle short loc_1649D
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_100], rax
lea rsi, aReadReadMoreTh; "read() read more than requested"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_16461:
mov rdi, [rbp+var_100]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_165B3
mov rdi, [rbp+var_100]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
call ___cxa_free_exception
jmp loc_165A1
loc_1649D:
mov rax, [rbp+var_78]
mov [rbp+var_98], rax
mov rax, [rbp+var_10]
mov [rbp+var_A0], rax
mov rdi, [rbp+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rbp+var_A8], rax
mov rdi, [rbp+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rbp+var_B0], rax
loc_164D9:
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_B0]
call _ZN9__gnu_cxxeqIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_164F7
jmp loc_16588
loc_164F7:
lea rdi, [rbp+var_A8]
call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void)
mov [rbp+var_B8], rax
mov rax, [rbp+var_98]
mov [rbp+var_108], rax
mov rdi, [rbp+var_B8]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_108]
cmp rax, rcx
jb short loc_16555
mov rdi, [rbp+var_B8]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_98]
sub rax, rcx
mov [rbp+var_98], rax
jmp short loc_16575
loc_16555:
mov rdi, [rbp+var_B8]
mov rsi, [rbp+var_98]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
jmp short $+2
loc_1656A:
mov [rbp+var_98], 0
loc_16575:
jmp short $+2
loc_16577:
lea rdi, [rbp+var_A8]
call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void)
jmp loc_164D9
loc_16588:
mov [rbp+var_7C], 0
loc_1658F:
lea rdi, [rbp+var_28]
call _ZNSt6vectorI5iovecSaIS0_EED2Ev; std::vector<iovec>::~vector()
loc_16598:
add rsp, 110h
pop rbp
retn
loc_165A1:
lea rdi, [rbp+var_28]
call _ZNSt6vectorI5iovecSaIS0_EED2Ev; std::vector<iovec>::~vector()
mov rdi, [rbp+var_30]
call __Unwind_Resume
loc_165B3:
nop word ptr [rax+rax+00000000h]
|
long long FileDescriptor::read(FileDescriptor *a1, long long a2)
{
long long result; // rax
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
unsigned int v7; // eax
int *v8; // rax
long long v9; // rcx
unsigned long long v10; // [rsp+8h] [rbp-108h]
std::runtime_error *exception; // [rsp+10h] [rbp-100h]
std::_V2 *v12; // [rsp+18h] [rbp-F8h]
long long v13; // [rsp+30h] [rbp-E0h]
unsigned int v14; // [rsp+44h] [rbp-CCh]
long long v15; // [rsp+58h] [rbp-B8h]
long long v16; // [rsp+60h] [rbp-B0h] BYREF
long long v17; // [rsp+68h] [rbp-A8h] BYREF
long long v18; // [rsp+70h] [rbp-A0h]
long long v19; // [rsp+78h] [rbp-98h]
long long v20[2]; // [rsp+80h] [rbp-90h] BYREF
int v21; // [rsp+94h] [rbp-7Ch]
long long v22; // [rsp+98h] [rbp-78h]
_QWORD v23[2]; // [rsp+A0h] [rbp-70h] BYREF
long long v24; // [rsp+B0h] [rbp-60h]
long long v25; // [rsp+B8h] [rbp-58h] BYREF
long long v26; // [rsp+C0h] [rbp-50h] BYREF
long long v27; // [rsp+C8h] [rbp-48h]
long long v28; // [rsp+D0h] [rbp-40h]
_BYTE v29[24]; // [rsp+E8h] [rbp-28h] BYREF
long long v30; // [rsp+100h] [rbp-10h]
FileDescriptor *v31; // [rsp+108h] [rbp-8h]
v31 = a1;
v30 = a2;
result = std::vector<std::string>::empty(a2);
if ( (result & 1) == 0 )
{
v3 = std::vector<std::string>::back(v30);
std::string::clear(v3);
v4 = std::vector<std::string>::back(v30);
std::string::resize(v4, 0x4000LL);
std::vector<iovec>::vector();
v5 = std::vector<std::string>::size(v30);
std::vector<iovec>::reserve(v29, v5);
v28 = 0LL;
v27 = v30;
v26 = std::vector<std::string>::begin(v30);
v25 = std::vector<std::string>::end(v27);
while ( (__gnu_cxx::operator==<std::string *,std::vector<std::string>>(&v26, &v25) & 1) == 0 )
{
v24 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(&v26);
v23[0] = std::string::data(v24);
v23[1] = std::string::size(v24);
std::vector<iovec>::push_back(v29, v23);
v6 = std::string::size(v24);
v28 += v6;
__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(&v26);
}
v14 = FileDescriptor::fd_num(a1);
v13 = std::vector<iovec>::data();
v7 = std::vector<iovec>::size(v29);
v22 = readv(v14, v13, v7);
if ( v22 >= 0 )
{
FileDescriptor::register_read(a1);
if ( v22 > v28 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "read() read more than requested");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v19 = v22;
v18 = v30;
v17 = std::vector<std::string>::begin(v30);
v16 = std::vector<std::string>::end(v18);
while ( (__gnu_cxx::operator==<std::string *,std::vector<std::string>>(&v17, &v16) & 1) == 0 )
{
v15 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(&v17);
v10 = v19;
if ( v10 < std::string::size(v15) )
{
std::string::resize(v15, v19);
v19 = 0LL;
}
else
{
v9 = std::string::size(v15);
v19 -= v9;
}
__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(&v17);
}
v21 = 0;
}
else
{
if ( (*(_BYTE *)(std::__shared_ptr_access<FileDescriptor::FDWrapper,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)a1)
+ 6) & 1) == 0
|| *(_DWORD *)__errno_location() != 11 && *(_DWORD *)__errno_location() != 115 )
{
v12 = (std::_V2 *)__cxa_allocate_exception(0x48uLL);
std::string_view::basic_string_view(v20, (long long)"read");
v8 = (int *)__errno_location();
unix_error::unix_error(v12, v20[0], v20[1], *v8);
__cxa_throw(v12, (struct type_info *)&`typeinfo for'unix_error, (void (*)(void *))unix_error::~unix_error);
}
std::vector<std::string>::clear(v30);
v21 = 1;
}
return std::vector<iovec>::~vector(v29);
}
return result;
}
|
read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00116d00
TEST AL,0x1
JNZ 0x001161fd
JMP 0x00116202
LAB_001161fd:
JMP 0x00116598
LAB_00116202:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00116d40
MOV RDI,RAX
CALL 0x0010d6d0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00116d40
MOV RDI,RAX
MOV ESI,0x4000
CALL 0x0010cc30
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0xc8],RDI
CALL 0x00116d80
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00116ea0
MOV RDI,qword ptr [RBP + -0xc8]
MOV RSI,RAX
LAB_0011624c:
CALL 0x00116da0
JMP 0x00116253
LAB_00116253:
MOV qword ptr [RBP + -0x40],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00116ec0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00116ef0
MOV qword ptr [RBP + -0x58],RAX
LAB_0011627d:
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x58]
CALL 0x00116f20
XOR AL,0xff
TEST AL,0x1
JNZ 0x00116292
JMP 0x001162f5
LAB_00116292:
LEA RDI,[RBP + -0x50]
CALL 0x00116f60
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00106730
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00106750
MOV qword ptr [RBP + -0x68],RAX
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x70]
CALL 0x00116f80
JMP 0x001162c8
LAB_001162c8:
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00106750
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[RBP + -0x50]
CALL 0x00116fb0
JMP 0x0011627d
LAB_001162f5:
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x00112410
MOV dword ptr [RBP + -0xcc],EAX
JMP 0x00116309
LAB_00116309:
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0xe8],RDI
CALL 0x00116fd0
MOV RDI,qword ptr [RBP + -0xe8]
MOV qword ptr [RBP + -0xe0],RAX
CALL 0x00116ff0
MOV EDI,dword ptr [RBP + -0xcc]
MOV RSI,qword ptr [RBP + -0xe0]
MOV EDX,EAX
CALL 0x001050f0
LAB_00116340:
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x00116349
LAB_00116349:
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x78],RAX
CMP qword ptr [RBP + -0x78],0x0
JGE 0x00116424
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x0010d170
TEST byte ptr [RAX + 0x6],0x1
JZ 0x0011639a
CALL 0x00105030
CMP dword ptr [RAX],0xb
JZ 0x00116385
CALL 0x00105030
CMP dword ptr [RAX],0x73
JNZ 0x0011639a
LAB_00116385:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00117010
MOV dword ptr [RBP + -0x7c],0x1
JMP 0x0011658f
LAB_0011639a:
MOV EDI,0x48
CALL 0x00105140
MOV qword ptr [RBP + -0xf0],RAX
MOV qword ptr [RBP + -0xf8],RAX
LEA RSI,[0x11b713]
LEA RDI,[RBP + -0x90]
CALL 0x0010ed90
CALL 0x00105030
MOV RDI,qword ptr [RBP + -0xf0]
MOV ECX,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x88]
LAB_001163e1:
CALL 0x001125d0
JMP 0x001163e8
LAB_001163e8:
MOV RDI,qword ptr [RBP + -0xf8]
LEA RSI,[0x128b88]
LEA RDX,[0x112640]
CALL 0x001053d0
LAB_00116424:
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x00116cd0
LAB_00116430:
JMP 0x00116432
LAB_00116432:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x40]
JLE 0x0011649d
MOV EDI,0x10
CALL 0x00105140
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x100],RAX
LAB_00116453:
LEA RSI,[0x11b718]
CALL 0x001050e0
JMP 0x00116461
LAB_00116461:
MOV RDI,qword ptr [RBP + -0x100]
MOV RSI,qword ptr [0x00128fd8]
MOV RDX,qword ptr [0x00128f90]
CALL 0x001053d0
LAB_0011649d:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x00116ec0
MOV qword ptr [RBP + -0xa8],RAX
MOV RDI,qword ptr [RBP + -0xa0]
CALL 0x00116ef0
MOV qword ptr [RBP + -0xb0],RAX
LAB_001164d9:
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0xb0]
CALL 0x00116f20
XOR AL,0xff
TEST AL,0x1
JNZ 0x001164f7
JMP 0x00116588
LAB_001164f7:
LEA RDI,[RBP + -0xa8]
CALL 0x00116f60
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x108],RAX
MOV RDI,qword ptr [RBP + -0xb8]
CALL 0x00106750
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x108]
CMP RAX,RCX
JC 0x00116555
MOV RDI,qword ptr [RBP + -0xb8]
CALL 0x00106750
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x98]
SUB RAX,RCX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00116575
LAB_00116555:
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0x98]
LAB_00116563:
CALL 0x0010cc30
LAB_00116568:
JMP 0x0011656a
LAB_0011656a:
MOV qword ptr [RBP + -0x98],0x0
LAB_00116575:
JMP 0x00116577
LAB_00116577:
LEA RDI,[RBP + -0xa8]
CALL 0x00116fb0
JMP 0x001164d9
LAB_00116588:
MOV dword ptr [RBP + -0x7c],0x0
LAB_0011658f:
LEA RDI,[RBP + -0x28]
CALL 0x00117030
LAB_00116598:
ADD RSP,0x110
POP RBP
RET
|
/* FileDescriptor::read(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&)
*/
void __thiscall FileDescriptor::read(FileDescriptor *this,vector *param_1)
{
byte bVar1;
int __fd;
int __count;
ulong uVar2;
string *psVar3;
iovec *__iovec;
long lVar4;
int *piVar5;
unix_error *puVar6;
runtime_error *this_00;
ulong uVar7;
int8 local_b8;
int8 local_b0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_a8;
ulong local_a0;
int8 local_98;
int8 local_90;
int4 local_84;
ulong local_80;
iovec local_78;
string *local_68;
int8 local_60;
int8 local_58;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_50;
long local_48;
vector<iovec,std::allocator<iovec>> local_30 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18;
FileDescriptor *local_10;
local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1;
local_10 = this;
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1);
if ((uVar2 & 1) == 0) {
psVar3 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::back(local_18);
std::__cxx11::string::clear(psVar3);
psVar3 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::back(local_18);
std::__cxx11::string::resize(psVar3,0x4000);
std::vector<iovec,std::allocator<iovec>>::vector(local_30);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_18);
/* try { // try from 0011624c to 0011633f has its CatchHandler @ 001162e4 */
std::vector<iovec,std::allocator<iovec>>::reserve(local_30,uVar2);
local_48 = 0;
local_50 = local_18;
local_58 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
(local_18);
local_60 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_50)
;
while (bVar1 = _ZN9__gnu_cxxeqIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_58,&local_60), ((bVar1 ^ 0xff) & 1) != 0) {
local_68 = (string *)
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_58);
local_78.iov_base = (void *)std::__cxx11::string::data(local_68);
local_78.iov_len = std::__cxx11::string::size(local_68);
std::vector<iovec,std::allocator<iovec>>::push_back(local_30,&local_78);
lVar4 = std::__cxx11::string::size(local_68);
local_48 = lVar4 + local_48;
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_58);
}
__fd = fd_num(this);
__iovec = (iovec *)std::vector<iovec,std::allocator<iovec>>::data(local_30);
__count = std::vector<iovec,std::allocator<iovec>>::size(local_30);
local_80 = readv(__fd,__iovec,__count);
if ((long)local_80 < 0) {
lVar4 = std::
__shared_ptr_access<FileDescriptor::FDWrapper,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<FileDescriptor::FDWrapper,(__gnu_cxx::_Lock_policy)2,false,false>
*)this);
if (((*(byte *)(lVar4 + 6) & 1) == 0) ||
((piVar5 = __errno_location(), *piVar5 != 0xb &&
(piVar5 = __errno_location(), *piVar5 != 0x73)))) {
puVar6 = (unix_error *)__cxa_allocate_exception(0x48);
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_98,"read");
piVar5 = __errno_location();
/* try { // try from 001163e1 to 001163e5 has its CatchHandler @ 00116407 */
unix_error::unix_error(puVar6,local_98,local_90,*piVar5);
/* try { // try from 001163e8 to 00116401 has its CatchHandler @ 001162e4 */
/* WARNING: Subroutine does not return */
__cxa_throw(puVar6,&unix_error::typeinfo,unix_error::~unix_error);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::clear(local_18);
local_84 = 1;
}
else {
/* try { // try from 00116424 to 0011642f has its CatchHandler @ 001162e4 */
register_read(this);
if (local_48 < (long)local_80) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00116453 to 0011645e has its CatchHandler @ 00116480 */
std::runtime_error::runtime_error(this_00,"read() read more than requested");
/* try { // try from 00116461 to 0011647a has its CatchHandler @ 001162e4 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00128fd8,PTR__runtime_error_00128f90);
}
local_a0 = local_80;
local_a8 = local_18;
local_b0 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
(local_18);
local_b8 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end
(local_a8);
while (bVar1 = _ZN9__gnu_cxxeqIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_b0,&local_b8), ((bVar1 ^ 0xff) & 1) != 0) {
psVar3 = (string *)
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_b0);
uVar2 = local_a0;
uVar7 = std::__cxx11::string::size(psVar3);
if (uVar2 < uVar7) {
/* try { // try from 00116563 to 00116567 has its CatchHandler @ 001162e4 */
std::__cxx11::string::resize(psVar3,local_a0);
local_a0 = 0;
}
else {
lVar4 = std::__cxx11::string::size(psVar3);
local_a0 = local_a0 - lVar4;
}
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_b0);
}
local_84 = 0;
}
std::vector<iovec,std::allocator<iovec>>::~vector(local_30);
}
return;
}
|
|
57,029
|
psi_cond_wait
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_cond_wait(mysql_cond_t *that, mysql_mutex_t *mutex,
const char *file, uint line)
{
PSI_cond_locker_state state;
PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait)
(&state, that->m_psi, mutex->m_psi, PSI_COND_WAIT, file, line);
int result= my_cond_wait(&that->m_cond, &mutex->m_mutex);
if (locker)
PSI_COND_CALL(end_cond_wait)(locker, result);
return result;
}
|
O3
|
c
|
psi_cond_wait:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %r9d
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2d53ca(%rip), %r12 # 0x2f9e58
movq (%r12), %rax
movq 0x30(%rdi), %rsi
movq 0x40(%r14), %rdx
leaq -0x58(%rbp), %rdi
xorl %ecx, %ecx
callq *0x1c0(%rax)
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x24560
movl %eax, %r14d
testq %rbx, %rbx
je 0x24acc
movq (%r12), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1c8(%rax)
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
psi_cond_wait:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r9d, ecx
mov r8, rdx
mov r14, rsi
mov r15, rdi
lea r12, PSI_server
mov rax, [r12]
mov rsi, [rdi+30h]
mov rdx, [r14+40h]
lea rdi, [rbp+var_58]
xor ecx, ecx
call qword ptr [rax+1C0h]
mov rbx, rax
mov rdi, r15
mov rsi, r14
call _pthread_cond_wait
mov r14d, eax
test rbx, rbx
jz short loc_24ACC
mov rax, [r12]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1C8h]
loc_24ACC:
mov eax, r14d
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long psi_cond_wait(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // rbx
unsigned int v5; // r14d
_BYTE v7[88]; // [rsp+8h] [rbp-58h] BYREF
v4 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, _QWORD, long long, _QWORD))PSI_server + 56))(
v7,
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a2 + 64),
0LL,
a3,
a4);
v5 = pthread_cond_wait(a1, a2);
if ( v4 )
(*((void ( **)(long long, _QWORD))PSI_server + 57))(v4, v5);
return v5;
}
|
psi_cond_wait:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R9D,ECX
MOV R8,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[0x3f9e58]
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [RDI + 0x30]
MOV RDX,qword ptr [R14 + 0x40]
LEA RDI,[RBP + -0x58]
XOR ECX,ECX
CALL qword ptr [RAX + 0x1c0]
MOV RBX,RAX
MOV RDI,R15
MOV RSI,R14
CALL 0x00124560
MOV R14D,EAX
TEST RBX,RBX
JZ 0x00124acc
MOV RAX,qword ptr [R12]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1c8]
LAB_00124acc:
MOV EAX,R14D
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int psi_cond_wait(pthread_cond_t *param_1,pthread_mutex_t *param_2,int8 param_3,
int4 param_4)
{
int iVar1;
long lVar2;
int1 local_60 [56];
lVar2 = (**(code **)(PSI_server + 0x1c0))
(local_60,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),0,param_3,
param_4);
iVar1 = pthread_cond_wait(param_1,param_2);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1c8))(lVar2,iVar1);
}
return iVar1;
}
|
|
57,030
|
google::protobuf::compiler::python::PyiGenerator::PrintItemMap(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/pyi_generator.cc
|
void PyiGenerator::PrintItemMap(
const std::map<std::string, std::string>& item_map) const {
for (const auto& entry : item_map) {
printer_->Print("$key$: $value$\n", "key", entry.first, "value",
entry.second);
}
}
|
O3
|
cpp
|
google::protobuf::compiler::python::PyiGenerator::PrintItemMap(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x18(%rsi), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0x6e79b
movq %rdi, %r14
leaq 0x13a8e7(%rip), %r12 # 0x1a904a
leaq 0x1396a7(%rip), %r13 # 0x1a7e11
leaq 0x1817ab(%rip), %rbp # 0x1eff1c
leaq 0x20(%r15), %rcx
movq 0x38(%r14), %rdi
leaq 0x40(%r15), %r9
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %r8
callq 0x70f2c
movq %r15, %rdi
callq 0x1f570
movq %rax, %r15
cmpq %rbx, %rax
jne 0x6e771
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZNK6google8protobuf8compiler6python12PyiGenerator12PrintItemMapERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St4lessISA_ESaISt4pairIKSA_SA_EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r15, [rsi+18h]
add rbx, 8
cmp r15, rbx
jz short loc_6E79B
mov r14, rdi
lea r12, aKeyValue; "$key$: $value$\n"
lea r13, aDescriptorKey+0Bh; "key"
lea rbp, aNoDefaultValue+0Bh; "value"
loc_6E771:
lea rcx, [r15+20h]
mov rdi, [r14+38h]
lea r9, [r15+40h]
mov rsi, r12
mov rdx, r13
mov r8, rbp
call _ZN6google8protobuf2io7Printer5PrintIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA6_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [4],std::string,char [6],std::string>(char const*,char [4],std::string,char [6],std::string const&)
mov rdi, r15
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov r15, rax
cmp rax, rbx
jnz short loc_6E771
loc_6E79B:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long google::protobuf::compiler::python::PyiGenerator::PrintItemMap(long long a1, long long a2)
{
long long result; // rax
long long v3; // r15
long long v4; // [rsp-8h] [rbp-38h]
v4 = result;
v3 = *(_QWORD *)(a2 + 24);
if ( v3 != a2 + 8 )
{
do
{
google::protobuf::io::Printer::Print<char [4],std::string,char [6],std::string>(
*(_QWORD *)(a1 + 56),
"$key$: $value$\n",
"key",
v3 + 32,
"value",
v3 + 64,
v4);
result = std::_Rb_tree_increment(v3);
v3 = result;
}
while ( result != a2 + 8 );
}
return result;
}
|
PrintItemMap:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R15,qword ptr [RSI + 0x18]
ADD RBX,0x8
CMP R15,RBX
JZ 0x0016e79b
MOV R14,RDI
LEA R12,[0x2a904a]
LEA R13,[0x2a7e11]
LEA RBP,[0x2eff1c]
LAB_0016e771:
LEA RCX,[R15 + 0x20]
MOV RDI,qword ptr [R14 + 0x38]
LEA R9,[R15 + 0x40]
MOV RSI,R12
MOV RDX,R13
MOV R8,RBP
CALL 0x00170f2c
MOV RDI,R15
CALL 0x0011f570
MOV R15,RAX
CMP RAX,RBX
JNZ 0x0016e771
LAB_0016e79b:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::compiler::python::PyiGenerator::PrintItemMap(std::map<std::__cxx11::string,
std::__cxx11::string, std::less<std::__cxx11::string >,
std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&) const */
void __thiscall
google::protobuf::compiler::python::PyiGenerator::PrintItemMap(PyiGenerator *this,map *param_1)
{
_Rb_tree_node_base *p_Var1;
for (p_Var1 = *(_Rb_tree_node_base **)(param_1 + 0x18);
p_Var1 != (_Rb_tree_node_base *)(param_1 + 8);
p_Var1 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var1)) {
io::Printer::Print<char[4],std::__cxx11::string,char[6],std::__cxx11::string>
(*(char **)(this + 0x38),"$key$: $value$\n",(string *)0x2a7e11,(char *)(p_Var1 + 0x20)
,(string *)0x2eff1c);
}
return;
}
|
|
57,031
|
my_mb_wc_big5
|
eloqsql/strings/ctype-big5.c
|
static int
my_mb_wc_big5(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_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
}
|
O3
|
c
|
my_mb_wc_big5:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x633e6
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x633b0
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x633e6
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x58, %cl
ja 0x633e6
movzbl 0x1(%rdx), %ecx
leal -0x7f(%rcx), %edx
cmpb $-0x3f, %dl
setb %dl
leal 0x1(%rcx), %r8d
cmpb $-0x5e, %r8b
setb %r8b
testb %r8b, %dl
je 0x633e7
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
leal (%rax,%rcx), %edx
addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0
cmpl $0x26bc, %edx # imm = 0x26BC
ja 0x6340e
movl %edx, %eax
leaq 0x36704(%rip), %rcx # 0x99b10
jmp 0x63425
orl %ecx, %eax
addl $0xffff36c0, %eax # imm = 0xFFFF36C0
cmpl $0x309d, %eax # imm = 0x309D
jae 0x6343e
movl %eax, %eax
leaq 0x3b46b(%rip), %rcx # 0x9e890
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x6344a
jmp 0x63445
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
|
my_mb_wc_big5:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_633E6
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_633B0
mov [rsi], rdi
mov eax, 1
retn
loc_633B0:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_633E6
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 58h ; 'X'
ja short locret_633E6
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx-7Fh]
cmp dl, 0C1h
setb dl
lea r8d, [rcx+1]
cmp r8b, 0A2h
setb r8b
test dl, r8b
jz short loc_633E7
locret_633E6:
retn
loc_633E7:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
lea edx, [rax+rcx]
add edx, 0FFFF5EC0h
cmp edx, 26BCh
ja short loc_6340E
mov eax, edx
lea rcx, tab_big5_uni0
jmp short loc_63425
loc_6340E:
or eax, ecx
add eax, 0FFFF36C0h
cmp eax, 309Dh
jnb short loc_6343E
mov eax, eax
lea rcx, tab_big5_uni1
loc_63425:
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_6344A
jmp short loc_63445
loc_6343E:
mov qword ptr [rsi], 0
loc_63445:
mov eax, 0FFFFFFFEh
loc_6344A:
pop rbp
retn
|
long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // ecx
int v7; // eax
unsigned int v8; // edx
long long v9; // rax
unsigned __int16 *v10; // rcx
long long v11; // 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) <= 0x58u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u )
{
v7 = (unsigned __int8)v5 << 8;
v8 = v7 + v6 - 41280;
if ( v8 > 0x26BC )
{
LODWORD(v9) = (v6 | v7) - 51520;
if ( (unsigned int)v9 >= 0x309D )
{
*a2 = 0LL;
return 4294967294LL;
}
v9 = (unsigned int)v9;
v10 = (unsigned __int16 *)&tab_big5_uni1;
}
else
{
v9 = v8;
v10 = (unsigned __int16 *)&tab_big5_uni0;
}
v11 = v10[v9];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
|
my_mb_wc_big5:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001633e6
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001633b0
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001633b0:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001633e6
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x58
JA 0x001633e6
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x7f]
CMP DL,0xc1
SETC DL
LEA R8D,[RCX + 0x1]
CMP R8B,0xa2
SETC R8B
TEST DL,R8B
JZ 0x001633e7
LAB_001633e6:
RET
LAB_001633e7:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
LEA EDX,[RAX + RCX*0x1]
ADD EDX,0xffff5ec0
CMP EDX,0x26bc
JA 0x0016340e
MOV EAX,EDX
LEA RCX,[0x199b10]
JMP 0x00163425
LAB_0016340e:
OR EAX,ECX
ADD EAX,0xffff36c0
CMP EAX,0x309d
JNC 0x0016343e
MOV EAX,EAX
LEA RCX,[0x19e890]
LAB_00163425:
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 0x0016344a
JMP 0x00163445
LAB_0016343e:
MOV qword ptr [RSI],0x0
LAB_00163445:
MOV EAX,0xfffffffe
LAB_0016344a:
POP RBP
RET
|
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
int *puVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(bVar1 + 0x5f) < 0x59) {
bVar2 = param_3[1];
if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) {
return 0;
}
uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140;
if (uVar5 < 0x26bd) {
puVar4 = &tab_big5_uni0;
}
else {
uVar5 = CONCAT11(bVar1,bVar2) - 0xc940;
if (0x309c < uVar5) {
*param_2 = 0;
return 0xfffffffe;
}
puVar4 = &tab_big5_uni1;
}
uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
|
|
57,032
|
check_exact_power2n
|
bluesky950520[P]quickjs/libbf.c
|
static BOOL check_exact_power2n(bf_t *r, const bf_t *x, slimb_t n)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
slimb_t e, i, er;
limb_t v;
/* x = m*2^e with m odd integer */
e = bf_get_exp_min(x);
/* fast check on the exponent */
if (n > (LIMB_BITS - 1)) {
if (e != 0)
return FALSE;
er = 0;
} else {
if ((e & (((limb_t)1 << n) - 1)) != 0)
return FALSE;
er = e >> n;
}
/* every perfect odd square = 1 modulo 8 */
v = get_bits(x->tab, x->len, x->len * LIMB_BITS - x->expn + e);
if ((v & 7) != 1)
return FALSE;
bf_init(s, T);
bf_set(T, x);
T->expn -= e;
for(i = 0; i < n; i++) {
if (i != 0)
bf_set(T, r);
if (bf_sqrtrem(r, NULL, T) != 0)
return FALSE;
}
r->expn += er;
return TRUE;
}
|
O3
|
c
|
check_exact_power2n:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rdx
testq %rdx, %rdx
je 0x8e163
movq 0x20(%rsi), %rcx
movq %rdx, %rax
shlq $0x6, %rax
xorl %r13d, %r13d
xorl %edi, %edi
movq (%rcx,%rdi,8), %r8
testq %r8, %r8
jne 0x8e168
incq %rdi
addq $-0x40, %rax
cmpq %rdi, %rdx
jne 0x8e14c
jmp 0x8e173
xorl %r13d, %r13d
jmp 0x8e173
bsfq %r8, %r13
addq 0x10(%rsi), %r13
subq %rax, %r13
movq (%r14), %rdi
cmpq $0x40, %rbx
jl 0x8e18c
xorl %r12d, %r12d
testq %r13, %r13
jne 0x8e27b
xorl %ebp, %ebp
jmp 0x8e1ac
movq $-0x1, %rax
movl %ebx, %ecx
shlq %cl, %rax
notq %rax
testq %rax, %r13
jne 0x8e278
movq %r13, %rbp
movl %ebx, %ecx
sarq %cl, %rbp
movq 0x20(%rsi), %r9
movq %rdx, %rcx
shlq $0x6, %rcx
subq 0x10(%rsi), %rcx
addq %r13, %rcx
movq %rcx, %r10
sarq $0x6, %r10
movl %ecx, %eax
andl $0x3f, %eax
cmpq %rdx, %r10
jae 0x8e1d5
movq (%r9,%r10,8), %r8
jmp 0x8e1d8
xorl %r8d, %r8d
testl %eax, %eax
je 0x8e1fb
leaq 0x1(%r10), %r11
cmpq %rdx, %r11
jae 0x8e1ec
movq 0x8(%r9,%r10,8), %rdx
jmp 0x8e1ee
xorl %edx, %edx
shrq %cl, %r8
negb %al
movl %eax, %ecx
shlq %cl, %rdx
orq %rdx, %r8
andl $0x7, %r8d
cmpl $0x1, %r8d
jne 0x8e278
movq %rsp, %r15
movq %rdi, (%r15)
movl $0x0, 0x8(%r15)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movq %r15, %rdi
callq 0x86a9a
subq %r13, 0x10(%r15)
testq %rbx, %rbx
jle 0x8e26c
xorl %r13d, %r13d
movq %rsp, %r15
testq %r13, %r13
je 0x8e250
movq %r15, %rdi
movq %r14, %rsi
callq 0x86a9a
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x89460
testl %eax, %eax
jne 0x8e27b
incq %r13
cmpq %r13, %rbx
jne 0x8e240
addq %rbp, 0x10(%r14)
movl $0x1, %r12d
jmp 0x8e27b
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
check_exact_power2n:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rdi
mov rdx, [rsi+18h]
test rdx, rdx
jz short loc_8E163
mov rcx, [rsi+20h]
mov rax, rdx
shl rax, 6
xor r13d, r13d
xor edi, edi
loc_8E14C:
mov r8, [rcx+rdi*8]
test r8, r8
jnz short loc_8E168
inc rdi
add rax, 0FFFFFFFFFFFFFFC0h
cmp rdx, rdi
jnz short loc_8E14C
jmp short loc_8E173
loc_8E163:
xor r13d, r13d
jmp short loc_8E173
loc_8E168:
bsf r13, r8
add r13, [rsi+10h]
sub r13, rax
loc_8E173:
mov rdi, [r14]
cmp rbx, 40h ; '@'
jl short loc_8E18C
xor r12d, r12d
test r13, r13
jnz loc_8E27B
xor ebp, ebp
jmp short loc_8E1AC
loc_8E18C:
mov rax, 0FFFFFFFFFFFFFFFFh
mov ecx, ebx
shl rax, cl
not rax
test r13, rax
jnz loc_8E278
mov rbp, r13
mov ecx, ebx
sar rbp, cl
loc_8E1AC:
mov r9, [rsi+20h]
mov rcx, rdx
shl rcx, 6
sub rcx, [rsi+10h]
add rcx, r13
mov r10, rcx
sar r10, 6
mov eax, ecx
and eax, 3Fh
cmp r10, rdx
jnb short loc_8E1D5
mov r8, [r9+r10*8]
jmp short loc_8E1D8
loc_8E1D5:
xor r8d, r8d
loc_8E1D8:
test eax, eax
jz short loc_8E1FB
lea r11, [r10+1]
cmp r11, rdx
jnb short loc_8E1EC
mov rdx, [r9+r10*8+8]
jmp short loc_8E1EE
loc_8E1EC:
xor edx, edx
loc_8E1EE:
shr r8, cl
neg al
mov ecx, eax
shl rdx, cl
or r8, rdx
loc_8E1FB:
and r8d, 7
cmp r8d, 1
jnz short loc_8E278
mov r15, rsp
mov [r15], rdi
mov dword ptr [r15+8], 0
mov rax, 8000000000000000h
mov [r15+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r15+18h], xmm0
mov rdi, r15
call bf_set
sub [r15+10h], r13
test rbx, rbx
jle short loc_8E26C
xor r13d, r13d
mov r15, rsp
loc_8E240:
test r13, r13
jz short loc_8E250
mov rdi, r15
mov rsi, r14
call bf_set
loc_8E250:
xor r12d, r12d
mov rdi, r14
xor esi, esi
mov rdx, r15
call bf_sqrtrem
test eax, eax
jnz short loc_8E27B
inc r13
cmp rbx, r13
jnz short loc_8E240
loc_8E26C:
add [r14+10h], rbp
mov r12d, 1
jmp short loc_8E27B
loc_8E278:
xor r12d, r12d
loc_8E27B:
mov eax, r12d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long check_exact_power2n(long long a1, _QWORD *a2, long long a3)
{
unsigned long long v5; // rdx
unsigned long long v6; // rax
long long v7; // r13
long long v8; // rdi
unsigned long long v9; // r8
unsigned long long v10; // r13
unsigned int v11; // r12d
long long v12; // rbp
long long v13; // r9
long long v14; // rcx
long long v15; // r10
char v16; // al
unsigned long long v17; // r8
long long v18; // rdx
long long v19; // r13
_QWORD *v21; // [rsp+0h] [rbp-58h] BYREF
int v22; // [rsp+8h] [rbp-50h]
unsigned long long v23; // [rsp+10h] [rbp-48h]
__int128 v24; // [rsp+18h] [rbp-40h]
v5 = a2[3];
if ( v5 )
{
v6 = v5 << 6;
v7 = 0LL;
v8 = 0LL;
while ( 1 )
{
v9 = *(_QWORD *)(a2[4] + 8 * v8);
if ( v9 )
break;
++v8;
v6 -= 64LL;
if ( v5 == v8 )
goto LABEL_8;
}
_BitScanForward64(&v10, v9);
v7 = a2[2] + v10 - v6;
}
else
{
v7 = 0LL;
}
LABEL_8:
if ( a3 < 64 )
{
if ( (~(-1LL << a3) & v7) != 0 )
return 0;
v12 = v7 >> a3;
}
else
{
v11 = 0;
if ( v7 )
return v11;
v12 = 0LL;
}
v13 = a2[4];
v14 = v7 + (v5 << 6) - a2[2];
v15 = v14 >> 6;
v16 = (v7 + ((_BYTE)v5 << 6) - *((_BYTE *)a2 + 16)) & 0x3F;
if ( v14 >> 6 >= v5 )
v17 = 0LL;
else
v17 = *(_QWORD *)(v13 + 8 * v15);
if ( (((_BYTE)v7 + ((_BYTE)v5 << 6) - *((_BYTE *)a2 + 16)) & 0x3F) != 0 )
{
if ( v15 + 1 >= v5 )
v18 = 0LL;
else
v18 = *(_QWORD *)(v13 + 8 * v15 + 8);
v17 = (v18 << -v16) | (v17 >> v14);
}
if ( (v17 & 7) != 1 )
return 0;
v21 = *(_QWORD **)a1;
v22 = 0;
v23 = 0x8000000000000000LL;
v24 = 0LL;
bf_set(&v21, (long long)a2);
v23 -= v7;
if ( a3 <= 0 )
{
LABEL_28:
*(_QWORD *)(a1 + 16) += v12;
return 1;
}
else
{
v19 = 0LL;
while ( 1 )
{
if ( v19 )
bf_set(&v21, a1);
v11 = 0;
if ( (unsigned int)bf_sqrtrem((_QWORD **)a1, 0LL, (long long)&v21) )
break;
if ( a3 == ++v19 )
goto LABEL_28;
}
}
return v11;
}
|
check_exact_power2n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RDI
MOV RDX,qword ptr [RSI + 0x18]
TEST RDX,RDX
JZ 0x0018e163
MOV RCX,qword ptr [RSI + 0x20]
MOV RAX,RDX
SHL RAX,0x6
XOR R13D,R13D
XOR EDI,EDI
LAB_0018e14c:
MOV R8,qword ptr [RCX + RDI*0x8]
TEST R8,R8
JNZ 0x0018e168
INC RDI
ADD RAX,-0x40
CMP RDX,RDI
JNZ 0x0018e14c
JMP 0x0018e173
LAB_0018e163:
XOR R13D,R13D
JMP 0x0018e173
LAB_0018e168:
BSF R13,R8
ADD R13,qword ptr [RSI + 0x10]
SUB R13,RAX
LAB_0018e173:
MOV RDI,qword ptr [R14]
CMP RBX,0x40
JL 0x0018e18c
XOR R12D,R12D
TEST R13,R13
JNZ 0x0018e27b
XOR EBP,EBP
JMP 0x0018e1ac
LAB_0018e18c:
MOV RAX,-0x1
MOV ECX,EBX
SHL RAX,CL
NOT RAX
TEST R13,RAX
JNZ 0x0018e278
MOV RBP,R13
MOV ECX,EBX
SAR RBP,CL
LAB_0018e1ac:
MOV R9,qword ptr [RSI + 0x20]
MOV RCX,RDX
SHL RCX,0x6
SUB RCX,qword ptr [RSI + 0x10]
ADD RCX,R13
MOV R10,RCX
SAR R10,0x6
MOV EAX,ECX
AND EAX,0x3f
CMP R10,RDX
JNC 0x0018e1d5
MOV R8,qword ptr [R9 + R10*0x8]
JMP 0x0018e1d8
LAB_0018e1d5:
XOR R8D,R8D
LAB_0018e1d8:
TEST EAX,EAX
JZ 0x0018e1fb
LEA R11,[R10 + 0x1]
CMP R11,RDX
JNC 0x0018e1ec
MOV RDX,qword ptr [R9 + R10*0x8 + 0x8]
JMP 0x0018e1ee
LAB_0018e1ec:
XOR EDX,EDX
LAB_0018e1ee:
SHR R8,CL
NEG AL
MOV ECX,EAX
SHL RDX,CL
OR R8,RDX
LAB_0018e1fb:
AND R8D,0x7
CMP R8D,0x1
JNZ 0x0018e278
MOV R15,RSP
MOV qword ptr [R15],RDI
MOV dword ptr [R15 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R15 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x18],XMM0
MOV RDI,R15
CALL 0x00186a9a
SUB qword ptr [R15 + 0x10],R13
TEST RBX,RBX
JLE 0x0018e26c
XOR R13D,R13D
MOV R15,RSP
LAB_0018e240:
TEST R13,R13
JZ 0x0018e250
MOV RDI,R15
MOV RSI,R14
CALL 0x00186a9a
LAB_0018e250:
XOR R12D,R12D
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R15
CALL 0x00189460
TEST EAX,EAX
JNZ 0x0018e27b
INC R13
CMP RBX,R13
JNZ 0x0018e240
LAB_0018e26c:
ADD qword ptr [R14 + 0x10],RBP
MOV R12D,0x1
JMP 0x0018e27b
LAB_0018e278:
XOR R12D,R12D
LAB_0018e27b:
MOV EAX,R12D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 check_exact_power2n(int8 *param_1,long param_2,long param_3)
{
ulong uVar1;
int iVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
int8 local_58;
int4 local_50;
long local_48;
int8 local_40;
int8 uStack_38;
uVar1 = *(ulong *)(param_2 + 0x18);
if (uVar1 == 0) {
uVar7 = 0;
}
else {
lVar3 = uVar1 << 6;
uVar7 = 0;
uVar4 = 0;
do {
uVar6 = *(ulong *)(*(long *)(param_2 + 0x20) + uVar4 * 8);
if (uVar6 != 0) {
lVar8 = 0;
if (uVar6 != 0) {
for (; (uVar6 >> lVar8 & 1) == 0; lVar8 = lVar8 + 1) {
}
}
uVar7 = (lVar8 + *(long *)(param_2 + 0x10)) - lVar3;
break;
}
uVar4 = uVar4 + 1;
lVar3 = lVar3 + -0x40;
} while (uVar1 != uVar4);
}
local_58 = *param_1;
if (param_3 < 0x40) {
if ((uVar7 & ~(-1L << ((byte)param_3 & 0x3f))) != 0) {
return 0;
}
lVar3 = (long)uVar7 >> ((byte)param_3 & 0x3f);
}
else {
if (uVar7 != 0) {
return 0;
}
lVar3 = 0;
}
uVar4 = (uVar1 * 0x40 - *(long *)(param_2 + 0x10)) + uVar7;
uVar6 = (long)uVar4 >> 6;
if (uVar6 < uVar1) {
uVar5 = *(ulong *)(*(long *)(param_2 + 0x20) + uVar6 * 8);
}
else {
uVar5 = 0;
}
if ((uVar4 & 0x3f) != 0) {
if (uVar6 + 1 < uVar1) {
lVar8 = *(long *)(*(long *)(param_2 + 0x20) + 8 + uVar6 * 8);
}
else {
lVar8 = 0;
}
uVar5 = uVar5 >> ((byte)uVar4 & 0x3f) | lVar8 << (-((byte)uVar4 & 0x3f) & 0x3f);
}
if (((uint)uVar5 & 7) != 1) {
return 0;
}
local_50 = 0;
local_48 = -0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
bf_set(&local_58);
local_48 = local_48 - uVar7;
if (0 < param_3) {
lVar8 = 0;
do {
if (lVar8 != 0) {
bf_set(&local_58,param_1);
}
iVar2 = bf_sqrtrem(param_1,0,&local_58);
if (iVar2 != 0) {
return 0;
}
lVar8 = lVar8 + 1;
} while (param_3 != lVar8);
}
param_1[2] = param_1[2] + lVar3;
return 1;
}
|
|
57,033
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const
|
monkey531[P]llama/common/json.hpp
|
const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xaa26e
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0xaa25c
cmpl $0x2, %eax
jne 0xaa265
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0xaa256
leaq 0x30(%rbx), %rdi
callq 0xacfa9
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0xaa269
movq %rbx, %rdi
popq %rbx
jmp 0x8bfa8
addq $0x50, %rbx
movq %rbx, %rax
popq %rbx
retq
leaq 0x42964(%rip), %rdi # 0xecbd9
leaq 0x429a7(%rip), %rdx # 0xecc23
leaq 0x47c53(%rip), %rcx # 0xf1ed6
movl $0x1491, %esi # imm = 0x1491
xorl %eax, %eax
callq 0x1ae30
nop
|
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
push rbx
mov rax, [rdi]
test rax, rax
jz short loc_AA26E
mov rbx, rdi
movzx eax, byte ptr [rax]
cmp eax, 1
jz short loc_AA25C
cmp eax, 2
jnz short loc_AA265
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_AA256
lea rdi, [rbx+30h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, [rbx+20h]
mov [rbx+28h], rax
loc_AA256:
add rbx, 30h ; '0'
jmp short loc_AA269
loc_AA25C:
mov rdi, rbx
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void)
loc_AA265:
add rbx, 50h ; 'P'
loc_AA269:
mov rax, rbx
pop rbx
retn
loc_AA26E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr"
mov esi, 1491h
xor eax, eax
call _ggml_abort
nop
|
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::key(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 1 )
{
return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::key(a1);
}
else
{
if ( v1 != 2 )
return (long long)(a1 + 10);
if ( a1[4] != a1[5] )
{
nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6);
a1[5] = a1[4];
}
return (long long)(a1 + 6);
}
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
5265LL,
"GGML_ASSERT(%s) failed",
"anchor.m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
|
key:
PUSH RBX
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001aa26e
MOV RBX,RDI
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JZ 0x001aa25c
CMP EAX,0x2
JNZ 0x001aa265
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x001aa256
LEA RDI,[RBX + 0x30]
CALL 0x001acfa9
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],RAX
LAB_001aa256:
ADD RBX,0x30
JMP 0x001aa269
LAB_001aa25c:
MOV RDI,RBX
POP RBX
JMP 0x0018bfa8
LAB_001aa265:
ADD RBX,0x50
LAB_001aa269:
MOV RAX,RBX
POP RBX
RET
LAB_001aa26e:
LEA RDI,[0x1ecbd9]
LEA RDX,[0x1ecc23]
LEA RCX,[0x1f1ed6]
MOV ESI,0x1491
XOR EAX,EAX
CALL 0x0011ae30
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const> >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*this)
{
char cVar1;
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*piVar2;
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491,
"GGML_ASSERT(%s) failed","anchor.m_object != nullptr");
}
cVar1 = **(char **)this;
if (cVar1 != '\x01') {
if (cVar1 == '\x02') {
if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
piVar2 = this + 0x30;
}
else {
piVar2 = this + 0x50;
}
return piVar2;
}
piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)this);
return piVar2;
}
|
|
57,034
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const
|
monkey531[P]llama/common/json.hpp
|
const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x7f316
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x7f304
cmpl $0x2, %eax
jne 0x7f30d
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x7f2fe
leaq 0x30(%rbx), %rdi
callq 0x7f3b7
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0x7f311
movq %rbx, %rdi
popq %rbx
jmp 0x7f3ea
addq $0x50, %rbx
movq %rbx, %rax
popq %rbx
retq
leaq 0x2f8bf(%rip), %rdi # 0xaebdc
leaq 0x2f902(%rip), %rdx # 0xaec26
leaq 0x34b8b(%rip), %rcx # 0xb3eb6
movl $0x1491, %esi # imm = 0x1491
xorl %eax, %eax
callq 0x23e40
nop
|
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
push rbx
mov rax, [rdi]
test rax, rax
jz short loc_7F316
mov rbx, rdi
movzx eax, byte ptr [rax]
cmp eax, 1
jz short loc_7F304
cmp eax, 2
jnz short loc_7F30D
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_7F2FE
lea rdi, [rbx+30h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, [rbx+20h]
mov [rbx+28h], rax
loc_7F2FE:
add rbx, 30h ; '0'
jmp short loc_7F311
loc_7F304:
mov rdi, rbx
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void)
loc_7F30D:
add rbx, 50h ; 'P'
loc_7F311:
mov rax, rbx
pop rbx
retn
loc_7F316:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr"
mov esi, 1491h
xor eax, eax
call _ggml_abort
nop
|
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 1 )
{
return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(a1);
}
else
{
if ( v1 != 2 )
return (long long)(a1 + 10);
if ( a1[4] != a1[5] )
{
nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6);
a1[5] = a1[4];
}
return (long long)(a1 + 6);
}
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
5265LL,
"GGML_ASSERT(%s) failed",
"anchor.m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::operator++("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
|
key:
PUSH RBX
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0017f316
MOV RBX,RDI
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JZ 0x0017f304
CMP EAX,0x2
JNZ 0x0017f30d
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x0017f2fe
LEA RDI,[RBX + 0x30]
CALL 0x0017f3b7
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],RAX
LAB_0017f2fe:
ADD RBX,0x30
JMP 0x0017f311
LAB_0017f304:
MOV RDI,RBX
POP RBX
JMP 0x0017f3ea
LAB_0017f30d:
ADD RBX,0x50
LAB_0017f311:
MOV RAX,RBX
POP RBX
RET
LAB_0017f316:
LEA RDI,[0x1aebdc]
LEA RDX,[0x1aec26]
LEA RCX,[0x1b3eb6]
MOV ESI,0x1491
XOR EAX,EAX
CALL 0x00123e40
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this)
{
char cVar1;
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*piVar2;
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491,
"GGML_ASSERT(%s) failed","anchor.m_object != nullptr");
}
cVar1 = **(char **)this;
if (cVar1 != '\x01') {
if (cVar1 == '\x02') {
if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
piVar2 = this + 0x30;
}
else {
piVar2 = this + 0x50;
}
return piVar2;
}
piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)this);
return piVar2;
}
|
|
57,035
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const
|
monkey531[P]llama/common/json.hpp
|
const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xac684
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0xac672
cmpl $0x2, %eax
jne 0xac67b
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0xac66c
leaq 0x30(%rbx), %rdi
callq 0xac739
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0xac67f
movq %rbx, %rdi
popq %rbx
jmp 0xac7fa
addq $0x50, %rbx
movq %rbx, %rax
popq %rbx
retq
leaq 0x3e54e(%rip), %rdi # 0xeabd9
leaq 0x3e591(%rip), %rdx # 0xeac23
leaq 0x4382d(%rip), %rcx # 0xefec6
movl $0x1491, %esi # imm = 0x1491
xorl %eax, %eax
callq 0x1ae30
nop
|
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
push rbx
mov rax, [rdi]
test rax, rax
jz short loc_AC684
mov rbx, rdi
movzx eax, byte ptr [rax]
cmp eax, 1
jz short loc_AC672
cmp eax, 2
jnz short loc_AC67B
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_AC66C
lea rdi, [rbx+30h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, [rbx+20h]
mov [rbx+28h], rax
loc_AC66C:
add rbx, 30h ; '0'
jmp short loc_AC67F
loc_AC672:
mov rdi, rbx
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void)
loc_AC67B:
add rbx, 50h ; 'P'
loc_AC67F:
mov rax, rbx
pop rbx
retn
loc_AC684:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr"
mov esi, 1491h
xor eax, eax
call _ggml_abort
nop
|
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 1 )
{
return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(a1);
}
else
{
if ( v1 != 2 )
return (long long)(a1 + 10);
if ( a1[4] != a1[5] )
{
nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6);
a1[5] = a1[4];
}
return (long long)(a1 + 6);
}
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
5265LL,
"GGML_ASSERT(%s) failed",
"anchor.m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
|
key:
PUSH RBX
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001ac684
MOV RBX,RDI
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JZ 0x001ac672
CMP EAX,0x2
JNZ 0x001ac67b
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x001ac66c
LEA RDI,[RBX + 0x30]
CALL 0x001ac739
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],RAX
LAB_001ac66c:
ADD RBX,0x30
JMP 0x001ac67f
LAB_001ac672:
MOV RDI,RBX
POP RBX
JMP 0x001ac7fa
LAB_001ac67b:
ADD RBX,0x50
LAB_001ac67f:
MOV RAX,RBX
POP RBX
RET
LAB_001ac684:
LEA RDI,[0x1eabd9]
LEA RDX,[0x1eac23]
LEA RCX,[0x1efec6]
MOV ESI,0x1491
XOR EAX,EAX
CALL 0x0011ae30
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this)
{
char cVar1;
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*piVar2;
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491,
"GGML_ASSERT(%s) failed","anchor.m_object != nullptr");
}
cVar1 = **(char **)this;
if (cVar1 != '\x01') {
if (cVar1 == '\x02') {
if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
piVar2 = this + 0x30;
}
else {
piVar2 = this + 0x50;
}
return piVar2;
}
piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)this);
return piVar2;
}
|
|
57,036
|
map_decref_record
|
bluesky950520[P]quickjs/quickjs.c
|
static void map_decref_record(JSRuntime *rt, JSMapRecord *mr)
{
if (--mr->ref_count == 0) {
/* the record can be safely removed */
assert(mr->empty);
list_del(&mr->link);
js_free_rt(rt, mr);
}
}
|
O1
|
c
|
map_decref_record:
decl (%rsi)
je 0x3b47c
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
decq 0x28(%rdi)
movq %rsi, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
|
map_decref_record:
dec dword ptr [rsi]
jz short loc_3B47C
retn
loc_3B47C:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rax, [rsi+10h]
mov rcx, [rsi+18h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rsi+10h], xmm0
dec qword ptr [rdi+28h]
mov rdi, rsi
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rcx
|
long long map_decref_record(long long a1, long long a2)
{
long long v3; // rax
_QWORD *v4; // rcx
long long v5; // rax
long long ( *v6)(_QWORD, long long); // rcx
long long result; // rax
if ( (*(_DWORD *)a2)-- == 1 )
{
v3 = *(_QWORD *)(a2 + 16);
v4 = *(_QWORD **)(a2 + 24);
*(_QWORD *)(v3 + 8) = v4;
*v4 = v3;
*(_OWORD *)(a2 + 16) = 0LL;
--*(_QWORD *)(a1 + 40);
v5 = (*(long long ( **)(long long))(a1 + 32))(a2);
v6 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v5 - 8;
return v6(*(_QWORD *)(a1 + 64), a2);
}
return result;
}
| |||
57,037
|
map_decref_record
|
bluesky950520[P]quickjs/quickjs.c
|
static void map_decref_record(JSRuntime *rt, JSMapRecord *mr)
{
if (--mr->ref_count == 0) {
/* the record can be safely removed */
assert(mr->empty);
list_del(&mr->link);
js_free_rt(rt, mr);
}
}
|
O2
|
c
|
map_decref_record:
decl (%rsi)
je 0x3423c
retq
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
jmp 0x170cb
|
map_decref_record:
dec dword ptr [rsi]
jz short loc_3423C
retn
loc_3423C:
mov rax, [rsi+10h]
mov rcx, [rsi+18h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rsi+10h], xmm0
jmp js_free_rt
|
long long map_decref_record(long long a1, long long a2)
{
long long v3; // rax
_QWORD *v4; // rcx
long long result; // rax
if ( (*(_DWORD *)a2)-- == 1 )
{
v3 = *(_QWORD *)(a2 + 16);
v4 = *(_QWORD **)(a2 + 24);
*(_QWORD *)(v3 + 8) = v4;
*v4 = v3;
*(_OWORD *)(a2 + 16) = 0LL;
return js_free_rt(a1, a2);
}
return result;
}
|
map_decref_record:
DEC dword ptr [RSI]
JZ 0x0013423c
RET
LAB_0013423c:
MOV RAX,qword ptr [RSI + 0x10]
MOV RCX,qword ptr [RSI + 0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x10],XMM0
JMP 0x001170cb
|
void map_decref_record(int8 param_1,int *param_2)
{
long lVar1;
long *plVar2;
*param_2 = *param_2 + -1;
if (*param_2 != 0) {
return;
}
lVar1 = *(long *)(param_2 + 4);
plVar2 = *(long **)(param_2 + 6);
*(long **)(lVar1 + 8) = plVar2;
*plVar2 = lVar1;
param_2[4] = 0;
param_2[5] = 0;
param_2[6] = 0;
param_2[7] = 0;
js_free_rt();
return;
}
|
|
57,038
|
testing::internal::StreamingListener::OnTestSuiteStart(testing::TestSuite const&)
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
void OnTestSuiteStart(const TestSuite& test_suite) override {
SendLn(std::string("event=TestCaseStart&name=") + test_suite.name());
}
|
O3
|
c
|
testing::internal::StreamingListener::OnTestSuiteStart(testing::TestSuite const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xec1f(%rip), %rsi # 0x88657
leaq 0xec31(%rip), %rdx # 0x88670
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x19014
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x25290
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x79a7f
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x79a86
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rbx), %rdi
callq 0x7afe6
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x79ac2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x79ad9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x79b04
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x79b04
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x79b1b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
movq %rbx, %rdi
callq 0x11760
nop
|
_ZN7testing8internal17StreamingListener16OnTestSuiteStartERKNS_9TestSuiteE:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+68h+var_30]
mov [r12-10h], r12
lea rsi, aEventTestcases; "event=TestCaseStart&name="
lea rdx, aEventTestcases+19h; ""
lea r15, [rsp+68h+var_40]
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)
mov rsi, [r14+8]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r14, [rsp+68h+var_50]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_79A7F
mov [rsp+68h+var_60], rdx
mov rdx, [rcx]
mov [rsp+68h+var_50], rdx
jmp short loc_79A86
loc_79A7F:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_79A86:
mov rdx, [rax+8]
lea rsi, [rsp+68h+var_60]
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+68h+var_60]; void *
cmp rdi, r14
jz short loc_79AC2
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79AC2:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r12
jz short loc_79AD9
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79AD9:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_79B04
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_79B04
mov rbx, rax
loc_79B04:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_79B1B
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79B1B:
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::StreamingListener::OnTestSuiteStart(
testing::internal::StreamingListener *this,
const testing::TestSuite *a2)
{
long long v2; // rax
int v3; // r8d
int v4; // r9d
__int128 *v5; // rcx
int v6; // edx
void *v7; // [rsp+8h] [rbp-60h] BYREF
long long v8; // [rsp+10h] [rbp-58h]
__int128 v9; // [rsp+18h] [rbp-50h] BYREF
void *v10[2]; // [rsp+28h] [rbp-40h] BYREF
_QWORD v11[6]; // [rsp+38h] [rbp-30h] BYREF
v10[0] = v11;
std::string::_M_construct<char const*>(v10, "event=TestCaseStart&name=", (long long)"");
v2 = std::string::append((long long)v10, *((_QWORD *)a2 + 1));
v7 = &v9;
v5 = (__int128 *)(v2 + 16);
if ( *(_QWORD *)v2 == v2 + 16 )
{
v9 = *v5;
}
else
{
v7 = *(void **)v2;
*(_QWORD *)&v9 = *(_QWORD *)v5;
}
v8 = *(_QWORD *)(v2 + 8);
v6 = v8;
*(_QWORD *)v2 = v5;
*(_QWORD *)(v2 + 8) = 0LL;
*(_BYTE *)(v2 + 16) = 0;
testing::internal::StreamingListener::AbstractSocketWriter::SendLn(
*((_QWORD *)this + 1),
(unsigned int)&v7,
v6,
(_DWORD)v5,
v3,
v4);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
}
|
OnTestSuiteStart:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x188657]
LEA RDX,[0x188670]
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x00119014
MOV RSI,qword ptr [R14 + 0x8]
LAB_00179a50:
MOV RDI,R15
CALL 0x00125290
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00179a7f
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00179a86
LAB_00179a7f:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_00179a86:
MOV RDX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
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_00179aa6:
CALL 0x0017afe6
LAB_00179aab:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x00179ac2
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00111120
LAB_00179ac2:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00179ad9
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00111120
LAB_00179ad9:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* testing::internal::StreamingListener::OnTestSuiteStart(testing::TestSuite const&) */
void __thiscall
testing::internal::StreamingListener::OnTestSuiteStart(StreamingListener *this,TestSuite *param_1)
{
long *plVar1;
long *plVar2;
long *local_60;
long local_58;
long local_50;
long lStack_48;
long *local_40 [2];
long local_30 [2];
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>((string *)local_40,"event=TestCaseStart&name=","")
;
/* try { // try from 00179a50 to 00179a57 has its CatchHandler @ 00179b01 */
plVar1 = (long *)std::__cxx11::string::append((string *)local_40,*(char **)(param_1 + 8));
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_50 = *plVar2;
lStack_48 = plVar1[3];
local_60 = &local_50;
}
else {
local_50 = *plVar2;
local_60 = (long *)*plVar1;
}
local_58 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 00179aa6 to 00179aaa has its CatchHandler @ 00179ae5 */
AbstractSocketWriter::SendLn(*(AbstractSocketWriter **)(this + 8),(string *)&local_60);
if (local_60 != &local_50) {
operator_delete(local_60,local_50 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return;
}
|
|
57,039
|
js_init_module_os
|
bluesky950520[P]quickjs/quickjs-libc.c
|
JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name)
{
JSModuleDef *m;
m = JS_NewCModule(ctx, module_name, js_os_init);
if (!m)
return NULL;
JS_AddModuleExportList(ctx, m, js_os_funcs, countof(js_os_funcs));
#ifdef USE_WORKER
JS_AddModuleExport(ctx, m, "Worker");
#endif
return m;
}
|
O1
|
c
|
js_init_module_os:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x45(%rip), %rdx # 0x14d80
callq 0x30853
testq %rax, %rax
je 0x14d73
movq %rax, %rbx
leaq 0xb1e61(%rip), %rdx # 0xc6bb0
movq %r14, %rdi
movq %rax, %rsi
movl $0x4a, %ecx
callq 0x33050
leaq 0x86bff(%rip), %rdx # 0x9b965
movq %r14, %rdi
movq %rbx, %rsi
callq 0x30893
jmp 0x14d75
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_init_module_os:
push r14
push rbx
push rax
mov r14, rdi
lea rdx, js_os_init
call JS_NewCModule
test rax, rax
jz short loc_14D73
mov rbx, rax
lea rdx, js_os_funcs
mov rdi, r14
mov rsi, rax
mov ecx, 4Ah ; 'J'
call JS_AddModuleExportList
lea rdx, aWorker; "Worker"
mov rdi, r14
mov rsi, rbx
call JS_AddModuleExport
jmp short loc_14D75
loc_14D73:
xor ebx, ebx
loc_14D75:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
long long js_init_module_os(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
v2 = JS_NewCModule(a1, a2, js_os_init);
if ( !v2 )
return 0LL;
v3 = v2;
JS_AddModuleExportList(a1, v2, &js_os_funcs, 74LL);
JS_AddModuleExport(a1, v3, "Worker");
return v3;
}
|
js_init_module_os:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
LEA RDX,[0x114d80]
CALL 0x00130853
TEST RAX,RAX
JZ 0x00114d73
MOV RBX,RAX
LEA RDX,[0x1c6bb0]
MOV RDI,R14
MOV RSI,RAX
MOV ECX,0x4a
CALL 0x00133050
LEA RDX,[0x19b965]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00130893
JMP 0x00114d75
LAB_00114d73:
XOR EBX,EBX
LAB_00114d75:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
long js_init_module_os(int8 param_1,int8 param_2)
{
long lVar1;
lVar1 = JS_NewCModule(param_1,param_2,js_os_init);
if (lVar1 == 0) {
lVar1 = 0;
}
else {
JS_AddModuleExportList(param_1,lVar1,js_os_funcs,0x4a);
JS_AddModuleExport(param_1,lVar1,"Worker");
}
return lVar1;
}
|
|
57,040
|
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>::empty() const
|
monkey531[P]llama/common/json.hpp
|
bool empty() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return true;
}
case value_t::array:
{
// delegate call to array_t::empty()
return m_data.m_value.array->empty();
}
case value_t::object:
{
// delegate call to object_t::empty()
return m_data.m_value.object->empty();
}
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types are nonempty
return false;
}
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::empty() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x63ab0
cmpl $0x1, %eax
je 0x63aa1
cmpl $0x2, %eax
jne 0x63ab3
movq 0x8(%rdi), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
sete %al
retq
movb $0x1, %al
retq
xorl %eax, %eax
retq
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_63AB0
cmp eax, 1
jz short loc_63AA1
cmp eax, 2
jnz short loc_63AB3
loc_63AA1:
mov rax, [rdi+8]
mov rcx, [rax]
cmp rcx, [rax+8]
setz al
retn
loc_63AB0:
mov al, 1
retn
loc_63AB3:
xor eax, eax
retn
|
bool 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>::empty(
unsigned __int8 *a1)
{
int v1; // eax
v1 = *a1;
if ( !*a1 )
return 1;
if ( v1 == 1 || v1 == 2 )
return **((_QWORD **)a1 + 1) == *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
return 0;
}
|
empty:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x00163ab0
CMP EAX,0x1
JZ 0x00163aa1
CMP EAX,0x2
JNZ 0x00163ab3
LAB_00163aa1:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
SETZ AL
RET
LAB_00163ab0:
MOV AL,0x1
RET
LAB_00163ab3:
XOR EAX,EAX
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::empty() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::empty(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
long *plVar2;
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
return 1;
}
if ((bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) &&
(bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2)) {
return 0;
}
plVar2 = *(long **)(this + 8);
return CONCAT71((int7)((ulong)plVar2 >> 8),*plVar2 == plVar2[1]);
}
|
|
57,041
|
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>>>>>::reset()
|
monkey531[P]llama/common/json.hpp
|
void reset() noexcept
{
token_buffer.clear();
token_string.clear();
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
|
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>>>>>::reset():
pushq %rax
movq %rdi, %rax
movq $0x0, 0x58(%rdi)
movq 0x50(%rdi), %rcx
movb $0x0, (%rcx)
addq $0x38, %rdi
movq 0x38(%rax), %rcx
cmpq %rcx, 0x40(%rax)
je 0x4b337
movq %rcx, 0x40(%rax)
movb 0x14(%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
callq 0x3ed68
popq %rax
retq
movq %rax, %rdi
callq 0x20d37
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv:
push rax
mov rax, rdi
mov qword ptr [rdi+58h], 0
mov rcx, [rdi+50h]
mov byte ptr [rcx], 0
add rdi, 38h ; '8'
mov rcx, [rax+38h]
cmp [rax+40h], rcx
jz short loc_4B337
mov [rax+40h], rcx
loc_4B337:
mov al, [rax+14h]
lea rsi, [rsp+8+var_1]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
pop rax
retn
mov rdi, rax
call __clang_call_terminate
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> 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>>>::reset(
long long a1)
{
long long v2; // rdi
long long v3; // rcx
char v4; // [rsp+1h] [rbp-1h] BYREF
*(_QWORD *)(a1 + 88) = 0LL;
**(_BYTE **)(a1 + 80) = 0;
v2 = a1 + 56;
v3 = *(_QWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 64) != v3 )
*(_QWORD *)(a1 + 64) = v3;
v4 = *(_BYTE *)(a1 + 20);
std::vector<char>::emplace_back<char>(v2, &v4);
}
|
reset:
PUSH RAX
MOV RAX,RDI
MOV qword ptr [RDI + 0x58],0x0
MOV RCX,qword ptr [RDI + 0x50]
MOV byte ptr [RCX],0x0
ADD RDI,0x38
MOV RCX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x40],RCX
JZ 0x0014b337
MOV qword ptr [RAX + 0x40],RCX
LAB_0014b337:
MOV AL,byte ptr [RAX + 0x14]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LAB_0014b341:
CALL 0x0013ed68
POP RAX
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 > > >::reset() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int8 in_RAX;
int8 uStack_8;
*(int8 *)(this + 0x58) = 0;
**(int1 **)(this + 0x50) = 0;
if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) {
*(long *)(this + 0x40) = *(long *)(this + 0x38);
}
uStack_8 = CONCAT17(this[0x14],(int7)in_RAX);
/* try { // try from 0014b341 to 0014b345 has its CatchHandler @ 0014b348 */
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7));
return uStack_8;
}
|
|
57,042
|
LefDefParser::defiBlockage::setLayer(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiBlockage.cpp
|
void defiBlockage::setLayer(const char* name) {
int len = strlen(name) + 1;
if (layerNameLength_ < len) {
if (layerName_) free(layerName_);
layerName_ = (char*)malloc(len);
layerNameLength_ = len;
}
strcpy(layerName_, defData->DEFCASE(name));
hasLayer_ = 1;
}
|
O3
|
cpp
|
LefDefParser::defiBlockage::setLayer(char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x60d0
movq %rax, %r12
incl %r12d
movq 0x8(%rbx), %r15
cmpl %r12d, 0x10(%rbx)
jge 0x2ac7b
testq %r15, %r15
je 0x2ac65
movq %r15, %rdi
callq 0x6220
movslq %r12d, %r12
movq %r12, %rdi
callq 0x6270
movq %rax, %r15
movq %rax, 0x8(%rbx)
movl %r12d, 0x10(%rbx)
movq 0x90(%rbx), %rdi
movq %r14, %rsi
callq 0x18aa0
movq %r15, %rdi
movq %rax, %rsi
callq 0x6190
movl $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZN12LefDefParser12defiBlockage8setLayerEPKc:
push r15
push r14
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
call _strlen
mov r12, rax
inc r12d
mov r15, [rbx+8]
cmp [rbx+10h], r12d
jge short loc_2AC7B
test r15, r15
jz short loc_2AC65
mov rdi, r15
call _free
loc_2AC65:
movsxd r12, r12d
mov rdi, r12
call _malloc
mov r15, rax
mov [rbx+8], rax
mov [rbx+10h], r12d
loc_2AC7B:
mov rdi, [rbx+90h]; this
mov rsi, r14; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
mov dword ptr [rbx], 1
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long LefDefParser::defiBlockage::setLayer(LefDefParser::defiBlockage *this, const char *a2)
{
int v2; // r12d
long long v3; // r15
const char *v4; // rax
long long result; // rax
v2 = strlen(a2) + 1;
v3 = *((_QWORD *)this + 1);
if ( *((_DWORD *)this + 4) < v2 )
{
if ( v3 )
free(*((_QWORD *)this + 1));
v3 = malloc(v2);
*((_QWORD *)this + 1) = v3;
*((_DWORD *)this + 4) = v2;
}
v4 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 18), a2);
result = strcpy(v3, v4);
*(_DWORD *)this = 1;
return result;
}
|
setLayer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001060d0
MOV R12,RAX
INC R12D
MOV R15,qword ptr [RBX + 0x8]
CMP dword ptr [RBX + 0x10],R12D
JGE 0x0012ac7b
TEST R15,R15
JZ 0x0012ac65
MOV RDI,R15
CALL 0x00106220
LAB_0012ac65:
MOVSXD R12,R12D
MOV RDI,R12
CALL 0x00106270
MOV R15,RAX
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX + 0x10],R12D
LAB_0012ac7b:
MOV RDI,qword ptr [RBX + 0x90]
MOV RSI,R14
CALL 0x00118aa0
MOV RDI,R15
MOV RSI,RAX
CALL 0x00106190
MOV dword ptr [RBX],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* LefDefParser::defiBlockage::setLayer(char const*) */
void __thiscall LefDefParser::defiBlockage::setLayer(defiBlockage *this,char *param_1)
{
size_t sVar1;
char *__dest;
char *__src;
int iVar2;
sVar1 = strlen(param_1);
iVar2 = (int)sVar1 + 1;
__dest = *(char **)(this + 8);
if (*(int *)(this + 0x10) < iVar2) {
if (__dest != (char *)0x0) {
free(__dest);
}
__dest = (char *)malloc((long)iVar2);
*(char **)(this + 8) = __dest;
*(int *)(this + 0x10) = iVar2;
}
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x90),param_1);
strcpy(__dest,__src);
*(int4 *)this = 1;
return;
}
|
|
57,043
|
js_dataview_get_byteOffset
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_dataview_get_byteOffset(JSContext *ctx, JSValue this_val)
{
JSTypedArray *ta;
JSObject *p;
p = get_dataview(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (dataview_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
ta = p->u.typed_array;
return js_uint32(ta->offset);
}
|
O0
|
c
|
js_dataview_get_byteOffset:
subq $0x38, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0xe3d20
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0xe3305
movl $0x0, 0x28(%rsp)
movq $0x6, 0x30(%rsp)
jmp 0xe334d
movq (%rsp), %rdi
callq 0xe3da0
cmpl $0x0, %eax
je 0xe3329
movq 0x10(%rsp), %rdi
callq 0x57820
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
jmp 0xe334d
movq (%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0x20(%rax), %edi
callq 0x328a0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
addq $0x38, %rsp
retq
nopl (%rax)
|
js_dataview_get_byteOffset:
sub rsp, 38h
mov [rsp+38h+var_20], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_28], rdi
mov rdi, [rsp+38h+var_28]
mov rsi, [rsp+38h+var_20]
mov rdx, [rsp+38h+var_18]
call get_dataview
mov [rsp+38h+var_38], rax
cmp [rsp+38h+var_38], 0
jnz short loc_E3305
mov dword ptr [rsp+38h+var_10], 0
mov [rsp+38h+var_8], 6
jmp short loc_E334D
loc_E3305:
mov rdi, [rsp+38h+var_38]
call dataview_is_oob
cmp eax, 0
jz short loc_E3329
mov rdi, [rsp+38h+var_28]
call JS_ThrowTypeErrorArrayBufferOOB
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
jmp short loc_E334D
loc_E3329:
mov rax, [rsp+38h+var_38]
mov rax, [rax+30h]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
mov edi, [rax+20h]
call js_uint32
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
loc_E334D:
mov rax, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long js_dataview_get_byteOffset(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
long long dataview; // [rsp+0h] [rbp-38h]
long long v19; // [rsp+28h] [rbp-10h]
dataview = get_dataview(a1, a2, a3);
if ( dataview )
{
if ( (unsigned int)dataview_is_oob(dataview) )
return JS_ThrowTypeErrorArrayBufferOOB(a1, a4, a5, a6, a7, v15, v16, a10, a11, a2, v11, v12, v13, v14);
else
return js_uint32(*(_DWORD *)(*(_QWORD *)(dataview + 48) + 32LL));
}
else
{
LODWORD(v19) = 0;
}
return v19;
}
|
js_dataview_get_byteOffset:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x001e3d20
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JNZ 0x001e3305
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x6
JMP 0x001e334d
LAB_001e3305:
MOV RDI,qword ptr [RSP]
CALL 0x001e3da0
CMP EAX,0x0
JZ 0x001e3329
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00157820
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
JMP 0x001e334d
LAB_001e3329:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV EDI,dword ptr [RAX + 0x20]
CALL 0x001328a0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
LAB_001e334d:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int1 [16]
js_dataview_get_byteOffset(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
long lVar2;
int1 auVar3 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
lVar2 = get_dataview(param_1,param_2,param_3);
if (lVar2 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
iVar1 = dataview_is_oob(lVar2);
if (iVar1 == 0) {
auVar3 = js_uint32(*(int4 *)(*(long *)(lVar2 + 0x30) + 0x20));
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else {
auVar3 = JS_ThrowTypeErrorArrayBufferOOB(param_1);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
|
|
57,044
|
js_dataview_get_byteOffset
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_dataview_get_byteOffset(JSContext *ctx, JSValue this_val)
{
JSTypedArray *ta;
JSObject *p;
p = get_dataview(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (dataview_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
ta = p->u.typed_array;
return js_uint32(ta->offset);
}
|
O1
|
c
|
js_dataview_get_byteOffset:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x82e2e
movq 0x8(%rsp), %r15
cmpw $0x21, 0x6(%r15)
je 0x82e42
leaq 0x1e20c(%rip), %rsi # 0xa1041
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %ebx
testq %r15, %r15
je 0x82e6e
movq %r15, %rdi
callq 0x8339d
testl %eax, %eax
je 0x82e75
leaq 0x1debb(%rip), %rsi # 0xa0d1a
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x21953
jmp 0x82e71
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0x82eab
movq 0x30(%r15), %rax
movslq 0x20(%rax), %rax
xorl %ecx, %ecx
movl %eax, %edx
cvtsi2sd %rdx, %xmm0
testq %rax, %rax
movq %xmm0, %rdx
cmovnsq %rax, %rdx
movl $0x7, %ebx
cmovnsq %rcx, %rbx
movabsq $0x7fffffff00000000, %rax # imm = 0x7FFFFFFF00000000
andq %rdx, %rax
movl %edx, %r15d
orq %rax, %r15
movq %r15, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
js_dataview_get_byteOffset:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdi
mov [rsp+28h+var_20], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_82E2E
mov r15, [rsp+28h+var_20]
cmp word ptr [r15+6], 21h ; '!'
jz short loc_82E42
loc_82E2E:
lea rsi, aNotADataview; "not a DataView"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
loc_82E42:
mov ebx, 6
test r15, r15
jz short loc_82E6E
mov rdi, r15
call dataview_is_oob
test eax, eax
jz short loc_82E75
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_82E71
loc_82E6E:
xor r15d, r15d
loc_82E71:
xor eax, eax
jmp short loc_82EAB
loc_82E75:
mov rax, [r15+30h]
movsxd rax, dword ptr [rax+20h]
xor ecx, ecx
mov edx, eax
cvtsi2sd xmm0, rdx
test rax, rax
movq rdx, xmm0
cmovns rdx, rax
mov ebx, 7
cmovns rbx, rcx
mov rax, 7FFFFFFF00000000h
and rax, rdx
mov r15d, edx
loc_82EAB:
or r15, rax
mov rax, r15
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long js_dataview_get_byteOffset(
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; // r15
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; // r15
long long v22; // rax
double v23; // rdx
char v25; // [rsp+0h] [rbp-28h]
if ( (_DWORD)a3 != -1 || (v14 = a2, *(_WORD *)(a2 + 6) != 33) )
{
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a DataView", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v25);
}
if ( !v14 )
{
v21 = 0LL;
goto LABEL_8;
}
if ( (unsigned int)dataview_is_oob(v14) )
{
v21 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v15,
v16,
v17,
v18,
a7,
a8,
a9,
a10,
v19,
v20,
a13,
a14,
v25);
LABEL_8:
v22 = 0LL;
return v22 | v21;
}
v23 = (double)*(int *)(*(_QWORD *)(v14 + 48) + 32LL);
if ( *(int *)(*(_QWORD *)(v14 + 48) + 32LL) >= 0LL )
*(_QWORD *)&v23 = *(int *)(*(_QWORD *)(v14 + 48) + 32LL);
v22 = *(_QWORD *)&v23 & 0x7FFFFFFF00000000LL;
v21 = LODWORD(v23);
return v22 | v21;
}
|
js_dataview_get_byteOffset:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x1
JNZ 0x00182e2e
MOV R15,qword ptr [RSP + 0x8]
CMP word ptr [R15 + 0x6],0x21
JZ 0x00182e42
LAB_00182e2e:
LEA RSI,[0x1a1041]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00121953
LAB_00182e42:
MOV EBX,0x6
TEST R15,R15
JZ 0x00182e6e
MOV RDI,R15
CALL 0x0018339d
TEST EAX,EAX
JZ 0x00182e75
LEA RSI,[0x1a0d1a]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00121953
JMP 0x00182e71
LAB_00182e6e:
XOR R15D,R15D
LAB_00182e71:
XOR EAX,EAX
JMP 0x00182eab
LAB_00182e75:
MOV RAX,qword ptr [R15 + 0x30]
MOVSXD RAX,dword ptr [RAX + 0x20]
XOR ECX,ECX
MOV EDX,EAX
CVTSI2SD XMM0,RDX
TEST RAX,RAX
MOVQ RDX,XMM0
CMOVNS RDX,RAX
MOV EBX,0x7
CMOVNS RBX,RCX
MOV RAX,0x7fffffff00000000
AND RAX,RDX
MOV R15D,EDX
LAB_00182eab:
OR R15,RAX
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
int1 [16] js_dataview_get_byteOffset(int8 param_1,long param_2,int param_3)
{
uint uVar1;
int iVar2;
double dVar3;
ulong uVar4;
double dVar5;
int8 uVar6;
ulong uVar7;
int1 auVar8 [16];
if ((param_3 != -1) || (*(short *)(param_2 + 6) != 0x21)) {
param_2 = 0;
JS_ThrowTypeError(param_1,"not a DataView");
}
uVar6 = 6;
if (param_2 != 0) {
iVar2 = dataview_is_oob(param_2);
if (iVar2 == 0) {
uVar1 = *(uint *)(*(long *)(param_2 + 0x30) + 0x20);
dVar3 = (double)(long)(int)uVar1;
dVar5 = (double)uVar1;
if (-1 < (long)dVar3) {
dVar5 = dVar3;
}
uVar6 = 7;
if (-1 < (long)dVar3) {
uVar6 = 0;
}
uVar4 = (ulong)dVar5 & 0x7fffffff00000000;
uVar7 = (ulong)dVar5 & 0xffffffff;
goto LAB_00182eab;
}
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
}
uVar7 = 0;
uVar4 = 0;
LAB_00182eab:
auVar8._8_8_ = uVar6;
auVar8._0_8_ = uVar7 | uVar4;
return auVar8;
}
|
|
57,045
|
testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper()
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-test-part.cc
|
HasNewFatalFailureHelper::HasNewFatalFailureHelper()
: has_new_fatal_failure_(false),
original_reporter_(
GetUnitTestImpl()->GetTestPartResultReporterForCurrentThread()) {
GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this);
}
|
O1
|
cpp
|
testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3c42e(%rip), %rax # 0x58de8
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x1d29e
movl $0x90, %r14d
movq 0x414158d(%rip), %rdi # 0x415df60
addq %r14, %rdi
callq 0x3da10
movq (%rax), %rax
movq %rax, 0x10(%rbx)
callq 0x1d29e
addq 0x4141572(%rip), %r14 # 0x415df60
movq %r14, %rdi
callq 0x3da10
movq %rbx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN7testing8internal24HasNewFatalFailureHelperC2Ev:
push r14
push rbx
push rax
mov rbx, rdi
lea rax, off_58DE8
mov [rdi], rax
mov byte ptr [rdi+8], 0
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov r14d, 90h
mov rdi, cs:qword_415DF60
add rdi, r14; this
call _ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv; testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::GetOrCreateValue(void)
mov rax, [rax]
mov [rbx+10h], rax
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
add r14, cs:qword_415DF60
mov rdi, r14
call _ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv; testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::GetOrCreateValue(void)
mov [rax], rbx
add rsp, 8
pop rbx
pop r14
retn
|
_QWORD * testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper(
testing::internal::HasNewFatalFailureHelper *this,
int a2)
{
int v2; // eax
testing::UnitTest *v4; // rdi
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
_QWORD *result; // rax
int v14; // [rsp-8h] [rbp-18h]
int v15; // [rsp-8h] [rbp-18h]
v14 = v2;
*(_QWORD *)this = off_58DE8;
*((_BYTE *)this + 8) = 0;
testing::UnitTest::GetInstance(this);
v4 = (testing::internal::UnitTestImpl *)((char *)qword_415DF60 + 144);
*((_QWORD *)this + 2) = *(_QWORD *)testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::GetOrCreateValue(
(int)qword_415DF60 + 144,
a2,
v5,
v6,
v7,
v8,
v14);
testing::UnitTest::GetInstance(v4);
result = (_QWORD *)testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::GetOrCreateValue(
(int)qword_415DF60 + 144,
a2,
v9,
v10,
v11,
v12,
v15);
*result = this;
return result;
}
|
HasNewFatalFailureHelper:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x158de8]
MOV qword ptr [RDI],RAX
MOV byte ptr [RDI + 0x8],0x0
CALL 0x0011d29e
MOV R14D,0x90
MOV RDI,qword ptr [0x0425df60]
ADD RDI,R14
CALL 0x0013da10
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],RAX
CALL 0x0011d29e
ADD R14,qword ptr [0x0425df60]
MOV RDI,R14
CALL 0x0013da10
MOV qword ptr [RAX],RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper() */
void __thiscall
testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper
(HasNewFatalFailureHelper *this)
{
int8 *puVar1;
*(int ***)this = &PTR__HasNewFatalFailureHelper_00158de8;
this[8] = (HasNewFatalFailureHelper)0x0;
UnitTest::GetInstance();
puVar1 = (int8 *)
ThreadLocal<testing::TestPartResultReporterInterface*>::GetOrCreateValue
((ThreadLocal<testing::TestPartResultReporterInterface*> *)
(UnitTest::GetInstance()::instance._64_8_ + 0x90));
*(int8 *)(this + 0x10) = *puVar1;
UnitTest::GetInstance();
puVar1 = (int8 *)
ThreadLocal<testing::TestPartResultReporterInterface*>::GetOrCreateValue
((ThreadLocal<testing::TestPartResultReporterInterface*> *)
(UnitTest::GetInstance()::instance._64_8_ + 0x90));
*puVar1 = this;
return;
}
|
|
57,046
|
ma_soft_sync_background
|
eloqsql/storage/maria/ma_loghandler.c
|
static pthread_handler_t
ma_soft_sync_background( void *arg __attribute__((unused)))
{
my_thread_init();
{
DBUG_ENTER("ma_soft_sync_background");
for(;;)
{
ulonglong prev_loop= microsecond_interval_timer();
ulonglong time, sleep;
uint32 min, max, sync_request;
min= soft_sync_min;
max= soft_sync_max;
sync_request= soft_need_sync;
soft_sync_min= max;
soft_need_sync= 0;
sleep= group_commit_wait;
if (sync_request)
translog_sync_files(min, max, FALSE);
time= microsecond_interval_timer() - prev_loop;
if (time > sleep)
sleep= 0;
else
sleep-= time;
if (my_service_thread_sleep(&soft_sync_control, sleep))
break;
}
my_thread_end();
DBUG_RETURN(0);
}
}
|
O3
|
c
|
ma_soft_sync_background:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
callq 0xa9035
movabsq $0x20c49ba5e353f7cf, %r12 # imm = 0x20C49BA5E353F7CF
leaq 0x32190e(%rip), %rbx # 0x38ec08
callq 0xa582c
shrq $0x3, %rax
mulq %r12
movq %rdx, %r15
movl 0xb9c7fd(%rip), %edi # 0xc09b0c
movl 0xb9c7fb(%rip), %esi # 0xc09b10
cmpb $0x0, 0xb9c7f8(%rip) # 0xc09b14
movl %esi, 0xb9c7ea(%rip) # 0xc09b0c
movb $0x1, 0xb9c7eb(%rip) # 0xc09b14
movl 0xb9c7d4(%rip), %r14d # 0xc09b04
jne 0x6d339
xorl %edx, %edx
callq 0x6c586
shrq $0x4, %r15
callq 0xa582c
shrq $0x3, %rax
mulq %r12
shrq $0x4, %rdx
subq %r15, %rdx
subq %rdx, %r14
jae 0x6d358
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x751e8
testb %al, %al
je 0x6d2fa
callq 0xa92b0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
ma_soft_sync_background:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
call my_thread_init
mov r12, 20C49BA5E353F7CFh
lea rbx, soft_sync_control
loc_6D2FA:
call my_interval_timer
shr rax, 3
mul r12
mov r15, rdx
mov edi, cs:soft_sync_min
mov esi, cs:soft_sync_max
cmp cs:soft_need_sync, 0
mov cs:soft_sync_min, esi
mov cs:soft_need_sync, 1
mov r14d, cs:group_commit_wait
jnz short loc_6D339
xor edx, edx
call translog_sync_files
loc_6D339:
shr r15, 4
call my_interval_timer
shr rax, 3
mul r12
shr rdx, 4
sub rdx, r15
sub r14, rdx
jnb short loc_6D358
xor r14d, r14d
loc_6D358:
mov rdi, rbx
mov rsi, r14
call my_service_thread_sleep
test al, al
jz short loc_6D2FA
call my_thread_end
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ma_soft_sync_background()
{
unsigned long long v0; // r15
long long v1; // rdi
bool v2; // zf
unsigned long long v3; // r14
unsigned long long v4; // rdx
bool v5; // cf
unsigned long long v6; // r14
my_thread_init();
do
{
v0 = (0x20C49BA5E353F7CFLL * (unsigned __int128)((unsigned long long)((long long (*)(void))my_interval_timer)() >> 3)) >> 64;
v1 = (unsigned int)soft_sync_min;
v2 = soft_need_sync == 0;
soft_sync_min = soft_sync_max;
soft_need_sync = 1;
v3 = (unsigned int)group_commit_wait;
if ( v2 )
translog_sync_files(v1, soft_sync_max, 0);
v4 = my_interval_timer(v1) / 0x3E8uLL - (v0 >> 4);
v5 = v3 < v4;
v6 = v3 - v4;
if ( v5 )
v6 = 0LL;
}
while ( !(unsigned __int8)my_service_thread_sleep(&soft_sync_control, v6) );
my_thread_end();
return 0LL;
}
|
ma_soft_sync_background:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
CALL 0x001a9035
MOV R12,0x20c49ba5e353f7cf
LEA RBX,[0x48ec08]
LAB_0016d2fa:
CALL 0x001a582c
SHR RAX,0x3
MUL R12
MOV R15,RDX
MOV EDI,dword ptr [0x00d09b0c]
MOV ESI,dword ptr [0x00d09b10]
CMP byte ptr [0x00d09b14],0x0
MOV dword ptr [0x00d09b0c],ESI
MOV byte ptr [0x00d09b14],0x1
MOV R14D,dword ptr [0x00d09b04]
JNZ 0x0016d339
XOR EDX,EDX
CALL 0x0016c586
LAB_0016d339:
SHR R15,0x4
CALL 0x001a582c
SHR RAX,0x3
MUL R12
SHR RDX,0x4
SUB RDX,R15
SUB R14,RDX
JNC 0x0016d358
XOR R14D,R14D
LAB_0016d358:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001751e8
TEST AL,AL
JZ 0x0016d2fa
CALL 0x001a92b0
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 ma_soft_sync_background(void)
{
int4 uVar1;
char cVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
long lVar6;
bool bVar7;
my_thread_init();
do {
uVar3 = my_interval_timer();
uVar1 = soft_sync_min;
bVar7 = soft_need_sync == '\0';
soft_sync_min = soft_sync_max;
soft_need_sync = '\x01';
uVar5 = (ulong)group_commit_wait;
if (bVar7) {
translog_sync_files(uVar1,soft_sync_max,0);
}
uVar4 = my_interval_timer();
uVar3 = uVar4 / 1000 - uVar3 / 1000;
lVar6 = uVar5 - uVar3;
if (uVar5 < uVar3) {
lVar6 = 0;
}
cVar2 = my_service_thread_sleep(soft_sync_control,lVar6);
} while (cVar2 == '\0');
my_thread_end();
return 0;
}
|
|
57,047
|
instr_in::raw_encode(program&)
|
msxemulator/build_O0/_deps/pico_sdk-src/tools/pioasm/pio_assembler.cpp
|
raw_encoding instr_in::raw_encode(program& program) {
int v = value->resolve(program);
if (v < 1 || v > 32) {
throw syntax_error(value->location, "'in' bit count must be >= 1 and <= 32");
}
return {inst_type::in, (uint) src, (uint) v & 0x1fu};
}
|
O0
|
cpp
|
instr_in::raw_encode(program&):
subq $0x98, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x50, %rdi
callq 0x13740
movq %rax, %rdi
movq 0x78(%rsp), %rsi
callq 0xcd60
movl %eax, 0x74(%rsp)
cmpl $0x1, 0x74(%rsp)
jl 0x103cd
cmpl $0x20, 0x74(%rsp)
jle 0x1049e
movb $0x1, 0x3b(%rsp)
movl $0x30, %edi
callq 0x71c0
movq 0x20(%rsp), %rdi
movq %rax, 0x8(%rsp)
addq $0x50, %rdi
callq 0x13740
addq $0x8, %rax
movq %rax, 0x10(%rsp)
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x7600
movq 0x18(%rsp), %rdx
leaq 0x43777(%rip), %rsi # 0x53b8a
leaq 0x50(%rsp), %rdi
callq 0x74c0
jmp 0x1041f
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x13200
jmp 0x10435
movq 0x8(%rsp), %rdi
movb $0x0, 0x3b(%rsp)
leaq 0x5fc82(%rip), %rsi # 0x700c8
leaq 0x209f3(%rip), %rdx # 0x30e40
callq 0x75c0
jmp 0x104f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0x1047f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x76d8
leaq 0x4f(%rsp), %rdi
callq 0x73b0
testb $0x1, 0x3b(%rsp)
jne 0x10492
jmp 0x1049c
movq 0x8(%rsp), %rdi
callq 0x72b0
jmp 0x104ef
movq 0x20(%rsp), %rax
movl $0x2, 0x8c(%rsp)
movl 0x48(%rax), %eax
movl %eax, 0x90(%rsp)
movl 0x74(%rsp), %eax
andl $0x1f, %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
movl %eax, 0x30(%rsp)
movq 0x8c(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movl 0x30(%rsp), %edx
addq $0x98, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x75f0
nopl (%rax)
|
_ZN8instr_in10raw_encodeER7program:
sub rsp, 98h
mov [rsp+98h+var_18], rdi
mov [rsp+98h+var_20], rsi
mov rdi, [rsp+98h+var_18]
mov [rsp+98h+var_78], rdi
add rdi, 50h ; 'P'
call _ZNKSt19__shared_ptr_accessI10resolvableLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rsi, [rsp+98h+var_20]
call _ZN10resolvable7resolveERK7program; resolvable::resolve(program const&)
mov [rsp+98h+var_24], eax
cmp [rsp+98h+var_24], 1
jl short loc_103CD
cmp [rsp+98h+var_24], 20h ; ' '
jle loc_1049E
loc_103CD:
mov [rsp+98h+var_5D], 1
mov edi, 30h ; '0'; thrown_size
call ___cxa_allocate_exception
mov rdi, [rsp+98h+var_78]
mov [rsp+98h+var_90], rax
add rdi, 50h ; 'P'
call _ZNKSt19__shared_ptr_accessI10resolvableLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
add rax, 8
mov [rsp+98h+var_88], rax
lea rdi, [rsp+98h+var_49]
mov [rsp+98h+var_80], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+98h+var_80]
lea rsi, aInBitCountMust; "'in' bit count must be >= 1 and <= 32"
lea rdi, [rsp+98h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_1041F:
mov rsi, [rsp+98h+var_88]
mov rdi, [rsp+98h+var_90]
lea rdx, [rsp+98h+var_48]
call _ZN2yy6parser12syntax_errorC2ERKNS_8locationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; yy::parser::syntax_error::syntax_error(yy::location const&,std::string const&)
jmp short $+2
loc_10435:
mov rdi, [rsp+98h+var_90]; void *
mov [rsp+98h+var_5D], 0
lea rsi, _ZTIN2yy6parser12syntax_errorE; lptinfo
lea rdx, _ZN2yy6parser12syntax_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_104F9
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
jmp short loc_1047F
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1047F:
lea rdi, [rsp+arg_47]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_33], 1
jnz short loc_10492
jmp short loc_1049C
loc_10492:
mov rdi, [rsp+arg_0]; void *
call ___cxa_free_exception
loc_1049C:
jmp short loc_104EF
loc_1049E:
mov rax, [rsp+98h+var_78]
mov dword ptr [rsp+98h+var_C], 2
mov eax, [rax+48h]
mov dword ptr [rsp+98h+var_C+4], eax
mov eax, [rsp+98h+var_24]
and eax, 1Fh
mov [rsp+98h+var_4], eax
mov eax, [rsp+98h+var_4]
mov [rsp+98h+var_68], eax
mov rax, [rsp+98h+var_C]
mov [rsp+98h+var_70], rax
mov rax, [rsp+98h+var_70]
mov edx, [rsp+98h+var_68]
add rsp, 98h
retn
loc_104EF:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
loc_104F9:
nop dword ptr [rax+00000000h]
|
long long instr_in::raw_encode(instr_in *this, pio_assembler **a2)
{
resolvable *v2; // rax
void *exception; // [rsp+8h] [rbp-90h]
long long v5; // [rsp+10h] [rbp-88h]
char v6; // [rsp+4Fh] [rbp-49h] BYREF
_BYTE v7[36]; // [rsp+50h] [rbp-48h] BYREF
int v8; // [rsp+74h] [rbp-24h]
pio_assembler **v9; // [rsp+78h] [rbp-20h]
instr_in *v10; // [rsp+80h] [rbp-18h]
long long v11; // [rsp+8Ch] [rbp-Ch]
v10 = this;
v9 = a2;
v2 = (resolvable *)std::__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((char *)this + 80);
v8 = resolvable::resolve(v2, a2);
if ( v8 < 1 || v8 > 32 )
{
exception = __cxa_allocate_exception(0x30uLL);
v5 = std::__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((char *)this + 80) + 8;
std::allocator<char>::allocator();
std::string::basic_string(v7, "'in' bit count must be >= 1 and <= 32", &v6);
yy::parser::syntax_error::syntax_error(exception, v5, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'yy::parser::syntax_error,
yy::parser::syntax_error::~syntax_error);
}
LODWORD(v11) = 2;
HIDWORD(v11) = *((_DWORD *)this + 18);
return v11;
}
|
raw_encode:
SUB RSP,0x98
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV RDI,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x20],RDI
ADD RDI,0x50
CALL 0x00113740
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x0010cd60
MOV dword ptr [RSP + 0x74],EAX
CMP dword ptr [RSP + 0x74],0x1
JL 0x001103cd
CMP dword ptr [RSP + 0x74],0x20
JLE 0x0011049e
LAB_001103cd:
MOV byte ptr [RSP + 0x3b],0x1
MOV EDI,0x30
CALL 0x001071c0
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
ADD RDI,0x50
CALL 0x00113740
ADD RAX,0x8
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x4f]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00107600
MOV RDX,qword ptr [RSP + 0x18]
LAB_0011040c:
LEA RSI,[0x153b8a]
LEA RDI,[RSP + 0x50]
CALL 0x001074c0
JMP 0x0011041f
LAB_0011041f:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x50]
CALL 0x00113200
JMP 0x00110435
LAB_00110435:
MOV RDI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x3b],0x0
LEA RSI,[0x1700c8]
LEA RDX,[0x130e40]
CALL 0x001075c0
LAB_0011049e:
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x8c],0x2
MOV EAX,dword ptr [RAX + 0x48]
MOV dword ptr [RSP + 0x90],EAX
MOV EAX,dword ptr [RSP + 0x74]
AND EAX,0x1f
MOV dword ptr [RSP + 0x94],EAX
MOV EAX,dword ptr [RSP + 0x94]
MOV dword ptr [RSP + 0x30],EAX
MOV RAX,qword ptr [RSP + 0x8c]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x30]
ADD RSP,0x98
RET
|
/* instr_in::raw_encode(program&) */
int1 [16] __thiscall instr_in::raw_encode(instr_in *this,program *param_1)
{
resolvable *this_00;
syntax_error *this_01;
long lVar1;
int1 auVar2 [16];
allocator local_49;
string local_48 [36];
uint local_24;
program *local_20;
instr_in *local_18;
local_20 = param_1;
local_18 = this;
this_00 = (resolvable *)
std::__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
((__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false> *)
(this + 0x50));
local_24 = resolvable::resolve(this_00,local_20);
if ((0 < (int)local_24) && ((int)local_24 < 0x21)) {
auVar2._4_4_ = *(int4 *)(this + 0x48);
auVar2._0_4_ = 2;
auVar2._8_4_ = local_24 & 0x1f;
auVar2._12_4_ = 0;
return auVar2;
}
this_01 = (syntax_error *)__cxa_allocate_exception(0x30);
lVar1 = std::__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
((__shared_ptr_access<resolvable,(__gnu_cxx::_Lock_policy)2,false,false> *)
(this + 0x50));
std::allocator<char>::allocator();
/* try { // try from 0011040c to 0011041c has its CatchHandler @ 00110457 */
std::__cxx11::string::string(local_48,"\'in\' bit count must be >= 1 and <= 32",&local_49);
/* try { // try from 0011041f to 00110451 has its CatchHandler @ 00110467 */
yy::parser::syntax_error::syntax_error(this_01,(location *)(lVar1 + 8),local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(this_01,&yy::parser::syntax_error::typeinfo,yy::parser::syntax_error::~syntax_error);
}
|
|
57,048
|
fini_one_value
|
eloqsql/mysys/my_getopt.c
|
static void fini_one_value(const struct my_option *option, void *variable,
longlong value __attribute__ ((unused)))
{
DBUG_ENTER("fini_one_value");
switch ((option->var_type & GET_TYPE_MASK)) {
case GET_STR_ALLOC:
my_free(*((char**) variable));
*((char**) variable)= NULL;
break;
default: /* dummy default to avoid compiler warnings */
break;
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
fini_one_value:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x3f, %eax
subl $0xa, %eax
jne 0x3497e
jmp 0x34965
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x37410
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x34980
jmp 0x34980
jmp 0x34982
jmp 0x34984
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
fini_one_value:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+30h]
and eax, 3Fh
sub eax, 0Ah
jnz short loc_3497E
jmp short $+2
loc_34965:
mov rax, [rbp+var_10]
mov rdi, [rax]
call my_free
mov rax, [rbp+var_10]
mov qword ptr [rax], 0
jmp short loc_34980
loc_3497E:
jmp short $+2
loc_34980:
jmp short $+2
loc_34982:
jmp short $+2
loc_34984:
add rsp, 20h
pop rbp
retn
|
_QWORD * fini_one_value(long long a1, _QWORD *a2)
{
_QWORD *result; // rax
result = (_QWORD *)((*(_DWORD *)(a1 + 48) & 0x3Fu) - 10);
if ( (*(_DWORD *)(a1 + 48) & 0x3F) == 0xA )
{
my_free(*a2);
result = a2;
*a2 = 0LL;
}
return result;
}
|
fini_one_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x30]
AND EAX,0x3f
SUB EAX,0xa
JNZ 0x0013497e
JMP 0x00134965
LAB_00134965:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00137410
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0x0
JMP 0x00134980
LAB_0013497e:
JMP 0x00134980
LAB_00134980:
JMP 0x00134982
LAB_00134982:
JMP 0x00134984
LAB_00134984:
ADD RSP,0x20
POP RBP
RET
|
void fini_one_value(long param_1,int8 *param_2)
{
if ((*(uint *)(param_1 + 0x30) & 0x3f) == 10) {
my_free(*param_2);
*param_2 = 0;
}
return;
}
|
|
57,049
|
rlGetLocationAttrib
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
|
int rlGetLocationAttrib(unsigned int shaderId, const char *attribName)
{
int location = -1;
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
location = glGetAttribLocation(shaderId, attribName);
//if (location == -1) TRACELOG(RL_LOG_WARNING, "SHADER: [ID %i] Failed to find shader attribute: %s", shaderId, attribName);
//else TRACELOG(RL_LOG_INFO, "SHADER: [ID %i] Shader attribute (%s) set at location: %i", shaderId, attribName, location);
#endif
return location;
}
|
O2
|
c
|
rlGetLocationAttrib:
movq 0xc30f1(%rip), %rax # 0x125ab0
movq %rdx, %rsi
jmpq *%rax
|
GetShaderLocationAttrib:
mov rax, cs:glad_glGetAttribLocation
mov rsi, rdx
jmp rax
|
long long GetShaderLocationAttrib(long long a1, long long a2, long long a3)
{
return glad_glGetAttribLocation(a1, a3);
}
|
GetShaderLocationAttrib:
MOV RAX,qword ptr [0x00225ab0]
MOV RSI,RDX
JMP RAX
|
void GetShaderLocationAttrib(int8 param_1,int8 param_2,int8 param_3)
{
/* WARNING: Could not recover jumptable at 0x001629c2. Too many branches */
/* WARNING: Treating indirect jump as call */
(*glad_glGetAttribLocation)(param_1,param_3);
return;
}
|
|
57,050
|
my_fill_utf8mb3_mb
|
eloqsql/strings/ctype-utf8.c
|
static void
my_fill_utf8mb3_mb(CHARSET_INFO *cs, char *str, size_t length, int fill)
{
char *end= str + length;
char buf[10];
char buflen= my_ci_native_to_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
for ( ; str + buflen <= end ; )
{
memcpy(str, buf, buflen);
str+= buflen;
}
for ( ; str < end; )
*str++= ' ';
}
|
O0
|
c
|
my_fill_utf8mb3_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0xd8(%rax), %rax
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
leaq -0x12(%rbp), %rdx
leaq -0x12(%rbp), %rcx
addq $0xa, %rcx
callq *%rax
movb %al, -0x41(%rbp)
jmp 0xb5d0d
jmp 0xb5d0f
movq -0x28(%rbp), %rax
movsbl -0x41(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
cmpq -0x40(%rbp), %rax
ja 0xb5d49
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movsbq -0x41(%rbp), %rdx
callq 0x360b0
movsbl -0x41(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xb5d0f
jmp 0xb5d4b
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xb5d69
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x20, (%rax)
jmp 0xb5d4b
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb5d81
addq $0x50, %rsp
popq %rbp
retq
callq 0x362a0
nopw %cs:(%rax,%rax)
|
my_fill_utf8mb3_mb:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rax, [rax+0D8h]
mov rdi, [rbp+var_20]
movsxd rsi, [rbp+var_34]
lea rdx, [rbp+var_12]
lea rcx, [rbp+var_12]
add rcx, 0Ah
call rax
mov [rbp+var_41], al
jmp short $+2
loc_B5D0D:
jmp short $+2
loc_B5D0F:
mov rax, [rbp+var_28]
movsx ecx, [rbp+var_41]
movsxd rcx, ecx
add rax, rcx
cmp rax, [rbp+var_40]
ja short loc_B5D49
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
movsx rdx, [rbp+var_41]
call _memcpy
movsx ecx, [rbp+var_41]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short loc_B5D0F
loc_B5D49:
jmp short $+2
loc_B5D4B:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_40]
jnb short loc_B5D69
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 20h ; ' '
jmp short loc_B5D4B
loc_B5D69:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_B5D81
add rsp, 50h
pop rbp
retn
loc_B5D81:
call ___stack_chk_fail
|
unsigned long long my_fill_utf8mb3_mb(long long a1, _BYTE *a2, long long a3, int a4)
{
_BYTE *v4; // rax
char i; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
_BYTE *v8; // [rsp+28h] [rbp-28h]
_BYTE v9[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h] BYREF
v10 = __readfsqword(0x28u);
v8 = a2;
v7 = (unsigned long long)&a2[a3];
for ( i = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))(
a1,
a4,
v9,
&v10); (unsigned long long)&v8[i] <= v7; v8 += i )
memcpy(v8, v9, i);
while ( (unsigned long long)v8 < v7 )
{
v4 = v8++;
*v4 = 32;
}
return __readfsqword(0x28u);
}
|
my_fill_utf8mb3_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0xd8]
MOV RDI,qword ptr [RBP + -0x20]
MOVSXD RSI,dword ptr [RBP + -0x34]
LEA RDX,[RBP + -0x12]
LEA RCX,[RBP + -0x12]
ADD RCX,0xa
CALL RAX
MOV byte ptr [RBP + -0x41],AL
JMP 0x001b5d0d
LAB_001b5d0d:
JMP 0x001b5d0f
LAB_001b5d0f:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RBP + -0x41]
MOVSXD RCX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001b5d49
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
MOVSX RDX,byte ptr [RBP + -0x41]
CALL 0x001360b0
MOVSX ECX,byte ptr [RBP + -0x41]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b5d0f
LAB_001b5d49:
JMP 0x001b5d4b
LAB_001b5d4b:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001b5d69
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RAX],0x20
JMP 0x001b5d4b
LAB_001b5d69:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001b5d81
ADD RSP,0x50
POP RBP
RET
LAB_001b5d81:
CALL 0x001362a0
|
void my_fill_utf8mb3_mb(long param_1,int1 *param_2,long param_3,int param_4)
{
char cVar1;
long in_FS_OFFSET;
int1 *local_30;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
cVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,(long)param_4,local_1a,&local_10);
for (local_30 = param_2; local_30 + (int)cVar1 <= param_2 + param_3;
local_30 = local_30 + (int)cVar1) {
memcpy(local_30,local_1a,(long)cVar1);
}
while (local_30 < param_2 + param_3) {
*local_30 = 0x20;
local_30 = local_30 + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
57,051
|
my_wc_mb_euc_kr
|
eloqsql/strings/ctype-euc_kr.c
|
static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_euc_kr:
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
cmpq -0x28(%rbp), %rax
jb 0x6e17b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x6e1f4
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x6e19b
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6e1f4
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x6e520
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x6e1b7
movl $0x0, -0x4(%rbp)
jmp 0x6e1f4
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6e1ce
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x6e1f4
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
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_euc_kr:
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]
cmp rax, [rbp+var_28]
jb short loc_6E17B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_6E1F4
loc_6E17B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_6E19B
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_6E1F4
loc_6E19B:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_ksc5601_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_6E1B7
mov [rbp+var_4], 0
jmp short loc_6E1F4
loc_6E1B7:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_6E1CE
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_6E1F4
loc_6E1CE:
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_6E1F4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_ksc5601_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_euc_kr:
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]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0016e17b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0016e1f4
LAB_0016e17b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0016e19b
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 0x0016e1f4
LAB_0016e19b:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0016e520
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0016e1b7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016e1f4
LAB_0016e1b7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016e1ce
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0016e1f4
LAB_0016e1ce:
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_0016e1f4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_euc_kr(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_ksc5601_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
57,052
|
LefDefParser::defiRegion::Destroy()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRegion.cpp
|
void defiRegion::Destroy() {
if (name_) free(name_);
clear();
name_ = 0;
nameLength_ = 0;
free((char*)(xl_));
free((char*)(yl_));
free((char*)(xh_));
free((char*)(yh_));
free((char*)(propNames_));
free((char*)(propValues_));
free((char*)(propDValues_));
free((char*)(propTypes_));
}
|
O0
|
cpp
|
LefDefParser::defiRegion::Destroy():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
je 0x19666
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rdi
callq 0x19570
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movq 0x18(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x72a0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser10defiRegion7DestroyEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
cmp qword ptr [rax], 0
jz short loc_19666
mov rax, [rsp+18h+var_10]
mov rdi, [rax]
call _free
loc_19666:
mov rdi, [rsp+18h+var_10]; this
call _ZN12LefDefParser10defiRegion5clearEv; LefDefParser::defiRegion::clear(void)
mov rax, [rsp+18h+var_10]
mov qword ptr [rax], 0
mov dword ptr [rax+8], 0
mov rdi, [rax+18h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+20h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+28h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+30h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+40h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+48h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+50h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+58h]
call _free
add rsp, 18h
retn
|
long long LefDefParser::defiRegion::Destroy(LefDefParser::defiRegion *this)
{
if ( *(_QWORD *)this )
free(*(_QWORD *)this);
LefDefParser::defiRegion::clear(this);
*(_QWORD *)this = 0LL;
*((_DWORD *)this + 2) = 0;
free(*((_QWORD *)this + 3));
free(*((_QWORD *)this + 4));
free(*((_QWORD *)this + 5));
free(*((_QWORD *)this + 6));
free(*((_QWORD *)this + 8));
free(*((_QWORD *)this + 9));
free(*((_QWORD *)this + 10));
return free(*((_QWORD *)this + 11));
}
|
Destroy:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RAX],0x0
JZ 0x00119666
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x001072a0
LAB_00119666:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00119570
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],0x0
MOV dword ptr [RAX + 0x8],0x0
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x28]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x40]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x50]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x58]
CALL 0x001072a0
ADD RSP,0x18
RET
|
/* LefDefParser::defiRegion::Destroy() */
void __thiscall LefDefParser::defiRegion::Destroy(defiRegion *this)
{
if (*(long *)this != 0) {
free(*(void **)this);
}
clear(this);
*(int8 *)this = 0;
*(int4 *)(this + 8) = 0;
free(*(void **)(this + 0x18));
free(*(void **)(this + 0x20));
free(*(void **)(this + 0x28));
free(*(void **)(this + 0x30));
free(*(void **)(this + 0x40));
free(*(void **)(this + 0x48));
free(*(void **)(this + 0x50));
free(*(void **)(this + 0x58));
return;
}
|
|
57,053
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool)
|
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
|
explicit parser(InputAdapterType&& adapter,
parser_callback_t<BasicJsonType> cb = nullptr,
const bool allow_exceptions_ = true,
const bool skip_comments = false)
: callback(std::move(cb))
, m_lexer(std::move(adapter), skip_comments)
, allow_exceptions(allow_exceptions_)
{
// read first token
get_token();
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x18(%rdx), %rax
movq %rax, 0x18(%rdi)
cmpq $0x0, 0x10(%rdx)
je 0x18066
leaq 0x10(%rdx), %rax
movups (%rdx), %xmm1
movups %xmm1, (%rbx)
movq 0x10(%rdx), %rcx
movq %rcx, 0x10(%rbx)
movups %xmm0, (%rax)
movl $0x0, 0x20(%rbx)
leaq 0x28(%rbx), %r14
movups (%rsi), %xmm1
movups %xmm1, 0x28(%rbx)
movb %r8b, 0x38(%rbx)
movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF
xorl %eax, %eax
movb %al, 0x40(%rbx)
leaq 0x88(%rbx), %rcx
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rcx, 0x78(%rbx)
movq %rax, 0x80(%rbx)
movb %al, 0x88(%rbx)
leaq 0xa6db(%rip), %rcx # 0x2278e
movq %rcx, 0x98(%rbx)
movups %xmm0, 0xa0(%rbx)
movq %rax, 0xb0(%rbx)
callq 0x11da0
movsbl %al, %eax
movl %eax, 0xb8(%rbx)
movq $-0x1, 0xc0(%rbx)
movb %bpl, 0xc8(%rbx)
movq %r14, %rdi
callq 0x11c90
movl %eax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x11730
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x1811f
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r15, %rdi
callq 0x12010
movq %rax, %rdi
callq 0x15362
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rax, [rdx+18h]
mov [rdi+18h], rax
cmp qword ptr [rdx+10h], 0
jz short loc_18066
lea rax, [rdx+10h]
movups xmm1, xmmword ptr [rdx]
movups xmmword ptr [rbx], xmm1
mov rcx, [rdx+10h]
mov [rbx+10h], rcx
movups xmmword ptr [rax], xmm0
loc_18066:
mov dword ptr [rbx+20h], 0
lea r14, [rbx+28h]
movups xmm1, xmmword ptr [rsi]
movups xmmword ptr [rbx+28h], xmm1
mov [rbx+38h], r8b
mov dword ptr [rbx+3Ch], 0FFFFFFFFh
xor eax, eax
mov [rbx+40h], al
lea rcx, [rbx+88h]
movups xmmword ptr [rbx+48h], xmm0
movups xmmword ptr [rbx+58h], xmm0
movups xmmword ptr [rbx+68h], xmm0
mov [rbx+78h], rcx
mov [rbx+80h], rax
mov [rbx+88h], al
lea rcx, asc_2278C+2; ""
mov [rbx+98h], rcx
movups xmmword ptr [rbx+0A0h], xmm0
mov [rbx+0B0h], rax
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(void)
movsx eax, al
mov [rbx+0B8h], eax
mov qword ptr [rbx+0C0h], 0FFFFFFFFFFFFFFFFh
mov [rbx+0C8h], bpl
mov rdi, r14
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(void)
mov [rbx+20h], eax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov r15, rax
mov rdi, r14
call __ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer()
mov rax, [rbx+10h]
test rax, rax
jz short loc_1811F
mov rdi, rbx
mov rsi, rbx
mov edx, 3
call rax
loc_1811F:
mov rdi, r15
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser(
long long a1,
_OWORD *a2,
long long a3,
char a4,
char a5)
{
long long result; // rax
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a3 + 24);
if ( *(_QWORD *)(a3 + 16) )
{
*(_OWORD *)a1 = *(_OWORD *)a3;
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a3 + 16);
*(_OWORD *)(a3 + 16) = 0LL;
}
*(_DWORD *)(a1 + 32) = 0;
*(_OWORD *)(a1 + 40) = *a2;
*(_BYTE *)(a1 + 56) = a5;
*(_DWORD *)(a1 + 60) = -1;
*(_BYTE *)(a1 + 64) = 0;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_QWORD *)(a1 + 120) = a1 + 136;
*(_QWORD *)(a1 + 128) = 0LL;
*(_BYTE *)(a1 + 136) = 0;
*(_QWORD *)(a1 + 152) = "";
*(_OWORD *)(a1 + 160) = 0LL;
*(_QWORD *)(a1 + 176) = 0LL;
*(_DWORD *)(a1 + 184) = (char)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(a1);
*(_QWORD *)(a1 + 192) = -1LL;
*(_BYTE *)(a1 + 200) = a4;
result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(a1 + 40);
*(_DWORD *)(a1 + 32) = result;
return result;
}
|
parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RDX + 0x18]
MOV qword ptr [RDI + 0x18],RAX
CMP qword ptr [RDX + 0x10],0x0
JZ 0x00118066
LEA RAX,[RDX + 0x10]
MOVUPS XMM1,xmmword ptr [RDX]
MOVUPS xmmword ptr [RBX],XMM1
MOV RCX,qword ptr [RDX + 0x10]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS xmmword ptr [RAX],XMM0
LAB_00118066:
MOV dword ptr [RBX + 0x20],0x0
LEA R14,[RBX + 0x28]
MOVUPS XMM1,xmmword ptr [RSI]
MOVUPS xmmword ptr [RBX + 0x28],XMM1
MOV byte ptr [RBX + 0x38],R8B
MOV dword ptr [RBX + 0x3c],0xffffffff
XOR EAX,EAX
MOV byte ptr [RBX + 0x40],AL
LEA RCX,[RBX + 0x88]
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOVUPS xmmword ptr [RBX + 0x68],XMM0
MOV qword ptr [RBX + 0x78],RCX
MOV qword ptr [RBX + 0x80],RAX
MOV byte ptr [RBX + 0x88],AL
LEA RCX,[0x12278e]
MOV qword ptr [RBX + 0x98],RCX
MOVUPS xmmword ptr [RBX + 0xa0],XMM0
MOV qword ptr [RBX + 0xb0],RAX
CALL 0x00111da0
MOVSX EAX,AL
MOV dword ptr [RBX + 0xb8],EAX
MOV qword ptr [RBX + 0xc0],-0x1
MOV byte ptr [RBX + 0xc8],BPL
LAB_001180e8:
MOV RDI,R14
CALL 0x00111c90
MOV dword ptr [RBX + 0x20],EAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
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>&)>, bool, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parser(parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,int8 *param_1,int8 *param_3,
parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
param_4,parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
param_5)
{
int8 uVar1;
char cVar2;
int4 uVar3;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = param_3[3];
if (param_3[2] != 0) {
uVar1 = param_3[1];
*(int8 *)this = *param_3;
*(int8 *)(this + 8) = uVar1;
*(int8 *)(this + 0x10) = param_3[2];
param_3[2] = 0;
param_3[3] = 0;
}
*(int4 *)(this + 0x20) = 0;
uVar1 = param_1[1];
*(int8 *)(this + 0x28) = *param_1;
*(int8 *)(this + 0x30) = uVar1;
this[0x38] = param_5;
*(int4 *)(this + 0x3c) = 0xffffffff;
this[0x40] = (parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
*(parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x78) = this + 0x88;
*(int8 *)(this + 0x80) = 0;
this[0x88] = (parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int **)(this + 0x98) = &DAT_0012278e;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0;
cVar2 = lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_decimal_point();
*(int *)(this + 0xb8) = (int)cVar2;
*(int8 *)(this + 0xc0) = 0xffffffffffffffff;
this[200] = param_4;
/* try { // try from 001180e8 to 001180ef has its CatchHandler @ 001180fe */
uVar3 = lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan((lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*)(this + 0x28));
*(int4 *)(this + 0x20) = uVar3;
return;
}
|
|
57,054
|
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>>::~serializer()
|
monkey531[P]llama/common/json.hpp
|
~serializer() = default;
|
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>>::~serializer():
pushq %rbx
movq %rdi, %rbx
movq 0x260(%rdi), %rdi
leaq 0x270(%rbx), %rax
cmpq %rax, %rdi
je 0xc47cc
movq (%rax), %rsi
incq %rsi
callq 0x1b8f0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xc47db
popq %rbx
jmp 0x7b578
popq %rbx
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+260h]; void *
lea rax, [rbx+270h]
cmp rdi, rax
jz short loc_C47CC
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C47CC:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_C47DB
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_C47DB:
pop rbx
retn
|
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~serializer(
_QWORD *a1)
{
_QWORD *v2; // rdi
volatile signed __int32 *v3; // rdi
v2 = (_QWORD *)a1[76];
if ( v2 != a1 + 78 )
operator delete(v2, a1[78] + 1LL);
v3 = (volatile signed __int32 *)a1[1];
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~serializer:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x260]
LEA RAX,[RBX + 0x270]
CMP RDI,RAX
JZ 0x001c47cc
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b8f0
LAB_001c47cc:
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x001c47db
POP RBX
JMP 0x0017b578
LAB_001c47db:
POP RBX
RET
|
/* 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> >::~serializer() */
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>>
::~serializer(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)
{
if (*(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 + 0x260) != this + 0x270) {
operator_delete(*(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 + 0x260),*(long *)(this + 0x270) + 1);
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8));
return;
}
return;
}
|
|
57,055
|
minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>)
|
monkey531[P]llama/common/minja.hpp
|
static Value array(const std::vector<Value> values = {}) {
auto array = std::make_shared<ArrayType>();
for (const auto& item : values) {
array->push_back(item);
}
return Value(array);
}
|
O3
|
cpp
|
minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value>>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movl $0x28, %edi
callq 0x18690
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x8ba9b(%rip), %rax # 0xdc4a8
addq $0x10, %rax
movq %rax, (%r14)
leaq 0x10(%r14), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movq %r14, 0x8(%rsp)
movq %r15, (%rsp)
movq (%r13), %r12
movq 0x8(%r13), %r13
cmpq %r13, %r12
je 0x50a4f
movq %r15, %rdi
movq %r12, %rsi
callq 0x50b80
addq $0x50, %r12
jmp 0x50a39
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x50bac
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x50a6b
callq 0x30ed6
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x30ed6
movq %rbx, %rdi
callq 0x18bc0
nop
|
_ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r13, rsi
mov rbx, rdi
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceISt6vectorIN5minja5ValueESaIS2_EESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<std::vector<minja::Value>,std::allocator<std::vector<minja::Value>>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
lea r15, [r14+10h]
xorps xmm0, xmm0
movups xmmword ptr [r14+10h], xmm0
mov qword ptr [r14+20h], 0
mov [rsp+38h+var_30], r14
mov [rsp+38h+var_38], r15
mov r12, [r13+0]
mov r13, [r13+8]
loc_50A39:
cmp r12, r13
jz short loc_50A4F
mov rdi, r15
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backERKS1_; std::vector<minja::Value>::push_back(minja::Value const&)
add r12, 50h ; 'P'
jmp short loc_50A39
loc_50A4F:
mov r14, rsp
mov rdi, rbx
mov rsi, r14
call _ZN5minja5ValueC2ERKSt10shared_ptrISt6vectorIS0_SaIS0_EEE; minja::Value::Value(std::shared_ptr<std::vector<minja::Value>> const&)
mov rdi, [r14+8]
test rdi, rdi
jz short loc_50A6B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50A6B:
mov rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, r14
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::array(long long a1, long long *a2)
{
long long v2; // r14
long long v3; // r12
long long v4; // r13
long long v6; // [rsp+0h] [rbp-38h] BYREF
volatile signed __int32 *v7; // [rsp+8h] [rbp-30h]
v2 = operator new(0x28uLL);
*(_QWORD *)(v2 + 8) = 0x100000001LL;
*(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<std::vector<minja::Value>,std::allocator<std::vector<minja::Value>>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(v2 + 32) = 0LL;
v7 = (volatile signed __int32 *)v2;
v6 = v2 + 16;
v3 = *a2;
v4 = a2[1];
while ( v3 != v4 )
{
std::vector<minja::Value>::push_back(v2 + 16, v3);
v3 += 80LL;
}
minja::Value::Value(a1, &v6);
if ( v7 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7);
return a1;
}
|
array:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R13,RSI
MOV RBX,RDI
MOV EDI,0x28
CALL 0x00118690
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x1dc4a8]
ADD RAX,0x10
MOV qword ptr [R14],RAX
LEA R15,[R14 + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOV qword ptr [R14 + 0x20],0x0
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP],R15
MOV R12,qword ptr [R13]
MOV R13,qword ptr [R13 + 0x8]
LAB_00150a39:
CMP R12,R13
JZ 0x00150a4f
LAB_00150a3e:
MOV RDI,R15
MOV RSI,R12
CALL 0x00150b80
LAB_00150a49:
ADD R12,0x50
JMP 0x00150a39
LAB_00150a4f:
MOV R14,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x00150bac
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
JZ 0x00150a6b
CALL 0x00130ed6
LAB_00150a6b:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::Value::array(std::vector<minja::Value, std::allocator<minja::Value> >) */
Value * __thiscall minja::Value::array(Value *this,int8 *param_2)
{
vector<minja::Value,std::allocator<minja::Value>> *this_00;
Value *pVVar1;
Value *pVVar2;
vector<minja::Value,std::allocator<minja::Value>> *local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
local_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x28);
*(int8 *)(local_30 + 8) = 0x100000001;
*(int ***)local_30 = &PTR___Sp_counted_ptr_inplace_001dc4b8;
this_00 = (vector<minja::Value,std::allocator<minja::Value>> *)(local_30 + 0x10);
*(int8 *)(local_30 + 0x10) = 0;
*(int8 *)(local_30 + 0x18) = 0;
*(int8 *)(local_30 + 0x20) = 0;
pVVar1 = (Value *)param_2[1];
local_38 = this_00;
for (pVVar2 = (Value *)*param_2; pVVar2 != pVVar1; pVVar2 = pVVar2 + 0x50) {
/* try { // try from 00150a3e to 00150a48 has its CatchHandler @ 00150a7c */
std::vector<minja::Value,std::allocator<minja::Value>>::push_back(this_00,pVVar2);
}
Value(this,(shared_ptr *)&local_38);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
return this;
}
|
|
57,056
|
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>::string_t&)
|
llama.cpp/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O3
|
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>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x767ce
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1cd30
movl $0x20, %edi
callq 0x1c460
movq %rax, %rbx
movq %r14, %rdi
callq 0x30fda
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x55a3a(%rip), %rsi # 0xcc22c
leaq 0x10(%rsp), %rdi
callq 0x76265
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x72d1c
xorl %ebp, %ebp
leaq 0x876c3(%rip), %rsi # 0xfdee0
leaq -0x4901e(%rip), %rdx # 0x2d806
movq %rbx, %rdi
callq 0x1c7b0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7684a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1c110
testb %bpl, %bpl
jne 0x76854
jmp 0x7685c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1caa0
movq %r14, %rdi
callq 0x1c7d0
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_767CE
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_767CE:
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, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7684A
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7684A:
test bpl, bpl
jnz short loc_76854
jmp short loc_7685C
mov r14, rax
loc_76854:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7685C:
mov rdi, r14
call __Unwind_Resume
|
long long 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>>(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be string, but is ",
&v4);
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,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8));
}
|
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],0x3
JNZ 0x001767ce
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0011cd30
LAB_001767ce:
MOV EDI,0x20
CALL 0x0011c460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00130fda
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001767eb:
LEA RSI,[0x1cc22c]
LEA RDI,[RSP + 0x10]
CALL 0x00176265
MOV BPL,0x1
LAB_001767ff:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00172d1c
XOR EBP,EBP
LEA RSI,[0x1fdee0]
LEA RDX,[0x12d806]
MOV RDI,RBX
CALL 0x0011c7b0
|
/* 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>::string_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,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x3) {
std::__cxx11::string::_M_assign((string *)param_2);
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 001767eb to 001767fb has its CatchHandler @ 00176851 */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 001767ff to 0017682b has its CatchHandler @ 0017682c */
_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);
}
|
|
57,057
|
MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*)
|
eloqsql/mysys_ssl/my_crypt.cc
|
int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
{
/*
note that this GCM class cannot do streaming decryption, because
it needs the tag (which is located at the end of encrypted data)
before decrypting the data. it can encrypt data piecewise, like, first
half, then the second half, but it must decrypt all at once
*/
if (!EVP_CIPHER_CTX_encrypting(ctx))
{
/* encrypted string must contain authenticaton tag (see MDEV-11174) */
if (slen < MY_AES_BLOCK_SIZE)
return MY_AES_BAD_DATA;
slen-= MY_AES_BLOCK_SIZE;
if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, MY_AES_BLOCK_SIZE,
(void*)(src + slen)))
return MY_AES_OPENSSL_ERROR;
}
int unused;
if (aadlen && !EVP_CipherUpdate(ctx, NULL, &unused, aad, aadlen))
return MY_AES_OPENSSL_ERROR;
aadlen= 0;
return MyCTX::update(src, slen, dst, dlen);
}
|
O3
|
cpp
|
MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r12
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r13
movq 0xc8(%rdi), %rdi
callq 0x29870
testl %eax, %eax
je 0xd7f16
movl 0xd8(%r13), %r8d
testl %r8d, %r8d
je 0xd7ee8
movq 0xc8(%r13), %rdi
movq 0xd0(%r13), %rcx
leaq -0x2c(%rbp), %rdx
xorl %esi, %esi
callq 0x29890
testl %eax, %eax
je 0xd7f47
movq %rbx, %rdx
xorl %ebx, %ebx
movl %ebx, 0xd8(%r13)
movq 0xc8(%r13), %rdi
movq %r12, %rsi
movq %r15, %rcx
movl %r14d, %r8d
callq 0x29890
cmpl $0x1, %eax
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmovel %ebx, %eax
jmp 0xd7f4c
movl $0xffffff9c, %eax # imm = 0xFFFFFF9C
cmpl $0x10, %r14d
jb 0xd7f4c
addl $-0x10, %r14d
movq 0xc8(%r13), %rdi
leaq (%r15,%r14), %rcx
movl $0x11, %esi
movl $0x10, %edx
callq 0x292d0
testl %eax, %eax
jne 0xd7ebf
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN9MyCTX_gcm6updateEPKhjPhPj:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r12, rcx
mov r14d, edx
mov r15, rsi
mov r13, rdi
mov rdi, [rdi+0C8h]
call _EVP_CIPHER_CTX_is_encrypting
test eax, eax
jz short loc_D7F16
loc_D7EBF:
mov r8d, [r13+0D8h]
test r8d, r8d
jz short loc_D7EE8
mov rdi, [r13+0C8h]
mov rcx, [r13+0D0h]
lea rdx, [rbp+var_2C]
xor esi, esi
call _EVP_CipherUpdate
test eax, eax
jz short loc_D7F47
loc_D7EE8:
mov rdx, rbx
xor ebx, ebx
mov [r13+0D8h], ebx
mov rdi, [r13+0C8h]
mov rsi, r12
mov rcx, r15
mov r8d, r14d
call _EVP_CipherUpdate
cmp eax, 1
mov eax, 0FFFFFF9Bh
cmovz eax, ebx
jmp short loc_D7F4C
loc_D7F16:
mov eax, 0FFFFFF9Ch
cmp r14d, 10h
jb short loc_D7F4C
add r14d, 0FFFFFFF0h
mov rdi, [r13+0C8h]
lea rcx, [r15+r14]
mov esi, 11h
mov edx, 10h
call _EVP_CIPHER_CTX_ctrl
test eax, eax
jnz loc_D7EBF
loc_D7F47:
mov eax, 0FFFFFF9Bh
loc_D7F4C:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long MyCTX_gcm::update(
MyCTX_gcm *this,
const unsigned __int8 *a2,
unsigned int a3,
unsigned __int8 *a4,
unsigned int *a5)
{
long long v5; // rax
bool v9; // zf
long long result; // rax
_DWORD v11[11]; // [rsp+0h] [rbp-2Ch] BYREF
v11[0] = HIDWORD(v5);
if ( !(unsigned int)EVP_CIPHER_CTX_is_encrypting(*((_QWORD *)this + 25)) )
{
result = 4294967196LL;
if ( a3 < 0x10 )
return result;
if ( !(unsigned int)EVP_CIPHER_CTX_ctrl(*((_QWORD *)this + 25), 17LL, 16LL, &a2[a3 - 16]) )
return 4294967195LL;
}
if ( *((_DWORD *)this + 54)
&& !(unsigned int)EVP_CipherUpdate(*((_QWORD *)this + 25), 0LL, v11, *((_QWORD *)this + 26)) )
{
return 4294967195LL;
}
*((_DWORD *)this + 54) = 0;
v9 = (unsigned int)EVP_CipherUpdate(*((_QWORD *)this + 25), a4, a5, a2) == 1;
result = 4294967195LL;
if ( v9 )
return 0LL;
return result;
}
|
update:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R12,RCX
MOV R14D,EDX
MOV R15,RSI
MOV R13,RDI
MOV RDI,qword ptr [RDI + 0xc8]
CALL 0x00129870
TEST EAX,EAX
JZ 0x001d7f16
LAB_001d7ebf:
MOV R8D,dword ptr [R13 + 0xd8]
TEST R8D,R8D
JZ 0x001d7ee8
MOV RDI,qword ptr [R13 + 0xc8]
MOV RCX,qword ptr [R13 + 0xd0]
LEA RDX,[RBP + -0x2c]
XOR ESI,ESI
CALL 0x00129890
TEST EAX,EAX
JZ 0x001d7f47
LAB_001d7ee8:
MOV RDX,RBX
XOR EBX,EBX
MOV dword ptr [R13 + 0xd8],EBX
MOV RDI,qword ptr [R13 + 0xc8]
MOV RSI,R12
MOV RCX,R15
MOV R8D,R14D
CALL 0x00129890
CMP EAX,0x1
MOV EAX,0xffffff9b
CMOVZ EAX,EBX
JMP 0x001d7f4c
LAB_001d7f16:
MOV EAX,0xffffff9c
CMP R14D,0x10
JC 0x001d7f4c
ADD R14D,-0x10
MOV RDI,qword ptr [R13 + 0xc8]
LEA RCX,[R15 + R14*0x1]
MOV ESI,0x11
MOV EDX,0x10
CALL 0x001292d0
TEST EAX,EAX
JNZ 0x001d7ebf
LAB_001d7f47:
MOV EAX,0xffffff9b
LAB_001d7f4c:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*) */
int8 __thiscall
MyCTX_gcm::update(MyCTX_gcm *this,uchar *param_1,uint param_2,uchar *param_3,uint *param_4)
{
int iVar1;
int local_34;
iVar1 = EVP_CIPHER_CTX_is_encrypting(*(int8 *)(this + 200));
if (iVar1 == 0) {
if (param_2 < 0x10) {
return 0xffffff9c;
}
param_2 = param_2 - 0x10;
iVar1 = EVP_CIPHER_CTX_ctrl(*(EVP_CIPHER_CTX **)(this + 200),0x11,0x10,param_1 + param_2);
if (iVar1 == 0) {
return 0xffffff9b;
}
}
if ((*(int *)(this + 0xd8) != 0) &&
(iVar1 = EVP_CipherUpdate(*(EVP_CIPHER_CTX **)(this + 200),(uchar *)0x0,&local_34,
*(uchar **)(this + 0xd0),*(int *)(this + 0xd8)), iVar1 == 0)) {
return 0xffffff9b;
}
*(int4 *)(this + 0xd8) = 0;
iVar1 = EVP_CipherUpdate(*(EVP_CIPHER_CTX **)(this + 200),param_3,(int *)param_4,param_1,param_2);
if (iVar1 == 1) {
return 0;
}
return 0xffffff9b;
}
|
|
57,058
|
js_create_iterator_result
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_create_iterator_result(JSContext *ctx,
JSValue val,
BOOL done)
{
JSValue obj;
obj = JS_NewObject(ctx);
if (JS_IsException(obj)) {
JS_FreeValue(ctx, val);
return obj;
}
if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_value,
val, JS_PROP_C_W_E) < 0) {
goto fail;
}
if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_done,
js_bool(done), JS_PROP_C_W_E) < 0) {
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
}
|
O2
|
c
|
js_create_iterator_result:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
callq 0x1b2c9
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x373a8
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1801e
jmp 0x373f3
movl $0x7, (%rsp)
pushq $0x41
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %r8
movq %r12, %r9
callq 0x20872
testl %eax, %eax
js 0x37405
xorl %r8d, %r8d
testl %ebp, %ebp
setne %r8b
movl $0x7, (%rsp)
pushq $0x6a
popq %rcx
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20872
testl %eax, %eax
js 0x37405
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
jmp 0x3741b
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
pushq $0x6
popq %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_create_iterator_result:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov r12, rdx
mov r13, rsi
mov r15, rdi
call JS_NewObject
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jnz short loc_373A8
mov rdi, r15
mov rsi, r13
mov rdx, r12
call JS_FreeValue
jmp short loc_373F3
loc_373A8:
mov [rsp+38h+var_38], 7
push 41h ; 'A'
pop rcx
mov rdi, r15
mov rsi, r14
mov rdx, rbx
mov r8, r13
mov r9, r12
call JS_DefinePropertyValue
test eax, eax
js short loc_37405
xor r8d, r8d
test ebp, ebp
setnz r8b
mov [rsp+38h+var_38], 7
push 6Ah ; 'j'
pop rcx
push 1
pop r9
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_DefinePropertyValue
test eax, eax
js short loc_37405
loc_373F3:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
jmp short loc_3741B
loc_37405:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
push 6
pop rbx
xor r14d, r14d
xor ecx, ecx
loc_3741B:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_create_iterator_result(
long long a1,
_DWORD *a2,
long long a3,
int a4,
double a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v14; // rax
long long v15; // rdx
__m128 v16; // xmm4
__m128 v17; // xmm5
long long v18; // r14
long long v19; // rbx
__m128 v20; // xmm4
__m128 v21; // xmm5
unsigned long long v22; // rcx
v14 = JS_NewObject(a1);
v18 = v14;
v19 = v15;
if ( (_DWORD)v15 == 6 )
{
JS_FreeValue(a1, (long long)a2, a3);
}
else if ( (int)JS_DefinePropertyValue(a1, v14, v15, 65LL, a2, a3, a5, a6, a7, a8, v16, v17, a11, a12, 7) < 0
|| (int)JS_DefinePropertyValue(
a1,
v18,
v19,
106LL,
(_DWORD *)(a4 != 0),
1LL,
a5,
a6,
a7,
a8,
v20,
v21,
a11,
a12,
7) < 0 )
{
JS_FreeValue(a1, v18, v19);
LODWORD(v18) = 0;
v22 = 0LL;
return v22 | (unsigned int)v18;
}
v22 = v18 & 0xFFFFFFFF00000000LL;
return v22 | (unsigned int)v18;
}
|
js_create_iterator_result:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R12,RDX
MOV R13,RSI
MOV R15,RDI
CALL 0x0011b2c9
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x001373a8
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
CALL 0x0011801e
JMP 0x001373f3
LAB_001373a8:
MOV dword ptr [RSP],0x7
PUSH 0x41
POP RCX
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
MOV R8,R13
MOV R9,R12
CALL 0x00120872
TEST EAX,EAX
JS 0x00137405
XOR R8D,R8D
TEST EBP,EBP
SETNZ R8B
MOV dword ptr [RSP],0x7
PUSH 0x6a
POP RCX
PUSH 0x1
POP R9
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120872
TEST EAX,EAX
JS 0x00137405
LAB_001373f3:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
JMP 0x0013741b
LAB_00137405:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
PUSH 0x6
POP RBX
XOR R14D,R14D
XOR ECX,ECX
LAB_0013741b:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_create_iterator_result(int8 param_1,int8 param_2,int8 param_3,int param_4)
{
int iVar1;
int8 in_RAX;
int4 uVar2;
ulong uVar3;
int8 uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
uVar2 = (int4)((ulong)in_RAX >> 0x20);
auVar5 = JS_NewObject();
uVar4 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
JS_FreeValue(param_1,param_2,param_3);
LAB_001373f3:
uVar3 = uVar3 & 0xffffffff00000000;
}
else {
iVar1 = JS_DefinePropertyValue(param_1,uVar3,uVar4,0x41,param_2,param_3,CONCAT44(uVar2,7));
if (-1 < iVar1) {
iVar1 = JS_DefinePropertyValue(param_1,uVar3,uVar4,0x6a,param_4 != 0,1,7);
if (-1 < iVar1) goto LAB_001373f3;
}
JS_FreeValue(param_1,uVar3,uVar4);
auVar5 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
auVar6._0_8_ = auVar5._0_8_ & 0xffffffff | uVar3;
auVar6._8_8_ = auVar5._8_8_;
return auVar6;
}
|
|
57,059
|
unpack_filename
|
eloqsql/mysys/mf_pack.c
|
size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
n_length=unpack_dirname(buff,buff);
if (n_length+strlen(from+length) < FN_REFLEN)
{
(void) strmov(buff+n_length,from+length);
length= system_filename(to,buff); /* Fix to usably filename */
}
else
length= system_filename(to,from); /* Fix to usably filename */
DBUG_RETURN(length);
}
|
O3
|
c
|
unpack_filename:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq -0x230(%rbp), %r12
leaq -0x238(%rbp), %rdx
movq %r12, %rdi
callq 0x4f371
movq %rax, %r15
movq %r12, %rdi
movq %r12, %rsi
callq 0x55efe
movq %rax, %r12
addq %r14, %r15
movq %r15, %rdi
callq 0x28150
addq %r12, %rax
cmpq $0x1ff, %rax # imm = 0x1FF
ja 0x56120
leaq (%r12,%rbp), %rdi
addq $-0x230, %rdi # imm = 0xFDD0
movq %r15, %rsi
callq 0x28350
leaq -0x230(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
jmp 0x5612b
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
movq %r14, %rsi
callq 0x92cd8
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x56152
subq %rbx, %rax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x28440
nop
|
unpack_filename:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea r12, [rbp+var_230]
lea rdx, [rbp+var_238]
mov rdi, r12
call dirname_part
mov r15, rax
mov rdi, r12
mov rsi, r12
call unpack_dirname
mov r12, rax
add r15, r14
mov rdi, r15
call _strlen
add rax, r12
cmp rax, 1FFh
ja short loc_56120
lea rdi, [r12+rbp]
add rdi, 0FFFFFFFFFFFFFDD0h
mov rsi, r15
call _strcpy
lea rsi, [rbp+var_230]
mov edx, 1FFh
mov rdi, rbx
jmp short loc_5612B
loc_56120:
mov edx, 1FFh
mov rdi, rbx
mov rsi, r14
loc_5612B:
call strmake
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_56152
sub rax, rbx
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_56152:
call ___stack_chk_fail
|
long long unpack_filename(long long a1, _BYTE *a2)
{
long long v2; // r15
long long v3; // r12
_BYTE *v4; // r15
long long v6; // [rsp+8h] [rbp-238h] BYREF
_BYTE v7[520]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v8; // [rsp+218h] [rbp-28h]
v8 = __readfsqword(0x28u);
v2 = dirname_part((long long)v7, a2, &v6);
v3 = unpack_dirname((long long)v7, v7);
v4 = &a2[v2];
if ( (unsigned long long)(v3 + strlen(v4)) <= 0x1FF )
{
strcpy(&v7[v3], v4);
a2 = v7;
}
return strmake(a1, a2, 511LL) - a1;
}
|
unpack_filename:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA R12,[RBP + -0x230]
LEA RDX,[RBP + -0x238]
MOV RDI,R12
CALL 0x0014f371
MOV R15,RAX
MOV RDI,R12
MOV RSI,R12
CALL 0x00155efe
MOV R12,RAX
ADD R15,R14
MOV RDI,R15
CALL 0x00128150
ADD RAX,R12
CMP RAX,0x1ff
JA 0x00156120
LEA RDI,[R12 + RBP*0x1]
ADD RDI,-0x230
MOV RSI,R15
CALL 0x00128350
LEA RSI,[RBP + -0x230]
MOV EDX,0x1ff
MOV RDI,RBX
JMP 0x0015612b
LAB_00156120:
MOV EDX,0x1ff
MOV RDI,RBX
MOV RSI,R14
LAB_0015612b:
CALL 0x00192cd8
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00156152
SUB RAX,RBX
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00156152:
CALL 0x00128440
|
long unpack_filename(long param_1,char *param_2)
{
long lVar1;
long lVar2;
size_t sVar3;
long in_FS_OFFSET;
int1 local_240 [8];
char local_238 [520];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = dirname_part(local_238,param_2,local_240);
lVar2 = unpack_dirname(local_238,local_238);
sVar3 = strlen(param_2 + lVar1);
if (sVar3 + lVar2 < 0x200) {
strcpy(local_238 + lVar2,param_2 + lVar1);
param_2 = local_238;
}
lVar1 = strmake(param_1,param_2,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar1 - param_1;
}
|
|
57,060
|
common_embd_similarity_cos(float const*, float const*, int)
|
llama.cpp/common/common.cpp
|
float common_embd_similarity_cos(const float * embd1, const float * embd2, int n){
double sum = 0.0;
double sum1 = 0.0;
double sum2 = 0.0;
for (int i = 0; i < n; i++) {
sum += embd1[i] * embd2[i];
sum1 += embd1[i] * embd1[i];
sum2 += embd2[i] * embd2[i];
}
// Handle the case where one or both vectors are zero vectors
if (sum1 == 0.0 || sum2 == 0.0) {
if (sum1 == 0.0 && sum2 == 0.0) {
return 1.0f; // two zero vectors are similar
}
return 0.0f;
}
return sum / (sqrt(sum1) * sqrt(sum2));
}
|
O3
|
cpp
|
common_embd_similarity_cos(float const*, float const*, int):
subq $0x28, %rsp
testl %edx, %edx
jle 0xb55d7
movl %edx, %eax
xorpd %xmm0, %xmm0
xorpd %xmm4, %xmm4
xorl %ecx, %ecx
movss (%rsi,%rcx,4), %xmm3
movss (%rdi,%rcx,4), %xmm1
movaps %xmm1, %xmm2
shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0]
unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
mulps %xmm2, %xmm1
cvtps2pd %xmm1, %xmm1
addpd %xmm1, %xmm0
mulss %xmm3, %xmm3
xorps %xmm1, %xmm1
cvtss2sd %xmm3, %xmm1
addsd %xmm1, %xmm4
incq %rcx
cmpq %rcx, %rax
jne 0xb5554
xorps %xmm2, %xmm2
movapd %xmm0, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
movapd %xmm4, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rcx
andl $0x1, %ecx
ucomisd %xmm2, %xmm0
jne 0xb55b6
jnp 0xb55db
ucomisd %xmm2, %xmm4
jne 0xb55be
jnp 0xb55db
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movapd %xmm0, 0x10(%rsp)
jb 0xb55ef
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0xb5608
movb $0x1, %cl
movb $0x1, %al
testb %cl, %al
jne 0xb55e5
xorpd %xmm0, %xmm0
jmp 0xb5645
movss 0x13af3(%rip), %xmm0 # 0xc90e0
jmp 0xb5645
movsd %xmm4, 0x8(%rsp)
callq 0x1d6a0
xorpd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm4
movapd %xmm0, %xmm2
ucomisd %xmm1, %xmm4
jb 0xb5617
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
jmp 0xb562c
movapd %xmm4, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x1d6a0
movsd 0x8(%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm2
unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1]
divsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
addq $0x28, %rsp
retq
|
_Z26common_embd_similarity_cosPKfS0_i:
sub rsp, 28h
test edx, edx
jle loc_B55D7
mov eax, edx
xorpd xmm0, xmm0
xorpd xmm4, xmm4
xor ecx, ecx
loc_B5554:
movss xmm3, dword ptr [rsi+rcx*4]
movss xmm1, dword ptr [rdi+rcx*4]
movaps xmm2, xmm1
shufps xmm2, xmm1, 0
unpcklps xmm1, xmm3
mulps xmm1, xmm2
cvtps2pd xmm1, xmm1
addpd xmm0, xmm1
mulss xmm3, xmm3
xorps xmm1, xmm1
cvtss2sd xmm1, xmm3
addsd xmm4, xmm1
inc rcx
cmp rax, rcx
jnz short loc_B5554
xorps xmm2, xmm2
movapd xmm1, xmm0
cmpeqsd xmm1, xmm2
movq rax, xmm1
and eax, 1
movapd xmm1, xmm4
cmpeqsd xmm1, xmm2
movq rcx, xmm1
and ecx, 1
ucomisd xmm0, xmm2
jnz short loc_B55B6
jnp short loc_B55DB
loc_B55B6:
ucomisd xmm4, xmm2
jnz short loc_B55BE
jnp short loc_B55DB
loc_B55BE:
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
movapd [rsp+28h+var_18], xmm0
jb short loc_B55EF
xorps xmm2, xmm2
sqrtsd xmm2, xmm0
jmp short loc_B5608
loc_B55D7:
mov cl, 1
mov al, 1
loc_B55DB:
test al, cl
jnz short loc_B55E5
xorpd xmm0, xmm0
jmp short loc_B5645
loc_B55E5:
movss xmm0, cs:dword_C90E0
jmp short loc_B5645
loc_B55EF:
movsd [rsp+28h+var_20], xmm4
call _sqrt
xorpd xmm1, xmm1
movsd xmm4, [rsp+28h+var_20]
movapd xmm2, xmm0
loc_B5608:
ucomisd xmm4, xmm1
jb short loc_B5617
xorps xmm0, xmm0
sqrtsd xmm0, xmm4
jmp short loc_B562C
loc_B5617:
movapd xmm0, xmm4
movsd [rsp+28h+var_20], xmm2
call _sqrt
movsd xmm2, [rsp+28h+var_20]
loc_B562C:
movapd xmm1, [rsp+28h+var_18]
mulsd xmm2, xmm0
unpckhpd xmm1, xmm1
divsd xmm1, xmm2
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
loc_B5645:
add rsp, 28h
retn
|
float common_embd_similarity_cos(const float *a1, const float *a2, int a3)
{
__m128d v3; // xmm0
__m128d v4; // xmm4
long long i; // rcx
__m128 v6; // xmm3
char v7; // al
char v8; // cl
double v9; // xmm2_8
double v11; // xmm0_8
double v12; // xmm0_8
double v13; // [rsp+8h] [rbp-20h]
__m128d v14; // [rsp+10h] [rbp-18h]
if ( a3 <= 0 )
{
v8 = 1;
v7 = 1;
LABEL_9:
if ( ((unsigned __int8)v8 & (unsigned __int8)v7) != 0 )
return 1.0;
else
return 0.0;
}
v3 = 0LL;
v4 = 0LL;
for ( i = 0LL; i != a3; ++i )
{
v6 = (__m128)LODWORD(a2[i]);
v3 = _mm_add_pd(
v3,
_mm_cvtps_pd(
_mm_mul_ps(
_mm_unpacklo_ps((__m128)LODWORD(a1[i]), v6),
_mm_shuffle_ps((__m128)LODWORD(a1[i]), (__m128)LODWORD(a1[i]), 0))));
v4.m128d_f64[0] = v4.m128d_f64[0] + (float)(v6.m128_f32[0] * v6.m128_f32[0]);
}
v7 = *(_OWORD *)&_mm_cmpeq_sd(v3, (__m128d)0LL) & 1;
v8 = *(_OWORD *)&_mm_cmpeq_sd(v4, (__m128d)0LL) & 1;
if ( v3.m128d_f64[0] == 0.0 || v4.m128d_f64[0] == 0.0 )
goto LABEL_9;
v14 = v3;
if ( v3.m128d_f64[0] < 0.0 )
{
v13 = v4.m128d_f64[0];
v11 = sqrt(v3.m128d_f64[0]);
v4.m128d_f64[0] = v13;
v9 = v11;
}
else
{
v9 = sqrt(v3.m128d_f64[0]);
}
if ( v4.m128d_f64[0] < 0.0 )
v12 = sqrt(v4.m128d_f64[0]);
else
v12 = sqrt(v4.m128d_f64[0]);
return _mm_unpackhi_pd(v14, v14).m128d_f64[0] / (v9 * v12);
}
|
common_embd_similarity_cos:
SUB RSP,0x28
TEST EDX,EDX
JLE 0x001b55d7
MOV EAX,EDX
XORPD XMM0,XMM0
XORPD XMM4,XMM4
XOR ECX,ECX
LAB_001b5554:
MOVSS XMM3,dword ptr [RSI + RCX*0x4]
MOVSS XMM1,dword ptr [RDI + RCX*0x4]
MOVAPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x0
UNPCKLPS XMM1,XMM3
MULPS XMM1,XMM2
CVTPS2PD XMM1,XMM1
ADDPD XMM0,XMM1
MULSS XMM3,XMM3
XORPS XMM1,XMM1
CVTSS2SD XMM1,XMM3
ADDSD XMM4,XMM1
INC RCX
CMP RAX,RCX
JNZ 0x001b5554
XORPS XMM2,XMM2
MOVAPD XMM1,XMM0
CMPEQSD XMM1,XMM2
MOVQ RAX,XMM1
AND EAX,0x1
MOVAPD XMM1,XMM4
CMPEQSD XMM1,XMM2
MOVQ RCX,XMM1
AND ECX,0x1
UCOMISD XMM0,XMM2
JNZ 0x001b55b6
JNP 0x001b55db
LAB_001b55b6:
UCOMISD XMM4,XMM2
JNZ 0x001b55be
JNP 0x001b55db
LAB_001b55be:
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
MOVAPD xmmword ptr [RSP + 0x10],XMM0
JC 0x001b55ef
XORPS XMM2,XMM2
SQRTSD XMM2,XMM0
JMP 0x001b5608
LAB_001b55d7:
MOV CL,0x1
MOV AL,0x1
LAB_001b55db:
TEST AL,CL
JNZ 0x001b55e5
XORPD XMM0,XMM0
JMP 0x001b5645
LAB_001b55e5:
MOVSS XMM0,dword ptr [0x001c90e0]
JMP 0x001b5645
LAB_001b55ef:
MOVSD qword ptr [RSP + 0x8],XMM4
CALL 0x0011d6a0
XORPD XMM1,XMM1
MOVSD XMM4,qword ptr [RSP + 0x8]
MOVAPD XMM2,XMM0
LAB_001b5608:
UCOMISD XMM4,XMM1
JC 0x001b5617
XORPS XMM0,XMM0
SQRTSD XMM0,XMM4
JMP 0x001b562c
LAB_001b5617:
MOVAPD XMM0,XMM4
MOVSD qword ptr [RSP + 0x8],XMM2
CALL 0x0011d6a0
MOVSD XMM2,qword ptr [RSP + 0x8]
LAB_001b562c:
MOVAPD XMM1,xmmword ptr [RSP + 0x10]
MULSD XMM2,XMM0
UNPCKHPD XMM1,XMM1
DIVSD XMM1,XMM2
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
LAB_001b5645:
ADD RSP,0x28
RET
|
/* common_embd_similarity_cos(float const*, float const*, int) */
float common_embd_similarity_cos(float *param_1,float *param_2,int param_3)
{
float fVar1;
int1 auVar2 [16];
double dVar3;
bool bVar4;
bool bVar5;
ulong uVar6;
float fVar7;
double dVar8;
double dVar9;
double dStack_10;
if (param_3 < 1) {
bVar5 = true;
bVar4 = true;
}
else {
dVar8 = 0.0;
dVar3 = 0.0;
dVar9 = 0.0;
uVar6 = 0;
do {
fVar7 = param_2[uVar6];
fVar1 = param_1[uVar6];
dVar8 = dVar8 + (double)(fVar1 * fVar1);
dVar3 = dVar3 + (double)(fVar7 * fVar1);
dVar9 = dVar9 + (double)(fVar7 * fVar7);
uVar6 = uVar6 + 1;
} while ((uint)param_3 != uVar6);
bVar4 = dVar8 == 0.0;
bVar5 = dVar9 == 0.0;
if (((dVar8 != 0.0) || (NAN(dVar8))) && ((dVar9 != 0.0 || (NAN(dVar9))))) {
auVar2._8_4_ = SUB84(dVar3,0);
auVar2._0_8_ = dVar8;
auVar2._12_4_ = (int)((ulong)dVar3 >> 0x20);
dStack_10 = auVar2._8_8_;
if (dVar8 < 0.0) {
dVar8 = sqrt(dVar8);
}
else {
dVar8 = SQRT(dVar8);
}
if (dVar9 < 0.0) {
dVar9 = sqrt(dVar9);
}
else {
dVar9 = SQRT(dVar9);
}
return (float)(dStack_10 / (dVar8 * dVar9));
}
}
fVar7 = DAT_001c90e0;
if (!(bool)(bVar4 & bVar5)) {
fVar7 = 0.0;
}
return fVar7;
}
|
|
57,061
|
r3d_shader_load_generate_prefilter
|
r3d/src/r3d_state.c
|
void r3d_shader_load_generate_prefilter(void)
{
R3D.shader.generate.prefilter.id = rlLoadShaderCode(
VS_COMMON_CUBEMAP, FS_GENERATE_PREFILTER
);
r3d_shader_get_location(generate.prefilter, uMatProj);
r3d_shader_get_location(generate.prefilter, uMatView);
r3d_shader_get_location(generate.prefilter, uCubemap);
r3d_shader_get_location(generate.prefilter, uRoughness);
r3d_shader_enable(generate.prefilter);
r3d_shader_set_samplerCube_slot(generate.prefilter, uCubemap, 0);
r3d_shader_disable();
}
|
O3
|
c
|
r3d_shader_load_generate_prefilter:
pushq %rbp
movq %rsp, %rbp
leaq 0x58438(%rip), %rdi # 0x118e90
leaq 0x58a71(%rip), %rsi # 0x1194d0
callq 0x1e60d
movl %eax, 0xef71e(%rip) # 0x1b0188
leaq 0x503f0(%rip), %rsi # 0x110e61
movl %eax, %edi
callq 0x1ea66
movl %eax, 0xef70e(%rip) # 0x1b018c
movl 0xef704(%rip), %edi # 0x1b0188
leaq 0x503df(%rip), %rsi # 0x110e6a
callq 0x1ea66
movl %eax, 0xef6fa(%rip) # 0x1b0190
movl 0xef6ec(%rip), %edi # 0x1b0188
leaq 0x503e4(%rip), %rsi # 0x110e87
callq 0x1ea66
movl %eax, 0xef6ea(%rip) # 0x1b0198
movl 0xef6d4(%rip), %edi # 0x1b0188
leaq 0x503d5(%rip), %rsi # 0x110e90
callq 0x1ea66
movl %eax, 0xef6da(%rip) # 0x1b01a0
movl 0xef6bc(%rip), %edi # 0x1b0188
callq 0x1be92
cmpl $0x0, 0xef6bc(%rip) # 0x1b0194
je 0xc0b00
movl $0x0, 0xef6b0(%rip) # 0x1b0194
leaq 0xef6a9(%rip), %rsi # 0x1b0194
movl 0xef6a7(%rip), %edi # 0x1b0198
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
popq %rbp
jmp 0x1be9d
|
r3d_shader_load_generate_prefilter:
push rbp
mov rbp, rsp
lea rdi, VS_COMMON_CUBEMAP; "#version 330 core\nlayout(location=0)in"...
lea rsi, FS_GENERATE_PREFILTER; "#version 330 core\n#define PI 3.1415926"...
call rlLoadShaderCode
mov cs:dword_1B0188, eax
lea rsi, aUmatproj; "uMatProj"
mov edi, eax
call rlGetLocationUniform
mov cs:dword_1B018C, eax
mov edi, cs:dword_1B0188
lea rsi, aUmatview; "uMatView"
call rlGetLocationUniform
mov cs:dword_1B0190, eax
mov edi, cs:dword_1B0188
lea rsi, aUcubemap; "uCubemap"
call rlGetLocationUniform
mov cs:dword_1B0198, eax
mov edi, cs:dword_1B0188
lea rsi, aUroughness; "uRoughness"
call rlGetLocationUniform
mov cs:dword_1B01A0, eax
mov edi, cs:dword_1B0188
call rlEnableShader
cmp cs:dword_1B0194, 0
jz short loc_C0B00
mov cs:dword_1B0194, 0
lea rsi, dword_1B0194
mov edi, cs:dword_1B0198
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C0B00:
pop rbp
jmp rlDisableShader
|
long long r3d_shader_load_generate_prefilter()
{
int v0; // r8d
int v1; // r9d
dword_1B0188 = rlLoadShaderCode(
(long long)"#version 330 core\n"
"layout(location=0)in vec3 aPosition;uniform mat4 uMatProj;uniform mat4 uMatView;out vec3 vPo"
"sition;void main(){vPosition=aPosition;gl_Position=uMatProj*uMatView*vec4(vPosition,1.0);}",
(long long)"#version 330 core\n"
"#define PI 3.14159265359\n"
"in vec3 vPosition;uniform samplerCube uTexCubemap;uniform float uRoughness;out vec4 a;float "
"DistributionGGX(vec3 N,vec3 H,float t){float g=t*t;float h=g*g;float c=max(dot(N,H),0.0);flo"
"at d=c*c;float o=h;float l=(d*(h-1.0)+1.0);l=PI*l*l;return o/l;}float RadicalInverse_VdC(uin"
"t j){j=(j << 16u)|(j >> 16u);j=((j & 0x55555555u)<< 1u)|((j & 0xAAAAAAAAu)>> 1u);j=((j & 0x3"
"3333333u)<< 2u)|((j & 0xCCCCCCCCu)>> 2u);j=((j & 0x0F0F0F0Fu)<< 4u)|((j & 0xF0F0F0F0u)>> 4u)"
";j=((j & 0x00FF00FFu)<< 8u)|((j & 0xFF00FF00u)>> 8u);return float(j)*2.3283064365386963e-10;"
"}vec2 Hammersley(uint m,uint N){return vec2(float(m)/float(N),RadicalInverse_VdC(m));}vec3 I"
"mportanceSampleGGX(vec2 f,vec3 N,float t){float g=t*t;float q=2.0*PI*f.x;float k=sqrt((1.0-f"
".y)/(1.0+(g*g-1.0)*f.y));float x=sqrt(1.0-k*k);vec3 H;H.x=cos(q)*x;H.y=sin(q)*x;H.z=k;vec3 a"
"a=abs(N.z)< 0.999 ? vec3(0.0,0.0,1.0): vec3(1.0,0.0,0.0);vec3 y=normalize(cross(aa,N));vec3 "
"i=cross(N,y);vec3 w=y*H.x+i*H.y+N*H.z;return normalize(w);}void main(){vec3 N=normalize(vPos"
"ition);vec3 R=N;vec3 V=R;const uint SAMPLE_COUNT=1024u;vec3 r=vec3(0.0);float z=0.0;for(uint"
" m=0u;m < SAMPLE_COUNT;++m){vec2 f=Hammersley(m,SAMPLE_COUNT);vec3 H=ImportanceSampleGGX(f,N"
",uRoughness);vec3 L=normalize(2.0*dot(V,H)*H-V);float e=max(dot(N,L),0.0);if(e > 0.0){float "
"D=DistributionGGX(N,H,uRoughness);float c=max(dot(N,H),0.0);float b=max(dot(H,V),0.0);float "
"p=D*c/(4.0*b)+0.0001;float s=512.0;float v=4.0*PI/(6.0*s*s);float u=1.0/(float(SAMPLE_COUNT)"
"*p+0.0001);float n=(uRoughness==0.0)? 0.0 : 0.5*log2(u/v);r+=textureLod(uTexCubemap,L,n).rgb"
"*e;z+=e;}}r=r/z;a=vec4(r,1.0);}");
dword_1B018C = rlGetLocationUniform((unsigned int)dword_1B0188, (long long)"uMatProj");
dword_1B0190 = rlGetLocationUniform((unsigned int)dword_1B0188, (long long)"uMatView");
dword_1B0198 = rlGetLocationUniform((unsigned int)dword_1B0188, (long long)"uCubemap");
dword_1B01A0 = rlGetLocationUniform((unsigned int)dword_1B0188, (long long)"uRoughness");
rlEnableShader((unsigned int)dword_1B0188);
if ( dword_1B0194 )
{
dword_1B0194 = 0;
rlSetUniform((unsigned int)dword_1B0198, (long long)&dword_1B0194, 4, 1u, v0, v1);
}
return rlDisableShader();
}
|
r3d_shader_load_generate_prefilter:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x218e90]
LEA RSI,[0x2194d0]
CALL 0x0011e60d
MOV dword ptr [0x002b0188],EAX
LEA RSI,[0x210e61]
MOV EDI,EAX
CALL 0x0011ea66
MOV dword ptr [0x002b018c],EAX
MOV EDI,dword ptr [0x002b0188]
LEA RSI,[0x210e6a]
CALL 0x0011ea66
MOV dword ptr [0x002b0190],EAX
MOV EDI,dword ptr [0x002b0188]
LEA RSI,[0x210e87]
CALL 0x0011ea66
MOV dword ptr [0x002b0198],EAX
MOV EDI,dword ptr [0x002b0188]
LEA RSI,[0x210e90]
CALL 0x0011ea66
MOV dword ptr [0x002b01a0],EAX
MOV EDI,dword ptr [0x002b0188]
CALL 0x0011be92
CMP dword ptr [0x002b0194],0x0
JZ 0x001c0b00
MOV dword ptr [0x002b0194],0x0
LEA RSI,[0x2b0194]
MOV EDI,dword ptr [0x002b0198]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c0b00:
POP RBP
JMP 0x0011be9d
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void r3d_shader_load_generate_prefilter(void)
{
DAT_002b0188 = rlLoadShaderCode("#version 330 core\nlayout(location=0)in vec3 aPosition;uniform mat4 uMatProj;uniform mat4 uMatView;out vec3 vPosition;void main(){vPosition=aPosition;gl_Position=uMatProj*uMatView*vec4(vPosition,1.0);}"
,
"#version 330 core\n#define PI 3.14159265359\nin vec3 vPosition;uniform samplerCube uTexCubemap;uniform float uRoughness;out vec4 a;float DistributionGGX(vec3 N,vec3 H,float t){float g=t*t;float h=g*g;float c=max(dot(N,H),0.0);float d=c*c;float o=h;float l=(d*(h-1.0)+1.0);l=PI*l*l;return o/l;}float RadicalInverse_VdC(uint j){j=(j << 16u)|(j >> 16u);j=((j & 0x55555555u)<< 1u)|((j & 0xAAAAAAAAu)>> 1u);j=((j & 0x33333333u)<< 2u)|((j & 0xCCCCCCCCu)>> 2u);j=((j & 0x0F0F0F0Fu)<< 4u)|((j & 0xF0F0F0F0u)>> 4u);j=((j & 0x00FF00FFu)<< 8u)|((j & 0xFF00FF00u)>> 8u);return float(j)*2.3283064365386963e-10;}vec2 Hammersley(uint m,uint N){return vec2(float(m)/float(N),RadicalInverse_VdC(m));}vec3 ImportanceSampleGGX(vec2 f,vec3 N,float t){float g=t*t;float q=2.0*PI*f.x;float k=sqrt((1.0-f.y)/(1.0+(g*g-1.0)*f.y));float x=sqrt(1.0-k*k);vec3 H;H.x=cos(q)*x;H.y=sin(q)*x;H.z=k;vec3 aa=abs(N.z)< 0.999 ? vec3(0.0,0.0,1.0): vec3(1.0,0.0,0.0);vec3 y=normalize(cross(aa,N));vec3 i=cross(N,y);vec3 w=y*H.x+i*H.y+N*H.z;return normalize(w);}void main(){vec3 N=normalize(vPosition);vec3 R=N;vec3 V=R;const uint SAMPLE_COUNT=1024u;vec3 r=vec3(0.0);float z=0.0;for(uint m=0u;m < SAMPLE_COUNT;++m){vec2 f=Hammersley(m,SAMPLE_COUNT);vec3 H=ImportanceSampleGGX(f,N,uRoughness);vec3 L=normalize(2.0*dot(V,H)*H-V);float e=max(dot(N,L),0.0);if(e > 0.0){float D=DistributionGGX(N,H,uRoughness);float c=max(dot(N,H),0.0);float b=max(dot(H,V),0.0);float p=D*c/(4.0*b)+0.0001;float s=512.0;float v=4.0*PI/(6.0*s*s);float u=1.0/(float(SAMPLE_COUNT)*p+0.0001);float n=(uRoughness==0.0)? 0.0 : 0.5*log2(u/v);r+=textureLod(uTexCubemap,L,n).rgb*e;z+=e;}}r=r/z;a=vec4(r,1.0);}"
);
_DAT_002b018c = rlGetLocationUniform(DAT_002b0188,"uMatProj");
_DAT_002b0190 = rlGetLocationUniform(DAT_002b0188,"uMatView");
_DAT_002b0198 = rlGetLocationUniform(DAT_002b0188,"uCubemap");
_DAT_002b01a0 = rlGetLocationUniform(DAT_002b0188,"uRoughness");
rlEnableShader(DAT_002b0188);
if (_DAT_002b0194 != 0) {
_DAT_002b0194 = 0;
rlSetUniform(_DAT_002b0198,&DAT_002b0194,4,1);
}
rlDisableShader();
return;
}
|
|
57,062
|
ma_crypt_free
|
eloqsql/storage/maria/ma_crypt.c
|
void
ma_crypt_free(MARIA_SHARE* share)
{
if (share->crypt_data != NULL)
{
mysql_mutex_destroy(&share->crypt_data->lock);
my_free(share->crypt_data);
share->crypt_data= NULL;
}
}
|
O3
|
c
|
ma_crypt_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xc20(%rdi), %r15
testq %r15, %r15
je 0x75514
movq %rdi, %rbx
leaq 0x68(%r15), %r14
movq 0xa8(%r15), %rdi
testq %rdi, %rdi
je 0x754f5
leaq 0x31b634(%rip), %rax # 0x390b18
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0xa8(%r15)
movq %r14, %rdi
callq 0x2a0e0
movq 0xc20(%rbx), %rdi
callq 0xa72ae
movq $0x0, 0xc20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
ma_crypt_free:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r15, [rdi+0C20h]
test r15, r15
jz short loc_75514
mov rbx, rdi
lea r14, [r15+68h]
mov rdi, [r15+0A8h]
test rdi, rdi
jz short loc_754F5
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [r15+0A8h], 0
loc_754F5:
mov rdi, r14
call _pthread_mutex_destroy
mov rdi, [rbx+0C20h]
call my_free
mov qword ptr [rbx+0C20h], 0
loc_75514:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ma_crypt_free(long long a1)
{
long long v1; // r15
long long v3; // rdi
long long result; // rax
v1 = *(_QWORD *)(a1 + 3104);
if ( v1 )
{
v3 = *(_QWORD *)(v1 + 168);
if ( v3 )
{
((void ( *)(long long))PSI_server[9])(v3);
*(_QWORD *)(v1 + 168) = 0LL;
}
pthread_mutex_destroy(v1 + 104);
result = my_free(*(_QWORD *)(a1 + 3104));
*(_QWORD *)(a1 + 3104) = 0LL;
}
return result;
}
|
ma_crypt_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RDI + 0xc20]
TEST R15,R15
JZ 0x00175514
MOV RBX,RDI
LEA R14,[R15 + 0x68]
MOV RDI,qword ptr [R15 + 0xa8]
TEST RDI,RDI
JZ 0x001754f5
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [R15 + 0xa8],0x0
LAB_001754f5:
MOV RDI,R14
CALL 0x0012a0e0
MOV RDI,qword ptr [RBX + 0xc20]
CALL 0x001a72ae
MOV qword ptr [RBX + 0xc20],0x0
LAB_00175514:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void ma_crypt_free(long param_1)
{
long lVar1;
lVar1 = *(long *)(param_1 + 0xc20);
if (lVar1 != 0) {
if (*(long *)(lVar1 + 0xa8) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)(lVar1 + 0xa8) = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(lVar1 + 0x68));
my_free(*(int8 *)(param_1 + 0xc20));
*(int8 *)(param_1 + 0xc20) = 0;
}
return;
}
|
|
57,063
|
dbuf_realloc
|
bluesky950520[P]quickjs/cutils.c
|
int dbuf_realloc(DynBuf *s, size_t new_size)
{
size_t size;
uint8_t *new_buf;
if (new_size > s->allocated_size) {
if (s->error)
return -1;
size = s->allocated_size * 3 / 2;
if (size > new_size)
new_size = size;
new_buf = s->realloc_func(s->opaque, s->buf, new_size);
if (!new_buf) {
s->error = TRUE;
return -1;
}
s->buf = new_buf;
s->allocated_size = new_size;
}
return 0;
}
|
O0
|
c
|
dbuf_realloc:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1e4ae
movq 0x18(%rsp), %rax
cmpl $0x0, 0x18(%rax)
je 0x1e42a
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x1e4b6
movq 0x18(%rsp), %rax
imulq $0x3, 0x10(%rax), %rax
shrq %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jbe 0x1e452
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x28(%rcx), %rdi
movq 0x18(%rsp), %rcx
movq (%rcx), %rsi
movq 0x10(%rsp), %rdx
callq *%rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x1e494
movq 0x18(%rsp), %rax
movl $0x1, 0x18(%rax)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x1e4b6
movq (%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
|
dbuf_realloc:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_18]
mov rcx, [rsp+28h+var_10]
cmp rax, [rcx+10h]
jbe loc_1E4AE
mov rax, [rsp+28h+var_10]
cmp dword ptr [rax+18h], 0
jz short loc_1E42A
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp loc_1E4B6
loc_1E42A:
mov rax, [rsp+28h+var_10]
imul rax, [rax+10h], 3
shr rax, 1
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
cmp rax, [rsp+28h+var_18]
jbe short loc_1E452
mov rax, [rsp+28h+var_20]
mov [rsp+28h+var_18], rax
loc_1E452:
mov rax, [rsp+28h+var_10]
mov rax, [rax+20h]
mov rcx, [rsp+28h+var_10]
mov rdi, [rcx+28h]
mov rcx, [rsp+28h+var_10]
mov rsi, [rcx]
mov rdx, [rsp+28h+var_18]
call rax
mov [rsp+28h+var_28], rax
cmp [rsp+28h+var_28], 0
jnz short loc_1E494
mov rax, [rsp+28h+var_10]
mov dword ptr [rax+18h], 1
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_1E4B6
loc_1E494:
mov rcx, [rsp+28h+var_28]
mov rax, [rsp+28h+var_10]
mov [rax], rcx
mov rcx, [rsp+28h+var_18]
mov rax, [rsp+28h+var_10]
mov [rax+10h], rcx
loc_1E4AE:
mov [rsp+28h+var_4], 0
loc_1E4B6:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long dbuf_realloc(long long a1, unsigned long long a2)
{
long long v3; // [rsp+0h] [rbp-28h]
unsigned long long v4; // [rsp+10h] [rbp-18h]
v4 = a2;
if ( a2 <= *(_QWORD *)(a1 + 16) )
return 0;
if ( !*(_DWORD *)(a1 + 24) )
{
if ( (unsigned long long)(3LL * *(_QWORD *)(a1 + 16)) >> 1 > a2 )
v4 = (unsigned long long)(3LL * *(_QWORD *)(a1 + 16)) >> 1;
v3 = (*(long long ( **)(_QWORD, _QWORD, unsigned long long))(a1 + 32))(
*(_QWORD *)(a1 + 40),
*(_QWORD *)a1,
v4);
if ( !v3 )
{
*(_DWORD *)(a1 + 24) = 1;
return (unsigned int)-1;
}
*(_QWORD *)a1 = v3;
*(_QWORD *)(a1 + 16) = v4;
return 0;
}
return (unsigned int)-1;
}
|
dbuf_realloc:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
CMP RAX,qword ptr [RCX + 0x10]
JBE 0x0011e4ae
MOV RAX,qword ptr [RSP + 0x18]
CMP dword ptr [RAX + 0x18],0x0
JZ 0x0011e42a
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0011e4b6
LAB_0011e42a:
MOV RAX,qword ptr [RSP + 0x18]
IMUL RAX,qword ptr [RAX + 0x10],0x3
SHR RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x10]
JBE 0x0011e452
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
LAB_0011e452:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RCX + 0x28]
MOV RCX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RCX]
MOV RDX,qword ptr [RSP + 0x10]
CALL RAX
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JNZ 0x0011e494
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x18],0x1
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0011e4b6
LAB_0011e494:
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RCX
LAB_0011e4ae:
MOV dword ptr [RSP + 0x24],0x0
LAB_0011e4b6:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 dbuf_realloc(long *param_1,ulong param_2)
{
ulong uVar1;
long lVar2;
ulong local_18;
if ((ulong)param_1[2] < param_2) {
if ((int)param_1[3] != 0) {
return 0xffffffff;
}
uVar1 = (ulong)(param_1[2] * 3) >> 1;
local_18 = param_2;
if (param_2 < uVar1) {
local_18 = uVar1;
}
lVar2 = (*(code *)param_1[4])(param_1[5],*param_1,local_18);
if (lVar2 == 0) {
*(int4 *)(param_1 + 3) = 1;
return 0xffffffff;
}
*param_1 = lVar2;
param_1[2] = local_18;
}
return 0;
}
|
|
57,064
|
dbuf_realloc
|
bluesky950520[P]quickjs/cutils.c
|
int dbuf_realloc(DynBuf *s, size_t new_size)
{
size_t size;
uint8_t *new_buf;
if (new_size > s->allocated_size) {
if (s->error)
return -1;
size = s->allocated_size * 3 / 2;
if (size > new_size)
new_size = size;
new_buf = s->realloc_func(s->opaque, s->buf, new_size);
if (!new_buf) {
s->error = TRUE;
return -1;
}
s->buf = new_buf;
s->allocated_size = new_size;
}
return 0;
}
|
O2
|
c
|
dbuf_realloc:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %rax
xorl %ebx, %ebx
cmpq %rsi, %rax
jae 0x15c2f
movq %rdi, %r14
pushq $-0x1
popq %rbx
cmpl $0x0, 0x18(%rdi)
jne 0x15c2f
leaq (%rax,%rax,2), %r15
shrq %r15
cmpq %rsi, %r15
cmovbeq %rsi, %r15
movq (%r14), %rsi
movq 0x28(%r14), %rdi
movq %r15, %rdx
callq *0x20(%r14)
testq %rax, %rax
je 0x15c27
movq %rax, (%r14)
movq %r15, 0x10(%r14)
xorl %ebx, %ebx
jmp 0x15c2f
movl $0x1, 0x18(%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
|
dbuf_realloc:
push r15
push r14
push rbx
mov rax, [rdi+10h]
xor ebx, ebx
cmp rax, rsi
jnb short loc_15C2F
mov r14, rdi
push 0FFFFFFFFFFFFFFFFh
pop rbx
cmp dword ptr [rdi+18h], 0
jnz short loc_15C2F
lea r15, [rax+rax*2]
shr r15, 1
cmp r15, rsi
cmovbe r15, rsi
mov rsi, [r14]
mov rdi, [r14+28h]
mov rdx, r15
call qword ptr [r14+20h]
test rax, rax
jz short loc_15C27
mov [r14], rax
mov [r14+10h], r15
xor ebx, ebx
jmp short loc_15C2F
loc_15C27:
mov dword ptr [r14+18h], 1
loc_15C2F:
mov eax, ebx
pop rbx
pop r14
pop r15
retn
|
long long dbuf_realloc(long long a1, unsigned long long a2)
{
unsigned long long v2; // rax
unsigned int v3; // ebx
unsigned long long v4; // r15
long long v5; // rax
v2 = *(_QWORD *)(a1 + 16);
v3 = 0;
if ( v2 < a2 )
{
v3 = -1;
if ( !*(_DWORD *)(a1 + 24) )
{
v4 = (3 * v2) >> 1;
if ( v4 <= a2 )
v4 = a2;
v5 = (*(long long ( **)(_QWORD, _QWORD, unsigned long long))(a1 + 32))(
*(_QWORD *)(a1 + 40),
*(_QWORD *)a1,
v4);
if ( v5 )
{
*(_QWORD *)a1 = v5;
*(_QWORD *)(a1 + 16) = v4;
return 0;
}
else
{
*(_DWORD *)(a1 + 24) = 1;
}
}
}
return v3;
}
|
dbuf_realloc:
PUSH R15
PUSH R14
PUSH RBX
MOV RAX,qword ptr [RDI + 0x10]
XOR EBX,EBX
CMP RAX,RSI
JNC 0x00115c2f
MOV R14,RDI
PUSH -0x1
POP RBX
CMP dword ptr [RDI + 0x18],0x0
JNZ 0x00115c2f
LEA R15,[RAX + RAX*0x2]
SHR R15,0x1
CMP R15,RSI
CMOVBE R15,RSI
MOV RSI,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0x28]
MOV RDX,R15
CALL qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x00115c27
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x10],R15
XOR EBX,EBX
JMP 0x00115c2f
LAB_00115c27:
MOV dword ptr [R14 + 0x18],0x1
LAB_00115c2f:
MOV EAX,EBX
POP RBX
POP R14
POP R15
RET
|
int4 dbuf_realloc(long *param_1,ulong param_2)
{
long lVar1;
int4 uVar2;
ulong uVar3;
uVar2 = 0;
if ((ulong)param_1[2] < param_2) {
uVar2 = 0xffffffff;
if ((int)param_1[3] == 0) {
uVar3 = (ulong)(param_1[2] * 3) >> 1;
if (uVar3 <= param_2) {
uVar3 = param_2;
}
lVar1 = (*(code *)param_1[4])(param_1[5],*param_1,uVar3);
if (lVar1 == 0) {
*(int4 *)(param_1 + 3) = 1;
}
else {
*param_1 = lVar1;
param_1[2] = uVar3;
uVar2 = 0;
}
}
}
return uVar2;
}
|
|
57,065
|
ma_init
|
eloqsql/libmariadb/libmariadb/ma_init.c
|
void ma_init(void)
{
if (ma_init_done)
return;
ma_init_done=1;
{
#ifdef _WIN32
my_win_init();
#endif
return;
}
}
|
O0
|
c
|
ma_init:
pushq %rbp
movq %rsp, %rbp
leaq 0x3abb0e(%rip), %rax # 0x402ac9
cmpb $0x0, (%rax)
je 0x56fc2
jmp 0x56fcc
leaq 0x3abb00(%rip), %rax # 0x402ac9
movb $0x1, (%rax)
popq %rbp
retq
nop
|
ma_init:
push rbp
mov rbp, rsp
lea rax, ma_init_done
cmp byte ptr [rax], 0
jz short loc_56FC2
jmp short loc_56FCC
loc_56FC2:
lea rax, ma_init_done
mov byte ptr [rax], 1
loc_56FCC:
pop rbp
retn
|
void *ma_init()
{
void *result; // rax
result = &ma_init_done;
if ( !ma_init_done )
{
result = &ma_init_done;
ma_init_done = 1;
}
return result;
}
|
ma_init:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x502ac9]
CMP byte ptr [RAX],0x0
JZ 0x00156fc2
JMP 0x00156fcc
LAB_00156fc2:
LEA RAX,[0x502ac9]
MOV byte ptr [RAX],0x1
LAB_00156fcc:
POP RBP
RET
|
void ma_init(void)
{
if (ma_init_done == '\0') {
ma_init_done = '\x01';
}
return;
}
|
|
57,066
|
unsigned long nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase<char const (&) [11], 0>(char const (&) [11])
|
monkey531[P]llama/common/json.hpp
|
size_type erase(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
// Since we cannot move const Keys, re-construct them in place
for (auto next = it; ++next != this->end(); ++it)
{
it->~value_type(); // Destroy but keep allocation
new (&*it) value_type{std::move(*next)};
}
Container::pop_back();
return 1;
}
}
return 0;
}
|
O2
|
cpp
|
unsigned long nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase<char const (&) [11], 0>(char const (&) [11]):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%r14), %r13
cmpq %r13, %rbx
je 0x79847
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3afd1
testb %al, %al
jne 0x7981a
addq $0x30, %rbx
jmp 0x797fc
movq %rbx, %r15
leaq 0x30(%r15), %r12
cmpq 0x8(%r14), %r12
je 0x7983f
movq %r15, %rdi
callq 0x300ce
movq %r15, %rdi
movq %r12, %rsi
callq 0x30d2e
movq %r12, %r15
jmp 0x7981d
movq %r14, %rdi
callq 0x794d0
xorl %eax, %eax
cmpq %r13, %rbx
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_:
push r15
push r14
push r13
push r12
push rbx
mov r15, rsi
mov r14, rdi
mov rbx, [rdi]
loc_797FC:
mov r13, [r14+8]
cmp rbx, r13
jz short loc_79847
mov rdi, rbx
mov rsi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_7981A
add rbx, 30h ; '0'
jmp short loc_797FC
loc_7981A:
mov r15, rbx
loc_7981D:
lea r12, [r15+30h]
cmp r12, [r14+8]
jz short loc_7983F
mov rdi, r15; void *
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEED2Ev; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~pair()
mov rdi, r15
mov rsi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&)
mov r15, r12
jmp short loc_7981D
loc_7983F:
mov rdi, r14
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE8pop_backEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::pop_back(void)
loc_79847:
xor eax, eax
cmp rbx, r13
setnz al
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
_BOOL8 ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_(
long long *a1)
{
long long i; // rbx
long long v2; // r13
char *j; // r15
for ( i = *a1; ; i += 48LL )
{
v2 = a1[1];
if ( i == v2 )
break;
if ( std::operator==<char>(i) )
{
for ( j = (char *)i; j + 48 != (char *)a1[1]; j += 48 )
{
std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~pair(j);
std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair(
(long long)j,
(long long)(j + 48));
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::pop_back((long long)a1);
return i != v2;
}
}
return i != v2;
}
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
LAB_001797fc:
MOV R13,qword ptr [R14 + 0x8]
CMP RBX,R13
JZ 0x00179847
MOV RDI,RBX
MOV RSI,R15
CALL 0x0013afd1
TEST AL,AL
JNZ 0x0017981a
ADD RBX,0x30
JMP 0x001797fc
LAB_0017981a:
MOV R15,RBX
LAB_0017981d:
LEA R12,[R15 + 0x30]
CMP R12,qword ptr [R14 + 0x8]
JZ 0x0017983f
MOV RDI,R15
CALL 0x001300ce
MOV RDI,R15
MOV RSI,R12
CALL 0x00130d2e
MOV R15,R12
JMP 0x0017981d
LAB_0017983f:
MOV RDI,R14
CALL 0x001794d0
LAB_00179847:
XOR EAX,EAX
CMP RBX,R13
SETNZ AL
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
bool _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_
(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*param_1,char *param_2)
{
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*ppVar1;
string *psVar2;
bool bVar3;
string *psVar4;
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this;
for (psVar4 = *(string **)param_1; psVar2 = *(string **)(param_1 + 8), psVar4 != psVar2;
psVar4 = psVar4 + 0x30) {
bVar3 = std::operator==(psVar4,param_2);
this = (pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)psVar4;
if (bVar3) goto LAB_0017981d;
}
LAB_00179847:
return psVar4 != psVar2;
LAB_0017981d:
while (ppVar1 = this + 0x30,
ppVar1 != *(pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(param_1 + 8)) {
std::
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::~pair(this);
std::
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::pair(this,ppVar1);
this = ppVar1;
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::pop_back(param_1);
goto LAB_00179847;
}
|
|
57,067
|
pagecache_delete_pages
|
eloqsql/storage/maria/ma_pagecache.c
|
my_bool pagecache_delete_pages(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
uint page_count,
enum pagecache_page_lock lock,
my_bool flush)
{
pgcache_page_no_t page_end;
DBUG_ENTER("pagecache_delete_pages");
DBUG_ASSERT(page_count > 0);
page_end= pageno + page_count;
do
{
if (pagecache_delete(pagecache, file, pageno,
lock, flush))
DBUG_RETURN(1);
} while (++pageno != page_end);
DBUG_RETURN(0);
}
|
O0
|
c
|
pagecache_delete_pages:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r9b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movb %al, -0x29(%rbp)
jmp 0x9d463
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movsbl -0x29(%rbp), %r8d
callq 0x9d150
cmpb $0x0, %al
je 0x9d496
jmp 0x9d490
movb $0x1, -0x1(%rbp)
jmp 0x9d4b0
jmp 0x9d498
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
cmpq -0x38(%rbp), %rax
jne 0x9d471
jmp 0x9d4ac
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
pagecache_delete_pages:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, r9b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_29], al
jmp short $+2
loc_9D463:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_24]
add rax, rcx
mov [rbp+var_38], rax
loc_9D471:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_28]
movsx r8d, [rbp+var_29]
call pagecache_delete
cmp al, 0
jz short loc_9D496
jmp short $+2
loc_9D490:
mov [rbp+var_1], 1
jmp short loc_9D4B0
loc_9D496:
jmp short $+2
loc_9D498:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
cmp rax, [rbp+var_38]
jnz short loc_9D471
jmp short $+2
loc_9D4AC:
mov [rbp+var_1], 0
loc_9D4B0:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char pagecache_delete_pages(_QWORD *a1, long long a2, long long a3, unsigned int a4, unsigned int a5, bool a6)
{
long long v7; // [rsp+8h] [rbp-38h]
long long v10; // [rsp+20h] [rbp-20h]
v10 = a3;
v7 = a4 + a3;
do
{
if ( pagecache_delete(a1, a2, v10, a5, a6) )
return 1;
++v10;
}
while ( v10 != v7 );
return 0;
}
|
pagecache_delete_pages:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,R9B
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],R8D
MOV byte ptr [RBP + -0x29],AL
JMP 0x0019d463
LAB_0019d463:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0019d471:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x28]
MOVSX R8D,byte ptr [RBP + -0x29]
CALL 0x0019d150
CMP AL,0x0
JZ 0x0019d496
JMP 0x0019d490
LAB_0019d490:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0019d4b0
LAB_0019d496:
JMP 0x0019d498
LAB_0019d498:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,qword ptr [RBP + -0x38]
JNZ 0x0019d471
JMP 0x0019d4ac
LAB_0019d4ac:
MOV byte ptr [RBP + -0x1],0x0
LAB_0019d4b0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
pagecache_delete_pages
(int8 param_1,int8 param_2,long param_3,uint param_4,int4 param_5,
char param_6)
{
char cVar1;
long local_28;
local_28 = param_3;
do {
cVar1 = pagecache_delete(param_1,param_2,local_28,param_5,(int)param_6);
if (cVar1 != '\0') {
return 1;
}
local_28 = local_28 + 1;
} while (local_28 != param_3 + (ulong)param_4);
return 0;
}
|
|
57,068
|
set_max_sort_char
|
eloqsql/strings/ctype-simple.c
|
static void set_max_sort_char(struct charset_info_st *cs)
{
uchar max_char;
uint i;
if (!cs->sort_order)
return;
max_char=cs->sort_order[(uchar) cs->max_sort_char];
for (i= 0; i < 256; i++)
{
if ((uchar) cs->sort_order[i] > max_char)
{
max_char=(uchar) cs->sort_order[i];
cs->max_sort_char= i;
}
}
}
|
O0
|
c
|
set_max_sort_char:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x97be5
jmp 0x97c56
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xa8(%rcx), %rcx
movzbl %cl, %ecx
movb (%rax,%rcx), %al
movb %al, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x100, -0x10(%rbp) # imm = 0x100
jae 0x97c56
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x10(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movzbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jle 0x97c49
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x10(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x9(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0xa8(%rax)
jmp 0x97c4b
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x97c08
popq %rbp
retq
nopl (%rax,%rax)
|
set_max_sort_char:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+58h], 0
jnz short loc_97BE5
jmp short loc_97C56
loc_97BE5:
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+0A8h]
movzx ecx, cl
mov al, [rax+rcx]
mov [rbp+var_9], al
mov [rbp+var_10], 0
loc_97C08:
cmp [rbp+var_10], 100h
jnb short loc_97C56
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov ecx, [rbp+var_10]
movzx eax, byte ptr [rax+rcx]
movzx ecx, [rbp+var_9]
cmp eax, ecx
jle short loc_97C49
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov ecx, [rbp+var_10]
mov al, [rax+rcx]
mov [rbp+var_9], al
mov eax, [rbp+var_10]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+0A8h], rcx
loc_97C49:
jmp short $+2
loc_97C4B:
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
jmp short loc_97C08
loc_97C56:
pop rbp
retn
|
unsigned __int8 set_max_sort_char(long long a1)
{
unsigned __int8 result; // al
unsigned int i; // [rsp+0h] [rbp-10h]
unsigned __int8 v3; // [rsp+7h] [rbp-9h]
result = a1;
if ( *(_QWORD *)(a1 + 88) )
{
result = *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*(_QWORD *)(a1 + 168));
v3 = result;
for ( i = 0; i < 0x100; ++i )
{
if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + i) > (int)v3 )
{
v3 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + i);
*(_QWORD *)(a1 + 168) = i;
}
result = i + 1;
}
}
return result;
}
|
set_max_sort_char:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x58],0x0
JNZ 0x00197be5
JMP 0x00197c56
LAB_00197be5:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0xa8]
MOVZX ECX,CL
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x9],AL
MOV dword ptr [RBP + -0x10],0x0
LAB_00197c08:
CMP dword ptr [RBP + -0x10],0x100
JNC 0x00197c56
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV ECX,dword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX ECX,byte ptr [RBP + -0x9]
CMP EAX,ECX
JLE 0x00197c49
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV ECX,dword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x9],AL
MOV EAX,dword ptr [RBP + -0x10]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa8],RCX
LAB_00197c49:
JMP 0x00197c4b
LAB_00197c4b:
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00197c08
LAB_00197c56:
POP RBP
RET
|
void set_max_sort_char(long param_1)
{
int4 local_18;
int1 local_11;
if (*(long *)(param_1 + 0x58) != 0) {
local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (*(ulong *)(param_1 + 0xa8) & 0xff));
for (local_18 = 0; local_18 < 0x100; local_18 = local_18 + 1) {
if (local_11 < *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18)) {
local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18);
*(ulong *)(param_1 + 0xa8) = (ulong)local_18;
}
}
}
return;
}
|
|
57,069
|
hexlo
|
eloqsql/strings/ctype-utf8.c
|
static int hexlo(int x)
{
static const char hex_lo_digit[256]=
{
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* !"#$%&'()*+,-./ */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, /* 0123456789:;<=>? */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* @ABCDEFGHIJKLMNO */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* PQRSTUVWXYZ[\]^_ */
-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* `abcdefghijklmno */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* pqrstuvwxyz{|}~. */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
};
return hex_lo_digit[(unsigned int) x];
}
|
O0
|
c
|
hexlo:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x14c85d(%rip), %rax # 0x1bebb0
movsbl (%rax,%rcx), %eax
popq %rbp
retq
nopl (%rax)
|
hexlo:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
mov ecx, eax
lea rax, hexlo_hex_lo_digit
movsx eax, byte ptr [rax+rcx]
pop rbp
retn
|
long long hexlo(int a1)
{
return (unsigned int)hexlo_hex_lo_digit[a1];
}
|
hexlo:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
MOV ECX,EAX
LEA RAX,[0x2bebb0]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
POP RBP
RET
|
int hexlo(uint param_1)
{
return (int)(char)hexlo_hex_lo_digit[param_1];
}
|
|
57,070
|
bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
bool operator==(const_reference lhs, ScalarType rhs) noexcept
{
return lhs == basic_json(rhs);
}
|
O3
|
cpp
|
bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x4bb84
movq %r14, %rdi
movl $0x1, %esi
callq 0x3d7c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e4d2
movl %eax, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d7c0
movq %r14, %rdi
callq 0x4a3ae
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
mov r14, rsp
movaps xmmword ptr [r14], xmm0
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov ebx, eax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov eax, ebx
add rsp, 18h
pop rbx
pop r14
retn
|
long long ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_(
unsigned __int8 *a1,
long long a2)
{
unsigned int v2; // ebx
_OWORD v4[2]; // [rsp+0h] [rbp-28h] BYREF
v4[0] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)v4,
a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v4);
v2 = nlohmann::json_abi_v3_11_3::operator==(a1, (unsigned __int8 *)v4, (__m128d)0LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)v4);
return v2;
}
|
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
MOV R14,RSP
MOVAPS xmmword ptr [R14],XMM0
MOV RDI,R14
CALL 0x0014bb84
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013d7c0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0014e4d2
MOV EBX,EAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d7c0
MOV RDI,R14
CALL 0x0014a3ae
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
int4
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
(basic_json *param_1)
{
int4 uVar1;
int8 local_28;
int8 uStack_20;
local_28 = 0;
uStack_20 = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
uVar1 = nlohmann::json_abi_v3_11_3::operator==(param_1,(basic_json *)&local_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_28);
return uVar1;
}
|
|
57,071
|
common_sampler_init(llama_model const*, common_params_sampling const&)
|
monkey531[P]llama/common/sampling.cpp
|
struct common_sampler * common_sampler_init(const struct llama_model * model, const struct common_params_sampling & params) {
const llama_vocab * vocab = llama_model_get_vocab(model);
llama_sampler_chain_params lparams = llama_sampler_chain_default_params();
lparams.no_perf = params.no_perf;
std::vector<const char *> trigger_words;
trigger_words.reserve(params.grammar_trigger_words.size());
for (const auto & str : params.grammar_trigger_words) {
trigger_words.push_back(str.word.c_str());
}
struct llama_sampler * grmr;
if (params.grammar.compare(0, 11, "%llguidance") == 0) {
#ifdef LLAMA_USE_LLGUIDANCE
grmr = llama_sampler_init_llg(vocab, "lark", params.grammar.c_str());
#else
GGML_ABORT("llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
#endif // LLAMA_USE_LLGUIDANCE
} else {
grmr = params.grammar_lazy
? llama_sampler_init_grammar_lazy(vocab, params.grammar.c_str(), "root",
trigger_words.data(), trigger_words.size(),
params.grammar_trigger_tokens.data(), params.grammar_trigger_tokens.size())
: llama_sampler_init_grammar(vocab, params.grammar.c_str(), "root");
}
auto * result = new common_sampler {
/* .params = */ params,
/* .grmr = */ grmr,
/* .chain = */ llama_sampler_chain_init(lparams),
/* .prev = */ ring_buffer<llama_token>(std::max(32, params.n_prev)),
/* .cur = */ {},
/* .cur_p = */ {},
};
llama_sampler_chain_add(result->chain,
llama_sampler_init_logit_bias(
llama_vocab_n_tokens(vocab),
params.logit_bias.size(),
params.logit_bias.data()));
if (params.mirostat == 0) {
for (const auto & cnstr : params.samplers) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY:
{
std::vector<const char *> c_breakers;
c_breakers.reserve(params.dry_sequence_breakers.size());
for (const auto & str : params.dry_sequence_breakers) {
c_breakers.push_back(str.c_str());
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dry (vocab, llama_model_n_ctx_train(model), params.dry_multiplier, params.dry_base, params.dry_allowed_length, params.dry_penalty_last_n, c_breakers.data(), c_breakers.size()));
}
break;
case COMMON_SAMPLER_TYPE_TOP_K:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_k (params.top_k));
break;
case COMMON_SAMPLER_TYPE_TOP_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_p (params.top_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_MIN_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_min_p (params.min_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_XTC:
llama_sampler_chain_add(result->chain, llama_sampler_init_xtc (params.xtc_probability, params.xtc_threshold, params.min_keep, params.seed));
break;
case COMMON_SAMPLER_TYPE_TYPICAL_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_typical (params.typ_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_TEMPERATURE:
llama_sampler_chain_add(result->chain, llama_sampler_init_temp_ext (params.temp, params.dynatemp_range, params.dynatemp_exponent));
break;
case COMMON_SAMPLER_TYPE_INFILL:
llama_sampler_chain_add(result->chain, llama_sampler_init_infill (vocab));
break;
case COMMON_SAMPLER_TYPE_PENALTIES:
llama_sampler_chain_add(result->chain, llama_sampler_init_penalties(params.penalty_last_n, params.penalty_repeat, params.penalty_freq, params.penalty_present));
break;
default:
GGML_ASSERT(false && "unknown sampler type");
}
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dist(params.seed));
} else if (params.mirostat == 1) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat(llama_vocab_n_tokens(vocab), params.seed, params.mirostat_tau, params.mirostat_eta, 100));
} else if (params.mirostat == 2) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat_v2(params.seed, params.mirostat_tau, params.mirostat_eta));
} else {
GGML_ASSERT(false && "unknown mirostat version");
}
return result;
}
|
O1
|
cpp
|
common_sampler_init(llama_model const*, common_params_sampling const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, 0x58(%rsp)
callq 0x1c140
movq %rax, 0x8(%rsp)
callq 0x1bd10
movb 0x61(%rbx), %bpl
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0xc8(%rbx), %rax
subq 0xc0(%rbx), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
callq 0xd117a
movq 0xc0(%rbx), %r15
movq 0xc8(%rbx), %r13
cmpq %r13, %r15
je 0xcfa0b
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r12
movq (%r15), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xd1844
addq $0x28, %r15
cmpq %r13, %r15
jne 0xcf9ef
leaq 0x98(%rbx), %rdi
leaq 0x2986c(%rip), %rcx # 0xf9285
movl $0xb, %edx
xorl %esi, %esi
callq 0x1bb50
testl %eax, %eax
je 0xcfe13
movq 0x98(%rbx), %rsi
cmpb $0x1, 0xb8(%rbx)
jne 0xcfa7a
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
subq %rcx, %r8
sarq $0x3, %r8
movq 0xd8(%rbx), %r9
movq 0xe0(%rbx), %rax
subq %r9, %rax
sarq $0x2, %rax
movq %rax, (%rsp)
leaq 0x28c3c(%rip), %rdx # 0xf86aa
movq 0x8(%rsp), %rdi
callq 0x1b700
jmp 0xcfa8b
leaq 0x28c29(%rip), %rdx # 0xf86aa
movq 0x8(%rsp), %rdi
callq 0x1b180
movq %rax, %r12
movl $0x1b8, %edi # imm = 0x1B8
callq 0x1b890
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a3a
movq %r12, 0x138(%r14)
movzbl %bpl, %edi
callq 0x1b4b0
movq %rax, 0x140(%r14)
movl 0x4(%rbx), %eax
cmpl $0x21, %eax
movl $0x20, %esi
cmovgel %eax, %esi
movq %rsi, 0x148(%r14)
movq %r14, %rdi
addq $0x168, %rdi # imm = 0x168
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movq $0x0, 0x160(%r14)
leaq 0x10(%rsp), %rdx
callq 0x78a38
xorps %xmm0, %xmm0
movups %xmm0, 0x1a0(%r14)
movups %xmm0, 0x190(%r14)
movups %xmm0, 0x180(%r14)
movq $0x0, 0x1b0(%r14)
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c0b0
movq 0x120(%rbx), %rdx
movq 0x128(%rbx), %rsi
subq %rdx, %rsi
shrq $0x3, %rsi
movl %eax, %edi
callq 0x1be40
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movl 0x54(%rbx), %eax
cmpl $0x2, %eax
je 0xcfd9b
cmpl $0x1, %eax
je 0xcfd54
testl %eax, %eax
jne 0xcfe4e
movq 0x80(%rbx), %r15
movq 0x88(%rbx), %rbp
cmpq %rbp, %r15
je 0xcfdd1
leaq 0x10(%rsp), %r13
movq %rbp, 0x50(%rsp)
movl (%r15), %eax
decl %eax
cmpl $0x9, %eax
ja 0xcfe2d
leaq 0x29513(%rip), %rcx # 0xf90c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x70(%rbx), %rsi
subq 0x68(%rbx), %rsi
sarq $0x5, %rsi
movq %r13, %rdi
callq 0xd117a
movq 0x68(%rbx), %r12
movq 0x70(%rbx), %rbp
cmpq %rbp, %r12
je 0xcfced
movq (%r12), %rax
movq %rax, 0x60(%rsp)
movq %r13, %rdi
leaq 0x60(%rsp), %rsi
callq 0xd1844
addq $0x20, %r12
jmp 0xcfbe3
movq 0x140(%r14), %r12
movl 0x34(%rbx), %edi
movss 0x38(%rbx), %xmm0
movss 0x3c(%rbx), %xmm1
movss 0x40(%rbx), %xmm2
callq 0x1b6c0
jmp 0xcfcd0
movq 0x140(%r14), %r12
movss 0x24(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b680
jmp 0xcfcd0
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
movss 0x2c(%rbx), %xmm1
movss 0x30(%rbx), %xmm2
callq 0x1c070
jmp 0xcfcd0
movq 0x140(%r14), %r12
movss 0x14(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b130
jmp 0xcfcd0
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1bcd0
jmp 0xcfcd0
movq 0x140(%r14), %r12
movss 0x18(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1bbf0
jmp 0xcfcd0
movq 0x140(%r14), %r12
movl 0x10(%rbx), %edi
callq 0x1b3f0
jmp 0xcfcd0
movq 0x140(%r14), %r12
movss 0x1c(%rbx), %xmm0
movss 0x20(%rbx), %xmm1
movslq 0xc(%rbx), %rdi
movl (%rbx), %esi
callq 0x1b2a0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
addq $0x4, %r15
cmpq %rbp, %r15
jne 0xcfb98
jmp 0xcfdd1
movq 0x140(%r14), %r12
movq 0x58(%rsp), %rdi
callq 0x1b850
movss 0x44(%rbx), %xmm0
movss 0x48(%rbx), %xmm1
movl 0x4c(%rbx), %edx
movl 0x50(%rbx), %ecx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
subq %r8, %r9
sarq $0x3, %r9
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x1be70
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x50(%rsp), %rbp
je 0xcfcdb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
jmp 0xcfcdb
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
callq 0x1b520
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c0b0
movl (%rbx), %esi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
movl %eax, %edi
movl $0x64, %edx
callq 0x1c130
jmp 0xcfddf
movq 0x140(%r14), %r15
movss 0x28(%rbx), %xmm0
callq 0x1b520
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x140(%r14), %r12
movl (%rbx), %edi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
callq 0x1be50
jmp 0xcfddf
movq 0x140(%r14), %r12
movl (%rbx), %edi
callq 0x1bd30
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xcfe01
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29477(%rip), %rdi # 0xf9291
leaq 0x294be(%rip), %rdx # 0xf92df
movl $0xa5, %esi
xorl %eax, %eax
callq 0x1be80
leaq 0x2945d(%rip), %rdi # 0xf9291
leaq 0x1a305(%rip), %rdx # 0xea140
leaq 0x294d5(%rip), %rcx # 0xf9317
movl $0xe5, %esi
xorl %eax, %eax
callq 0x1be80
leaq 0x2943c(%rip), %rdi # 0xf9291
leaq 0x1a2e4(%rip), %rdx # 0xea140
leaq 0x294d4(%rip), %rcx # 0xf9337
movl $0xf0, %esi
xorl %eax, %eax
callq 0x1be80
jmp 0xcfeb3
jmp 0xcfe73
movq %rax, %rbx
movq %r14, %rdi
callq 0x21980
jmp 0xcfe83
movq %rax, %rbx
movl $0x1b8, %esi # imm = 0x1B8
movq %r14, %rdi
jmp 0xcfeac
jmp 0xcfeb3
jmp 0xcfe97
jmp 0xcfeb3
jmp 0xcfeb3
jmp 0xcfeb3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcfeb6
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
jmp 0xcfeb6
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xcfecd
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
|
_Z19common_sampler_initPK11llama_modelRK22common_params_sampling:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, rsi
mov [rsp+98h+var_40], rdi
call _llama_model_get_vocab
mov [rsp+98h+var_90], rax
call _llama_sampler_chain_default_params
mov bpl, [rbx+61h]
xorps xmm0, xmm0
lea rdi, [rsp+98h+var_68]
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rax, [rbx+0C8h]
sub rax, [rbx+0C0h]
sar rax, 3
mov rsi, 0CCCCCCCCCCCCCCCDh
imul rsi, rax
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r15, [rbx+0C0h]
mov r13, [rbx+0C8h]
cmp r15, r13
jz short loc_CFA0B
lea r14, [rsp+98h+var_68]
lea r12, [rsp+98h+var_88]
loc_CF9EF:
mov rax, [r15]
mov [rsp+98h+var_88], rax
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r15, 28h ; '('
cmp r15, r13
jnz short loc_CF9EF
loc_CFA0B:
lea rdi, [rbx+98h]
lea rcx, aLlguidance; "%llguidance"
mov edx, 0Bh
xor esi, esi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*)
test eax, eax
jz loc_CFE13
mov rsi, [rbx+98h]
cmp byte ptr [rbx+0B8h], 1
jnz short loc_CFA7A
mov rcx, [rsp+98h+var_68]
mov r8, [rsp+98h+var_60]
sub r8, rcx
sar r8, 3
mov r9, [rbx+0D8h]
mov rax, [rbx+0E0h]
sub rax, r9
sar rax, 2
mov [rsp+98h+var_98], rax
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar_lazy
jmp short loc_CFA8B
loc_CFA7A:
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar
loc_CFA8B:
mov r12, rax
mov edi, 1B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; common_params_sampling *
call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&)
mov [r14+138h], r12
movzx edi, bpl
call _llama_sampler_chain_init
mov [r14+140h], rax
mov eax, [rbx+4]
cmp eax, 21h ; '!'
mov esi, 20h ; ' '
cmovge esi, eax
mov [r14+148h], rsi
mov rdi, r14
add rdi, 168h
xorps xmm0, xmm0
movups xmmword ptr [r14+150h], xmm0
mov qword ptr [r14+160h], 0
lea rdx, [rsp+98h+var_88]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
xorps xmm0, xmm0
movups xmmword ptr [r14+1A0h], xmm0
movups xmmword ptr [r14+190h], xmm0
movups xmmword ptr [r14+180h], xmm0
mov qword ptr [r14+1B0h], 0
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov rdx, [rbx+120h]
mov rsi, [rbx+128h]
sub rsi, rdx
shr rsi, 3
mov edi, eax
call _llama_sampler_init_logit_bias
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov eax, [rbx+54h]
cmp eax, 2
jz loc_CFD9B
cmp eax, 1
jz loc_CFD54
test eax, eax
jnz loc_CFE4E
mov r15, [rbx+80h]
mov rbp, [rbx+88h]
cmp r15, rbp
jz loc_CFDD1
lea r13, [rsp+98h+var_88]
mov [rsp+98h+var_48], rbp
loc_CFB98:
mov eax, [r15]
dec eax; switch 10 cases
cmp eax, 9
ja def_CFBB4; jumptable 00000000000CFBB4 default case, case 5
lea rcx, jpt_CFBB4
movsxd rax, ds:(jpt_CFBB4 - 0F90C0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CFBB6:
xorps xmm0, xmm0; jumptable 00000000000CFBB4 case 1
movaps xmmword ptr [rsp+98h+var_88], xmm0
mov [rsp+98h+var_78], 0
mov rsi, [rbx+70h]
sub rsi, [rbx+68h]
sar rsi, 5
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r12, [rbx+68h]
mov rbp, [rbx+70h]
loc_CFBE3:
cmp r12, rbp
jz loc_CFCED
mov rax, [r12]
mov [rsp+98h+var_38], rax
mov rdi, r13
lea rsi, [rsp+98h+var_38]
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r12, 20h ; ' '
jmp short loc_CFBE3
loc_CFC08:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 10
mov edi, [rbx+34h]
movss xmm0, dword ptr [rbx+38h]
movss xmm1, dword ptr [rbx+3Ch]
movss xmm2, dword ptr [rbx+40h]
call _llama_sampler_init_penalties
jmp loc_CFCD0
loc_CFC2B:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 6
movss xmm0, dword ptr [rbx+24h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_typical
jmp loc_CFCD0
loc_CFC45:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 7
movss xmm0, dword ptr [rbx+28h]
movss xmm1, dword ptr [rbx+2Ch]
movss xmm2, dword ptr [rbx+30h]
call _llama_sampler_init_temp_ext
jmp short loc_CFCD0
loc_CFC62:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 3
movss xmm0, dword ptr [rbx+14h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_top_p
jmp short loc_CFCD0
loc_CFC79:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 9
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_infill
jmp short loc_CFCD0
loc_CFC8C:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 4
movss xmm0, dword ptr [rbx+18h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_min_p
jmp short loc_CFCD0
loc_CFCA3:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 2
mov edi, [rbx+10h]
call _llama_sampler_init_top_k
jmp short loc_CFCD0
loc_CFCB4:
mov r12, [r14+140h]; jumptable 00000000000CFBB4 case 8
movss xmm0, dword ptr [rbx+1Ch]
movss xmm1, dword ptr [rbx+20h]
movsxd rdi, dword ptr [rbx+0Ch]
mov esi, [rbx]
call _llama_sampler_init_xtc
loc_CFCD0:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
loc_CFCDB:
add r15, 4
cmp r15, rbp
jnz loc_CFB98
jmp loc_CFDD1
loc_CFCED:
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_40]
call _llama_model_n_ctx_train
movss xmm0, dword ptr [rbx+44h]
movss xmm1, dword ptr [rbx+48h]
mov edx, [rbx+4Ch]
mov ecx, [rbx+50h]
mov r8, [rsp+98h+var_88]
mov r9, [rsp+98h+var_88+8]
sub r9, r8
sar r9, 3
mov rdi, [rsp+98h+var_90]
mov esi, eax
call _llama_sampler_init_dry
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
mov rbp, [rsp+98h+var_48]
jz short loc_CFCDB
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CFCDB
loc_CFD54:
mov r12, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov esi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
mov edi, eax
mov edx, 64h ; 'd'
call _llama_sampler_init_mirostat
jmp short loc_CFDDF
loc_CFD9B:
mov r15, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r15
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov edi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
call _llama_sampler_init_mirostat_v2
jmp short loc_CFDDF
loc_CFDD1:
mov r12, [r14+140h]
mov edi, [rbx]
call _llama_sampler_init_dist
loc_CFDDF:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_CFE01
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CFE01:
mov rax, r14
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CFE13:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aLlguidanceCmak; "llguidance (cmake -DLLAMA_LLGUIDANCE=ON"...
mov esi, 0A5h
xor eax, eax
call _ggml_abort
def_CFBB4:
lea rdi, aWorkspaceLlm4b_4; jumptable 00000000000CFBB4 default case, case 5
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownSa; "false && \"unknown sampler type\""
mov esi, 0E5h
xor eax, eax
call _ggml_abort
loc_CFE4E:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownMi; "false && \"unknown mirostat version\""
mov esi, 0F0h
xor eax, eax
call _ggml_abort
jmp short loc_CFEB3
jmp short $+2
loc_CFE73:
mov rbx, rax
mov rdi, r14; this
call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling()
jmp short loc_CFE83
mov rbx, rax
loc_CFE83:
mov esi, 1B8h
mov rdi, r14
jmp short loc_CFEAC
jmp short loc_CFEB3
jmp short loc_CFE97
jmp short loc_CFEB3
jmp short loc_CFEB3
jmp short loc_CFEB3
loc_CFE97:
mov rbx, rax
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
jz short loc_CFEB6
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
loc_CFEAC:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CFEB6
loc_CFEB3:
mov rbx, rax
loc_CFEB6:
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_CFECD
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CFECD:
mov rdi, rbx
call __Unwind_Resume
|
long long common_sampler_init(long long a1, unsigned int *a2)
{
unsigned __int8 v3; // bp
void **v4; // r15
void **i; // r13
long long v6; // rsi
long long inited; // rax
long long v8; // r12
long long v9; // r14
int v10; // eax
unsigned long long v11; // rsi
long long v12; // r12
unsigned int v13; // eax
long long v14; // rax
unsigned int v15; // eax
_DWORD *v16; // r15
_DWORD *v17; // rbp
long long *v18; // r12
long long *v19; // rbp
long long v20; // r12
long long v21; // rax
long long v22; // r12
unsigned int v23; // eax
long long v24; // rax
long long v25; // r12
long long v26; // rax
long long v27; // r12
unsigned int v28; // eax
long long v29; // rax
long long v30; // r15
long long v31; // rax
long long v33; // rax
long long v34; // rbx
long long vocab; // [rsp+8h] [rbp-90h]
void *v36[2]; // [rsp+10h] [rbp-88h] BYREF
long long v37; // [rsp+20h] [rbp-78h]
__int128 v38; // [rsp+30h] [rbp-68h] BYREF
long long v39; // [rsp+40h] [rbp-58h]
_DWORD *v40; // [rsp+50h] [rbp-48h]
long long v41; // [rsp+58h] [rbp-40h]
long long v42[7]; // [rsp+60h] [rbp-38h] BYREF
v41 = a1;
vocab = llama_model_get_vocab(a1);
llama_sampler_chain_default_params();
v3 = *((_BYTE *)a2 + 97);
v38 = 0LL;
v39 = 0LL;
std::vector<char const*>::reserve(
&v38,
0xCCCCCCCCCCCCCCCDLL * ((long long)(*((_QWORD *)a2 + 25) - *((_QWORD *)a2 + 24)) >> 3));
v4 = (void **)*((_QWORD *)a2 + 24);
for ( i = (void **)*((_QWORD *)a2 + 25); v4 != i; v4 += 5 )
{
v36[0] = *v4;
std::vector<char const*>::emplace_back<char const*>(&v38, v36);
}
if ( !(unsigned int)std::string::compare(a2 + 38, 0LL, 11LL, "%llguidance") )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
165LL,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
LABEL_38:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
229LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown sampler type\"");
goto LABEL_39;
}
v6 = *((_QWORD *)a2 + 19);
if ( *((_BYTE *)a2 + 184) == 1 )
inited = llama_sampler_init_grammar_lazy(vocab, v6, "root", v38, (long long)(*((_QWORD *)&v38 + 1) - v38) >> 3);
else
inited = llama_sampler_init_grammar(vocab, v6, "root");
v8 = inited;
v9 = operator new(0x1B8uLL);
common_params_sampling::common_params_sampling((common_params_sampling *)v9, (const common_params_sampling *)a2);
*(_QWORD *)(v9 + 312) = v8;
*(_QWORD *)(v9 + 320) = llama_sampler_chain_init(v3);
v10 = a2[1];
v11 = 32LL;
if ( v10 >= 33 )
v11 = (unsigned int)v10;
*(_QWORD *)(v9 + 328) = v11;
*(_OWORD *)(v9 + 336) = 0LL;
*(_QWORD *)(v9 + 352) = 0LL;
std::vector<int>::vector(v9 + 360, v11);
*(_OWORD *)(v9 + 416) = 0LL;
*(_OWORD *)(v9 + 400) = 0LL;
*(_OWORD *)(v9 + 384) = 0LL;
*(_QWORD *)(v9 + 432) = 0LL;
v12 = *(_QWORD *)(v9 + 320);
v13 = llama_vocab_n_tokens(vocab);
v14 = llama_sampler_init_logit_bias(v13, (*((_QWORD *)a2 + 37) - *((_QWORD *)a2 + 36)) >> 3);
llama_sampler_chain_add(v12, v14);
v15 = a2[21];
if ( v15 == 2 )
{
v30 = *(_QWORD *)(v9 + 320);
v31 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v30, v31);
v27 = *(_QWORD *)(v9 + 320);
v29 = llama_sampler_init_mirostat_v2(*a2, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 == 1 )
{
v25 = *(_QWORD *)(v9 + 320);
v26 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v25, v26);
v27 = *(_QWORD *)(v9 + 320);
v28 = llama_vocab_n_tokens(vocab);
v29 = llama_sampler_init_mirostat(v28, *a2, 100LL, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 )
{
LABEL_39:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
240LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown mirostat version\"");
v34 = v33;
if ( (_QWORD)v38 )
operator delete((void *)v38, v39 - v38);
_Unwind_Resume(v34);
}
v16 = (_DWORD *)*((_QWORD *)a2 + 16);
v17 = (_DWORD *)*((_QWORD *)a2 + 17);
if ( v16 != v17 )
{
v40 = (_DWORD *)*((_QWORD *)a2 + 17);
while ( 2 )
{
switch ( *v16 )
{
case 1:
*(_OWORD *)v36 = 0LL;
v37 = 0LL;
std::vector<char const*>::reserve(v36, (long long)(*((_QWORD *)a2 + 14) - *((_QWORD *)a2 + 13)) >> 5);
v18 = (long long *)*((_QWORD *)a2 + 13);
v19 = (long long *)*((_QWORD *)a2 + 14);
while ( v18 != v19 )
{
v42[0] = *v18;
std::vector<char const*>::emplace_back<char const*>(v36, v42);
v18 += 4;
}
v22 = *(_QWORD *)(v9 + 320);
v23 = llama_model_n_ctx_train(v41);
v24 = llama_sampler_init_dry(
vocab,
v23,
a2[19],
a2[20],
v36[0],
((char *)v36[1] - (char *)v36[0]) >> 3,
*((float *)a2 + 17),
*((float *)a2 + 18));
llama_sampler_chain_add(v22, v24);
v17 = v40;
if ( v36[0] )
operator delete(v36[0], v37 - (unsigned long long)v36[0]);
goto LABEL_27;
case 2:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_top_k(a2[4]);
goto LABEL_26;
case 3:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_top_p((int)a2[3], *((float *)a2 + 5));
goto LABEL_26;
case 4:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_min_p((int)a2[3], *((float *)a2 + 6));
goto LABEL_26;
case 6:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_typical((int)a2[3], *((float *)a2 + 9));
goto LABEL_26;
case 7:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_temp_ext(*((float *)a2 + 10), *((float *)a2 + 11), *((float *)a2 + 12));
goto LABEL_26;
case 8:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_xtc((int)a2[3], *a2, *((float *)a2 + 7), *((float *)a2 + 8));
goto LABEL_26;
case 9:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_infill(vocab);
goto LABEL_26;
case 0xA:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_penalties(a2[13], *((float *)a2 + 14), *((float *)a2 + 15), *((float *)a2 + 16));
LABEL_26:
llama_sampler_chain_add(v20, v21);
LABEL_27:
if ( ++v16 == v17 )
break;
continue;
default:
goto LABEL_38;
}
break;
}
}
v27 = *(_QWORD *)(v9 + 320);
v29 = llama_sampler_init_dist(*a2);
LABEL_34:
llama_sampler_chain_add(v27, v29);
if ( (_QWORD)v38 )
operator delete((void *)v38, v39 - v38);
return v9;
}
|
common_sampler_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RSI
MOV qword ptr [RSP + 0x58],RDI
CALL 0x0011c140
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0011bd10
MOV BPL,byte ptr [RBX + 0x61]
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RBX + 0xc8]
SUB RAX,qword ptr [RBX + 0xc0]
SAR RAX,0x3
MOV RSI,-0x3333333333333333
IMUL RSI,RAX
LAB_001cf9cd:
CALL 0x001d117a
MOV R15,qword ptr [RBX + 0xc0]
MOV R13,qword ptr [RBX + 0xc8]
CMP R15,R13
JZ 0x001cfa0b
LEA R14,[RSP + 0x30]
LEA R12,[RSP + 0x10]
LAB_001cf9ef:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x10],RAX
LAB_001cf9f7:
MOV RDI,R14
MOV RSI,R12
CALL 0x001d1844
ADD R15,0x28
CMP R15,R13
JNZ 0x001cf9ef
LAB_001cfa0b:
LEA RDI,[RBX + 0x98]
LAB_001cfa12:
LEA RCX,[0x1f9285]
MOV EDX,0xb
XOR ESI,ESI
CALL 0x0011bb50
TEST EAX,EAX
JZ 0x001cfe13
MOV RSI,qword ptr [RBX + 0x98]
CMP byte ptr [RBX + 0xb8],0x1
JNZ 0x001cfa7a
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
SUB R8,RCX
SAR R8,0x3
MOV R9,qword ptr [RBX + 0xd8]
MOV RAX,qword ptr [RBX + 0xe0]
SUB RAX,R9
SAR RAX,0x2
MOV qword ptr [RSP],RAX
LEA RDX,[0x1f86aa]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b700
JMP 0x001cfa8b
LAB_001cfa7a:
LEA RDX,[0x1f86aa]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b180
LAB_001cfa8b:
MOV R12,RAX
LAB_001cfa8e:
MOV EDI,0x1b8
CALL 0x0011b890
LAB_001cfa98:
MOV R14,RAX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00153a3a
MOV qword ptr [R14 + 0x138],R12
LAB_001cfaad:
MOVZX EDI,BPL
CALL 0x0011b4b0
MOV qword ptr [R14 + 0x140],RAX
MOV EAX,dword ptr [RBX + 0x4]
CMP EAX,0x21
MOV ESI,0x20
CMOVGE ESI,EAX
MOV qword ptr [R14 + 0x148],RSI
MOV RDI,R14
ADD RDI,0x168
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x150],XMM0
MOV qword ptr [R14 + 0x160],0x0
LAB_001cfaf2:
LEA RDX,[RSP + 0x10]
CALL 0x00178a38
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x1a0],XMM0
MOVUPS xmmword ptr [R14 + 0x190],XMM0
MOVUPS xmmword ptr [R14 + 0x180],XMM0
MOV qword ptr [R14 + 0x1b0],0x0
MOV R12,qword ptr [R14 + 0x140]
LAB_001cfb29:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c0b0
MOV RDX,qword ptr [RBX + 0x120]
MOV RSI,qword ptr [RBX + 0x128]
SUB RSI,RDX
SHR RSI,0x3
MOV EDI,EAX
CALL 0x0011be40
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV EAX,dword ptr [RBX + 0x54]
CMP EAX,0x2
JZ 0x001cfd9b
CMP EAX,0x1
JZ 0x001cfd54
TEST EAX,EAX
JNZ 0x001cfe4e
MOV R15,qword ptr [RBX + 0x80]
MOV RBP,qword ptr [RBX + 0x88]
CMP R15,RBP
JZ 0x001cfdd1
LEA R13,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RBP
LAB_001cfb98:
MOV EAX,dword ptr [R15]
DEC EAX
CMP EAX,0x9
JA 0x001cfe2d
LEA RCX,[0x1f90c0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV RSI,qword ptr [RBX + 0x70]
SUB RSI,qword ptr [RBX + 0x68]
SAR RSI,0x5
LAB_001cfbd3:
MOV RDI,R13
CALL 0x001d117a
MOV R12,qword ptr [RBX + 0x68]
MOV RBP,qword ptr [RBX + 0x70]
LAB_001cfbe3:
CMP R12,RBP
JZ 0x001cfced
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x60],RAX
LAB_001cfbf5:
MOV RDI,R13
LEA RSI,[RSP + 0x60]
CALL 0x001d1844
ADD R12,0x20
JMP 0x001cfbe3
caseD_a:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x34]
MOVSS XMM0,dword ptr [RBX + 0x38]
MOVSS XMM1,dword ptr [RBX + 0x3c]
MOVSS XMM2,dword ptr [RBX + 0x40]
LAB_001cfc21:
CALL 0x0011b6c0
JMP 0x001cfcd0
caseD_6:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x24]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b680
JMP 0x001cfcd0
caseD_7:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
MOVSS XMM1,dword ptr [RBX + 0x2c]
MOVSS XMM2,dword ptr [RBX + 0x30]
CALL 0x0011c070
JMP 0x001cfcd0
caseD_3:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x14]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b130
JMP 0x001cfcd0
caseD_9:
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011bcd0
JMP 0x001cfcd0
caseD_4:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x18]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011bbf0
JMP 0x001cfcd0
caseD_2:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x10]
CALL 0x0011b3f0
JMP 0x001cfcd0
caseD_8:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x1c]
MOVSS XMM1,dword ptr [RBX + 0x20]
MOVSXD RDI,dword ptr [RBX + 0xc]
MOV ESI,dword ptr [RBX]
CALL 0x0011b2a0
LAB_001cfcd0:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
LAB_001cfcdb:
ADD R15,0x4
CMP R15,RBP
JNZ 0x001cfb98
JMP 0x001cfdd1
LAB_001cfced:
MOV R12,qword ptr [R14 + 0x140]
LAB_001cfcf4:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0011b850
MOVSS XMM0,dword ptr [RBX + 0x44]
MOVSS XMM1,dword ptr [RBX + 0x48]
MOV EDX,dword ptr [RBX + 0x4c]
MOV ECX,dword ptr [RBX + 0x50]
MOV R8,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
SUB R9,R8
SAR R9,0x3
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x0011be70
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
MOV RBP,qword ptr [RSP + 0x50]
JZ 0x001cfcdb
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011b8b0
JMP 0x001cfcdb
LAB_001cfd54:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
LAB_001cfd60:
CALL 0x0011b520
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c0b0
MOV ESI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
MOV EDI,EAX
MOV EDX,0x64
CALL 0x0011c130
JMP 0x001cfddf
LAB_001cfd9b:
MOV R15,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
CALL 0x0011b520
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011b940
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
CALL 0x0011be50
JMP 0x001cfddf
LAB_001cfdd1:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
CALL 0x0011bd30
LAB_001cfddf:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001cfe01
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x0011b8b0
LAB_001cfe01:
MOV RAX,R14
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cfe13:
LEA RDI,[0x1f9291]
LEA RDX,[0x1f92df]
MOV ESI,0xa5
XOR EAX,EAX
CALL 0x0011be80
caseD_5:
LEA RDI,[0x1f9291]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f9317]
MOV ESI,0xe5
XOR EAX,EAX
CALL 0x0011be80
LAB_001cfe4e:
LEA RDI,[0x1f9291]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f9337]
MOV ESI,0xf0
XOR EAX,EAX
CALL 0x0011be80
|
/* common_sampler_init(llama_model const*, common_params_sampling const&) */
common_params_sampling * common_sampler_init(llama_model *param_1,common_params_sampling *param_2)
{
common_params_sampling cVar1;
int8 *puVar2;
int iVar3;
int4 uVar4;
int8 uVar5;
int8 uVar6;
common_params_sampling *this;
int8 uVar7;
int4 *puVar8;
allocator *paVar9;
int8 *puVar10;
int4 *puVar11;
char *local_88;
long lStack_80;
long local_78;
void *local_68;
long lStack_60;
long local_58;
int4 *local_48;
llama_model *local_40;
char *local_38;
local_40 = param_1;
uVar5 = llama_model_get_vocab();
llama_sampler_chain_default_params();
cVar1 = param_2[0x61];
local_68 = (void *)0x0;
lStack_60 = 0;
local_58 = 0;
/* try { // try from 001cf9cd to 001cf9d1 has its CatchHandler @ 001cfe8d */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_68,
(*(long *)(param_2 + 200) - *(long *)(param_2 + 0xc0) >> 3) * -0x3333333333333333);
puVar10 = *(int8 **)(param_2 + 0xc0);
puVar2 = *(int8 **)(param_2 + 200);
if (puVar10 != puVar2) {
do {
local_88 = (char *)*puVar10;
/* try { // try from 001cf9f7 to 001cfa01 has its CatchHandler @ 001cfeb3 */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_68,&local_88);
puVar10 = puVar10 + 5;
} while (puVar10 != puVar2);
}
/* try { // try from 001cfa12 to 001cfa8a has its CatchHandler @ 001cfe91 */
iVar3 = std::__cxx11::string::compare((ulong)(param_2 + 0x98),0,(char *)0xb);
if (iVar3 == 0) {
/* try { // try from 001cfe13 to 001cfe2c has its CatchHandler @ 001cfe91 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0xa5,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
}
if (param_2[0xb8] == (common_params_sampling)0x1) {
uVar6 = llama_sampler_init_grammar_lazy
(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f86aa,local_68,
lStack_60 - (long)local_68 >> 3,*(long *)(param_2 + 0xd8),
*(long *)(param_2 + 0xe0) - *(long *)(param_2 + 0xd8) >> 2);
}
else {
uVar6 = llama_sampler_init_grammar(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f86aa);
}
/* try { // try from 001cfa8e to 001cfa97 has its CatchHandler @ 001cfe93 */
this = (common_params_sampling *)operator_new(0x1b8);
/* try { // try from 001cfa98 to 001cfaa5 has its CatchHandler @ 001cfe80 */
common_params_sampling::common_params_sampling(this,param_2);
*(int8 *)(this + 0x138) = uVar6;
/* try { // try from 001cfaad to 001cfab5 has its CatchHandler @ 001cfe73 */
uVar6 = llama_sampler_chain_init(cVar1);
*(int8 *)(this + 0x140) = uVar6;
paVar9 = (allocator *)0x20;
if (0x20 < (int)*(uint *)(param_2 + 4)) {
paVar9 = (allocator *)(ulong)*(uint *)(param_2 + 4);
}
*(allocator **)(this + 0x148) = paVar9;
*(int8 *)(this + 0x150) = 0;
*(int8 *)(this + 0x158) = 0;
*(int8 *)(this + 0x160) = 0;
/* try { // try from 001cfaf2 to 001cfafb has its CatchHandler @ 001cfe71 */
std::vector<int,std::allocator<int>>::vector((ulong)(this + 0x168),paVar9);
*(int8 *)(this + 0x1a0) = 0;
*(int8 *)(this + 0x1a8) = 0;
*(int8 *)(this + 400) = 0;
*(int8 *)(this + 0x198) = 0;
*(int8 *)(this + 0x180) = 0;
*(int8 *)(this + 0x188) = 0;
*(int8 *)(this + 0x1b0) = 0;
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cfb29 to 001cfb59 has its CatchHandler @ 001cfe93 */
uVar4 = llama_vocab_n_tokens(uVar5);
uVar7 = llama_sampler_init_logit_bias
(uVar4,(ulong)(*(long *)(param_2 + 0x128) - *(long *)(param_2 + 0x120)) >> 3);
llama_sampler_chain_add(uVar6,uVar7);
iVar3 = *(int *)(param_2 + 0x54);
if (iVar3 == 2) {
uVar5 = *(int8 *)(this + 0x140);
uVar6 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar5,uVar6);
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_mirostat_v2
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),
*(int4 *)param_2);
}
else if (iVar3 == 1) {
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cfd60 to 001cfde9 has its CatchHandler @ 001cfe93 */
uVar7 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar6,uVar7);
uVar6 = *(int8 *)(this + 0x140);
uVar4 = llama_vocab_n_tokens(uVar5);
uVar5 = llama_sampler_init_mirostat
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),uVar4,
*(int4 *)param_2,100);
}
else {
if (iVar3 != 0) {
/* try { // try from 001cfe4e to 001cfe6e has its CatchHandler @ 001cfe93 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0xf0,"GGML_ASSERT(%s) failed","false && \"unknown mirostat version\"");
}
puVar11 = *(int4 **)(param_2 + 0x80);
puVar8 = *(int4 **)(param_2 + 0x88);
if (puVar11 != puVar8) {
local_48 = puVar8;
do {
switch(*puVar11) {
case 1:
local_88 = (char *)0x0;
lStack_80 = 0;
local_78 = 0;
/* try { // try from 001cfbd3 to 001cfbda has its CatchHandler @ 001cfe8f */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_88,
*(long *)(param_2 + 0x70) - *(long *)(param_2 + 0x68) >> 5);
puVar2 = *(int8 **)(param_2 + 0x70);
for (puVar10 = *(int8 **)(param_2 + 0x68); puVar10 != puVar2; puVar10 = puVar10 + 4)
{
local_38 = (char *)*puVar10;
/* try { // try from 001cfbf5 to 001cfc01 has its CatchHandler @ 001cfe97 */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_88,&local_38);
}
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cfcf4 to 001cfd35 has its CatchHandler @ 001cfe8f */
uVar4 = llama_model_n_ctx_train(local_40);
uVar7 = llama_sampler_init_dry
(*(int4 *)(param_2 + 0x44),*(int4 *)(param_2 + 0x48),uVar5,
uVar4,*(int4 *)(param_2 + 0x4c),*(int4 *)(param_2 + 0x50),
local_88,lStack_80 - (long)local_88 >> 3);
llama_sampler_chain_add(uVar6,uVar7);
puVar8 = local_48;
if (local_88 != (char *)0x0) {
operator_delete(local_88,local_78 - (long)local_88);
}
goto LAB_001cfcdb;
case 2:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_k(*(int4 *)(param_2 + 0x10));
break;
case 3:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_p
(*(int4 *)(param_2 + 0x14),(long)*(int *)(param_2 + 0xc));
break;
case 4:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_min_p
(*(int4 *)(param_2 + 0x18),(long)*(int *)(param_2 + 0xc));
break;
default:
/* try { // try from 001cfe2d to 001cfe4d has its CatchHandler @ 001cfe6f */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp"
,0xe5,"GGML_ASSERT(%s) failed","false && \"unknown sampler type\"");
case 6:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_typical
(*(int4 *)(param_2 + 0x24),(long)*(int *)(param_2 + 0xc));
break;
case 7:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_temp_ext
(*(int4 *)(param_2 + 0x28),*(int4 *)(param_2 + 0x2c),
*(int4 *)(param_2 + 0x30));
break;
case 8:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_xtc
(*(int4 *)(param_2 + 0x1c),*(int4 *)(param_2 + 0x20),
(long)*(int *)(param_2 + 0xc),*(int4 *)param_2);
break;
case 9:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_infill(uVar5);
break;
case 10:
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cfc21 to 001cfcda has its CatchHandler @ 001cfe95 */
uVar7 = llama_sampler_init_penalties
(*(int4 *)(param_2 + 0x38),*(int4 *)(param_2 + 0x3c),
*(int4 *)(param_2 + 0x40),*(int4 *)(param_2 + 0x34));
}
llama_sampler_chain_add(uVar6,uVar7);
LAB_001cfcdb:
puVar11 = puVar11 + 1;
} while (puVar11 != puVar8);
}
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_dist(*(int4 *)param_2);
}
llama_sampler_chain_add(uVar6,uVar5);
if (local_68 != (void *)0x0) {
operator_delete(local_68,local_58 - (long)local_68);
}
return this;
}
|
|
57,072
|
common_sampler_init(llama_model const*, common_params_sampling const&)
|
monkey531[P]llama/common/sampling.cpp
|
struct common_sampler * common_sampler_init(const struct llama_model * model, const struct common_params_sampling & params) {
const llama_vocab * vocab = llama_model_get_vocab(model);
llama_sampler_chain_params lparams = llama_sampler_chain_default_params();
lparams.no_perf = params.no_perf;
std::vector<const char *> trigger_words;
trigger_words.reserve(params.grammar_trigger_words.size());
for (const auto & str : params.grammar_trigger_words) {
trigger_words.push_back(str.word.c_str());
}
struct llama_sampler * grmr;
if (params.grammar.compare(0, 11, "%llguidance") == 0) {
#ifdef LLAMA_USE_LLGUIDANCE
grmr = llama_sampler_init_llg(vocab, "lark", params.grammar.c_str());
#else
GGML_ABORT("llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
#endif // LLAMA_USE_LLGUIDANCE
} else {
grmr = params.grammar_lazy
? llama_sampler_init_grammar_lazy(vocab, params.grammar.c_str(), "root",
trigger_words.data(), trigger_words.size(),
params.grammar_trigger_tokens.data(), params.grammar_trigger_tokens.size())
: llama_sampler_init_grammar(vocab, params.grammar.c_str(), "root");
}
auto * result = new common_sampler {
/* .params = */ params,
/* .grmr = */ grmr,
/* .chain = */ llama_sampler_chain_init(lparams),
/* .prev = */ ring_buffer<llama_token>(std::max(32, params.n_prev)),
/* .cur = */ {},
/* .cur_p = */ {},
};
llama_sampler_chain_add(result->chain,
llama_sampler_init_logit_bias(
llama_vocab_n_tokens(vocab),
params.logit_bias.size(),
params.logit_bias.data()));
if (params.mirostat == 0) {
for (const auto & cnstr : params.samplers) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY:
{
std::vector<const char *> c_breakers;
c_breakers.reserve(params.dry_sequence_breakers.size());
for (const auto & str : params.dry_sequence_breakers) {
c_breakers.push_back(str.c_str());
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dry (vocab, llama_model_n_ctx_train(model), params.dry_multiplier, params.dry_base, params.dry_allowed_length, params.dry_penalty_last_n, c_breakers.data(), c_breakers.size()));
}
break;
case COMMON_SAMPLER_TYPE_TOP_K:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_k (params.top_k));
break;
case COMMON_SAMPLER_TYPE_TOP_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_p (params.top_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_MIN_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_min_p (params.min_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_XTC:
llama_sampler_chain_add(result->chain, llama_sampler_init_xtc (params.xtc_probability, params.xtc_threshold, params.min_keep, params.seed));
break;
case COMMON_SAMPLER_TYPE_TYPICAL_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_typical (params.typ_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_TEMPERATURE:
llama_sampler_chain_add(result->chain, llama_sampler_init_temp_ext (params.temp, params.dynatemp_range, params.dynatemp_exponent));
break;
case COMMON_SAMPLER_TYPE_INFILL:
llama_sampler_chain_add(result->chain, llama_sampler_init_infill (vocab));
break;
case COMMON_SAMPLER_TYPE_PENALTIES:
llama_sampler_chain_add(result->chain, llama_sampler_init_penalties(params.penalty_last_n, params.penalty_repeat, params.penalty_freq, params.penalty_present));
break;
default:
GGML_ASSERT(false && "unknown sampler type");
}
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dist(params.seed));
} else if (params.mirostat == 1) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat(llama_vocab_n_tokens(vocab), params.seed, params.mirostat_tau, params.mirostat_eta, 100));
} else if (params.mirostat == 2) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat_v2(params.seed, params.mirostat_tau, params.mirostat_eta));
} else {
GGML_ASSERT(false && "unknown mirostat version");
}
return result;
}
|
O2
|
cpp
|
common_sampler_init(llama_model const*, common_params_sampling const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq %rdi, 0x60(%rsp)
callq 0x25180
movq %rax, 0x18(%rsp)
callq 0x24d20
movb 0x61(%rbx), %bpl
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0xc8(%rbx), %rax
subq 0xc0(%rbx), %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x9aa60
movq 0xc0(%rbx), %r14
movq 0xc8(%rbx), %r13
leaq 0x40(%rsp), %r15
leaq 0x20(%rsp), %r12
cmpq %r13, %r14
je 0x99818
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9b312
addq $0x28, %r14
jmp 0x997fa
leaq 0x98(%rbx), %rdi
leaq 0x21a1f(%rip), %rcx # 0xbb245
pushq $0xb
popq %rdx
xorl %esi, %esi
callq 0x24b70
movq 0x18(%rsp), %r15
testl %eax, %eax
je 0x99c26
movq 0x98(%rbx), %rsi
cmpb $0x1, 0xb8(%rbx)
jne 0x99888
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
subq %rcx, %r8
sarq $0x3, %r8
movq 0xd8(%rbx), %r9
movq 0xe0(%rbx), %rax
subq %r9, %rax
sarq $0x2, %rax
movq %rax, (%rsp)
leaq 0x20e0f(%rip), %rdx # 0xba68d
movq %r15, %rdi
callq 0x24720
jmp 0x99897
leaq 0x20dfe(%rip), %rdx # 0xba68d
movq %r15, %rdi
callq 0x24180
movq %rax, %r12
movl $0x1b8, %edi # imm = 0x1B8
callq 0x248a0
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
callq 0x39a56
movq %r12, 0x138(%r13)
movzbl %bpl, %edi
callq 0x244d0
movq %rax, 0x140(%r13)
movq %r13, %rdi
addq $0x148, %rdi # imm = 0x148
movl 0x4(%rbx), %eax
cmpl $0x21, %eax
pushq $0x20
popq %rsi
cmovgel %eax, %esi
callq 0x9aaf6
xorps %xmm0, %xmm0
movups %xmm0, 0x1a0(%r13)
movups %xmm0, 0x190(%r13)
movups %xmm0, 0x180(%r13)
andq $0x0, 0x1b0(%r13)
movq 0x140(%r13), %r12
movq %r15, %rdi
callq 0x250b0
movq 0x120(%rbx), %rdx
movq 0x128(%rbx), %rsi
subq %rdx, %rsi
shrq $0x3, %rsi
movl %eax, %edi
callq 0x24e40
movq %r12, %rdi
movq %rax, %rsi
callq 0x24960
movl 0x54(%rbx), %eax
cmpl $0x2, %eax
je 0x99b95
cmpl $0x1, %eax
je 0x99b52
movq %r13, 0x10(%rsp)
testl %eax, %eax
jne 0x99c40
movq 0x80(%rbx), %r14
movq 0x88(%rbx), %rax
movq %rax, 0x68(%rsp)
leaq 0x20(%rsp), %r13
leaq 0x70(%rsp), %rbp
cmpq 0x68(%rsp), %r14
je 0x99bcb
movl (%r14), %eax
decl %eax
cmpl $0x9, %eax
ja 0x99c05
leaq 0x216e4(%rip), %rcx # 0xbb080
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movq 0x70(%rbx), %rsi
subq 0x68(%rbx), %rsi
sarq $0x5, %rsi
movq %r13, %rdi
callq 0x9aa60
movq 0x68(%rbx), %r12
movq 0x70(%rbx), %r15
cmpq %r15, %r12
je 0x99af7
movq (%r12), %rax
movq %rax, 0x70(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x9b312
addq $0x20, %r12
jmp 0x999cf
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movl 0x34(%rbx), %edi
movss 0x38(%rbx), %xmm0
movss 0x3c(%rbx), %xmm1
movss 0x40(%rbx), %xmm2
callq 0x246e0
jmp 0x99ae3
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movss 0x24(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x246a0
jmp 0x99ae3
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movss 0x28(%rbx), %xmm0
movss 0x2c(%rbx), %xmm1
movss 0x30(%rbx), %xmm2
callq 0x25060
jmp 0x99ae3
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movss 0x14(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x24120
jmp 0x99ae3
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movq %r15, %rdi
callq 0x24ce0
jmp 0x99ae3
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movss 0x18(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x24c10
jmp 0x99ae3
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movl 0x10(%rbx), %edi
callq 0x243f0
jmp 0x99ae3
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movss 0x1c(%rbx), %xmm0
movss 0x20(%rbx), %xmm1
movslq 0xc(%rbx), %rdi
movl (%rbx), %esi
callq 0x242b0
movq %r12, %rdi
movq %rax, %rsi
callq 0x24960
addq $0x4, %r14
jmp 0x9997c
movq 0x10(%rsp), %rax
movq 0x140(%rax), %r12
movq 0x60(%rsp), %rdi
callq 0x24860
movq 0x18(%rsp), %r15
movss 0x44(%rbx), %xmm0
movss 0x48(%rbx), %xmm1
movl 0x4c(%rbx), %edx
movl 0x50(%rbx), %ecx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
subq %r8, %r9
sarq $0x3, %r9
movq %r15, %rdi
movl %eax, %esi
callq 0x24e80
movq %r12, %rdi
movq %rax, %rsi
callq 0x24960
movq %r13, %rdi
callq 0x3cd84
jmp 0x99aee
movq 0x140(%r13), %r12
movss 0x28(%rbx), %xmm0
callq 0x24550
movq %r12, %rdi
movq %rax, %rsi
callq 0x24960
movq 0x140(%r13), %r12
movq %r15, %rdi
callq 0x250b0
movl (%rbx), %esi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
pushq $0x64
popq %rdx
movl %eax, %edi
callq 0x25150
jmp 0x99bde
movq 0x140(%r13), %r14
movss 0x28(%rbx), %xmm0
callq 0x24550
movq %r14, %rdi
movq %rax, %rsi
callq 0x24960
movq 0x140(%r13), %r12
movl (%rbx), %edi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
callq 0x24e50
jmp 0x99bde
movq 0x10(%rsp), %r13
movq 0x140(%r13), %r12
movl (%rbx), %edi
callq 0x24d40
movq %r12, %rdi
movq %rax, %rsi
callq 0x24960
leaq 0x40(%rsp), %rdi
callq 0x3cd84
movq %r13, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21645(%rip), %rdi # 0xbb251
leaq 0x1252d(%rip), %rdx # 0xac140
leaq 0x216bd(%rip), %rcx # 0xbb2d7
movl $0xe5, %esi
xorl %eax, %eax
callq 0x24e90
leaq 0x21624(%rip), %rdi # 0xbb251
leaq 0x2166b(%rip), %rdx # 0xbb29f
movl $0xa5, %esi
xorl %eax, %eax
callq 0x24e90
leaq 0x2160a(%rip), %rdi # 0xbb251
leaq 0x124f2(%rip), %rdx # 0xac140
leaq 0x216a2(%rip), %rcx # 0xbb2f7
movl $0xf0, %esi
xorl %eax, %eax
callq 0x24e90
jmp 0x99c63
movq %rax, %rbx
movq %r13, %rdi
callq 0x2795a
jmp 0x99c73
movq %rax, %rbx
movl $0x1b8, %esi # imm = 0x1B8
movq %r13, %rdi
callq 0x248c0
jmp 0x99ca0
jmp 0x99c8e
jmp 0x99c8e
jmp 0x99c8e
jmp 0x99c93
jmp 0x99c8e
jmp 0x99c8e
movq %rax, %rbx
jmp 0x99ca0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3cd84
leaq 0x40(%rsp), %rdi
callq 0x3cd84
movq %rbx, %rdi
callq 0x24f60
|
_Z19common_sampler_initPK11llama_modelRK22common_params_sampling:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov rbx, rsi
mov [rsp+0A8h+var_48], rdi
call _llama_model_get_vocab
mov [rsp+0A8h+var_90], rax
call _llama_sampler_chain_default_params
mov bpl, [rbx+61h]
xorps xmm0, xmm0
lea rdi, [rsp+0A8h+var_68]
movaps xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
mov rax, [rbx+0C8h]
sub rax, [rbx+0C0h]
push 28h ; '('
pop rcx
cqo
idiv rcx
mov rsi, rax
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r14, [rbx+0C0h]
mov r13, [rbx+0C8h]
lea r15, [rsp+0A8h+var_68]
lea r12, [rsp+0A8h+var_88]
loc_997FA:
cmp r14, r13
jz short loc_99818
mov rax, [r14]
mov qword ptr [rsp+0A8h+var_88], rax
mov rdi, r15
mov rsi, r12
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r14, 28h ; '('
jmp short loc_997FA
loc_99818:
lea rdi, [rbx+98h]
lea rcx, aLlguidance; "%llguidance"
push 0Bh
pop rdx
xor esi, esi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*)
mov r15, [rsp+0A8h+var_90]
test eax, eax
jz loc_99C26
mov rsi, [rbx+98h]
cmp byte ptr [rbx+0B8h], 1
jnz short loc_99888
mov rcx, [rsp+0A8h+var_68]
mov r8, [rsp+0A8h+var_60]
sub r8, rcx
sar r8, 3
mov r9, [rbx+0D8h]
mov rax, [rbx+0E0h]
sub rax, r9
sar rax, 2
mov [rsp+0A8h+var_A8], rax
lea rdx, aRoot; "root"
mov rdi, r15
call _llama_sampler_init_grammar_lazy
jmp short loc_99897
loc_99888:
lea rdx, aRoot; "root"
mov rdi, r15
call _llama_sampler_init_grammar
loc_99897:
mov r12, rax
mov edi, 1B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rdi, rax; this
mov rsi, rbx; common_params_sampling *
call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&)
mov [r13+138h], r12
movzx edi, bpl
call _llama_sampler_chain_init
mov [r13+140h], rax
mov rdi, r13
add rdi, 148h
mov eax, [rbx+4]
cmp eax, 21h ; '!'
push 20h ; ' '
pop rsi
cmovge esi, eax
call _ZN11ring_bufferIiEC2Em; ring_buffer<int>::ring_buffer(ulong)
xorps xmm0, xmm0
movups xmmword ptr [r13+1A0h], xmm0
movups xmmword ptr [r13+190h], xmm0
movups xmmword ptr [r13+180h], xmm0
and qword ptr [r13+1B0h], 0
mov r12, [r13+140h]
mov rdi, r15
call _llama_vocab_n_tokens
mov rdx, [rbx+120h]
mov rsi, [rbx+128h]
sub rsi, rdx
shr rsi, 3
mov edi, eax
call _llama_sampler_init_logit_bias
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov eax, [rbx+54h]
cmp eax, 2
jz loc_99B95
cmp eax, 1
jz loc_99B52
mov [rsp+0A8h+var_98], r13
test eax, eax
jnz loc_99C40
mov r14, [rbx+80h]
mov rax, [rbx+88h]
mov [rsp+0A8h+var_40], rax
lea r13, [rsp+0A8h+var_88]
lea rbp, [rsp+0A8h+var_38]
loc_9997C:
cmp r14, [rsp+0A8h+var_40]
jz loc_99BCB
mov eax, [r14]
dec eax; switch 10 cases
cmp eax, 9
ja def_999A3; jumptable 00000000000999A3 default case, case 5
lea rcx, jpt_999A3
movsxd rax, ds:(jpt_999A3 - 0BB080h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_999A5:
xorps xmm0, xmm0; jumptable 00000000000999A3 case 1
movaps [rsp+0A8h+var_88], xmm0
and [rsp+0A8h+var_78], 0
mov rsi, [rbx+70h]
sub rsi, [rbx+68h]
sar rsi, 5
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r12, [rbx+68h]
mov r15, [rbx+70h]
loc_999CF:
cmp r12, r15
jz loc_99AF7
mov rax, [r12]
mov [rsp+0A8h+var_38], rax
mov rdi, r13
mov rsi, rbp
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r12, 20h ; ' '
jmp short loc_999CF
loc_999F2:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 10
mov r12, [rax+140h]
mov edi, [rbx+34h]
movss xmm0, dword ptr [rbx+38h]
movss xmm1, dword ptr [rbx+3Ch]
movss xmm2, dword ptr [rbx+40h]
call _llama_sampler_init_penalties
jmp loc_99AE3
loc_99A1A:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 6
mov r12, [rax+140h]
movss xmm0, dword ptr [rbx+24h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_typical
jmp loc_99AE3
loc_99A39:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 7
mov r12, [rax+140h]
movss xmm0, dword ptr [rbx+28h]
movss xmm1, dword ptr [rbx+2Ch]
movss xmm2, dword ptr [rbx+30h]
call _llama_sampler_init_temp_ext
jmp loc_99AE3
loc_99A5E:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 3
mov r12, [rax+140h]
movss xmm0, dword ptr [rbx+14h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_top_p
jmp short loc_99AE3
loc_99A7A:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 9
mov r12, [rax+140h]
mov rdi, r15
call _llama_sampler_init_infill
jmp short loc_99AE3
loc_99A90:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 4
mov r12, [rax+140h]
movss xmm0, dword ptr [rbx+18h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_min_p
jmp short loc_99AE3
loc_99AAC:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 2
mov r12, [rax+140h]
mov edi, [rbx+10h]
call _llama_sampler_init_top_k
jmp short loc_99AE3
loc_99AC2:
mov rax, [rsp+0A8h+var_98]; jumptable 00000000000999A3 case 8
mov r12, [rax+140h]
movss xmm0, dword ptr [rbx+1Ch]
movss xmm1, dword ptr [rbx+20h]
movsxd rdi, dword ptr [rbx+0Ch]
mov esi, [rbx]
call _llama_sampler_init_xtc
loc_99AE3:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
loc_99AEE:
add r14, 4
jmp loc_9997C
loc_99AF7:
mov rax, [rsp+0A8h+var_98]
mov r12, [rax+140h]
mov rdi, [rsp+0A8h+var_48]
call _llama_model_n_ctx_train
mov r15, [rsp+0A8h+var_90]
movss xmm0, dword ptr [rbx+44h]
movss xmm1, dword ptr [rbx+48h]
mov edx, [rbx+4Ch]
mov ecx, [rbx+50h]
mov r8, qword ptr [rsp+0A8h+var_88]
mov r9, qword ptr [rsp+0A8h+var_88+8]
sub r9, r8
sar r9, 3
mov rdi, r15
mov esi, eax
call _llama_sampler_init_dry
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, r13
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
jmp short loc_99AEE
loc_99B52:
mov r12, [r13+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r13+140h]
mov rdi, r15
call _llama_vocab_n_tokens
mov esi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
push 64h ; 'd'
pop rdx
mov edi, eax
call _llama_sampler_init_mirostat
jmp short loc_99BDE
loc_99B95:
mov r14, [r13+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r14
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r13+140h]
mov edi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
call _llama_sampler_init_mirostat_v2
jmp short loc_99BDE
loc_99BCB:
mov r13, [rsp+0A8h+var_98]
mov r12, [r13+140h]
mov edi, [rbx]
call _llama_sampler_init_dist
loc_99BDE:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
lea rdi, [rsp+0A8h+var_68]
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
mov rax, r13
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
def_999A3:
lea rdi, aWorkspaceLlm4b_4; jumptable 00000000000999A3 default case, case 5
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownSa; "false && \"unknown sampler type\""
mov esi, 0E5h
xor eax, eax
call _ggml_abort
loc_99C26:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aLlguidanceCmak; "llguidance (cmake -DLLAMA_LLGUIDANCE=ON"...
mov esi, 0A5h
xor eax, eax
call _ggml_abort
loc_99C40:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownMi; "false && \"unknown mirostat version\""
mov esi, 0F0h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_99C63:
mov rbx, rax
mov rdi, r13; this
call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling()
jmp short loc_99C73
mov rbx, rax
loc_99C73:
mov esi, 1B8h; unsigned __int64
mov rdi, r13; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99CA0
jmp short loc_99C8E
jmp short loc_99C8E
jmp short loc_99C8E
jmp short loc_99C93
jmp short loc_99C8E
jmp short $+2
loc_99C8E:
mov rbx, rax
jmp short loc_99CA0
loc_99C93:
mov rbx, rax
lea rdi, [rsp+0A8h+var_88]
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
loc_99CA0:
lea rdi, [rsp+0A8h+var_68]
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
|
common_params_sampling * common_sampler_init(long long a1, unsigned int *a2)
{
unsigned __int8 v3; // bp
common_params_sampling *v4; // r14
common_params_sampling *v5; // r13
long long v6; // r15
long long v7; // rsi
long long inited; // rax
long long v9; // r12
int v10; // eax
long long v11; // rsi
long long v12; // r12
unsigned int v13; // eax
long long v14; // rax
long long v15; // rdx
unsigned int v16; // eax
_DWORD *v17; // r14
_QWORD *v18; // r12
_QWORD *v19; // r15
long long v20; // r12
long long v21; // rax
long long v22; // r12
unsigned int v23; // eax
long long v24; // rax
long long v25; // r12
long long v26; // rax
long long v27; // r12
unsigned int v28; // eax
long long v29; // rax
long long v30; // r14
long long v31; // rax
long long v33; // rbx
common_params_sampling *v34; // [rsp+10h] [rbp-98h]
long long vocab; // [rsp+18h] [rbp-90h]
__int128 v36; // [rsp+20h] [rbp-88h] BYREF
long long v37; // [rsp+30h] [rbp-78h]
__int128 v38; // [rsp+40h] [rbp-68h] BYREF
long long v39; // [rsp+50h] [rbp-58h]
long long v40; // [rsp+60h] [rbp-48h]
_DWORD *v41; // [rsp+68h] [rbp-40h]
_QWORD v42[7]; // [rsp+70h] [rbp-38h] BYREF
v40 = a1;
vocab = llama_model_get_vocab(a1);
llama_sampler_chain_default_params();
v3 = *((_BYTE *)a2 + 97);
v38 = 0LL;
v39 = 0LL;
std::vector<char const*>::reserve(
&v38,
(*((_QWORD *)a2 + 25) - *((_QWORD *)a2 + 24)) / 40LL,
(*((_QWORD *)a2 + 25) - *((_QWORD *)a2 + 24)) % 40LL);
v4 = (common_params_sampling *)*((_QWORD *)a2 + 24);
v5 = (common_params_sampling *)*((_QWORD *)a2 + 25);
while ( v4 != v5 )
{
*(_QWORD *)&v36 = *(_QWORD *)v4;
std::vector<char const*>::emplace_back<char const*>(&v38, &v36);
v4 = (common_params_sampling *)((char *)v4 + 40);
}
v6 = vocab;
if ( !(unsigned int)std::string::compare(a2 + 38, 0LL, 11LL, "%llguidance") )
{
LABEL_35:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
165LL,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
goto LABEL_36;
}
v7 = *((_QWORD *)a2 + 19);
if ( *((_BYTE *)a2 + 184) == 1 )
inited = llama_sampler_init_grammar_lazy(vocab, v7, "root", v38, (long long)(*((_QWORD *)&v38 + 1) - v38) >> 3);
else
inited = llama_sampler_init_grammar(vocab, v7, "root");
v9 = inited;
v5 = (common_params_sampling *)operator new(0x1B8uLL);
common_params_sampling::common_params_sampling(v5, (const common_params_sampling *)a2);
*((_QWORD *)v5 + 39) = v9;
*((_QWORD *)v5 + 40) = llama_sampler_chain_init(v3);
v10 = a2[1];
v11 = 32LL;
if ( v10 >= 33 )
v11 = (unsigned int)v10;
ring_buffer<int>::ring_buffer((char *)v5 + 328, v11);
*((_OWORD *)v5 + 26) = 0LL;
*((_OWORD *)v5 + 25) = 0LL;
*((_OWORD *)v5 + 24) = 0LL;
*((_QWORD *)v5 + 54) = 0LL;
v12 = *((_QWORD *)v5 + 40);
v13 = llama_vocab_n_tokens(vocab);
v14 = llama_sampler_init_logit_bias(v13, (*((_QWORD *)a2 + 37) - *((_QWORD *)a2 + 36)) >> 3);
llama_sampler_chain_add(v12, v14);
v16 = a2[21];
if ( v16 == 2 )
{
v30 = *((_QWORD *)v5 + 40);
v31 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v30, v31);
v27 = *((_QWORD *)v5 + 40);
v29 = llama_sampler_init_mirostat_v2(*a2, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_33;
}
if ( v16 == 1 )
{
v25 = *((_QWORD *)v5 + 40);
v26 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v25, v26);
v27 = *((_QWORD *)v5 + 40);
v28 = llama_vocab_n_tokens(vocab);
v29 = llama_sampler_init_mirostat(v28, *a2, 100LL, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_33;
}
v34 = v5;
if ( v16 )
{
LABEL_36:
v33 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
240LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown mirostat version\"");
common_params_sampling::~common_params_sampling(v5);
operator delete(v5, 0x1B8uLL);
std::_Vector_base<char const*>::~_Vector_base(&v38);
_Unwind_Resume(v33);
}
v17 = (_DWORD *)*((_QWORD *)a2 + 16);
v41 = (_DWORD *)*((_QWORD *)a2 + 17);
v5 = (common_params_sampling *)&v36;
while ( 2 )
{
if ( v17 != v41 )
{
switch ( *v17 )
{
case 1:
v36 = 0LL;
v37 = 0LL;
std::vector<char const*>::reserve(&v36, (long long)(*((_QWORD *)a2 + 14) - *((_QWORD *)a2 + 13)) >> 5, v15);
v18 = (_QWORD *)*((_QWORD *)a2 + 13);
v19 = (_QWORD *)*((_QWORD *)a2 + 14);
while ( v18 != v19 )
{
v42[0] = *v18;
std::vector<char const*>::emplace_back<char const*>(&v36, v42);
v18 += 4;
}
v22 = *((_QWORD *)v34 + 40);
v23 = llama_model_n_ctx_train(v40);
v6 = vocab;
v24 = llama_sampler_init_dry(
vocab,
v23,
a2[19],
a2[20],
v36,
(long long)(*((_QWORD *)&v36 + 1) - v36) >> 3,
*((float *)a2 + 17),
*((float *)a2 + 18));
llama_sampler_chain_add(v22, v24);
std::_Vector_base<char const*>::~_Vector_base(&v36);
goto LABEL_28;
case 2:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_top_k(a2[4]);
goto LABEL_27;
case 3:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_top_p((int)a2[3], *((float *)a2 + 5));
goto LABEL_27;
case 4:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_min_p((int)a2[3], *((float *)a2 + 6));
goto LABEL_27;
case 6:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_typical((int)a2[3], *((float *)a2 + 9));
goto LABEL_27;
case 7:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_temp_ext(*((float *)a2 + 10), *((float *)a2 + 11), *((float *)a2 + 12));
goto LABEL_27;
case 8:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_xtc((int)a2[3], *a2, *((float *)a2 + 7), *((float *)a2 + 8));
goto LABEL_27;
case 9:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_infill(v6);
goto LABEL_27;
case 0xA:
v20 = *((_QWORD *)v34 + 40);
v21 = llama_sampler_init_penalties(a2[13], *((float *)a2 + 14), *((float *)a2 + 15), *((float *)a2 + 16));
LABEL_27:
llama_sampler_chain_add(v20, v21);
LABEL_28:
++v17;
continue;
default:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
229LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown sampler type\"");
goto LABEL_35;
}
}
break;
}
v5 = v34;
v27 = *((_QWORD *)v34 + 40);
v29 = llama_sampler_init_dist(*a2);
LABEL_33:
llama_sampler_chain_add(v27, v29);
std::_Vector_base<char const*>::~_Vector_base(&v38);
return v5;
}
|
common_sampler_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RSI
MOV qword ptr [RSP + 0x60],RDI
CALL 0x00125180
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00124d20
MOV BPL,byte ptr [RBX + 0x61]
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x40]
MOVAPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RBX + 0xc8]
SUB RAX,qword ptr [RBX + 0xc0]
PUSH 0x28
POP RCX
CQO
IDIV RCX
LAB_001997da:
MOV RSI,RAX
CALL 0x0019aa60
MOV R14,qword ptr [RBX + 0xc0]
MOV R13,qword ptr [RBX + 0xc8]
LEA R15,[RSP + 0x40]
LEA R12,[RSP + 0x20]
LAB_001997fa:
CMP R14,R13
JZ 0x00199818
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x20],RAX
LAB_00199807:
MOV RDI,R15
MOV RSI,R12
CALL 0x0019b312
ADD R14,0x28
JMP 0x001997fa
LAB_00199818:
LEA RDI,[RBX + 0x98]
LAB_0019981f:
LEA RCX,[0x1bb245]
PUSH 0xb
POP RDX
XOR ESI,ESI
CALL 0x00124b70
MOV R15,qword ptr [RSP + 0x18]
TEST EAX,EAX
JZ 0x00199c26
MOV RSI,qword ptr [RBX + 0x98]
CMP byte ptr [RBX + 0xb8],0x1
JNZ 0x00199888
MOV RCX,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP + 0x48]
SUB R8,RCX
SAR R8,0x3
MOV R9,qword ptr [RBX + 0xd8]
MOV RAX,qword ptr [RBX + 0xe0]
SUB RAX,R9
SAR RAX,0x2
MOV qword ptr [RSP],RAX
LEA RDX,[0x1ba68d]
MOV RDI,R15
CALL 0x00124720
JMP 0x00199897
LAB_00199888:
LEA RDX,[0x1ba68d]
MOV RDI,R15
CALL 0x00124180
LAB_00199897:
MOV R12,RAX
LAB_0019989a:
MOV EDI,0x1b8
CALL 0x001248a0
LAB_001998a4:
MOV R13,RAX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00139a56
MOV qword ptr [R13 + 0x138],R12
LAB_001998b9:
MOVZX EDI,BPL
CALL 0x001244d0
MOV qword ptr [R13 + 0x140],RAX
MOV RDI,R13
ADD RDI,0x148
MOV EAX,dword ptr [RBX + 0x4]
CMP EAX,0x21
PUSH 0x20
POP RSI
CMOVGE ESI,EAX
LAB_001998df:
CALL 0x0019aaf6
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x1a0],XMM0
MOVUPS xmmword ptr [R13 + 0x190],XMM0
MOVUPS xmmword ptr [R13 + 0x180],XMM0
AND qword ptr [R13 + 0x1b0],0x0
MOV R12,qword ptr [R13 + 0x140]
LAB_0019990e:
MOV RDI,R15
CALL 0x001250b0
MOV RDX,qword ptr [RBX + 0x120]
MOV RSI,qword ptr [RBX + 0x128]
SUB RSI,RDX
SHR RSI,0x3
MOV EDI,EAX
CALL 0x00124e40
MOV RDI,R12
MOV RSI,RAX
CALL 0x00124960
MOV EAX,dword ptr [RBX + 0x54]
CMP EAX,0x2
JZ 0x00199b95
CMP EAX,0x1
JZ 0x00199b52
MOV qword ptr [RSP + 0x10],R13
TEST EAX,EAX
JNZ 0x00199c40
MOV R14,qword ptr [RBX + 0x80]
MOV RAX,qword ptr [RBX + 0x88]
MOV qword ptr [RSP + 0x68],RAX
LEA R13,[RSP + 0x20]
LEA RBP,[RSP + 0x70]
LAB_0019997c:
CMP R14,qword ptr [RSP + 0x68]
JZ 0x00199bcb
MOV EAX,dword ptr [R14]
DEC EAX
CMP EAX,0x9
JA 0x00199c05
LEA RCX,[0x1bb080]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
AND qword ptr [RSP + 0x30],0x0
MOV RSI,qword ptr [RBX + 0x70]
SUB RSI,qword ptr [RBX + 0x68]
SAR RSI,0x5
LAB_001999bf:
MOV RDI,R13
CALL 0x0019aa60
MOV R12,qword ptr [RBX + 0x68]
MOV R15,qword ptr [RBX + 0x70]
LAB_001999cf:
CMP R12,R15
JZ 0x00199af7
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x70],RAX
LAB_001999e1:
MOV RDI,R13
MOV RSI,RBP
CALL 0x0019b312
ADD R12,0x20
JMP 0x001999cf
caseD_a:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOV EDI,dword ptr [RBX + 0x34]
MOVSS XMM0,dword ptr [RBX + 0x38]
MOVSS XMM1,dword ptr [RBX + 0x3c]
MOVSS XMM2,dword ptr [RBX + 0x40]
LAB_00199a10:
CALL 0x001246e0
JMP 0x00199ae3
caseD_6:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x24]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x001246a0
JMP 0x00199ae3
caseD_7:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
MOVSS XMM1,dword ptr [RBX + 0x2c]
MOVSS XMM2,dword ptr [RBX + 0x30]
CALL 0x00125060
JMP 0x00199ae3
caseD_3:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x14]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x00124120
JMP 0x00199ae3
caseD_9:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOV RDI,R15
CALL 0x00124ce0
JMP 0x00199ae3
caseD_4:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x18]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x00124c10
JMP 0x00199ae3
caseD_2:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOV EDI,dword ptr [RBX + 0x10]
CALL 0x001243f0
JMP 0x00199ae3
caseD_8:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x1c]
MOVSS XMM1,dword ptr [RBX + 0x20]
MOVSXD RDI,dword ptr [RBX + 0xc]
MOV ESI,dword ptr [RBX]
CALL 0x001242b0
LAB_00199ae3:
MOV RDI,R12
MOV RSI,RAX
CALL 0x00124960
LAB_00199aee:
ADD R14,0x4
JMP 0x0019997c
LAB_00199af7:
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX + 0x140]
LAB_00199b03:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00124860
MOV R15,qword ptr [RSP + 0x18]
MOVSS XMM0,dword ptr [RBX + 0x44]
MOVSS XMM1,dword ptr [RBX + 0x48]
MOV EDX,dword ptr [RBX + 0x4c]
MOV ECX,dword ptr [RBX + 0x50]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
SUB R9,R8
SAR R9,0x3
MOV RDI,R15
MOV ESI,EAX
CALL 0x00124e80
MOV RDI,R12
MOV RSI,RAX
CALL 0x00124960
MOV RDI,R13
CALL 0x0013cd84
JMP 0x00199aee
LAB_00199b52:
MOV R12,qword ptr [R13 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
LAB_00199b5e:
CALL 0x00124550
MOV RDI,R12
MOV RSI,RAX
CALL 0x00124960
MOV R12,qword ptr [R13 + 0x140]
MOV RDI,R15
CALL 0x001250b0
MOV ESI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
PUSH 0x64
POP RDX
MOV EDI,EAX
CALL 0x00125150
JMP 0x00199bde
LAB_00199b95:
MOV R14,qword ptr [R13 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
CALL 0x00124550
MOV RDI,R14
MOV RSI,RAX
CALL 0x00124960
MOV R12,qword ptr [R13 + 0x140]
MOV EDI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
CALL 0x00124e50
JMP 0x00199bde
LAB_00199bcb:
MOV R13,qword ptr [RSP + 0x10]
MOV R12,qword ptr [R13 + 0x140]
MOV EDI,dword ptr [RBX]
CALL 0x00124d40
LAB_00199bde:
MOV RDI,R12
MOV RSI,RAX
CALL 0x00124960
LEA RDI,[RSP + 0x40]
CALL 0x0013cd84
MOV RAX,R13
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_5:
LEA RDI,[0x1bb251]
LEA RDX,[0x1ac140]
LEA RCX,[0x1bb2d7]
MOV ESI,0xe5
XOR EAX,EAX
CALL 0x00124e90
LAB_00199c26:
LEA RDI,[0x1bb251]
LEA RDX,[0x1bb29f]
MOV ESI,0xa5
XOR EAX,EAX
CALL 0x00124e90
LAB_00199c40:
LEA RDI,[0x1bb251]
LEA RDX,[0x1ac140]
LEA RCX,[0x1bb2f7]
MOV ESI,0xf0
XOR EAX,EAX
CALL 0x00124e90
|
/* common_sampler_init(llama_model const*, common_params_sampling const&) */
common_params_sampling * common_sampler_init(llama_model *param_1,common_params_sampling *param_2)
{
common_params_sampling cVar1;
long *plVar2;
int8 *puVar3;
int iVar4;
int4 uVar5;
int8 uVar6;
int8 uVar7;
common_params_sampling *this;
int8 uVar8;
ulong uVar9;
int8 *puVar10;
long *plVar11;
int4 *puVar12;
char *local_88;
long lStack_80;
int8 local_78;
long local_68;
long lStack_60;
int8 local_58;
llama_model *local_48;
int4 *local_40;
char *local_38;
local_48 = param_1;
uVar6 = llama_model_get_vocab();
llama_sampler_chain_default_params();
cVar1 = param_2[0x61];
local_68 = 0;
lStack_60 = 0;
local_58 = 0;
/* try { // try from 001997da to 001997e1 has its CatchHandler @ 00199c82 */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_68,
(*(long *)(param_2 + 200) - *(long *)(param_2 + 0xc0)) / 0x28);
plVar2 = *(long **)(param_2 + 200);
for (plVar11 = *(long **)(param_2 + 0xc0); plVar11 != plVar2; plVar11 = plVar11 + 5) {
local_88 = (char *)*plVar11;
/* try { // try from 00199807 to 00199811 has its CatchHandler @ 00199c8e */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_68,&local_88);
}
/* try { // try from 0019981f to 00199896 has its CatchHandler @ 00199c86 */
iVar4 = std::__cxx11::string::compare((ulong)(param_2 + 0x98),0,(char *)0xb);
if (iVar4 == 0) {
/* try { // try from 00199c26 to 00199c3f has its CatchHandler @ 00199c86 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0xa5,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
}
if (param_2[0xb8] == (common_params_sampling)0x1) {
uVar7 = llama_sampler_init_grammar_lazy
(uVar6,*(int8 *)(param_2 + 0x98),&DAT_001ba68d,local_68,
lStack_60 - local_68 >> 3,*(long *)(param_2 + 0xd8),
*(long *)(param_2 + 0xe0) - *(long *)(param_2 + 0xd8) >> 2);
}
else {
uVar7 = llama_sampler_init_grammar(uVar6,*(int8 *)(param_2 + 0x98),&DAT_001ba68d);
}
/* try { // try from 0019989a to 001998a3 has its CatchHandler @ 00199c8a */
this = (common_params_sampling *)operator_new(0x1b8);
/* try { // try from 001998a4 to 001998b1 has its CatchHandler @ 00199c70 */
common_params_sampling::common_params_sampling(this,param_2);
*(int8 *)(this + 0x138) = uVar7;
/* try { // try from 001998b9 to 001998c1 has its CatchHandler @ 00199c63 */
uVar7 = llama_sampler_chain_init(cVar1);
*(int8 *)(this + 0x140) = uVar7;
uVar9 = 0x20;
if (0x20 < (int)*(uint *)(param_2 + 4)) {
uVar9 = (ulong)*(uint *)(param_2 + 4);
}
/* try { // try from 001998df to 001998e3 has its CatchHandler @ 00199c61 */
ring_buffer<int>::ring_buffer((ring_buffer<int> *)(this + 0x148),uVar9);
*(int8 *)(this + 0x1a0) = 0;
*(int8 *)(this + 0x1a8) = 0;
*(int8 *)(this + 400) = 0;
*(int8 *)(this + 0x198) = 0;
*(int8 *)(this + 0x180) = 0;
*(int8 *)(this + 0x188) = 0;
*(int8 *)(this + 0x1b0) = 0;
uVar7 = *(int8 *)(this + 0x140);
/* try { // try from 0019990e to 0019993c has its CatchHandler @ 00199c8a */
uVar5 = llama_vocab_n_tokens(uVar6);
uVar8 = llama_sampler_init_logit_bias
(uVar5,(ulong)(*(long *)(param_2 + 0x128) - *(long *)(param_2 + 0x120)) >> 3);
llama_sampler_chain_add(uVar7,uVar8);
iVar4 = *(int *)(param_2 + 0x54);
if (iVar4 == 2) {
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar6,uVar7);
uVar7 = *(int8 *)(this + 0x140);
uVar6 = llama_sampler_init_mirostat_v2
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),
*(int4 *)param_2);
}
else if (iVar4 == 1) {
uVar7 = *(int8 *)(this + 0x140);
/* try { // try from 00199b5e to 00199be8 has its CatchHandler @ 00199c8a */
uVar8 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar7,uVar8);
uVar7 = *(int8 *)(this + 0x140);
uVar5 = llama_vocab_n_tokens(uVar6);
uVar6 = llama_sampler_init_mirostat
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),uVar5,
*(int4 *)param_2,100);
}
else {
if (iVar4 != 0) {
/* try { // try from 00199c40 to 00199c60 has its CatchHandler @ 00199c8a */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0xf0,"GGML_ASSERT(%s) failed","false && \"unknown mirostat version\"");
}
local_40 = *(int4 **)(param_2 + 0x88);
for (puVar12 = *(int4 **)(param_2 + 0x80); puVar12 != local_40; puVar12 = puVar12 + 1) {
switch(*puVar12) {
case 1:
local_88 = (char *)0x0;
lStack_80 = 0;
local_78 = 0;
/* try { // try from 001999bf to 001999c6 has its CatchHandler @ 00199c88 */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_88,
*(long *)(param_2 + 0x70) - *(long *)(param_2 + 0x68) >> 5);
puVar3 = *(int8 **)(param_2 + 0x70);
for (puVar10 = *(int8 **)(param_2 + 0x68); puVar10 != puVar3; puVar10 = puVar10 + 4) {
local_38 = (char *)*puVar10;
/* try { // try from 001999e1 to 001999eb has its CatchHandler @ 00199c93 */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_88,&local_38);
}
uVar7 = *(int8 *)(this + 0x140);
/* try { // try from 00199b03 to 00199b47 has its CatchHandler @ 00199c88 */
uVar5 = llama_model_n_ctx_train(local_48);
uVar8 = llama_sampler_init_dry
(*(int4 *)(param_2 + 0x44),*(int4 *)(param_2 + 0x48),uVar6,
uVar5,*(int4 *)(param_2 + 0x4c),*(int4 *)(param_2 + 0x50),
local_88,lStack_80 - (long)local_88 >> 3);
llama_sampler_chain_add(uVar7,uVar8);
std::_Vector_base<char_const*,std::allocator<char_const*>>::~_Vector_base
((_Vector_base<char_const*,std::allocator<char_const*>> *)&local_88);
goto LAB_00199aee;
case 2:
uVar7 = *(int8 *)(this + 0x140);
uVar8 = llama_sampler_init_top_k(*(int4 *)(param_2 + 0x10));
break;
case 3:
uVar7 = *(int8 *)(this + 0x140);
uVar8 = llama_sampler_init_top_p
(*(int4 *)(param_2 + 0x14),(long)*(int *)(param_2 + 0xc));
break;
case 4:
uVar7 = *(int8 *)(this + 0x140);
uVar8 = llama_sampler_init_min_p
(*(int4 *)(param_2 + 0x18),(long)*(int *)(param_2 + 0xc));
break;
default:
/* try { // try from 00199c05 to 00199c25 has its CatchHandler @ 00199c84 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0xe5,"GGML_ASSERT(%s) failed","false && \"unknown sampler type\"");
case 6:
uVar7 = *(int8 *)(this + 0x140);
uVar8 = llama_sampler_init_typical
(*(int4 *)(param_2 + 0x24),(long)*(int *)(param_2 + 0xc));
break;
case 7:
uVar7 = *(int8 *)(this + 0x140);
uVar8 = llama_sampler_init_temp_ext
(*(int4 *)(param_2 + 0x28),*(int4 *)(param_2 + 0x2c),
*(int4 *)(param_2 + 0x30));
break;
case 8:
uVar7 = *(int8 *)(this + 0x140);
uVar8 = llama_sampler_init_xtc
(*(int4 *)(param_2 + 0x1c),*(int4 *)(param_2 + 0x20),
(long)*(int *)(param_2 + 0xc),*(int4 *)param_2);
break;
case 9:
uVar7 = *(int8 *)(this + 0x140);
uVar8 = llama_sampler_init_infill(uVar6);
break;
case 10:
uVar7 = *(int8 *)(this + 0x140);
/* try { // try from 00199a10 to 00199aed has its CatchHandler @ 00199c8c */
uVar8 = llama_sampler_init_penalties
(*(int4 *)(param_2 + 0x38),*(int4 *)(param_2 + 0x3c),
*(int4 *)(param_2 + 0x40),*(int4 *)(param_2 + 0x34));
}
llama_sampler_chain_add(uVar7,uVar8);
LAB_00199aee:
}
uVar7 = *(int8 *)(this + 0x140);
uVar6 = llama_sampler_init_dist(*(int4 *)param_2);
}
llama_sampler_chain_add(uVar7,uVar6);
std::_Vector_base<char_const*,std::allocator<char_const*>>::~_Vector_base
((_Vector_base<char_const*,std::allocator<char_const*>> *)&local_68);
return this;
}
|
|
57,073
|
common_sampler_init(llama_model const*, common_params_sampling const&)
|
monkey531[P]llama/common/sampling.cpp
|
struct common_sampler * common_sampler_init(const struct llama_model * model, const struct common_params_sampling & params) {
const llama_vocab * vocab = llama_model_get_vocab(model);
llama_sampler_chain_params lparams = llama_sampler_chain_default_params();
lparams.no_perf = params.no_perf;
std::vector<const char *> trigger_words;
trigger_words.reserve(params.grammar_trigger_words.size());
for (const auto & str : params.grammar_trigger_words) {
trigger_words.push_back(str.word.c_str());
}
struct llama_sampler * grmr;
if (params.grammar.compare(0, 11, "%llguidance") == 0) {
#ifdef LLAMA_USE_LLGUIDANCE
grmr = llama_sampler_init_llg(vocab, "lark", params.grammar.c_str());
#else
GGML_ABORT("llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
#endif // LLAMA_USE_LLGUIDANCE
} else {
grmr = params.grammar_lazy
? llama_sampler_init_grammar_lazy(vocab, params.grammar.c_str(), "root",
trigger_words.data(), trigger_words.size(),
params.grammar_trigger_tokens.data(), params.grammar_trigger_tokens.size())
: llama_sampler_init_grammar(vocab, params.grammar.c_str(), "root");
}
auto * result = new common_sampler {
/* .params = */ params,
/* .grmr = */ grmr,
/* .chain = */ llama_sampler_chain_init(lparams),
/* .prev = */ ring_buffer<llama_token>(std::max(32, params.n_prev)),
/* .cur = */ {},
/* .cur_p = */ {},
};
llama_sampler_chain_add(result->chain,
llama_sampler_init_logit_bias(
llama_vocab_n_tokens(vocab),
params.logit_bias.size(),
params.logit_bias.data()));
if (params.mirostat == 0) {
for (const auto & cnstr : params.samplers) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY:
{
std::vector<const char *> c_breakers;
c_breakers.reserve(params.dry_sequence_breakers.size());
for (const auto & str : params.dry_sequence_breakers) {
c_breakers.push_back(str.c_str());
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dry (vocab, llama_model_n_ctx_train(model), params.dry_multiplier, params.dry_base, params.dry_allowed_length, params.dry_penalty_last_n, c_breakers.data(), c_breakers.size()));
}
break;
case COMMON_SAMPLER_TYPE_TOP_K:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_k (params.top_k));
break;
case COMMON_SAMPLER_TYPE_TOP_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_p (params.top_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_MIN_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_min_p (params.min_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_XTC:
llama_sampler_chain_add(result->chain, llama_sampler_init_xtc (params.xtc_probability, params.xtc_threshold, params.min_keep, params.seed));
break;
case COMMON_SAMPLER_TYPE_TYPICAL_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_typical (params.typ_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_TEMPERATURE:
llama_sampler_chain_add(result->chain, llama_sampler_init_temp_ext (params.temp, params.dynatemp_range, params.dynatemp_exponent));
break;
case COMMON_SAMPLER_TYPE_INFILL:
llama_sampler_chain_add(result->chain, llama_sampler_init_infill (vocab));
break;
case COMMON_SAMPLER_TYPE_PENALTIES:
llama_sampler_chain_add(result->chain, llama_sampler_init_penalties(params.penalty_last_n, params.penalty_repeat, params.penalty_freq, params.penalty_present));
break;
default:
GGML_ASSERT(false && "unknown sampler type");
}
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dist(params.seed));
} else if (params.mirostat == 1) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat(llama_vocab_n_tokens(vocab), params.seed, params.mirostat_tau, params.mirostat_eta, 100));
} else if (params.mirostat == 2) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat_v2(params.seed, params.mirostat_tau, params.mirostat_eta));
} else {
GGML_ASSERT(false && "unknown mirostat version");
}
return result;
}
|
O3
|
cpp
|
common_sampler_init(llama_model const*, common_params_sampling const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, 0x58(%rsp)
callq 0x1c140
movq %rax, 0x8(%rsp)
callq 0x1bd10
movb 0x61(%rbx), %bpl
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0xc8(%rbx), %rax
subq 0xc0(%rbx), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
callq 0xd04c0
movq 0xc0(%rbx), %r15
movq 0xc8(%rbx), %r13
cmpq %r13, %r15
je 0xceddb
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r12
movq (%r15), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xd0b9e
addq $0x28, %r15
cmpq %r13, %r15
jne 0xcedbf
leaq 0x98(%rbx), %rdi
leaq 0x2848c(%rip), %rcx # 0xf7275
movl $0xb, %edx
xorl %esi, %esi
callq 0x1bb50
testl %eax, %eax
je 0xcf1e3
movq 0x98(%rbx), %rsi
cmpb $0x1, 0xb8(%rbx)
jne 0xcee4a
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
subq %rcx, %r8
sarq $0x3, %r8
movq 0xd8(%rbx), %r9
movq 0xe0(%rbx), %rax
subq %r9, %rax
sarq $0x2, %rax
movq %rax, (%rsp)
leaq 0x2785c(%rip), %rdx # 0xf669a
movq 0x8(%rsp), %rdi
callq 0x1b700
jmp 0xcee5b
leaq 0x27849(%rip), %rdx # 0xf669a
movq 0x8(%rsp), %rdi
callq 0x1b180
movq %rax, %r12
movl $0x1b8, %edi # imm = 0x1B8
callq 0x1b890
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x543ca
movq %r12, 0x138(%r14)
movzbl %bpl, %edi
callq 0x1b4b0
movq %rax, 0x140(%r14)
movl 0x4(%rbx), %eax
cmpl $0x21, %eax
movl $0x20, %esi
cmovgel %eax, %esi
movq %rsi, 0x148(%r14)
movq %r14, %rdi
addq $0x168, %rdi # imm = 0x168
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movq $0x0, 0x160(%r14)
leaq 0x10(%rsp), %rdx
callq 0x78f82
xorps %xmm0, %xmm0
movups %xmm0, 0x1a0(%r14)
movups %xmm0, 0x190(%r14)
movups %xmm0, 0x180(%r14)
movq $0x0, 0x1b0(%r14)
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c0b0
movq 0x120(%rbx), %rdx
movq 0x128(%rbx), %rsi
subq %rdx, %rsi
shrq $0x3, %rsi
movl %eax, %edi
callq 0x1be40
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movl 0x54(%rbx), %eax
cmpl $0x2, %eax
je 0xcf16b
cmpl $0x1, %eax
je 0xcf124
testl %eax, %eax
jne 0xcf21e
movq 0x80(%rbx), %r15
movq 0x88(%rbx), %rbp
cmpq %rbp, %r15
je 0xcf1a1
leaq 0x10(%rsp), %r13
movq %rbp, 0x50(%rsp)
movl (%r15), %eax
decl %eax
cmpl $0x9, %eax
ja 0xcf1fd
leaq 0x28133(%rip), %rcx # 0xf70b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x70(%rbx), %rsi
subq 0x68(%rbx), %rsi
sarq $0x5, %rsi
movq %r13, %rdi
callq 0xd04c0
movq 0x68(%rbx), %r12
movq 0x70(%rbx), %rbp
cmpq %rbp, %r12
je 0xcf0bd
movq (%r12), %rax
movq %rax, 0x60(%rsp)
movq %r13, %rdi
leaq 0x60(%rsp), %rsi
callq 0xd0b9e
addq $0x20, %r12
jmp 0xcefb3
movq 0x140(%r14), %r12
movl 0x34(%rbx), %edi
movss 0x38(%rbx), %xmm0
movss 0x3c(%rbx), %xmm1
movss 0x40(%rbx), %xmm2
callq 0x1b6c0
jmp 0xcf0a0
movq 0x140(%r14), %r12
movss 0x24(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b680
jmp 0xcf0a0
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
movss 0x2c(%rbx), %xmm1
movss 0x30(%rbx), %xmm2
callq 0x1c070
jmp 0xcf0a0
movq 0x140(%r14), %r12
movss 0x14(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b130
jmp 0xcf0a0
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1bcd0
jmp 0xcf0a0
movq 0x140(%r14), %r12
movss 0x18(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1bbf0
jmp 0xcf0a0
movq 0x140(%r14), %r12
movl 0x10(%rbx), %edi
callq 0x1b3f0
jmp 0xcf0a0
movq 0x140(%r14), %r12
movss 0x1c(%rbx), %xmm0
movss 0x20(%rbx), %xmm1
movslq 0xc(%rbx), %rdi
movl (%rbx), %esi
callq 0x1b2a0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
addq $0x4, %r15
cmpq %rbp, %r15
jne 0xcef68
jmp 0xcf1a1
movq 0x140(%r14), %r12
movq 0x58(%rsp), %rdi
callq 0x1b850
movss 0x44(%rbx), %xmm0
movss 0x48(%rbx), %xmm1
movl 0x4c(%rbx), %edx
movl 0x50(%rbx), %ecx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
subq %r8, %r9
sarq $0x3, %r9
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x1be70
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x50(%rsp), %rbp
je 0xcf0ab
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
jmp 0xcf0ab
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
callq 0x1b520
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c0b0
movl (%rbx), %esi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
movl %eax, %edi
movl $0x64, %edx
callq 0x1c130
jmp 0xcf1af
movq 0x140(%r14), %r15
movss 0x28(%rbx), %xmm0
callq 0x1b520
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x140(%r14), %r12
movl (%rbx), %edi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
callq 0x1be50
jmp 0xcf1af
movq 0x140(%r14), %r12
movl (%rbx), %edi
callq 0x1bd30
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b940
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xcf1d1
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28097(%rip), %rdi # 0xf7281
leaq 0x280de(%rip), %rdx # 0xf72cf
movl $0xa5, %esi
xorl %eax, %eax
callq 0x1be80
leaq 0x2807d(%rip), %rdi # 0xf7281
leaq 0x18f35(%rip), %rdx # 0xe8140
leaq 0x280f5(%rip), %rcx # 0xf7307
movl $0xe5, %esi
xorl %eax, %eax
callq 0x1be80
leaq 0x2805c(%rip), %rdi # 0xf7281
leaq 0x18f14(%rip), %rdx # 0xe8140
leaq 0x280f4(%rip), %rcx # 0xf7327
movl $0xf0, %esi
xorl %eax, %eax
callq 0x1be80
jmp 0xcf283
jmp 0xcf243
movq %rax, %rbx
movq %r14, %rdi
callq 0x21932
jmp 0xcf253
movq %rax, %rbx
movl $0x1b8, %esi # imm = 0x1B8
movq %r14, %rdi
jmp 0xcf27c
jmp 0xcf283
jmp 0xcf267
jmp 0xcf283
jmp 0xcf283
jmp 0xcf283
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcf286
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
jmp 0xcf286
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xcf29d
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
|
_Z19common_sampler_initPK11llama_modelRK22common_params_sampling:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, rsi
mov [rsp+98h+var_40], rdi
call _llama_model_get_vocab
mov [rsp+98h+var_90], rax
call _llama_sampler_chain_default_params
mov bpl, [rbx+61h]
xorps xmm0, xmm0
lea rdi, [rsp+98h+var_68]
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rax, [rbx+0C8h]
sub rax, [rbx+0C0h]
sar rax, 3
mov rsi, 0CCCCCCCCCCCCCCCDh
imul rsi, rax
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r15, [rbx+0C0h]
mov r13, [rbx+0C8h]
cmp r15, r13
jz short loc_CEDDB
lea r14, [rsp+98h+var_68]
lea r12, [rsp+98h+var_88]
loc_CEDBF:
mov rax, [r15]
mov [rsp+98h+var_88], rax
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r15, 28h ; '('
cmp r15, r13
jnz short loc_CEDBF
loc_CEDDB:
lea rdi, [rbx+98h]
lea rcx, aLlguidance; "%llguidance"
mov edx, 0Bh
xor esi, esi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*)
test eax, eax
jz loc_CF1E3
mov rsi, [rbx+98h]
cmp byte ptr [rbx+0B8h], 1
jnz short loc_CEE4A
mov rcx, [rsp+98h+var_68]
mov r8, [rsp+98h+var_60]
sub r8, rcx
sar r8, 3
mov r9, [rbx+0D8h]
mov rax, [rbx+0E0h]
sub rax, r9
sar rax, 2
mov [rsp+98h+var_98], rax
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar_lazy
jmp short loc_CEE5B
loc_CEE4A:
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar
loc_CEE5B:
mov r12, rax
mov edi, 1B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; common_params_sampling *
call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&)
mov [r14+138h], r12
movzx edi, bpl
call _llama_sampler_chain_init
mov [r14+140h], rax
mov eax, [rbx+4]
cmp eax, 21h ; '!'
mov esi, 20h ; ' '
cmovge esi, eax
mov [r14+148h], rsi
mov rdi, r14
add rdi, 168h
xorps xmm0, xmm0
movups xmmword ptr [r14+150h], xmm0
mov qword ptr [r14+160h], 0
lea rdx, [rsp+98h+var_88]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
xorps xmm0, xmm0
movups xmmword ptr [r14+1A0h], xmm0
movups xmmword ptr [r14+190h], xmm0
movups xmmword ptr [r14+180h], xmm0
mov qword ptr [r14+1B0h], 0
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov rdx, [rbx+120h]
mov rsi, [rbx+128h]
sub rsi, rdx
shr rsi, 3
mov edi, eax
call _llama_sampler_init_logit_bias
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov eax, [rbx+54h]
cmp eax, 2
jz loc_CF16B
cmp eax, 1
jz loc_CF124
test eax, eax
jnz loc_CF21E
mov r15, [rbx+80h]
mov rbp, [rbx+88h]
cmp r15, rbp
jz loc_CF1A1
lea r13, [rsp+98h+var_88]
mov [rsp+98h+var_48], rbp
loc_CEF68:
mov eax, [r15]
dec eax; switch 10 cases
cmp eax, 9
ja def_CEF84; jumptable 00000000000CEF84 default case, case 5
lea rcx, jpt_CEF84
movsxd rax, ds:(jpt_CEF84 - 0F70B0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CEF86:
xorps xmm0, xmm0; jumptable 00000000000CEF84 case 1
movaps xmmword ptr [rsp+98h+var_88], xmm0
mov [rsp+98h+var_78], 0
mov rsi, [rbx+70h]
sub rsi, [rbx+68h]
sar rsi, 5
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r12, [rbx+68h]
mov rbp, [rbx+70h]
loc_CEFB3:
cmp r12, rbp
jz loc_CF0BD
mov rax, [r12]
mov [rsp+98h+var_38], rax
mov rdi, r13
lea rsi, [rsp+98h+var_38]
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r12, 20h ; ' '
jmp short loc_CEFB3
loc_CEFD8:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 10
mov edi, [rbx+34h]
movss xmm0, dword ptr [rbx+38h]
movss xmm1, dword ptr [rbx+3Ch]
movss xmm2, dword ptr [rbx+40h]
call _llama_sampler_init_penalties
jmp loc_CF0A0
loc_CEFFB:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 6
movss xmm0, dword ptr [rbx+24h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_typical
jmp loc_CF0A0
loc_CF015:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 7
movss xmm0, dword ptr [rbx+28h]
movss xmm1, dword ptr [rbx+2Ch]
movss xmm2, dword ptr [rbx+30h]
call _llama_sampler_init_temp_ext
jmp short loc_CF0A0
loc_CF032:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 3
movss xmm0, dword ptr [rbx+14h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_top_p
jmp short loc_CF0A0
loc_CF049:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 9
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_infill
jmp short loc_CF0A0
loc_CF05C:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 4
movss xmm0, dword ptr [rbx+18h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_min_p
jmp short loc_CF0A0
loc_CF073:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 2
mov edi, [rbx+10h]
call _llama_sampler_init_top_k
jmp short loc_CF0A0
loc_CF084:
mov r12, [r14+140h]; jumptable 00000000000CEF84 case 8
movss xmm0, dword ptr [rbx+1Ch]
movss xmm1, dword ptr [rbx+20h]
movsxd rdi, dword ptr [rbx+0Ch]
mov esi, [rbx]
call _llama_sampler_init_xtc
loc_CF0A0:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
loc_CF0AB:
add r15, 4
cmp r15, rbp
jnz loc_CEF68
jmp loc_CF1A1
loc_CF0BD:
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_40]
call _llama_model_n_ctx_train
movss xmm0, dword ptr [rbx+44h]
movss xmm1, dword ptr [rbx+48h]
mov edx, [rbx+4Ch]
mov ecx, [rbx+50h]
mov r8, [rsp+98h+var_88]
mov r9, [rsp+98h+var_88+8]
sub r9, r8
sar r9, 3
mov rdi, [rsp+98h+var_90]
mov esi, eax
call _llama_sampler_init_dry
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
mov rbp, [rsp+98h+var_48]
jz short loc_CF0AB
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CF0AB
loc_CF124:
mov r12, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov esi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
mov edi, eax
mov edx, 64h ; 'd'
call _llama_sampler_init_mirostat
jmp short loc_CF1AF
loc_CF16B:
mov r15, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r15
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov edi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
call _llama_sampler_init_mirostat_v2
jmp short loc_CF1AF
loc_CF1A1:
mov r12, [r14+140h]
mov edi, [rbx]
call _llama_sampler_init_dist
loc_CF1AF:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_CF1D1
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF1D1:
mov rax, r14
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CF1E3:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aLlguidanceCmak; "llguidance (cmake -DLLAMA_LLGUIDANCE=ON"...
mov esi, 0A5h
xor eax, eax
call _ggml_abort
def_CEF84:
lea rdi, aWorkspaceLlm4b_4; jumptable 00000000000CEF84 default case, case 5
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownSa; "false && \"unknown sampler type\""
mov esi, 0E5h
xor eax, eax
call _ggml_abort
loc_CF21E:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownMi; "false && \"unknown mirostat version\""
mov esi, 0F0h
xor eax, eax
call _ggml_abort
jmp short loc_CF283
jmp short $+2
loc_CF243:
mov rbx, rax
mov rdi, r14; this
call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling()
jmp short loc_CF253
mov rbx, rax
loc_CF253:
mov esi, 1B8h
mov rdi, r14
jmp short loc_CF27C
jmp short loc_CF283
jmp short loc_CF267
jmp short loc_CF283
jmp short loc_CF283
jmp short loc_CF283
loc_CF267:
mov rbx, rax
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
jz short loc_CF286
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
loc_CF27C:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CF286
loc_CF283:
mov rbx, rax
loc_CF286:
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_CF29D
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF29D:
mov rdi, rbx
call __Unwind_Resume
|
long long common_sampler_init(long long a1, unsigned int *a2)
{
unsigned __int8 v3; // bp
void **v4; // r15
void **i; // r13
long long v6; // rsi
long long inited; // rax
long long v8; // r12
long long v9; // r14
int v10; // eax
unsigned long long v11; // rsi
long long v12; // r12
unsigned int v13; // eax
long long v14; // rax
unsigned int v15; // eax
_DWORD *v16; // r15
_DWORD *v17; // rbp
long long *v18; // r12
long long *v19; // rbp
long long v20; // r12
long long v21; // rax
long long v22; // r12
unsigned int v23; // eax
long long v24; // rax
long long v25; // r12
long long v26; // rax
long long v27; // r12
unsigned int v28; // eax
long long v29; // rax
long long v30; // r15
long long v31; // rax
long long v33; // rax
long long v34; // rbx
long long vocab; // [rsp+8h] [rbp-90h]
void *v36[2]; // [rsp+10h] [rbp-88h] BYREF
long long v37; // [rsp+20h] [rbp-78h]
__int128 v38; // [rsp+30h] [rbp-68h] BYREF
long long v39; // [rsp+40h] [rbp-58h]
_DWORD *v40; // [rsp+50h] [rbp-48h]
long long v41; // [rsp+58h] [rbp-40h]
long long v42[7]; // [rsp+60h] [rbp-38h] BYREF
v41 = a1;
vocab = llama_model_get_vocab(a1);
llama_sampler_chain_default_params();
v3 = *((_BYTE *)a2 + 97);
v38 = 0LL;
v39 = 0LL;
std::vector<char const*>::reserve(
&v38,
0xCCCCCCCCCCCCCCCDLL * ((long long)(*((_QWORD *)a2 + 25) - *((_QWORD *)a2 + 24)) >> 3));
v4 = (void **)*((_QWORD *)a2 + 24);
for ( i = (void **)*((_QWORD *)a2 + 25); v4 != i; v4 += 5 )
{
v36[0] = *v4;
std::vector<char const*>::emplace_back<char const*>(&v38, v36);
}
if ( !(unsigned int)std::string::compare(a2 + 38, 0LL, 11LL, "%llguidance") )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
165LL,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
LABEL_38:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
229LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown sampler type\"");
goto LABEL_39;
}
v6 = *((_QWORD *)a2 + 19);
if ( *((_BYTE *)a2 + 184) == 1 )
inited = llama_sampler_init_grammar_lazy(vocab, v6, "root", v38, (long long)(*((_QWORD *)&v38 + 1) - v38) >> 3);
else
inited = llama_sampler_init_grammar(vocab, v6, "root");
v8 = inited;
v9 = operator new(0x1B8uLL);
common_params_sampling::common_params_sampling((common_params_sampling *)v9, (const common_params_sampling *)a2);
*(_QWORD *)(v9 + 312) = v8;
*(_QWORD *)(v9 + 320) = llama_sampler_chain_init(v3);
v10 = a2[1];
v11 = 32LL;
if ( v10 >= 33 )
v11 = (unsigned int)v10;
*(_QWORD *)(v9 + 328) = v11;
*(_OWORD *)(v9 + 336) = 0LL;
*(_QWORD *)(v9 + 352) = 0LL;
std::vector<int>::vector(v9 + 360, v11);
*(_OWORD *)(v9 + 416) = 0LL;
*(_OWORD *)(v9 + 400) = 0LL;
*(_OWORD *)(v9 + 384) = 0LL;
*(_QWORD *)(v9 + 432) = 0LL;
v12 = *(_QWORD *)(v9 + 320);
v13 = llama_vocab_n_tokens(vocab);
v14 = llama_sampler_init_logit_bias(v13, (*((_QWORD *)a2 + 37) - *((_QWORD *)a2 + 36)) >> 3);
llama_sampler_chain_add(v12, v14);
v15 = a2[21];
if ( v15 == 2 )
{
v30 = *(_QWORD *)(v9 + 320);
v31 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v30, v31);
v27 = *(_QWORD *)(v9 + 320);
v29 = llama_sampler_init_mirostat_v2(*a2, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 == 1 )
{
v25 = *(_QWORD *)(v9 + 320);
v26 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v25, v26);
v27 = *(_QWORD *)(v9 + 320);
v28 = llama_vocab_n_tokens(vocab);
v29 = llama_sampler_init_mirostat(v28, *a2, 100LL, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 )
{
LABEL_39:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
240LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown mirostat version\"");
v34 = v33;
if ( (_QWORD)v38 )
operator delete((void *)v38, v39 - v38);
_Unwind_Resume(v34);
}
v16 = (_DWORD *)*((_QWORD *)a2 + 16);
v17 = (_DWORD *)*((_QWORD *)a2 + 17);
if ( v16 != v17 )
{
v40 = (_DWORD *)*((_QWORD *)a2 + 17);
while ( 2 )
{
switch ( *v16 )
{
case 1:
*(_OWORD *)v36 = 0LL;
v37 = 0LL;
std::vector<char const*>::reserve(v36, (long long)(*((_QWORD *)a2 + 14) - *((_QWORD *)a2 + 13)) >> 5);
v18 = (long long *)*((_QWORD *)a2 + 13);
v19 = (long long *)*((_QWORD *)a2 + 14);
while ( v18 != v19 )
{
v42[0] = *v18;
std::vector<char const*>::emplace_back<char const*>(v36, v42);
v18 += 4;
}
v22 = *(_QWORD *)(v9 + 320);
v23 = llama_model_n_ctx_train(v41);
v24 = llama_sampler_init_dry(
vocab,
v23,
a2[19],
a2[20],
v36[0],
((char *)v36[1] - (char *)v36[0]) >> 3,
*((float *)a2 + 17),
*((float *)a2 + 18));
llama_sampler_chain_add(v22, v24);
v17 = v40;
if ( v36[0] )
operator delete(v36[0], v37 - (unsigned long long)v36[0]);
goto LABEL_27;
case 2:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_top_k(a2[4]);
goto LABEL_26;
case 3:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_top_p((int)a2[3], *((float *)a2 + 5));
goto LABEL_26;
case 4:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_min_p((int)a2[3], *((float *)a2 + 6));
goto LABEL_26;
case 6:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_typical((int)a2[3], *((float *)a2 + 9));
goto LABEL_26;
case 7:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_temp_ext(*((float *)a2 + 10), *((float *)a2 + 11), *((float *)a2 + 12));
goto LABEL_26;
case 8:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_xtc((int)a2[3], *a2, *((float *)a2 + 7), *((float *)a2 + 8));
goto LABEL_26;
case 9:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_infill(vocab);
goto LABEL_26;
case 0xA:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_penalties(a2[13], *((float *)a2 + 14), *((float *)a2 + 15), *((float *)a2 + 16));
LABEL_26:
llama_sampler_chain_add(v20, v21);
LABEL_27:
if ( ++v16 == v17 )
break;
continue;
default:
goto LABEL_38;
}
break;
}
}
v27 = *(_QWORD *)(v9 + 320);
v29 = llama_sampler_init_dist(*a2);
LABEL_34:
llama_sampler_chain_add(v27, v29);
if ( (_QWORD)v38 )
operator delete((void *)v38, v39 - v38);
return v9;
}
|
common_sampler_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RSI
MOV qword ptr [RSP + 0x58],RDI
CALL 0x0011c140
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0011bd10
MOV BPL,byte ptr [RBX + 0x61]
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RBX + 0xc8]
SUB RAX,qword ptr [RBX + 0xc0]
SAR RAX,0x3
MOV RSI,-0x3333333333333333
IMUL RSI,RAX
LAB_001ced9d:
CALL 0x001d04c0
MOV R15,qword ptr [RBX + 0xc0]
MOV R13,qword ptr [RBX + 0xc8]
CMP R15,R13
JZ 0x001ceddb
LEA R14,[RSP + 0x30]
LEA R12,[RSP + 0x10]
LAB_001cedbf:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x10],RAX
LAB_001cedc7:
MOV RDI,R14
MOV RSI,R12
CALL 0x001d0b9e
ADD R15,0x28
CMP R15,R13
JNZ 0x001cedbf
LAB_001ceddb:
LEA RDI,[RBX + 0x98]
LAB_001cede2:
LEA RCX,[0x1f7275]
MOV EDX,0xb
XOR ESI,ESI
CALL 0x0011bb50
TEST EAX,EAX
JZ 0x001cf1e3
MOV RSI,qword ptr [RBX + 0x98]
CMP byte ptr [RBX + 0xb8],0x1
JNZ 0x001cee4a
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
SUB R8,RCX
SAR R8,0x3
MOV R9,qword ptr [RBX + 0xd8]
MOV RAX,qword ptr [RBX + 0xe0]
SUB RAX,R9
SAR RAX,0x2
MOV qword ptr [RSP],RAX
LEA RDX,[0x1f669a]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b700
JMP 0x001cee5b
LAB_001cee4a:
LEA RDX,[0x1f669a]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b180
LAB_001cee5b:
MOV R12,RAX
LAB_001cee5e:
MOV EDI,0x1b8
CALL 0x0011b890
LAB_001cee68:
MOV R14,RAX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001543ca
MOV qword ptr [R14 + 0x138],R12
LAB_001cee7d:
MOVZX EDI,BPL
CALL 0x0011b4b0
MOV qword ptr [R14 + 0x140],RAX
MOV EAX,dword ptr [RBX + 0x4]
CMP EAX,0x21
MOV ESI,0x20
CMOVGE ESI,EAX
MOV qword ptr [R14 + 0x148],RSI
MOV RDI,R14
ADD RDI,0x168
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x150],XMM0
MOV qword ptr [R14 + 0x160],0x0
LAB_001ceec2:
LEA RDX,[RSP + 0x10]
CALL 0x00178f82
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x1a0],XMM0
MOVUPS xmmword ptr [R14 + 0x190],XMM0
MOVUPS xmmword ptr [R14 + 0x180],XMM0
MOV qword ptr [R14 + 0x1b0],0x0
MOV R12,qword ptr [R14 + 0x140]
LAB_001ceef9:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c0b0
MOV RDX,qword ptr [RBX + 0x120]
MOV RSI,qword ptr [RBX + 0x128]
SUB RSI,RDX
SHR RSI,0x3
MOV EDI,EAX
CALL 0x0011be40
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV EAX,dword ptr [RBX + 0x54]
CMP EAX,0x2
JZ 0x001cf16b
CMP EAX,0x1
JZ 0x001cf124
TEST EAX,EAX
JNZ 0x001cf21e
MOV R15,qword ptr [RBX + 0x80]
MOV RBP,qword ptr [RBX + 0x88]
CMP R15,RBP
JZ 0x001cf1a1
LEA R13,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RBP
LAB_001cef68:
MOV EAX,dword ptr [R15]
DEC EAX
CMP EAX,0x9
JA 0x001cf1fd
LEA RCX,[0x1f70b0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV RSI,qword ptr [RBX + 0x70]
SUB RSI,qword ptr [RBX + 0x68]
SAR RSI,0x5
LAB_001cefa3:
MOV RDI,R13
CALL 0x001d04c0
MOV R12,qword ptr [RBX + 0x68]
MOV RBP,qword ptr [RBX + 0x70]
LAB_001cefb3:
CMP R12,RBP
JZ 0x001cf0bd
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x60],RAX
LAB_001cefc5:
MOV RDI,R13
LEA RSI,[RSP + 0x60]
CALL 0x001d0b9e
ADD R12,0x20
JMP 0x001cefb3
caseD_a:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x34]
MOVSS XMM0,dword ptr [RBX + 0x38]
MOVSS XMM1,dword ptr [RBX + 0x3c]
MOVSS XMM2,dword ptr [RBX + 0x40]
LAB_001ceff1:
CALL 0x0011b6c0
JMP 0x001cf0a0
caseD_6:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x24]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b680
JMP 0x001cf0a0
caseD_7:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
MOVSS XMM1,dword ptr [RBX + 0x2c]
MOVSS XMM2,dword ptr [RBX + 0x30]
CALL 0x0011c070
JMP 0x001cf0a0
caseD_3:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x14]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b130
JMP 0x001cf0a0
caseD_9:
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011bcd0
JMP 0x001cf0a0
caseD_4:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x18]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011bbf0
JMP 0x001cf0a0
caseD_2:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x10]
CALL 0x0011b3f0
JMP 0x001cf0a0
caseD_8:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x1c]
MOVSS XMM1,dword ptr [RBX + 0x20]
MOVSXD RDI,dword ptr [RBX + 0xc]
MOV ESI,dword ptr [RBX]
CALL 0x0011b2a0
LAB_001cf0a0:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
LAB_001cf0ab:
ADD R15,0x4
CMP R15,RBP
JNZ 0x001cef68
JMP 0x001cf1a1
LAB_001cf0bd:
MOV R12,qword ptr [R14 + 0x140]
LAB_001cf0c4:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0011b850
MOVSS XMM0,dword ptr [RBX + 0x44]
MOVSS XMM1,dword ptr [RBX + 0x48]
MOV EDX,dword ptr [RBX + 0x4c]
MOV ECX,dword ptr [RBX + 0x50]
MOV R8,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
SUB R9,R8
SAR R9,0x3
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x0011be70
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
MOV RBP,qword ptr [RSP + 0x50]
JZ 0x001cf0ab
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011b8b0
JMP 0x001cf0ab
LAB_001cf124:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
LAB_001cf130:
CALL 0x0011b520
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c0b0
MOV ESI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
MOV EDI,EAX
MOV EDX,0x64
CALL 0x0011c130
JMP 0x001cf1af
LAB_001cf16b:
MOV R15,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
CALL 0x0011b520
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011b940
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
CALL 0x0011be50
JMP 0x001cf1af
LAB_001cf1a1:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
CALL 0x0011bd30
LAB_001cf1af:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b940
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001cf1d1
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x0011b8b0
LAB_001cf1d1:
MOV RAX,R14
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cf1e3:
LEA RDI,[0x1f7281]
LEA RDX,[0x1f72cf]
MOV ESI,0xa5
XOR EAX,EAX
CALL 0x0011be80
caseD_5:
LEA RDI,[0x1f7281]
LEA RDX,[0x1e8140]
LEA RCX,[0x1f7307]
MOV ESI,0xe5
XOR EAX,EAX
CALL 0x0011be80
LAB_001cf21e:
LEA RDI,[0x1f7281]
LEA RDX,[0x1e8140]
LEA RCX,[0x1f7327]
MOV ESI,0xf0
XOR EAX,EAX
CALL 0x0011be80
|
/* common_sampler_init(llama_model const*, common_params_sampling const&) */
common_params_sampling * common_sampler_init(llama_model *param_1,common_params_sampling *param_2)
{
common_params_sampling cVar1;
int8 *puVar2;
int iVar3;
int4 uVar4;
int8 uVar5;
int8 uVar6;
common_params_sampling *this;
int8 uVar7;
int4 *puVar8;
allocator *paVar9;
int8 *puVar10;
int4 *puVar11;
char *local_88;
long lStack_80;
long local_78;
void *local_68;
long lStack_60;
long local_58;
int4 *local_48;
llama_model *local_40;
char *local_38;
local_40 = param_1;
uVar5 = llama_model_get_vocab();
llama_sampler_chain_default_params();
cVar1 = param_2[0x61];
local_68 = (void *)0x0;
lStack_60 = 0;
local_58 = 0;
/* try { // try from 001ced9d to 001ceda1 has its CatchHandler @ 001cf25d */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_68,
(*(long *)(param_2 + 200) - *(long *)(param_2 + 0xc0) >> 3) * -0x3333333333333333);
puVar10 = *(int8 **)(param_2 + 0xc0);
puVar2 = *(int8 **)(param_2 + 200);
if (puVar10 != puVar2) {
do {
local_88 = (char *)*puVar10;
/* try { // try from 001cedc7 to 001cedd1 has its CatchHandler @ 001cf283 */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_68,&local_88);
puVar10 = puVar10 + 5;
} while (puVar10 != puVar2);
}
/* try { // try from 001cede2 to 001cee5a has its CatchHandler @ 001cf261 */
iVar3 = std::__cxx11::string::compare((ulong)(param_2 + 0x98),0,(char *)0xb);
if (iVar3 == 0) {
/* try { // try from 001cf1e3 to 001cf1fc has its CatchHandler @ 001cf261 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0xa5,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
}
if (param_2[0xb8] == (common_params_sampling)0x1) {
uVar6 = llama_sampler_init_grammar_lazy
(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f669a,local_68,
lStack_60 - (long)local_68 >> 3,*(long *)(param_2 + 0xd8),
*(long *)(param_2 + 0xe0) - *(long *)(param_2 + 0xd8) >> 2);
}
else {
uVar6 = llama_sampler_init_grammar(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f669a);
}
/* try { // try from 001cee5e to 001cee67 has its CatchHandler @ 001cf263 */
this = (common_params_sampling *)operator_new(0x1b8);
/* try { // try from 001cee68 to 001cee75 has its CatchHandler @ 001cf250 */
common_params_sampling::common_params_sampling(this,param_2);
*(int8 *)(this + 0x138) = uVar6;
/* try { // try from 001cee7d to 001cee85 has its CatchHandler @ 001cf243 */
uVar6 = llama_sampler_chain_init(cVar1);
*(int8 *)(this + 0x140) = uVar6;
paVar9 = (allocator *)0x20;
if (0x20 < (int)*(uint *)(param_2 + 4)) {
paVar9 = (allocator *)(ulong)*(uint *)(param_2 + 4);
}
*(allocator **)(this + 0x148) = paVar9;
*(int8 *)(this + 0x150) = 0;
*(int8 *)(this + 0x158) = 0;
*(int8 *)(this + 0x160) = 0;
/* try { // try from 001ceec2 to 001ceecb has its CatchHandler @ 001cf241 */
std::vector<int,std::allocator<int>>::vector((ulong)(this + 0x168),paVar9);
*(int8 *)(this + 0x1a0) = 0;
*(int8 *)(this + 0x1a8) = 0;
*(int8 *)(this + 400) = 0;
*(int8 *)(this + 0x198) = 0;
*(int8 *)(this + 0x180) = 0;
*(int8 *)(this + 0x188) = 0;
*(int8 *)(this + 0x1b0) = 0;
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001ceef9 to 001cef29 has its CatchHandler @ 001cf263 */
uVar4 = llama_vocab_n_tokens(uVar5);
uVar7 = llama_sampler_init_logit_bias
(uVar4,(ulong)(*(long *)(param_2 + 0x128) - *(long *)(param_2 + 0x120)) >> 3);
llama_sampler_chain_add(uVar6,uVar7);
iVar3 = *(int *)(param_2 + 0x54);
if (iVar3 == 2) {
uVar5 = *(int8 *)(this + 0x140);
uVar6 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar5,uVar6);
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_mirostat_v2
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),
*(int4 *)param_2);
}
else if (iVar3 == 1) {
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cf130 to 001cf1b9 has its CatchHandler @ 001cf263 */
uVar7 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar6,uVar7);
uVar6 = *(int8 *)(this + 0x140);
uVar4 = llama_vocab_n_tokens(uVar5);
uVar5 = llama_sampler_init_mirostat
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),uVar4,
*(int4 *)param_2,100);
}
else {
if (iVar3 != 0) {
/* try { // try from 001cf21e to 001cf23e has its CatchHandler @ 001cf263 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0xf0,"GGML_ASSERT(%s) failed","false && \"unknown mirostat version\"");
}
puVar11 = *(int4 **)(param_2 + 0x80);
puVar8 = *(int4 **)(param_2 + 0x88);
if (puVar11 != puVar8) {
local_48 = puVar8;
do {
switch(*puVar11) {
case 1:
local_88 = (char *)0x0;
lStack_80 = 0;
local_78 = 0;
/* try { // try from 001cefa3 to 001cefaa has its CatchHandler @ 001cf25f */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_88,
*(long *)(param_2 + 0x70) - *(long *)(param_2 + 0x68) >> 5);
puVar2 = *(int8 **)(param_2 + 0x70);
for (puVar10 = *(int8 **)(param_2 + 0x68); puVar10 != puVar2; puVar10 = puVar10 + 4)
{
local_38 = (char *)*puVar10;
/* try { // try from 001cefc5 to 001cefd1 has its CatchHandler @ 001cf267 */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_88,&local_38);
}
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001cf0c4 to 001cf105 has its CatchHandler @ 001cf25f */
uVar4 = llama_model_n_ctx_train(local_40);
uVar7 = llama_sampler_init_dry
(*(int4 *)(param_2 + 0x44),*(int4 *)(param_2 + 0x48),uVar5,
uVar4,*(int4 *)(param_2 + 0x4c),*(int4 *)(param_2 + 0x50),
local_88,lStack_80 - (long)local_88 >> 3);
llama_sampler_chain_add(uVar6,uVar7);
puVar8 = local_48;
if (local_88 != (char *)0x0) {
operator_delete(local_88,local_78 - (long)local_88);
}
goto LAB_001cf0ab;
case 2:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_k(*(int4 *)(param_2 + 0x10));
break;
case 3:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_p
(*(int4 *)(param_2 + 0x14),(long)*(int *)(param_2 + 0xc));
break;
case 4:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_min_p
(*(int4 *)(param_2 + 0x18),(long)*(int *)(param_2 + 0xc));
break;
default:
/* try { // try from 001cf1fd to 001cf21d has its CatchHandler @ 001cf23f */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp"
,0xe5,"GGML_ASSERT(%s) failed","false && \"unknown sampler type\"");
case 6:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_typical
(*(int4 *)(param_2 + 0x24),(long)*(int *)(param_2 + 0xc));
break;
case 7:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_temp_ext
(*(int4 *)(param_2 + 0x28),*(int4 *)(param_2 + 0x2c),
*(int4 *)(param_2 + 0x30));
break;
case 8:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_xtc
(*(int4 *)(param_2 + 0x1c),*(int4 *)(param_2 + 0x20),
(long)*(int *)(param_2 + 0xc),*(int4 *)param_2);
break;
case 9:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_infill(uVar5);
break;
case 10:
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001ceff1 to 001cf0aa has its CatchHandler @ 001cf265 */
uVar7 = llama_sampler_init_penalties
(*(int4 *)(param_2 + 0x38),*(int4 *)(param_2 + 0x3c),
*(int4 *)(param_2 + 0x40),*(int4 *)(param_2 + 0x34));
}
llama_sampler_chain_add(uVar6,uVar7);
LAB_001cf0ab:
puVar11 = puVar11 + 1;
} while (puVar11 != puVar8);
}
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_dist(*(int4 *)param_2);
}
llama_sampler_chain_add(uVar6,uVar5);
if (local_68 != (void *)0x0) {
operator_delete(local_68,local_58 - (long)local_68);
}
return this;
}
|
|
57,074
|
ftxui::animation::easing::BackInOut(float)
|
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/animation.cpp
|
float BackInOut(float p) {
if (p < 0.5f) {
const float f = 2.f * p;
return 0.5f * (f * f * f - f * std::sin(f * kPi));
}
const float f = (1.f - (2.f * p - 1.f));
return 0.5f * (1.f - (f * f * f - f * std::sin(f * kPi))) + 0.5f;
}
|
O1
|
cpp
|
ftxui::animation::easing::BackInOut(float):
pushq %rax
movaps %xmm0, %xmm1
movss 0x633b(%rip), %xmm0 # 0x3de00
ucomiss %xmm1, %xmm0
jbe 0x37b15
addss %xmm1, %xmm1
movss %xmm1, (%rsp)
movaps %xmm1, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x8878(%rip), %xmm0 # 0x40360
mulss %xmm1, %xmm0
callq 0xb330
movss (%rsp), %xmm2
mulss %xmm2, %xmm0
movss 0x4(%rsp), %xmm1
mulss %xmm2, %xmm1
subss %xmm0, %xmm1
mulss 0x62f0(%rip), %xmm1 # 0x3de00
movaps %xmm1, %xmm0
popq %rax
retq
addss %xmm1, %xmm1
addss 0x7247(%rip), %xmm1 # 0x3ed68
movss 0x62cf(%rip), %xmm2 # 0x3ddf8
subss %xmm1, %xmm2
movss %xmm2, (%rsp)
movaps %xmm2, %xmm0
mulss %xmm2, %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x8819(%rip), %xmm0 # 0x40360
mulss %xmm2, %xmm0
callq 0xb330
movss (%rsp), %xmm2
mulss %xmm2, %xmm0
movss 0x4(%rsp), %xmm1
mulss %xmm2, %xmm1
subss %xmm0, %xmm1
movss 0x6289(%rip), %xmm0 # 0x3ddf8
subss %xmm1, %xmm0
movss 0x6285(%rip), %xmm1 # 0x3de00
mulss %xmm1, %xmm0
addss %xmm1, %xmm0
popq %rax
retq
|
_ZN5ftxui9animation6easing9BackInOutEf:
push rax
movaps xmm1, xmm0
movss xmm0, cs:dword_3DE00
ucomiss xmm0, xmm1
jbe short loc_37B15
addss xmm1, xmm1
movss [rsp+8+var_8], xmm1
movaps xmm0, xmm1
mulss xmm0, xmm1
movss [rsp+8+var_4], xmm0
movss xmm0, cs:dword_40360
mulss xmm0, xmm1
call _sinf
movss xmm2, [rsp+8+var_8]
mulss xmm0, xmm2
movss xmm1, [rsp+8+var_4]
mulss xmm1, xmm2
subss xmm1, xmm0
mulss xmm1, cs:dword_3DE00
movaps xmm0, xmm1
pop rax
retn
loc_37B15:
addss xmm1, xmm1
addss xmm1, cs:dword_3ED68
movss xmm2, cs:dword_3DDF8
subss xmm2, xmm1
movss [rsp+8+var_8], xmm2
movaps xmm0, xmm2
mulss xmm0, xmm2
movss [rsp+8+var_4], xmm0
movss xmm0, cs:dword_40360
mulss xmm0, xmm2
call _sinf
movss xmm2, [rsp+8+var_8]
mulss xmm0, xmm2
movss xmm1, [rsp+8+var_4]
mulss xmm1, xmm2
subss xmm1, xmm0
movss xmm0, cs:dword_3DDF8
subss xmm0, xmm1
movss xmm1, cs:dword_3DE00
mulss xmm0, xmm1
addss xmm0, xmm1
pop rax
retn
|
long long ftxui::animation::easing::BackInOut(ftxui::animation::easing *this, float a2)
{
long long v3; // [rsp+0h] [rbp-8h]
if ( a2 >= 0.5 )
{
*(float *)&v3 = 1.0 - (float)((float)(a2 + a2) + -1.0);
*((float *)&v3 + 1) = *(float *)&v3 * *(float *)&v3;
sinf(this, 3.1415927 * *(float *)&v3);
}
else
{
*(float *)&v3 = a2 + a2;
*((float *)&v3 + 1) = *(float *)&v3 * *(float *)&v3;
sinf(this, 3.1415927 * (float)(a2 + a2));
}
return v3;
}
|
BackInOut:
PUSH RAX
MOVAPS XMM1,XMM0
MOVSS XMM0,dword ptr [0x0013de00]
UCOMISS XMM0,XMM1
JBE 0x00137b15
ADDSS XMM1,XMM1
MOVSS dword ptr [RSP],XMM1
MOVAPS XMM0,XMM1
MULSS XMM0,XMM1
MOVSS dword ptr [RSP + 0x4],XMM0
MOVSS XMM0,dword ptr [0x00140360]
MULSS XMM0,XMM1
CALL 0x0010b330
MOVSS XMM2,dword ptr [RSP]
MULSS XMM0,XMM2
MOVSS XMM1,dword ptr [RSP + 0x4]
MULSS XMM1,XMM2
SUBSS XMM1,XMM0
MULSS XMM1,dword ptr [0x0013de00]
MOVAPS XMM0,XMM1
POP RAX
RET
LAB_00137b15:
ADDSS XMM1,XMM1
ADDSS XMM1,dword ptr [0x0013ed68]
MOVSS XMM2,dword ptr [0x0013ddf8]
SUBSS XMM2,XMM1
MOVSS dword ptr [RSP],XMM2
MOVAPS XMM0,XMM2
MULSS XMM0,XMM2
MOVSS dword ptr [RSP + 0x4],XMM0
MOVSS XMM0,dword ptr [0x00140360]
MULSS XMM0,XMM2
CALL 0x0010b330
MOVSS XMM2,dword ptr [RSP]
MULSS XMM0,XMM2
MOVSS XMM1,dword ptr [RSP + 0x4]
MULSS XMM1,XMM2
SUBSS XMM1,XMM0
MOVSS XMM0,dword ptr [0x0013ddf8]
SUBSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x0013de00]
MULSS XMM0,XMM1
ADDSS XMM0,XMM1
POP RAX
RET
|
/* ftxui::animation::easing::BackInOut(float) */
int8 ftxui::animation::easing::BackInOut(float param_1)
{
float fVar1;
int8 local_8;
if (param_1 < DAT_0013de00) {
fVar1 = param_1 + param_1;
local_8 = CONCAT44(fVar1 * fVar1,fVar1);
sinf(DAT_00140360 * fVar1);
return local_8;
}
fVar1 = DAT_0013ddf8 - (param_1 + param_1 + DAT_0013ed68);
local_8 = CONCAT44(fVar1 * fVar1,fVar1);
sinf(DAT_00140360 * fVar1);
return local_8;
}
|
|
57,075
|
emit_push_const
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int emit_push_const(JSParseState *s, JSValue val,
BOOL as_atom)
{
int idx;
if (JS_VALUE_GET_TAG(val) == JS_TAG_STRING && as_atom) {
JSAtom atom;
/* warning: JS_NewAtomStr frees the string value */
JS_DupValue(s->ctx, val);
atom = JS_NewAtomStr(s->ctx, JS_VALUE_GET_STRING(val));
if (atom != JS_ATOM_NULL && !__JS_AtomIsTaggedInt(atom)) {
emit_op(s, OP_push_atom_value);
emit_u32(s, atom);
return 0;
}
}
idx = cpool_add(s, JS_DupValue(s->ctx, val));
if (idx < 0)
return -1;
emit_op(s, OP_push_const);
emit_u32(s, idx);
return 0;
}
|
O0
|
c
|
emit_push_const:
subq $0x58, %rsp
movq %rsi, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq %rdi, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq 0x48(%rsp), %rax
cmpl $-0x7, %eax
jne 0xb15ed
cmpl $0x0, 0x34(%rsp)
je 0xb15ed
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x27980
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x2e730
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
je 0xb15eb
movl 0x2c(%rsp), %edi
callq 0x3c3b0
cmpl $0x0, %eax
jne 0xb15eb
movq 0x38(%rsp), %rdi
movl $0x4, %esi
callq 0xa3210
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0xad7c0
movl $0x0, 0x54(%rsp)
jmp 0xb1664
jmp 0xb15ed
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x27980
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xad700
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jge 0xb163f
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb1664
movq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0xa3210
movq 0x38(%rsp), %rdi
movl 0x30(%rsp), %esi
callq 0xad7c0
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
|
emit_push_const:
sub rsp, 58h
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_10], rdx
mov [rsp+58h+var_20], rdi
mov [rsp+58h+var_24], ecx
mov rax, [rsp+58h+var_10]
cmp eax, 0FFFFFFF9h
jnz short loc_B15ED
cmp [rsp+58h+var_24], 0
jz short loc_B15ED
mov rax, [rsp+58h+var_20]
mov rdi, [rax]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_10]
call JS_DupValue
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_38], rdx
mov rax, [rsp+58h+var_20]
mov rdi, [rax]
mov rsi, [rsp+58h+var_18]
call JS_NewAtomStr
mov [rsp+58h+var_2C], eax
cmp [rsp+58h+var_2C], 0
jz short loc_B15EB
mov edi, [rsp+58h+var_2C]
call __JS_AtomIsTaggedInt
cmp eax, 0
jnz short loc_B15EB
mov rdi, [rsp+58h+var_20]
mov esi, 4
call emit_op
mov rdi, [rsp+58h+var_20]
mov esi, [rsp+58h+var_2C]
call emit_u32
mov [rsp+58h+var_4], 0
jmp short loc_B1664
loc_B15EB:
jmp short $+2
loc_B15ED:
mov rax, [rsp+58h+var_20]
mov [rsp+58h+var_58], rax
mov rax, [rsp+58h+var_20]
mov rdi, [rax]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_10]
call JS_DupValue
mov rdi, [rsp+58h+var_58]
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_48], rdx
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
call cpool_add
mov [rsp+58h+var_28], eax
cmp [rsp+58h+var_28], 0
jge short loc_B163F
mov [rsp+58h+var_4], 0FFFFFFFFh
jmp short loc_B1664
loc_B163F:
mov rdi, [rsp+58h+var_20]
mov esi, 2
call emit_op
mov rdi, [rsp+58h+var_20]
mov esi, [rsp+58h+var_28]
call emit_u32
mov [rsp+58h+var_4], 0
loc_B1664:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
|
long long emit_push_const(long long *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long v6; // rdx
long long v8; // [rsp+8h] [rbp-50h]
int v9; // [rsp+2Ch] [rbp-2Ch]
int v10; // [rsp+30h] [rbp-28h]
if ( (_DWORD)a3 == -7
&& (_DWORD)a4
&& (JS_DupValue(*a1, a2, a3, a4, a5, a6), (v9 = JS_NewAtomStr(*a1, a2)) != 0)
&& !_JS_AtomIsTaggedInt(v9) )
{
emit_op((long long)a1, 4);
emit_u32((long long)a1, v9);
return 0;
}
else
{
v8 = JS_DupValue(*a1, a2, a3, a4, a5, a6);
v10 = cpool_add(a1, v8, v6);
if ( v10 >= 0 )
{
emit_op((long long)a1, 2);
emit_u32((long long)a1, v10);
return 0;
}
else
{
return (unsigned int)-1;
}
}
}
|
emit_push_const:
SUB RSP,0x58
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ECX
MOV RAX,qword ptr [RSP + 0x48]
CMP EAX,-0x7
JNZ 0x001b15ed
CMP dword ptr [RSP + 0x34],0x0
JZ 0x001b15ed
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x00127980
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x0012e730
MOV dword ptr [RSP + 0x2c],EAX
CMP dword ptr [RSP + 0x2c],0x0
JZ 0x001b15eb
MOV EDI,dword ptr [RSP + 0x2c]
CALL 0x0013c3b0
CMP EAX,0x0
JNZ 0x001b15eb
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x4
CALL 0x001a3210
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x001ad7c0
MOV dword ptr [RSP + 0x54],0x0
JMP 0x001b1664
LAB_001b15eb:
JMP 0x001b15ed
LAB_001b15ed:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x00127980
MOV RDI,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x001ad700
MOV dword ptr [RSP + 0x30],EAX
CMP dword ptr [RSP + 0x30],0x0
JGE 0x001b163f
MOV dword ptr [RSP + 0x54],0xffffffff
JMP 0x001b1664
LAB_001b163f:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,0x2
CALL 0x001a3210
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x30]
CALL 0x001ad7c0
MOV dword ptr [RSP + 0x54],0x0
LAB_001b1664:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
int4 emit_push_const(int8 *param_1,int8 param_2,int8 param_3,int param_4)
{
int iVar1;
int iVar2;
int1 auVar3 [16];
int4 local_4;
if (((int)param_3 == -7) && (param_4 != 0)) {
JS_DupValue(*param_1,param_2,param_3);
iVar1 = JS_NewAtomStr(*param_1,param_2);
if ((iVar1 != 0) && (iVar2 = __JS_AtomIsTaggedInt(iVar1), iVar2 == 0)) {
emit_op(param_1,4);
emit_u32(param_1,iVar1);
return 0;
}
}
auVar3 = JS_DupValue(*param_1,param_2,param_3);
iVar1 = cpool_add(param_1,auVar3._0_8_,auVar3._8_8_);
if (iVar1 < 0) {
local_4 = 0xffffffff;
}
else {
emit_op(param_1,2);
emit_u32(param_1,iVar1);
local_4 = 0;
}
return local_4;
}
|
|
57,076
|
emit_push_const
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int emit_push_const(JSParseState *s, JSValue val,
BOOL as_atom)
{
int idx;
if (JS_VALUE_GET_TAG(val) == JS_TAG_STRING && as_atom) {
JSAtom atom;
/* warning: JS_NewAtomStr frees the string value */
JS_DupValue(s->ctx, val);
atom = JS_NewAtomStr(s->ctx, JS_VALUE_GET_STRING(val));
if (atom != JS_ATOM_NULL && !__JS_AtomIsTaggedInt(atom)) {
emit_op(s, OP_push_atom_value);
emit_u32(s, atom);
return 0;
}
}
idx = cpool_add(s, JS_DupValue(s->ctx, val));
if (idx < 0)
return -1;
emit_op(s, OP_push_const);
emit_u32(s, idx);
return 0;
}
|
O2
|
c
|
emit_push_const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $-0x7, %r14d
setne %al
testl %ecx, %ecx
sete %cl
orb %al, %cl
jne 0x5c45c
incl (%r15)
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x1dfbc
testl %eax, %eax
jle 0x5c45c
movl %eax, %ebp
movb $0x4, %al
jmp 0x5c47b
cmpl $-0x9, %r14d
jb 0x5c465
incl (%r15)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x59f19
testl %eax, %eax
js 0x5c494
movl %eax, %ebp
movb $0x2, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x535cb
movq %rbx, %rdi
movl %ebp, %esi
callq 0x59f8e
xorl %eax, %eax
jmp 0x5c497
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
emit_push_const:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
cmp r14d, 0FFFFFFF9h
setnz al
test ecx, ecx
setz cl
or cl, al
jnz short loc_5C45C
inc dword ptr [r15]
mov rdi, [rbx]
mov rsi, r15
call JS_NewAtomStr
test eax, eax
jle short loc_5C45C
mov ebp, eax
mov al, 4
jmp short loc_5C47B
loc_5C45C:
cmp r14d, 0FFFFFFF7h
jb short loc_5C465
inc dword ptr [r15]
loc_5C465:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call cpool_add
test eax, eax
js short loc_5C494
mov ebp, eax
mov al, 2
loc_5C47B:
movzx esi, al
mov rdi, rbx
call emit_op
mov rdi, rbx
mov esi, ebp
call emit_u32
xor eax, eax
jmp short loc_5C497
loc_5C494:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_5C497:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long emit_push_const(long long *a1, _DWORD *a2, long long a3, int a4)
{
int v5; // eax
unsigned int v6; // ebp
char v7; // al
int v8; // eax
if ( (_DWORD)a3 == -7 && a4 != 0 )
{
++*a2;
v5 = JS_NewAtomStr(*a1, (long long)a2);
if ( v5 > 0 )
{
v6 = v5;
v7 = 4;
LABEL_8:
emit_op((long long)a1, v7);
emit_u32((long long)a1, v6);
return 0LL;
}
}
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*a2;
v8 = cpool_add(a1, (long long)a2, a3);
if ( v8 >= 0 )
{
v6 = v8;
v7 = 2;
goto LABEL_8;
}
return -1LL;
}
|
emit_push_const:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CMP R14D,-0x7
SETNZ AL
TEST ECX,ECX
SETZ CL
OR CL,AL
JNZ 0x0015c45c
INC dword ptr [R15]
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0011dfbc
TEST EAX,EAX
JLE 0x0015c45c
MOV EBP,EAX
MOV AL,0x4
JMP 0x0015c47b
LAB_0015c45c:
CMP R14D,-0x9
JC 0x0015c465
INC dword ptr [R15]
LAB_0015c465:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00159f19
TEST EAX,EAX
JS 0x0015c494
MOV EBP,EAX
MOV AL,0x2
LAB_0015c47b:
MOVZX ESI,AL
MOV RDI,RBX
CALL 0x001535cb
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00159f8e
XOR EAX,EAX
JMP 0x0015c497
LAB_0015c494:
PUSH -0x1
POP RAX
LAB_0015c497:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 emit_push_const(int8 *param_1,int *param_2,int8 param_3,int param_4)
{
int1 uVar1;
int iVar2;
if (param_4 != 0 && (uint)param_3 == 0xfffffff9) {
*param_2 = *param_2 + 1;
iVar2 = JS_NewAtomStr(*param_1,param_2);
if (0 < iVar2) {
uVar1 = 4;
goto LAB_0015c47b;
}
}
if (0xfffffff6 < (uint)param_3) {
*param_2 = *param_2 + 1;
}
iVar2 = cpool_add(param_1,param_2,param_3);
if (iVar2 < 0) {
return 0xffffffffffffffff;
}
uVar1 = 2;
LAB_0015c47b:
emit_op(param_1,uVar1);
emit_u32(param_1,iVar2);
return 0;
}
|
|
57,077
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/./json.hpp
|
void push_back(const basic_json& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(val);
set_parent(m_data.m_value.array->back(), old_capacity);
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x30031
movb $0x2, (%r14)
callq 0x2d196
movq %rax, %rdi
movq %rax, 0x8(%r14)
jmp 0x3003a
cmpl $0x2, %eax
jne 0x3004a
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3b2e0
pushq $0x20
popq %rdi
callq 0x213f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2d0f2
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x65316(%rip), %rsi # 0x95382
leaq 0x10(%rsp), %rdi
callq 0x2a277
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x2e408
xorl %ebp, %ebp
leaq 0xa7e49(%rip), %rsi # 0xd7ee0
leaq -0x806c(%rip), %rdx # 0x28032
movq %rbx, %rdi
callq 0x21de0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x22078
testb %bpl, %bpl
jne 0x300bd
jmp 0x300c5
movq %rax, %r14
movq %rbx, %rdi
callq 0x215c0
movq %r14, %rdi
callq 0x21e50
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_30031
mov byte ptr [r14], 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::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>>>()
mov rdi, rax
mov [r14+8], rax
jmp short loc_3003A
loc_30031:
cmp eax, 2
jnz short loc_3004A
mov rdi, [r14+8]
loc_3003A:
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; 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>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_3004A:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_300BD
jmp short loc_300C5
mov r14, rax
loc_300BD:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_300C5:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
long long v3; // rdi
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v6; // [rsp+8h] [rbp-40h] BYREF
_BYTE v7[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v6 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v7,
(long long)"cannot use push_back() with ",
&v6);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
(long long)v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = *(_QWORD *)(a1 + 8);
}
else
{
*(_BYTE *)a1 = 2;
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>::create<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>>>();
*(_QWORD *)(a1 + 8) = v3;
}
return 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>>::push_back(
v3,
a2);
}
|
push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x00130031
MOV byte ptr [R14],0x2
CALL 0x0012d196
MOV RDI,RAX
MOV qword ptr [R14 + 0x8],RAX
JMP 0x0013003a
LAB_00130031:
CMP EAX,0x2
JNZ 0x0013004a
MOV RDI,qword ptr [R14 + 0x8]
LAB_0013003a:
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0013b2e0
LAB_0013004a:
PUSH 0x20
POP RDI
CALL 0x001213f0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012d0f2
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00130065:
LEA RSI,[0x195382]
LEA RDI,[RSP + 0x10]
CALL 0x0012a277
MOV BPL,0x1
LAB_00130079:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x0012e408
XOR EBP,EBP
LEA RSI,[0x1d7ee0]
LEA RDX,[0x128032]
MOV RDI,RBX
CALL 0x00121de0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
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>>>
*this_00;
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
this_00 = (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>>>
*)create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
*(vector<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>>>
**)(this + 8) = this_00;
}
else {
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00130065 to 00130075 has its CatchHandler @ 001300ba */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 00130079 to 001300a5 has its CatchHandler @ 001300a6 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
this_00 = *(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>>>
**)(this + 8);
}
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>>>
::push_back(this_00,param_1);
return;
}
|
|
57,078
|
js_finrec_constructor
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_finrec_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv)
{
if (JS_IsUndefined(new_target))
return JS_ThrowTypeError(ctx, "constructor requires 'new'");
JSValue cb = argv[0];
if (!JS_IsFunction(ctx, cb))
return JS_ThrowTypeError(ctx, "argument must be a function");
JSValue obj = js_create_from_ctor(ctx, new_target, JS_CLASS_FINALIZATION_REGISTRY);
if (JS_IsException(obj))
return JS_EXCEPTION;
JSFinalizationRegistryData *frd = js_malloc(ctx, sizeof(*frd));
if (!frd) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
init_list_head(&frd->entries);
frd->ctx = ctx;
frd->cb = js_dup(cb);
JS_SetOpaqueInternal(obj, frd);
return obj;
}
|
O3
|
c
|
js_finrec_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x3, %edx
jne 0x3adfc
leaq 0x686f8(%rip), %rsi # 0xa34f2
jmp 0x3ae66
movq 0x8(%r8), %r13
cmpl $-0x1, %r13d
jne 0x3ae5f
movq (%r8), %rbp
movzwl 0x6(%rbp), %eax
cmpl $0xd, %eax
je 0x3ae3f
cmpl $0x30, %eax
jne 0x3ae21
movq 0x30(%rbp), %rax
movzbl 0x20(%rax), %eax
jmp 0x3ae3b
movq 0x18(%r14), %rcx
movq 0x80(%rcx), %rcx
leaq (%rax,%rax,4), %rdi
xorl %eax, %eax
cmpq $0x0, 0x18(%rcx,%rdi,8)
setne %al
testl %eax, %eax
je 0x3ae5f
movq %r14, %rdi
movl $0x3b, %ecx
callq 0x373f3
movq %rdx, %r12
movl $0x6, %r15d
cmpl $0x6, %r12d
jne 0x3ae8d
xorl %ebx, %ebx
jmp 0x3ae78
leaq 0x69251(%rip), %rsi # 0xa40b7
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r15d
movq %rbx, %rax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0xed89
testq %rax, %rax
je 0x3aec1
movq %rax, (%rax)
movq %rax, 0x8(%rax)
movq %r14, 0x10(%rax)
incl (%rbp)
movq %rbp, 0x18(%rax)
movq %r13, 0x20(%rax)
movq %rax, 0x30(%rbx)
movq %r12, %r15
jmp 0x3ae78
cmpl $-0x9, %r12d
jb 0x3ae5b
movq 0x18(%r14), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x3ae5b
movq %rbx, %rsi
movq %r12, %rdx
callq 0x20d90
jmp 0x3ae5b
|
js_finrec_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
cmp edx, 3
jnz short loc_3ADFC
lea rsi, aConstructorReq; "constructor requires 'new'"
jmp short loc_3AE66
loc_3ADFC:
mov r13, [r8+8]
cmp r13d, 0FFFFFFFFh
jnz short loc_3AE5F
mov rbp, [r8]
movzx eax, word ptr [rbp+6]
cmp eax, 0Dh
jz short loc_3AE3F
cmp eax, 30h ; '0'
jnz short loc_3AE21
mov rax, [rbp+30h]
movzx eax, byte ptr [rax+20h]
jmp short loc_3AE3B
loc_3AE21:
mov rcx, [r14+18h]
mov rcx, [rcx+80h]
lea rdi, [rax+rax*4]
xor eax, eax
cmp qword ptr [rcx+rdi*8+18h], 0
setnz al
loc_3AE3B:
test eax, eax
jz short loc_3AE5F
loc_3AE3F:
mov rdi, r14
mov ecx, 3Bh ; ';'
call js_create_from_ctor
mov r12, rdx
mov r15d, 6
cmp r12d, 6
jnz short loc_3AE8D
loc_3AE5B:
xor ebx, ebx
jmp short loc_3AE78
loc_3AE5F:
lea rsi, aArgumentMustBe; "argument must be a function"
loc_3AE66:
xor ebx, ebx
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov r15d, 6
loc_3AE78:
mov rax, rbx
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3AE8D:
mov rbx, rax
mov esi, 28h ; '('
mov rdi, r14
call js_malloc
test rax, rax
jz short loc_3AEC1
mov [rax], rax
mov [rax+8], rax
mov [rax+10h], r14
inc dword ptr [rbp+0]
mov [rax+18h], rbp
mov [rax+20h], r13
mov [rbx+30h], rax
mov r15, r12
jmp short loc_3AE78
loc_3AEC1:
cmp r12d, 0FFFFFFF7h
jb short loc_3AE5B
mov rdi, [r14+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_3AE5B
mov rsi, rbx
mov rdx, r12
call js_free_value_rt
jmp loc_3AE5B
|
_QWORD * js_finrec_constructor(
long long a1,
long long a2,
long long a3,
long long a4,
_QWORD *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
const char *v15; // rsi
long long v16; // r13
long long v17; // rbp
long long v18; // rax
int v19; // eax
unsigned long long v20; // rax
long long v21; // rdx
long long v22; // r12
_QWORD *v23; // rbx
_QWORD *v25; // rax
long long v26; // r8
long long v27; // r9
long long v28; // rdi
int v29; // eax
long long v30; // rcx
char v31; // [rsp-8h] [rbp-38h]
v31 = v14;
if ( (_DWORD)a3 == 3 )
{
v15 = "constructor requires 'new'";
LABEL_12:
v23 = 0LL;
JS_ThrowTypeError(a1, (long long)v15, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v31);
return v23;
}
v16 = a5[1];
if ( (_DWORD)v16 != -1
|| (v17 = *a5, v18 = *(unsigned __int16 *)(*a5 + 6LL), (_DWORD)v18 != 13)
&& ((_DWORD)v18 != 48
? (a4 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL), v19 = *(_QWORD *)(a4 + 40 * v18 + 24) != 0LL)
: (v19 = *(unsigned __int8 *)(*(_QWORD *)(v17 + 48) + 32LL)),
!v19) )
{
v15 = "argument must be a function";
goto LABEL_12;
}
v20 = js_create_from_ctor(a1, a2, a3, 59);
v22 = v21;
if ( (_DWORD)v21 != 6 )
{
v23 = (_QWORD *)v20;
v25 = (_QWORD *)js_malloc(a1, 40LL);
if ( v25 )
{
*v25 = v25;
v25[1] = v25;
v25[2] = a1;
++*(_DWORD *)v17;
v25[3] = v17;
v25[4] = v16;
v23[6] = v25;
return v23;
}
if ( (unsigned int)v22 >= 0xFFFFFFF7 )
{
v28 = *(_QWORD *)(a1 + 24);
v29 = *(_DWORD *)v23;
v30 = (unsigned int)(*(_DWORD *)v23 - 1);
*(_DWORD *)v23 = v30;
if ( v29 <= 1 )
js_free_value_rt(v28, v23, v22, v30, v26, v27);
}
}
return 0LL;
}
|
js_finrec_constructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
CMP EDX,0x3
JNZ 0x0013adfc
LEA RSI,[0x1a34f2]
JMP 0x0013ae66
LAB_0013adfc:
MOV R13,qword ptr [R8 + 0x8]
CMP R13D,-0x1
JNZ 0x0013ae5f
MOV RBP,qword ptr [R8]
MOVZX EAX,word ptr [RBP + 0x6]
CMP EAX,0xd
JZ 0x0013ae3f
CMP EAX,0x30
JNZ 0x0013ae21
MOV RAX,qword ptr [RBP + 0x30]
MOVZX EAX,byte ptr [RAX + 0x20]
JMP 0x0013ae3b
LAB_0013ae21:
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x80]
LEA RDI,[RAX + RAX*0x4]
XOR EAX,EAX
CMP qword ptr [RCX + RDI*0x8 + 0x18],0x0
SETNZ AL
LAB_0013ae3b:
TEST EAX,EAX
JZ 0x0013ae5f
LAB_0013ae3f:
MOV RDI,R14
MOV ECX,0x3b
CALL 0x001373f3
MOV R12,RDX
MOV R15D,0x6
CMP R12D,0x6
JNZ 0x0013ae8d
LAB_0013ae5b:
XOR EBX,EBX
JMP 0x0013ae78
LAB_0013ae5f:
LEA RSI,[0x1a40b7]
LAB_0013ae66:
XOR EBX,EBX
MOV RDI,R14
XOR EAX,EAX
CALL 0x0012214f
MOV R15D,0x6
LAB_0013ae78:
MOV RAX,RBX
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013ae8d:
MOV RBX,RAX
MOV ESI,0x28
MOV RDI,R14
CALL 0x0010ed89
TEST RAX,RAX
JZ 0x0013aec1
MOV qword ptr [RAX],RAX
MOV qword ptr [RAX + 0x8],RAX
MOV qword ptr [RAX + 0x10],R14
INC dword ptr [RBP]
MOV qword ptr [RAX + 0x18],RBP
MOV qword ptr [RAX + 0x20],R13
MOV qword ptr [RBX + 0x30],RAX
MOV R15,R12
JMP 0x0013ae78
LAB_0013aec1:
CMP R12D,-0x9
JC 0x0013ae5b
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x0013ae5b
MOV RSI,RBX
MOV RDX,R12
CALL 0x00120d90
JMP 0x0013ae5b
|
int1 [16]
js_finrec_constructor
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 *param_5
)
{
ushort uVar1;
int iVar2;
int8 uVar3;
int *piVar4;
int *piVar5;
long lVar6;
char *pcVar7;
char cVar8;
int1 auVar9 [16];
if ((int)param_3 == 3) {
pcVar7 = "constructor requires \'new\'";
}
else {
uVar3 = param_5[1];
if ((int)uVar3 == -1) {
piVar4 = (int *)*param_5;
uVar1 = *(ushort *)((long)piVar4 + 6);
if (uVar1 == 0xd) {
LAB_0013ae3f:
auVar9 = js_create_from_ctor(param_1,param_2,param_3,0x3b);
piVar5 = auVar9._0_8_;
if (auVar9._8_4_ != 6) {
lVar6 = js_malloc(param_1,0x28);
if (lVar6 != 0) {
*(long *)lVar6 = lVar6;
*(long *)(lVar6 + 8) = lVar6;
*(long *)(lVar6 + 0x10) = param_1;
*piVar4 = *piVar4 + 1;
*(int **)(lVar6 + 0x18) = piVar4;
*(int8 *)(lVar6 + 0x20) = uVar3;
*(long *)(piVar5 + 0xc) = lVar6;
return auVar9;
}
if (0xfffffff6 < auVar9._8_4_) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar5;
*piVar5 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar3,piVar5,auVar9._8_8_);
}
}
}
return ZEXT816(6) << 0x40;
}
if (uVar1 == 0x30) {
cVar8 = *(char *)(*(long *)(piVar4 + 0xc) + 0x20);
}
else {
cVar8 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x18 + (ulong)uVar1 * 0x28)
!= 0;
}
if (cVar8 != '\0') goto LAB_0013ae3f;
}
pcVar7 = "argument must be a function";
}
JS_ThrowTypeError(param_1,pcVar7);
return ZEXT816(6) << 0x40;
}
|
|
57,079
|
list_free
|
eloqsql/libmariadb/libmariadb/ma_list.c
|
void list_free(LIST *root, unsigned int free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
free(root->data);
free(root);
root=next;
}
}
|
O3
|
c
|
list_free:
testq %rdi, %rdi
je 0x22096
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%r14), %r15
testl %ebx, %ebx
je 0x2207c
movq 0x10(%r14), %rdi
callq 0x13570
movq %r14, %rdi
callq 0x13570
movq %r15, %r14
testq %r15, %r15
jne 0x2206b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
list_free:
test rdi, rdi
jz short locret_22096
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
loc_2206B:
mov r15, [r14+8]
test ebx, ebx
jz short loc_2207C
mov rdi, [r14+10h]
call _free
loc_2207C:
mov rdi, r14
call _free
mov r14, r15
test r15, r15
jnz short loc_2206B
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_22096:
retn
|
long long list_free(long long a1, int a2)
{
long long v2; // r14
long long v3; // r15
long long result; // rax
if ( a1 )
{
v2 = a1;
do
{
v3 = *(_QWORD *)(v2 + 8);
if ( a2 )
free(*(_QWORD *)(v2 + 16));
result = free(v2);
v2 = v3;
}
while ( v3 );
}
return result;
}
|
list_free:
TEST RDI,RDI
JZ 0x00122096
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LAB_0012206b:
MOV R15,qword ptr [R14 + 0x8]
TEST EBX,EBX
JZ 0x0012207c
MOV RDI,qword ptr [R14 + 0x10]
CALL 0x00113570
LAB_0012207c:
MOV RDI,R14
CALL 0x00113570
MOV R14,R15
TEST R15,R15
JNZ 0x0012206b
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_00122096:
RET
|
void list_free(void *param_1,int param_2)
{
void *pvVar1;
if (param_1 != (void *)0x0) {
do {
pvVar1 = *(void **)((long)param_1 + 8);
if (param_2 != 0) {
free(*(void **)((long)param_1 + 0x10));
}
free(param_1);
param_1 = pvVar1;
} while (pvVar1 != (void *)0x0);
}
return;
}
|
|
57,080
|
my_string_repertoire
|
eloqsql/strings/ctype.c
|
my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
}
|
O0
|
c
|
my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x98(%rax)
jne 0x7ee58
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
jne 0x7ee58
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x7ec00
movl %eax, -0x4(%rbp)
jmp 0x7eebb
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x7eeb2
cmpq $0x7f, -0x30(%rbp)
jbe 0x7ee9d
movl $0x3, -0x4(%rbp)
jmp 0x7eebb
jmp 0x7ee9f
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7ee64
jmp 0x7eeb4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_string_repertoire:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp dword ptr [rax+98h], 1
jnz short loc_7EE58
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
and eax, 2000h
cmp eax, 0
jnz short loc_7EE58
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_string_repertoire_8bit
mov [rbp+var_4], eax
jmp short loc_7EEBB
loc_7EE58:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_7EE64:
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_7EEB2
cmp [rbp+var_30], 7Fh
jbe short loc_7EE9D
mov [rbp+var_4], 3
jmp short loc_7EEBB
loc_7EE9D:
jmp short $+2
loc_7EE9F:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_7EE64
loc_7EEB2:
jmp short $+2
loc_7EEB4:
mov [rbp+var_4], 1
loc_7EEBB:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long my_string_repertoire(long long a1, unsigned __int8 *a2, long long a3)
{
int v4; // [rsp+Ch] [rbp-34h]
unsigned long long v5; // [rsp+10h] [rbp-30h] BYREF
unsigned __int8 *v6; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
unsigned __int8 *v8; // [rsp+28h] [rbp-18h]
long long v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_DWORD *)(v9 + 12) & 0x2000) != 0 )
{
v6 = &v8[v7];
while ( 1 )
{
v4 = (*(long long ( **)(long long, unsigned long long *, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(v9 + 184) + 40LL))(
v9,
&v5,
v8,
v6);
if ( v4 <= 0 )
break;
if ( v5 > 0x7F )
return 3;
v8 += v4;
}
return 1;
}
else
{
return (unsigned int)my_string_repertoire_8bit(v9, v8, v7);
}
}
|
my_string_repertoire:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x98],0x1
JNZ 0x0017ee58
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JNZ 0x0017ee58
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0017ec00
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017eebb
LAB_0017ee58:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0017ee64:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x0017eeb2
CMP qword ptr [RBP + -0x30],0x7f
JBE 0x0017ee9d
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0017eebb
LAB_0017ee9d:
JMP 0x0017ee9f
LAB_0017ee9f:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0017ee64
LAB_0017eeb2:
JMP 0x0017eeb4
LAB_0017eeb4:
MOV dword ptr [RBP + -0x4],0x1
LAB_0017eebb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 my_string_repertoire(long param_1,long param_2,long param_3)
{
int iVar1;
ulong local_38;
long local_30;
long local_28;
long local_20;
long local_18;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(uint *)(param_1 + 0xc) & 0x2000) == 0)) {
local_c = my_string_repertoire_8bit(param_1,param_2,param_3);
}
else {
local_30 = param_2 + param_3;
while (iVar1 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x28))
(local_18,&local_38,local_20,local_30), 0 < iVar1) {
if (0x7f < local_38) {
return 3;
}
local_20 = local_20 + iVar1;
}
local_c = 1;
}
return local_c;
}
|
|
57,081
|
my_string_repertoire
|
eloqsql/strings/ctype.c
|
my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
}
|
O3
|
c
|
my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x1, 0x98(%rdi)
jne 0x5c317
testb $0x20, 0xd(%r15)
jne 0x5c317
movl $0x1, %eax
testq %rbx, %rbx
jle 0x5c37d
addq %r14, %rbx
cmpb $0x0, (%r14)
js 0x5c38a
incq %r14
cmpq %rbx, %r14
jb 0x5c307
jmp 0x5c37d
addq %r14, %rbx
movq 0xb8(%r15), %rax
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0x5c373
cmpq $0x7f, -0x28(%rbp)
ja 0x5c373
leaq -0x28(%rbp), %r12
movq %r14, %rcx
movl %eax, %r14d
addq %rcx, %r14
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0x5c373
cmpq $0x80, -0x28(%rbp)
jb 0x5c343
movzbl %cl, %eax
leal 0x1(,%rax,2), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %eax
jmp 0x5c37d
|
my_string_repertoire:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rdi+98h], 1
jnz short loc_5C317
test byte ptr [r15+0Dh], 20h
jnz short loc_5C317
mov eax, 1
test rbx, rbx
jle short loc_5C37D
add rbx, r14
loc_5C307:
cmp byte ptr [r14], 0
js short loc_5C38A
inc r14
cmp r14, rbx
jb short loc_5C307
jmp short loc_5C37D
loc_5C317:
add rbx, r14
mov rax, [r15+0B8h]
lea rsi, [rbp+var_28]
mov rdi, r15
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_5C373
cmp [rbp+var_28], 7Fh
ja short loc_5C373
lea r12, [rbp+var_28]
loc_5C343:
mov rcx, r14
mov r14d, eax
add r14, rcx
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r12
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_5C373
cmp [rbp+var_28], 80h
jb short loc_5C343
loc_5C373:
movzx eax, cl
lea eax, ds:1[rax*2]
loc_5C37D:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5C38A:
mov eax, 3
jmp short loc_5C37D
|
long long my_string_repertoire(long long a1, char *a2, long long a3)
{
char *v3; // r14
long long result; // rax
char *v5; // rbx
int v6; // eax
bool v7; // cl
_QWORD v8[5]; // [rsp+8h] [rbp-28h] BYREF
v3 = a2;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_BYTE *)(a1 + 13) & 0x20) != 0 )
{
v5 = &a2[a3];
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
a2,
&a2[a3]);
v7 = v6 > 0;
if ( v6 > 0 && v8[0] <= 0x7FuLL )
{
do
{
v3 += (unsigned int)v6;
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
v3,
v5);
v7 = v6 > 0;
}
while ( v6 > 0 && v8[0] < 0x80uLL );
}
return 2 * (unsigned int)v7 + 1;
}
else
{
result = 1LL;
if ( a3 > 0 )
{
while ( *v3 >= 0 )
{
if ( ++v3 >= &a2[a3] )
return result;
}
return 3LL;
}
}
return result;
}
|
my_string_repertoire:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RDI + 0x98],0x1
JNZ 0x0015c317
TEST byte ptr [R15 + 0xd],0x20
JNZ 0x0015c317
MOV EAX,0x1
TEST RBX,RBX
JLE 0x0015c37d
ADD RBX,R14
LAB_0015c307:
CMP byte ptr [R14],0x0
JS 0x0015c38a
INC R14
CMP R14,RBX
JC 0x0015c307
JMP 0x0015c37d
LAB_0015c317:
ADD RBX,R14
MOV RAX,qword ptr [R15 + 0xb8]
LEA RSI,[RBP + -0x28]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x0015c373
CMP qword ptr [RBP + -0x28],0x7f
JA 0x0015c373
LEA R12,[RBP + -0x28]
LAB_0015c343:
MOV RCX,R14
MOV R14D,EAX
ADD R14,RCX
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x0015c373
CMP qword ptr [RBP + -0x28],0x80
JC 0x0015c343
LAB_0015c373:
MOVZX EAX,CL
LEA EAX,[0x1 + RAX*0x2]
LAB_0015c37d:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015c38a:
MOV EAX,0x3
JMP 0x0015c37d
|
char my_string_repertoire(long param_1,char *param_2,long param_3)
{
char cVar1;
uint uVar2;
bool bVar3;
char *pcVar4;
ulong local_30;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(byte *)(param_1 + 0xd) & 0x20) == 0)) {
cVar1 = '\x01';
if (0 < param_3) {
pcVar4 = param_2 + param_3;
do {
if (*param_2 < '\0') {
return '\x03';
}
param_2 = param_2 + 1;
} while (param_2 < pcVar4);
}
}
else {
pcVar4 = param_2 + param_3;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((0 < (int)uVar2) && (local_30 < 0x80)) {
do {
param_2 = param_2 + uVar2;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((int)uVar2 < 1) break;
} while (local_30 < 0x80);
}
cVar1 = bVar3 * '\x02' + '\x01';
}
return cVar1;
}
|
|
57,082
|
ggml_compute_forward_pool_1d
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_pool_1d(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const int32_t * opts = (const int32_t *)dst->op_params;
enum ggml_op_pool op = opts[0];
const int k0 = opts[1];
const int s0 = opts[2];
const int p0 = opts[3];
GGML_ASSERT(p0 == 0); // padding not supported
GGML_ASSERT(k0 == s0); // only s = k supported
ggml_compute_forward_pool_1d_sk_p0(params, op, k0, dst);
}
|
O0
|
c
|
ggml_compute_forward_pool_1d:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x54, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x17cfa
leaq 0x5be82(%rip), %rdi # 0x73b62
movl $0x27fb, %esi # imm = 0x27FB
leaq 0x5bed5(%rip), %rdx # 0x73bc1
leaq 0x5d747(%rip), %rcx # 0x7543a
movb $0x0, %al
callq 0xe270
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x17d23
leaq 0x5be59(%rip), %rdi # 0x73b62
movl $0x27fc, %esi # imm = 0x27FC
leaq 0x5beac(%rip), %rdx # 0x73bc1
leaq 0x5d726(%rip), %rcx # 0x75442
movb $0x0, %al
callq 0xe270
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movq -0x10(%rbp), %rcx
callq 0x34080
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
ggml_compute_forward_pool_1d:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
add rax, 54h ; 'T'
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
mov eax, [rax+4]
mov [rbp+var_20], eax
mov rax, [rbp+var_18]
mov eax, [rax+8]
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov eax, [rax+0Ch]
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_17CFA
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 27FBh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aP00; "p0 == 0"
mov al, 0
call _ggml_abort
loc_17CFA:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_24]
jz short loc_17D23
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 27FCh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aK0S0; "k0 == s0"
mov al, 0
call _ggml_abort
loc_17D23:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_1C]
mov edx, [rbp+var_20]
mov rcx, [rbp+var_10]
call ggml_compute_forward_pool_1d_sk_p0
add rsp, 30h
pop rbp
retn
|
long long ggml_compute_forward_pool_1d(long long a1, _DWORD *a2)
{
int v3; // [rsp+Ch] [rbp-24h]
unsigned int v4; // [rsp+10h] [rbp-20h]
unsigned int v5; // [rsp+14h] [rbp-1Ch]
v5 = a2[21];
v4 = a2[22];
v3 = a2[23];
if ( a2[24] )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
10235LL,
"GGML_ASSERT(%s) failed",
"p0 == 0");
if ( v4 != v3 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
10236LL,
"GGML_ASSERT(%s) failed",
"k0 == s0");
return ggml_compute_forward_pool_1d_sk_p0(a1, v5, v4, a2);
}
|
ggml_compute_forward_pool_1d:
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 + -0x10]
ADD RAX,0x54
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x00117cfa
LEA RDI,[0x173b62]
MOV ESI,0x27fb
LEA RDX,[0x173bc1]
LEA RCX,[0x17543a]
MOV AL,0x0
CALL 0x0010e270
LAB_00117cfa:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x00117d23
LEA RDI,[0x173b62]
MOV ESI,0x27fc
LEA RDX,[0x173bc1]
LEA RCX,[0x175442]
MOV AL,0x0
CALL 0x0010e270
LAB_00117d23:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0x1c]
MOV EDX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CALL 0x00134080
ADD RSP,0x30
POP RBP
RET
|
void ggml_compute_forward_pool_1d(int8 param_1,long param_2)
{
int4 uVar1;
int iVar2;
int iVar3;
uVar1 = *(int4 *)(param_2 + 0x54);
iVar2 = *(int *)(param_2 + 0x58);
iVar3 = *(int *)(param_2 + 0x5c);
if (*(int *)(param_2 + 0x60) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x27fb,"GGML_ASSERT(%s) failed","p0 == 0");
}
if (iVar2 != iVar3) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x27fc,"GGML_ASSERT(%s) failed","k0 == s0");
}
ggml_compute_forward_pool_1d_sk_p0(param_1,uVar1,iVar2,param_2);
return;
}
|
|
57,083
|
inline_mysql_cond_init
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
}
|
O0
|
c
|
inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x26e77e(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a370
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
inline_mysql_cond_init_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
|
long long inline_mysql_cond_init_0(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2);
return pthread_cond_init(a2, a3);
}
|
inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012a370
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
|
|
57,084
|
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>)
|
llama.cpp/common/json.hpp
|
iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
cmpq %rdx, %rsi
je 0xa0bef
movq %rdx, %r15
movq %rdi, %rbx
movq %rdx, %rax
subq %r14, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
leaq (%r15,%rbp), %r12
cmpq 0x8(%rbx), %r12
je 0xa0bae
leaq (%r14,%rbp), %r13
addq $0x50, %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x732fc
movq %r13, %rdi
callq 0x300e0
leaq (%r14,%rbp), %rdi
addq $0x48, %rdi
callq 0x34564
leaq (%r14,%rbp), %rdi
addq $0x38, %rdi
callq 0x34564
leaq (%r14,%rbp), %r13
addq $0x28, %r13
movq %r13, %rdi
callq 0x34564
movq -0x10(%r13), %rdi
testq %rdi, %rdi
je 0xa0b84
movq 0x5f431(%rip), %rax # 0xfff90
cmpb $0x0, (%rax)
je 0xa0b6f
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa0b79
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa0b84
movq (%rdi), %rax
callq *0x18(%rax)
leaq (%r14,%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x732fc
movq %r13, %rdi
callq 0x300e0
movq %r13, %rdi
movq %r12, %rsi
callq 0xa0c02
addq $0x60, %rbp
jmp 0xa0afd
movq %r14, %r15
subq 0x8(%rsp), %r15
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x5, %rsi
addq %r14, %rsi
subq (%rbx), %rsi
addq %rbp, %rsi
sarq $0x5, %rsi
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rsi
subq %rax, %rsi
movq %rbx, %rdi
callq 0xa0c8e
addq (%rbx), %r15
movq %r15, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
cmp rsi, rdx
jz loc_A0BEF
mov r15, rdx
mov rbx, rdi
mov rax, rdx
sub rax, r14
sar rax, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rdi]
mov [rsp+48h+var_40], rax
xor ebp, ebp
loc_A0AFD:
lea r12, [r15+rbp]
cmp r12, [rbx+8]
jz loc_A0BAE
lea r13, [r14+rbp]
add r13, 50h ; 'P'
mov rdi, r13
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, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [r14+rbp]
add rdi, 48h ; 'H'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [r14+rbp]
add rdi, 38h ; '8'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r13, [r14+rbp]
add r13, 28h ; '('
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r13-10h]
test rdi, rdi
jz short loc_A0B84
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_A0B6F
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A0B79
loc_A0B6F:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A0B79:
cmp eax, 1
jnz short loc_A0B84
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A0B84:
lea r13, [r14+rbp]
mov rdi, r13
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, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r13
mov rsi, r12
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&)
add rbp, 60h ; '`'
jmp loc_A0AFD
loc_A0BAE:
mov r15, r14
sub r15, [rsp+48h+var_40]
mov rax, [rsp+48h+var_38]
lea rsi, [rax+rax*2]
shl rsi, 5
add rsi, r14
sub rsi, [rbx]
add rsi, rbp
sar rsi, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rsi, rcx
sub rsi, rax
mov rdi, rbx
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong)
add r15, [rbx]
mov r14, r15
loc_A0BEF:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // r14
long long i; // rbp
volatile signed __int32 *v7; // rdi
signed __int32 v8; // eax
long long v10; // [rsp+8h] [rbp-40h]
unsigned long long v11; // [rsp+10h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5);
v10 = *a1;
for ( i = 0LL; a3 + i != a1[1]; i += 96LL )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + i + 80));
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(a2 + i + 80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 72));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 56));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 40));
v7 = *(volatile signed __int32 **)(a2 + i + 24);
if ( v7 )
{
if ( _libc_single_threaded )
{
v8 = *((_DWORD *)v7 + 3);
*((_DWORD *)v7 + 3) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd(v7 + 3, 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 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 *)(a2 + i));
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(a2 + i);
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair(
a2 + i,
a3 + i);
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * ((long long)(i + a2 + 96 * v11 - *a1) >> 5) - v11);
return *a1 + a2 - v10;
}
return v3;
}
|
erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
CMP RSI,RDX
JZ 0x001a0bef
MOV R15,RDX
MOV RBX,RDI
MOV RAX,RDX
SUB RAX,R14
SAR RAX,0x5
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RAX
XOR EBP,EBP
LAB_001a0afd:
LEA R12,[R15 + RBP*0x1]
CMP R12,qword ptr [RBX + 0x8]
JZ 0x001a0bae
LEA R13,[R14 + RBP*0x1]
ADD R13,0x50
MOV RDI,R13
XOR ESI,ESI
CALL 0x001732fc
MOV RDI,R13
CALL 0x001300e0
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x48
CALL 0x00134564
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x38
CALL 0x00134564
LEA R13,[R14 + RBP*0x1]
ADD R13,0x28
MOV RDI,R13
CALL 0x00134564
MOV RDI,qword ptr [R13 + -0x10]
TEST RDI,RDI
JZ 0x001a0b84
MOV RAX,qword ptr [0x001fff90]
CMP byte ptr [RAX],0x0
JZ 0x001a0b6f
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a0b79
LAB_001a0b6f:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a0b79:
CMP EAX,0x1
JNZ 0x001a0b84
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a0b84:
LEA R13,[R14 + RBP*0x1]
MOV RDI,R13
XOR ESI,ESI
CALL 0x001732fc
MOV RDI,R13
CALL 0x001300e0
MOV RDI,R13
MOV RSI,R12
CALL 0x001a0c02
ADD RBP,0x60
JMP 0x001a0afd
LAB_001a0bae:
MOV R15,R14
SUB R15,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[RAX + RAX*0x2]
SHL RSI,0x5
ADD RSI,R14
SUB RSI,qword ptr [RBX]
ADD RSI,RBP
SAR RSI,0x5
MOV RCX,-0x5555555555555555
IMUL RSI,RCX
SUB RSI,RAX
MOV RDI,RBX
CALL 0x001a0c8e
ADD R15,qword ptr [RBX]
MOV R14,R15
LAB_001a0bef:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >,
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,long param_2,long param_3)
{
int *piVar1;
long lVar2;
long *plVar3;
int iVar4;
long lVar5;
long lVar6;
data *pdVar7;
if (param_2 != param_3) {
lVar5 = param_3 - param_2 >> 5;
lVar2 = *(long *)this;
for (lVar6 = 0; (pair *)(param_3 + lVar6) != *(pair **)(this + 8); lVar6 = lVar6 + 0x60) {
pdVar7 = (data *)(param_2 + lVar6 + 0x50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x48));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x38));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x28));
plVar3 = *(long **)(param_2 + lVar6 + 0x18);
if (plVar3 != (long *)0x0) {
if (*PTR___libc_single_threaded_001fff90 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar3 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)plVar3 + 0xc);
*(int *)((long)plVar3 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*plVar3 + 0x18))();
}
}
pdVar7 = (data *)(param_2 + lVar6);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::pair((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*)pdVar7,(pair *)(param_3 + lVar6));
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,(((lVar5 * 0x20 + param_2) - *(long *)this) + lVar6 >> 5) * -0x5555555555555555
+ lVar5 * 0x5555555555555555);
param_2 = (param_2 - lVar2) + *(long *)this;
}
return param_2;
}
|
|
57,085
|
mi_seq_search
|
eloqsql/storage/myisam/mi_search.c
|
int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff, my_bool *last_key)
{
int UNINIT_VAR(flag);
uint nod_flag,UNINIT_VAR(length),not_used[2];
uchar t_buff[HA_MAX_KEY_BUFF],*end;
DBUG_ENTER("_mi_seq_search");
end= page+mi_getint(page);
nod_flag=mi_test_if_nod(page);
page+=2+nod_flag;
*ret_pos=page;
t_buff[0]=0; /* Avoid bugs */
while (page < end)
{
length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff);
if (length == 0 || page > end)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_PRINT("error",
("Found wrong key: length: %u page: %p end: %p",
length, page, end));
DBUG_RETURN(MI_FOUND_WRONG_KEY);
}
if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag,
not_used)) >= 0)
break;
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff,
flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
}
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
*last_key= page == end;
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
DBUG_RETURN(flag);
}
|
O3
|
c
|
mi_seq_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp # imm = 0x508
movl %r9d, -0x508(%rbp)
movl %r8d, -0x504(%rbp)
movq %rcx, -0x520(%rbp)
movq %rsi, -0x510(%rbp)
movq 0x10(%rbp), %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzbl 0x1(%rdx), %ecx
movzbl (%rdx), %r9d
movl %r9d, %eax
andl $0x7f, %eax
shll $0x8, %eax
orq %rcx, %rax
xorl %esi, %esi
testb %r9b, %r9b
jns 0x8454c
movq (%rdi), %rcx
movl 0x17c(%rcx), %esi
movq %rdi, -0x518(%rbp)
leaq (%rdx,%rax), %rcx
movq %rcx, -0x500(%rbp)
leal 0x2(%rsi), %ecx
addq %rcx, %rdx
movq %rdx, -0x4f8(%rbp)
movq %rdx, (%rbx)
movb $0x0, -0x4f0(%rbp)
cmpl %ecx, %eax
jbe 0x8465b
leaq -0x4f0(%rbp), %rcx
movq -0x510(%rbp), %rdi
movq %rsi, %r12
leaq -0x4f8(%rbp), %rdx
movq %rcx, %r13
callq *0x48(%rdi)
testl %eax, %eax
je 0x84615
movl %eax, %r15d
movq -0x500(%rbp), %rax
cmpq %rax, -0x4f8(%rbp)
ja 0x84615
movq -0x510(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r13, %rsi
movq -0x520(%rbp), %rdx
movl -0x504(%rbp), %ecx
movl -0x508(%rbp), %r8d
leaq -0x528(%rbp), %r9
callq 0x9e3ee
movl %eax, %r14d
testl %eax, %eax
jns 0x84643
movl %r15d, %edx
movq 0x18(%rbp), %rdi
movq %r13, %rsi
callq 0x29080
movq -0x4f8(%rbp), %rax
movq %rax, (%rbx)
cmpq -0x500(%rbp), %rax
movq %r12, %rsi
movq %r13, %rcx
jb 0x84584
jmp 0x8465b
movq -0x518(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7ab1a
callq 0xa16ee
movl $0x7e, (%rax)
movl $0x7fffffff, %r14d # imm = 0x7FFFFFFF
jmp 0x84670
jne 0x8465b
movl %r15d, %edx
leaq -0x4f0(%rbp), %rsi
movq 0x18(%rbp), %rdi
callq 0x29080
xorl %r14d, %r14d
movq -0x500(%rbp), %rax
cmpq %rax, -0x4f8(%rbp)
movq 0x20(%rbp), %rax
sete (%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x84694
movl %r14d, %eax
addq $0x508, %rsp # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
|
_mi_seq_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 508h
mov [rbp+var_508], r9d
mov [rbp+var_504], r8d
mov [rbp+var_520], rcx
mov [rbp+var_510], rsi
mov rbx, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_30], rax
movzx ecx, byte ptr [rdx+1]
movzx r9d, byte ptr [rdx]
mov eax, r9d
and eax, 7Fh
shl eax, 8
or rax, rcx
xor esi, esi
test r9b, r9b
jns short loc_8454C
mov rcx, [rdi]
mov esi, [rcx+17Ch]
loc_8454C:
mov [rbp+var_518], rdi
lea rcx, [rdx+rax]
mov [rbp+var_500], rcx
lea ecx, [rsi+2]
add rdx, rcx
mov [rbp+var_4F8], rdx
mov [rbx], rdx
mov [rbp+var_4F0], 0
cmp eax, ecx
jbe loc_8465B
lea rcx, [rbp+var_4F0]
loc_84584:
mov rdi, [rbp+var_510]
mov r12, rsi
lea rdx, [rbp+var_4F8]
mov r13, rcx
call qword ptr [rdi+48h]
test eax, eax
jz short loc_84615
mov r15d, eax
mov rax, [rbp+var_500]
cmp [rbp+var_4F8], rax
ja short loc_84615
mov rax, [rbp+var_510]
mov rdi, [rax+28h]
mov rsi, r13
mov rdx, [rbp+var_520]
mov ecx, [rbp+var_504]
mov r8d, [rbp+var_508]
lea r9, [rbp+var_528]
call ha_key_cmp
mov r14d, eax
test eax, eax
jns short loc_84643
mov edx, r15d
mov rdi, [rbp+arg_8]
mov rsi, r13
call _memcpy
mov rax, [rbp+var_4F8]
mov [rbx], rax
cmp rax, [rbp+var_500]
mov rsi, r12
mov rcx, r13
jb loc_84584
jmp short loc_8465B
loc_84615:
mov rax, [rbp+var_518]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov r14d, 7FFFFFFFh
jmp short loc_84670
loc_84643:
jnz short loc_8465B
mov edx, r15d
lea rsi, [rbp+var_4F0]
mov rdi, [rbp+arg_8]
call _memcpy
xor r14d, r14d
loc_8465B:
mov rax, [rbp+var_500]
cmp [rbp+var_4F8], rax
mov rax, [rbp+arg_10]
setz byte ptr [rax]
loc_84670:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_84694
mov eax, r14d
add rsp, 508h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_84694:
call ___stack_chk_fail
|
long long mi_seq_search(
long long a1,
long long a2,
char *a3,
long long a4,
unsigned int a5,
unsigned int a6,
char **a7,
long long a8,
bool *a9)
{
unsigned int v9; // r14d
unsigned long long v10; // rax
long long v11; // rsi
long long v12; // rcx
_BYTE *v13; // rcx
_BYTE *v14; // r13
unsigned int v15; // eax
unsigned int v16; // r15d
int v17; // eax
char *v18; // rax
const char *v19; // rsi
char v21[8]; // [rsp+8h] [rbp-528h] BYREF
long long v22; // [rsp+10h] [rbp-520h]
long long v23; // [rsp+18h] [rbp-518h]
long long v24; // [rsp+20h] [rbp-510h]
unsigned int v25; // [rsp+28h] [rbp-508h]
unsigned int v26; // [rsp+2Ch] [rbp-504h]
char *v27; // [rsp+30h] [rbp-500h]
char *v28; // [rsp+38h] [rbp-4F8h] BYREF
_BYTE v29[1216]; // [rsp+40h] [rbp-4F0h] BYREF
unsigned long long v30; // [rsp+500h] [rbp-30h]
v25 = a6;
v26 = a5;
v22 = a4;
v24 = a2;
v30 = __readfsqword(0x28u);
v10 = (unsigned __int8)a3[1] | (unsigned long long)((unsigned __int8)(*a3 & 0x7F) << 8);
v11 = 0LL;
if ( *a3 < 0 )
v11 = *(unsigned int *)(*(_QWORD *)a1 + 380LL);
v23 = a1;
v27 = &a3[v10];
v12 = (unsigned int)(v11 + 2);
v28 = &a3[v12];
*a7 = &a3[v12];
v29[0] = 0;
if ( (unsigned int)v10 > (unsigned int)v12 )
{
v13 = v29;
while ( 1 )
{
v14 = v13;
v15 = (*(long long ( **)(long long, long long, char **))(v24 + 72))(v24, v11, &v28);
if ( !v15 || (v16 = v15, v28 > v27) )
{
v19 = *(const char **)(*(_QWORD *)v23 + 616LL);
mi_report_error(126, (long long)v19);
*(_DWORD *)my_thread_var(126LL, v19) = 126;
return 0x7FFFFFFF;
}
v17 = ha_key_cmp(*(_QWORD *)(v24 + 40), v14, v22, v26, v25, v21);
v9 = v17;
if ( v17 >= 0 )
break;
memcpy(a8, v14, v16);
v18 = v28;
*a7 = v28;
v13 = v14;
if ( v18 >= v27 )
goto LABEL_13;
}
if ( !v17 )
{
memcpy(a8, v29, v16);
v9 = 0;
}
}
LABEL_13:
*a9 = v28 == v27;
return v9;
}
|
_mi_seq_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x508
MOV dword ptr [RBP + -0x508],R9D
MOV dword ptr [RBP + -0x504],R8D
MOV qword ptr [RBP + -0x520],RCX
MOV qword ptr [RBP + -0x510],RSI
MOV RBX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX ECX,byte ptr [RDX + 0x1]
MOVZX R9D,byte ptr [RDX]
MOV EAX,R9D
AND EAX,0x7f
SHL EAX,0x8
OR RAX,RCX
XOR ESI,ESI
TEST R9B,R9B
JNS 0x0018454c
MOV RCX,qword ptr [RDI]
MOV ESI,dword ptr [RCX + 0x17c]
LAB_0018454c:
MOV qword ptr [RBP + -0x518],RDI
LEA RCX,[RDX + RAX*0x1]
MOV qword ptr [RBP + -0x500],RCX
LEA ECX,[RSI + 0x2]
ADD RDX,RCX
MOV qword ptr [RBP + -0x4f8],RDX
MOV qword ptr [RBX],RDX
MOV byte ptr [RBP + -0x4f0],0x0
CMP EAX,ECX
JBE 0x0018465b
LEA RCX,[RBP + -0x4f0]
LAB_00184584:
MOV RDI,qword ptr [RBP + -0x510]
MOV R12,RSI
LEA RDX,[RBP + -0x4f8]
MOV R13,RCX
CALL qword ptr [RDI + 0x48]
TEST EAX,EAX
JZ 0x00184615
MOV R15D,EAX
MOV RAX,qword ptr [RBP + -0x500]
CMP qword ptr [RBP + -0x4f8],RAX
JA 0x00184615
MOV RAX,qword ptr [RBP + -0x510]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x520]
MOV ECX,dword ptr [RBP + -0x504]
MOV R8D,dword ptr [RBP + -0x508]
LEA R9,[RBP + -0x528]
CALL 0x0019e3ee
MOV R14D,EAX
TEST EAX,EAX
JNS 0x00184643
MOV EDX,R15D
MOV RDI,qword ptr [RBP + 0x18]
MOV RSI,R13
CALL 0x00129080
MOV RAX,qword ptr [RBP + -0x4f8]
MOV qword ptr [RBX],RAX
CMP RAX,qword ptr [RBP + -0x500]
MOV RSI,R12
MOV RCX,R13
JC 0x00184584
JMP 0x0018465b
LAB_00184615:
MOV RAX,qword ptr [RBP + -0x518]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017ab1a
CALL 0x001a16ee
MOV dword ptr [RAX],0x7e
MOV R14D,0x7fffffff
JMP 0x00184670
LAB_00184643:
JNZ 0x0018465b
MOV EDX,R15D
LEA RSI,[RBP + -0x4f0]
MOV RDI,qword ptr [RBP + 0x18]
CALL 0x00129080
XOR R14D,R14D
LAB_0018465b:
MOV RAX,qword ptr [RBP + -0x500]
CMP qword ptr [RBP + -0x4f8],RAX
MOV RAX,qword ptr [RBP + 0x20]
SETZ byte ptr [RAX]
LAB_00184670:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00184694
MOV EAX,R14D
ADD RSP,0x508
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00184694:
CALL 0x00129270
|
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5,
int4 param_6,int8 *param_7,void *param_8,int8 param_9)
{
uint uVar1;
ulong uVar2;
int4 *puVar3;
int iVar4;
int unaff_R14D;
long in_FS_OFFSET;
int1 local_530 [8];
int8 local_528;
long *local_520;
long local_518;
int4 local_510;
int4 local_50c;
byte *local_508;
byte *local_500;
int1 local_4f8 [1216];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = (ulong)((*param_3 & 0x7f) << 8) | (ulong)param_3[1];
iVar4 = 0;
if ((char)*param_3 < '\0') {
iVar4 = *(int *)(*param_1 + 0x17c);
}
local_508 = param_3 + uVar2;
local_500 = param_3 + (iVar4 + 2U);
*param_7 = local_500;
local_4f8[0] = 0;
local_528 = param_4;
local_520 = param_1;
local_518 = param_2;
local_510 = param_6;
local_50c = param_5;
if (iVar4 + 2U < (uint)uVar2) {
do {
uVar1 = (**(code **)(local_518 + 0x48))(local_518,iVar4,&local_500);
if ((uVar1 == 0) || (local_508 < local_500)) {
mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268));
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x7e;
unaff_R14D = 0x7fffffff;
goto LAB_00184670;
}
unaff_R14D = ha_key_cmp(*(int8 *)(local_518 + 0x28),local_4f8,local_528,local_50c,
local_510,local_530);
if (-1 < unaff_R14D) {
if (unaff_R14D == 0) {
memcpy(param_8,local_4f8,(ulong)uVar1);
unaff_R14D = 0;
}
break;
}
memcpy(param_8,local_4f8,(ulong)uVar1);
*param_7 = local_500;
} while (local_500 < local_508);
}
*(bool *)param_9 = local_500 == local_508;
LAB_00184670:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return unaff_R14D;
}
|
|
57,086
|
my_is_symlink
|
eloqsql/mysys/my_symlink.c
|
int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined (HAVE_LSTAT) && defined (S_ISLNK)
struct stat stat_buff;
if (lstat(filename, &stat_buff))
return 0;
MSAN_STAT_WORKAROUND(&stat_buff);
return !!S_ISLNK(stat_buff.st_mode);
#elif defined (_WIN32)
DWORD dwAttr = GetFileAttributes(filename);
return (dwAttr != INVALID_FILE_ATTRIBUTES) &&
(dwAttr & FILE_ATTRIBUTE_REPARSE_POINT);
#else /* No symlinks */
return 0;
#endif
}
|
O3
|
c
|
my_is_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
leaq -0x98(%rbp), %rbx
movq %rbx, %rsi
callq 0x28570
movl 0x18(%rbx), %edx
andl $0xf000, %edx # imm = 0xF000
xorl $0xa000, %edx # imm = 0xA000
xorl %ecx, %ecx
orl %eax, %edx
sete %cl
movl %ecx, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
|
my_is_symlink:
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
lea rbx, [rbp+var_98]
mov rsi, rbx
call _lstat64
mov edx, [rbx+18h]
and edx, 0F000h
xor edx, 0A000h
xor ecx, ecx
or edx, eax
setz cl
mov eax, ecx
add rsp, 98h
pop rbx
pop rbp
retn
|
_BOOL8 my_is_symlink(long long a1)
{
int v1; // eax
_BYTE v3[24]; // [rsp+8h] [rbp-98h] BYREF
__int16 v4; // [rsp+20h] [rbp-80h]
v1 = lstat64(a1, v3);
return (v1 | v4 & 0xF000 ^ 0xA000) == 0;
}
|
my_is_symlink:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
LEA RBX,[RBP + -0x98]
MOV RSI,RBX
CALL 0x00128570
MOV EDX,dword ptr [RBX + 0x18]
AND EDX,0xf000
XOR EDX,0xa000
XOR ECX,ECX
OR EDX,EAX
SETZ CL
MOV EAX,ECX
ADD RSP,0x98
POP RBX
POP RBP
RET
|
bool my_is_symlink(char *param_1)
{
int iVar1;
stat64 local_a0;
iVar1 = lstat64(param_1,&local_a0);
return (local_a0.st_mode & 0xf000) == 0xa000 && iVar1 == 0;
}
|
|
57,087
|
my_mb_wc_sjis
|
eloqsql/strings/ctype-sjis.c
|
static int
my_mb_wc_sjis(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: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
/* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */
if (hi >= 0xA1 && hi <= 0xDF)
{
*pwc= sjis_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]]))
return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
}
|
O0
|
c
|
my_mb_wc_sjis:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0xa595a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xa5ab8
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0xa5982
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xa5ab8
cmpl $0xa1, -0x2c(%rbp)
jl 0xa59b8
cmpl $0xdf, -0x2c(%rbp)
jg 0xa59b8
movslq -0x2c(%rbp), %rcx
leaq 0x23d4d1(%rip), %rax # 0x2e2e70
movzwl (%rax,%rcx,2), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xa5ab8
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xa59d2
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xa5ab8
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x23d484(%rip), %rax # 0x2e2e70
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0xa5ab1
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0xa5a1d
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0x9f, %eax
jle 0xa5a44
movl -0x2c(%rbp), %eax
movzbl %al, %edx
xorl %eax, %eax
movl $0xe0, %ecx
cmpl %edx, %ecx
movb %al, -0x2d(%rbp)
jg 0xa5a9c
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0xfc, %ecx
movb %al, -0x2d(%rbp)
jg 0xa5a9c
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0xa5a67
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x7e, %ecx
movb %al, -0x2e(%rbp)
jle 0xa5a96
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %edx
xorl %eax, %eax
movl $0x80, %ecx
cmpl %edx, %ecx
movb %al, -0x2f(%rbp)
jg 0xa5a90
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfc, %eax
setle %al
movb %al, -0x2f(%rbp)
movb -0x2f(%rbp), %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %dl
xorl %eax, %eax
movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xa5ab8
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
my_mb_wc_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_20]
cmp rax, [rbp+var_28]
jb short loc_A595A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_A5AB8
loc_A595A:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_A5982
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_A5AB8
loc_A5982:
cmp [rbp+var_2C], 0A1h
jl short loc_A59B8
cmp [rbp+var_2C], 0DFh
jg short loc_A59B8
movsxd rcx, [rbp+var_2C]
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_A5AB8
loc_A59B8:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_A59D2
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_A5AB8
loc_A59D2:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz loc_A5AB1
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 81h
cmp eax, ecx
jg short loc_A5A1D
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 9Fh
jle short loc_A5A44
loc_A5A1D:
mov eax, [rbp+var_2C]
movzx edx, al
xor eax, eax
mov ecx, 0E0h
cmp ecx, edx
mov [rbp+var_2D], al
jg short loc_A5A9C
mov eax, [rbp+var_2C]
movzx ecx, al
xor eax, eax
cmp ecx, 0FCh
mov [rbp+var_2D], al
jg short loc_A5A9C
loc_A5A44:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_A5A67
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 7Eh ; '~'
mov [rbp+var_2E], al
jle short loc_A5A96
loc_A5A67:
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+1]
xor eax, eax
mov ecx, 80h
cmp ecx, edx
mov [rbp+var_2F], al
jg short loc_A5A90
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FCh
setle al
mov [rbp+var_2F], al
loc_A5A90:
mov al, [rbp+var_2F]
mov [rbp+var_2E], al
loc_A5A96:
mov al, [rbp+var_2E]
mov [rbp+var_2D], al
loc_A5A9C:
mov dl, [rbp+var_2D]
xor eax, eax
mov ecx, 0FFFFFFFEh
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_A5AB8
loc_A5AB1:
mov [rbp+var_4], 2
loc_A5AB8:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
bool v7; // [rsp+1h] [rbp-2Fh]
char v8; // [rsp+2h] [rbp-2Eh]
char v9; // [rsp+3h] [rbp-2Dh]
unsigned int v10; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v10 = *a3;
if ( v10 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 > 0xDFu )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = sjis_to_unicode[a3[1] + (v10 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
if ( (unsigned __int8)v10 >= 0x81u && (unsigned __int8)v10 <= 0x9Fu
|| (v9 = 0, (unsigned __int8)v10 >= 0xE0u) && (v9 = 0, (unsigned __int8)v10 <= 0xFCu) )
{
if ( a3[1] < 0x40u || (v8 = 1, a3[1] > 0x7Eu) )
{
v7 = 0;
if ( a3[1] >= 0x80u )
v7 = a3[1] <= 0xFCu;
v8 = v7;
}
v9 = v8;
}
v5 = 0;
if ( (v9 & 1) != 0 )
return (unsigned int)-2;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = sjis_to_unicode[*a3];
return 1;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_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 + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001a595a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001a5ab8
LAB_001a595a:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x001a5982
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a5ab8
LAB_001a5982:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x001a59b8
CMP dword ptr [RBP + -0x2c],0xdf
JG 0x001a59b8
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x3e2e70]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a5ab8
LAB_001a59b8:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001a59d2
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001a5ab8
LAB_001a59d2:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3e2e70]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001a5ab1
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0x81
CMP EAX,ECX
JG 0x001a5a1d
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0x9f
JLE 0x001a5a44
LAB_001a5a1d:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EDX,AL
XOR EAX,EAX
MOV ECX,0xe0
CMP ECX,EDX
MOV byte ptr [RBP + -0x2d],AL
JG 0x001a5a9c
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
XOR EAX,EAX
CMP ECX,0xfc
MOV byte ptr [RBP + -0x2d],AL
JG 0x001a5a9c
LAB_001a5a44:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x001a5a67
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0x7e
MOV byte ptr [RBP + -0x2e],AL
JLE 0x001a5a96
LAB_001a5a67:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x1]
XOR EAX,EAX
MOV ECX,0x80
CMP ECX,EDX
MOV byte ptr [RBP + -0x2f],AL
JG 0x001a5a90
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfc
SETLE AL
MOV byte ptr [RBP + -0x2f],AL
LAB_001a5a90:
MOV AL,byte ptr [RBP + -0x2f]
MOV byte ptr [RBP + -0x2e],AL
LAB_001a5a96:
MOV AL,byte ptr [RBP + -0x2e]
MOV byte ptr [RBP + -0x2d],AL
LAB_001a5a9c:
MOV DL,byte ptr [RBP + -0x2d]
XOR EAX,EAX
MOV ECX,0xfffffffe
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001a5ab8
LAB_001a5ab1:
MOV dword ptr [RBP + -0x4],0x2
LAB_001a5ab8:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xdf < uVar3)) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)(sjis_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
if ((((0x80 < uVar3) && (uVar3 < 0xa0)) ||
((bVar2 = false, 0xdf < uVar3 && (bVar2 = false, uVar3 < 0xfd)))) &&
(((param_3[1] < 0x40 || (bVar2 = true, 0x7e < param_3[1])) &&
(bVar2 = false, 0x7f < param_3[1])))) {
bVar2 = param_3[1] < 0xfd;
}
local_c = 0;
if (bVar2) {
local_c = 0xfffffffe;
}
}
else {
local_c = 2;
}
}
}
else {
*param_2 = (ulong)*(ushort *)(sjis_to_unicode + (long)(int)uVar3 * 2);
local_c = 1;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
57,088
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) {
std::map<std::string, size_t> named_positions;
for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i;
return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value {
auto args_obj = Value::object();
std::vector<bool> provided_args(params.size());
for (size_t i = 0, n = args.args.size(); i < n; i++) {
auto & arg = args.args[i];
if (i < params.size()) {
args_obj.set(params[i], arg);
provided_args[i] = true;
} else {
throw std::runtime_error("Too many positional params for " + fn_name);
}
}
for (auto & [name, value] : args.kwargs) {
auto named_pos_it = named_positions.find(name);
if (named_pos_it == named_positions.end()) {
throw std::runtime_error("Unknown argument " + name + " for function " + fn_name);
}
provided_args[named_pos_it->second] = true;
args_obj.set(name, value);
}
return fn(context, args_obj);
});
}
|
O3
|
cpp
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0xc0(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x8(%rdx), %rbp
subq (%rdx), %rbp
je 0x97627
sarq $0x5, %rbp
cmpq $0x1, %rbp
adcq $0x0, %rbp
xorl %ebx, %ebx
leaq 0xb8(%rsp), %r13
xorl %r12d, %r12d
movq (%r15), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0x7ff8c
movq %r12, (%rax)
incq %r12
addq $0x20, %rbx
cmpq %r12, %rbp
jne 0x9760a
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x2c50a
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x26a9a
leaq 0x68(%rsp), %r14
leaq 0xb8(%rsp), %rsi
movq %r14, %rdi
callq 0x803e6
leaq 0x98(%rsp), %r15
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0x80008
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x88, %edi
callq 0x197d0
movq %rax, %r12
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x2c50a
leaq 0x18(%r12), %rdi
leaq 0x28(%r12), %rbp
movq %rbp, 0x18(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
callq 0x26a9a
leaq 0x40(%r12), %rax
movq 0x78(%rsp), %rdx
testq %rdx, %rdx
je 0x9770e
leaq 0x70(%rsp), %rdi
movl (%rdi), %ecx
movq %rdx, 0x48(%r12)
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %rsi
movq %rax, 0x8(%rdx)
leaq 0x90(%rsp), %rdx
movq (%rdx), %rax
movq %rax, 0x60(%r12)
movq $0x0, -0x18(%rdx)
movq %rdi, -0x10(%rdx)
movq %rdi, -0x8(%rdx)
movq %r8, %rax
jmp 0x97721
movq $0x0, 0x48(%r12)
leaq 0x60(%r12), %rdx
xorl %ecx, %ecx
movq %rax, %rsi
movq %rax, 0x50(%r12)
movq %rsi, 0x58(%r12)
movq $0x0, (%rdx)
movl %ecx, 0x40(%r12)
leaq 0x68(%r12), %rdi
movq %r15, %rsi
callq 0x80008
movq %rsp, %rsi
movq %r12, (%rsi)
leaq 0x1c9(%rip), %rax # 0x9791a
movq %rax, 0x18(%rsi)
leaq 0x84c(%rip), %rax # 0x97fa8
movq %rax, 0x10(%rsi)
movq 0x20(%rsp), %rdi
callq 0x69ca2
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x97781
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0x9779b
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0x80648
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x977ba
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x197f0
leaq 0x30(%rsp), %rdi
callq 0x23964
leaq 0xb8(%rsp), %rdi
callq 0x80648
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x97862
jmp 0x97862
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x9786d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x9786d
jmp 0x97862
movq %rax, %rbx
movq %r12, %rdi
addq $0x38, %rdi
callq 0x80648
movq 0x18(%r12), %rdi
cmpq %rbp, %rdi
je 0x9782f
movq (%rbp), %rsi
incq %rsi
callq 0x197f0
jmp 0x9782f
movq %rax, %rbx
movq %r12, %rdi
callq 0x23964
jmp 0x9783c
movq %rax, %rbx
movl $0x88, %esi
movq %r12, %rdi
callq 0x197f0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x9786d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x9786d
movq %rax, %rdi
callq 0x24406
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x978cc
jmp 0x978b6
movq %rax, %rbx
movq %r14, %rdi
callq 0x80648
jmp 0x97889
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x978a5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x197f0
jmp 0x978a5
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x23964
jmp 0x978b6
jmp 0x978b3
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x80648
movq %rbx, %rdi
callq 0x19dc0
nop
|
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_F0], rcx
mov r15, rdx
mov r14, rsi
mov [rsp+118h+var_F8], rdi
lea rax, [rsp+118h+var_58]
mov dword ptr [rax], 0
xor ecx, ecx
mov [rax+8], rcx
mov [rax+10h], rax
mov [rax+18h], rax
mov [rax+20h], rcx
mov rbp, [rdx+8]
sub rbp, [rdx]
jz short loc_97627
sar rbp, 5
cmp rbp, 1
adc rbp, 0
xor ebx, ebx
lea r13, [rsp+118h+var_60]
xor r12d, r12d
loc_9760A:
mov rsi, [r15]
add rsi, rbx
mov rdi, r13
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&)
mov [rax], r12
inc r12
add rbx, 20h ; ' '
cmp rbp, r12
jnz short loc_9760A
loc_97627:
lea rdi, [rsp+118h+var_E8]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [rsp+118h+var_D0]
lea r13, [rsp+118h+var_C0]
mov [r13-10h], r13
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea r14, [rsp+118h+var_B0]
lea rsi, [rsp+118h+var_60]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&)
lea r15, [rsp+118h+var_80]
mov rdi, r15
mov rsi, [rsp+118h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_108], xmm0
movaps [rsp+118h+var_118], xmm0
mov edi, 88h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rsi, [rsp+118h+var_E8]
mov rdi, rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [r12+18h]
lea rbp, [r12+28h]
mov [r12+18h], rbp
mov rsi, [rsp+118h+var_D0]
mov rdx, [rsp+118h+var_C8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [r12+40h]
mov rdx, [rsp+118h+var_A0]
test rdx, rdx
jz short loc_9770E
lea rdi, [rsp+118h+var_A8]
mov ecx, [rdi]
mov [r12+48h], rdx
mov r8, [rdi+10h]
mov rsi, [rdi+18h]
mov [rdx+8], rax
lea rdx, [rsp+118h+var_88]
mov rax, [rdx]
mov [r12+60h], rax
mov qword ptr [rdx-18h], 0
mov [rdx-10h], rdi
mov [rdx-8], rdi
mov rax, r8
jmp short loc_97721
loc_9770E:
mov qword ptr [r12+48h], 0
lea rdx, [r12+60h]
xor ecx, ecx
mov rsi, rax
loc_97721:
mov [r12+50h], rax
mov [r12+58h], rsi
mov qword ptr [rdx], 0
mov [r12+40h], ecx
lea rdi, [r12+68h]
mov rsi, r15
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
mov rsi, rsp
mov [rsi], r12
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8__0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation_0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
mov rdi, [rsp+118h+var_F8]
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_97781
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_97781:
mov rax, [rsp+118h+var_70]
test rax, rax
jz short loc_9779B
mov rdi, r15
mov rsi, r15
mov edx, 3
call rax
loc_9779B:
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_977BA
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_977BA:
lea rdi, [rsp+118h+var_E8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+118h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_97862
jmp short loc_97862
mov rbx, rax
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_9786D
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_9786D
jmp short loc_97862
mov rbx, rax
mov rdi, r12
add rdi, 38h ; '8'
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, [r12+18h]; void *
cmp rdi, rbp
jz short loc_9782F
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9782F
mov rbx, rax
loc_9782F:
mov rdi, r12; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_9783C
mov rbx, rax
loc_9783C:
mov esi, 88h; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_9786D
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_9786D
loc_97862:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_9786D:
lea rdi, [rsp+118h+var_E8]; void *
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
jmp short loc_978B6
mov rbx, rax
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
jmp short loc_97889
mov rbx, rax
loc_97889:
mov rdi, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_978A5
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_978A5
mov rbx, rax
loc_978A5:
lea rdi, [rsp+118h+var_E8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_978B6
jmp short $+2
loc_978B3:
mov rbx, rax
loc_978B6:
lea rdi, [rsp+118h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
|
void minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v5; // rbp
long long v6; // rbp
long long v7; // rbx
long long v8; // r12
long long v9; // r12
long long v10; // rax
long long v11; // rdx
int v12; // ecx
int *v13; // r8
int *v14; // rsi
long long *v15; // rdx
__int128 v16; // [rsp+0h] [rbp-118h] BYREF
__int128 v17; // [rsp+10h] [rbp-108h]
long long v18; // [rsp+20h] [rbp-F8h]
long long v19; // [rsp+28h] [rbp-F0h]
_QWORD v20[3]; // [rsp+30h] [rbp-E8h] BYREF
void *v21[2]; // [rsp+48h] [rbp-D0h] BYREF
_QWORD v22[2]; // [rsp+58h] [rbp-C0h] BYREF
_BYTE v23[8]; // [rsp+68h] [rbp-B0h] BYREF
int v24; // [rsp+70h] [rbp-A8h] BYREF
long long v25; // [rsp+78h] [rbp-A0h]
int *v26; // [rsp+80h] [rbp-98h]
int *v27; // [rsp+88h] [rbp-90h]
long long v28; // [rsp+90h] [rbp-88h] BYREF
__int128 v29; // [rsp+98h] [rbp-80h] BYREF
void ( *v30)(__int128 *, __int128 *, long long); // [rsp+A8h] [rbp-70h]
_BYTE v31[8]; // [rsp+B8h] [rbp-60h] BYREF
int v32; // [rsp+C0h] [rbp-58h] BYREF
long long v33; // [rsp+C8h] [rbp-50h]
int *v34; // [rsp+D0h] [rbp-48h]
int *v35; // [rsp+D8h] [rbp-40h]
long long v36; // [rsp+E0h] [rbp-38h]
v19 = a4;
v18 = a1;
v32 = 0;
v33 = 0LL;
v34 = &v32;
v35 = &v32;
v36 = 0LL;
v5 = a3[1] - *a3;
if ( v5 )
{
v6 = (v5 >> 5 == 0) + (v5 >> 5);
v7 = 0LL;
v8 = 0LL;
do
{
*(_QWORD *)std::map<std::string,unsigned long>::operator[]((long long)v31, v7 + *a3) = v8++;
v7 += 32LL;
}
while ( v6 != v8 );
}
std::vector<std::string>::vector((long long)v20, a3);
v21[0] = v22;
std::string::_M_construct<char *>((long long)v21, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree(
(long long)v23,
(long long)v31);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(&v29, v19);
v17 = 0LL;
v16 = 0LL;
v9 = operator new(0x88uLL);
std::vector<std::string>::vector(v9, v20);
*(_QWORD *)(v9 + 24) = v9 + 40;
std::string::_M_construct<char *>(v9 + 24, (_BYTE *)v21[0], (long long)v21[0] + (unsigned long long)v21[1]);
v10 = v9 + 64;
v11 = v25;
if ( v25 )
{
v12 = v24;
*(_QWORD *)(v9 + 72) = v25;
v13 = v26;
v14 = v27;
*(_QWORD *)(v11 + 8) = v10;
v15 = &v28;
*(_QWORD *)(v9 + 96) = v28;
v25 = 0LL;
v26 = &v24;
v27 = &v24;
v10 = (long long)v13;
}
else
{
*(_QWORD *)(v9 + 72) = 0LL;
v15 = (long long *)(v9 + 96);
v12 = 0;
v14 = (int *)(v9 + 64);
}
*(_QWORD *)(v9 + 80) = v10;
*(_QWORD *)(v9 + 88) = v14;
*v15 = 0LL;
*(_DWORD *)(v9 + 64) = v12;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(
(_OWORD *)(v9 + 104),
(long long)&v29);
*(_QWORD *)&v16 = v9;
*((_QWORD *)&v17 + 1) = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke;
*(_QWORD *)&v17 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager;
minja::Value::callable(v18, (long long)&v16);
if ( (_QWORD)v17 )
((void ( *)(__int128 *, __int128 *, long long))v17)(&v16, &v16, 3LL);
if ( v30 )
v30(&v29, &v29, 3LL);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v23);
if ( v21[0] != v22 )
operator delete(v21[0], v22[0] + 1LL);
std::vector<std::string>::~vector(v20);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v31);
}
|
simple_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x28],RCX
MOV R15,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x20],RDI
LEA RAX,[RSP + 0xc0]
MOV dword ptr [RAX],0x0
XOR ECX,ECX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
MOV qword ptr [RAX + 0x20],RCX
MOV RBP,qword ptr [RDX + 0x8]
SUB RBP,qword ptr [RDX]
JZ 0x00197627
SAR RBP,0x5
CMP RBP,0x1
ADC RBP,0x0
XOR EBX,EBX
LEA R13,[RSP + 0xb8]
XOR R12D,R12D
LAB_0019760a:
MOV RSI,qword ptr [R15]
ADD RSI,RBX
LAB_00197610:
MOV RDI,R13
CALL 0x0017ff8c
MOV qword ptr [RAX],R12
INC R12
ADD RBX,0x20
CMP RBP,R12
JNZ 0x0019760a
LAB_00197627:
LEA RDI,[RSP + 0x30]
MOV RSI,R15
CALL 0x0012c50a
LEA RDI,[RSP + 0x48]
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_0019764c:
CALL 0x00126a9a
LEA R14,[RSP + 0x68]
LAB_00197656:
LEA RSI,[RSP + 0xb8]
MOV RDI,R14
CALL 0x001803e6
LEA R15,[RSP + 0x98]
LAB_0019766e:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00180008
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
LAB_00197687:
MOV EDI,0x88
CALL 0x001197d0
LAB_00197691:
MOV R12,RAX
LEA RSI,[RSP + 0x30]
MOV RDI,RAX
CALL 0x0012c50a
LEA RDI,[R12 + 0x18]
LEA RBP,[R12 + 0x28]
MOV qword ptr [R12 + 0x18],RBP
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,RSI
LAB_001976bd:
CALL 0x00126a9a
LEA RAX,[R12 + 0x40]
MOV RDX,qword ptr [RSP + 0x78]
TEST RDX,RDX
JZ 0x0019770e
LEA RDI,[RSP + 0x70]
MOV ECX,dword ptr [RDI]
MOV qword ptr [R12 + 0x48],RDX
MOV R8,qword ptr [RDI + 0x10]
MOV RSI,qword ptr [RDI + 0x18]
MOV qword ptr [RDX + 0x8],RAX
LEA RDX,[RSP + 0x90]
MOV RAX,qword ptr [RDX]
MOV qword ptr [R12 + 0x60],RAX
MOV qword ptr [RDX + -0x18],0x0
MOV qword ptr [RDX + -0x10],RDI
MOV qword ptr [RDX + -0x8],RDI
MOV RAX,R8
JMP 0x00197721
LAB_0019770e:
MOV qword ptr [R12 + 0x48],0x0
LEA RDX,[R12 + 0x60]
XOR ECX,ECX
MOV RSI,RAX
LAB_00197721:
MOV qword ptr [R12 + 0x50],RAX
MOV qword ptr [R12 + 0x58],RSI
MOV qword ptr [RDX],0x0
MOV dword ptr [R12 + 0x40],ECX
LEA RDI,[R12 + 0x68]
LAB_0019773c:
MOV RSI,R15
CALL 0x00180008
MOV RSI,RSP
MOV qword ptr [RSI],R12
LEA RAX,[0x19791a]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x197fa8]
MOV qword ptr [RSI + 0x10],RAX
LAB_00197760:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00169ca2
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00197781
LAB_00197774:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00197781:
MOV RAX,qword ptr [RSP + 0xa8]
TEST RAX,RAX
JZ 0x0019779b
LAB_0019778e:
MOV RDI,R15
MOV RSI,R15
MOV EDX,0x3
CALL RAX
LAB_0019779b:
MOV RDI,R14
CALL 0x00180648
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R13
JZ 0x001977ba
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001197f0
LAB_001977ba:
LEA RDI,[RSP + 0x30]
CALL 0x00123964
LEA RDI,[RSP + 0xb8]
CALL 0x00180648
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, std::function<minja::Value
(std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */
void __thiscall
minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3)
{
long *plVar1;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar2;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3;
long lVar4;
long lVar5;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar6;
long lVar7;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_118;
int8 uStack_110;
code *local_108;
code *pcStack_100;
minja *local_f8;
function *local_f0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_e8 [24];
long *local_d0;
long local_c8;
long local_c0 [2];
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_b0 [8];
int4 local_a8 [2];
long local_a0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_98;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_90;
int8 local_88;
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_80 [16];
code *local_70;
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_60 [8];
int4 local_58 [2];
int8 local_50;
int4 *local_48;
int4 *local_40;
int8 local_38;
local_48 = local_58;
local_58[0] = 0;
local_50 = 0;
local_38 = 0;
local_f8 = this;
local_f0 = param_3;
local_40 = local_48;
if (*(long *)(param_2 + 8) - *(long *)param_2 != 0) {
lVar5 = *(long *)(param_2 + 8) - *(long *)param_2 >> 5;
lVar4 = 0;
lVar7 = 0;
do {
/* try { // try from 00197610 to 00197617 has its CatchHandler @ 001978b3 */
plVar1 = (long *)std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[](local_60,(string *)(*(long *)param_2 + lVar4));
*plVar1 = lVar7;
lVar7 = lVar7 + 1;
lVar4 = lVar4 + 0x20;
} while (lVar5 + (ulong)(lVar5 == 0) != lVar7);
}
/* try { // try from 00197627 to 00197633 has its CatchHandler @ 001978b1 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_e8,param_2);
local_d0 = local_c0;
/* try { // try from 0019764c to 00197650 has its CatchHandler @ 001978a2 */
std::__cxx11::string::_M_construct<char*>
(&local_d0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 00197656 to 00197665 has its CatchHandler @ 00197886 */
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::_Rb_tree(local_b0,(_Rb_tree *)local_60);
/* try { // try from 0019766e to 0019767a has its CatchHandler @ 00197879 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
(local_80,local_f0);
local_108 = (code *)0x0;
pcStack_100 = (code *)0x0;
local_118 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0;
uStack_110 = 0;
/* try { // try from 00197687 to 00197690 has its CatchHandler @ 0019786a */
this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88);
/* try { // try from 00197691 to 001976a0 has its CatchHandler @ 00197839 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(this_00,(vector *)local_e8);
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x18) =
this_00 + 0x28;
/* try { // try from 001976bd to 001976c1 has its CatchHandler @ 0019782c */
std::__cxx11::string::_M_construct<char*>(this_00 + 0x18,local_d0,local_c8 + (long)local_d0);
pvVar2 = this_00 + 0x40;
if (local_a0 == 0) {
*(int8 *)(this_00 + 0x48) = 0;
pvVar3 = this_00 + 0x60;
local_a8[0] = 0;
pvVar6 = pvVar2;
}
else {
*(long *)(this_00 + 0x48) = local_a0;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(local_a0 + 8) = pvVar2;
pvVar3 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88;
*(int8 *)(this_00 + 0x60) = local_88;
local_a0 = 0;
pvVar2 = local_98;
pvVar6 = local_90;
local_98 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8;
local_90 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8;
}
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x50) = pvVar2;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x58) = pvVar6;
*(int8 *)pvVar3 = 0;
*(int4 *)(this_00 + 0x40) = local_a8[0];
/* try { // try from 0019773c to 00197743 has its CatchHandler @ 00197805 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *)
(this_00 + 0x68),local_80);
pcStack_100 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_invoke;
local_108 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_manager;
local_118 = this_00;
/* try { // try from 00197760 to 00197769 has its CatchHandler @ 001977e7 */
Value::callable((Value *)local_f8,(function *)&local_118);
if (local_108 != (code *)0x0) {
/* try { // try from 00197774 to 00197780 has its CatchHandler @ 001977e5 */
(*local_108)(&local_118,&local_118,3);
}
if (local_70 != (code *)0x0) {
/* try { // try from 0019778e to 0019779a has its CatchHandler @ 001977e3 */
(*local_70)(local_80,local_80,3);
}
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree(local_b0);
if (local_d0 != local_c0) {
operator_delete(local_d0,local_c0[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_e8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)local_60);
return;
}
|
|
57,089
|
u64toa_length_expr
|
bluesky950520[P]quickjs/tests/test_conv.c
|
size_t u64toa_length_expr(char buf[minimum_length(21)], uint64_t n)
{
if (likely(n < 0x100000000))
return u32toa_length_expr(buf, n);
#if 0
size_t len = 10 + ((n >= 10000000000ULL) +
(n >= 100000000000ULL) +
(n >= 1000000000000ULL) +
(n >= 10000000000000ULL) +
(n >= 100000000000000ULL) +
(n >= 1000000000000000ULL) +
(n >= 10000000000000000ULL) +
(n >= 100000000000000000ULL) +
(n >= 1000000000000000000ULL) +
(n >= 10000000000000000000ULL));
char *end = buf + len;
*end-- = '\0';
#else
uint64_t n10 = 1000000000;
uint32_t last = n % 10;
n /= 10;
size_t len = 10;
while (n >= n10) {
n10 *= 10;
len++;
}
char *end = buf + len;
*end-- = '\0';
*end-- = (char)('0' + last);
#endif
while (n >= 10) {
uint32_t quo = n % 10;
n /= 10;
*end-- = (char)('0' + quo);
}
*end = (char)('0' + n);
return len;
}
|
O0
|
c
|
u64toa_length_expr:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, 0x30(%rsp)
setb %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x362c
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rax
movl %eax, %esi
callq 0x3480
movq %rax, 0x40(%rsp)
jmp 0x3738
movq $0x3b9aca00, 0x28(%rsp) # imm = 0x3B9ACA00
movq 0x30(%rsp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x30(%rsp)
movq $0xa, 0x18(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jb 0x368e
imulq $0xa, 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x3667
movq 0x38(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rsp)
movb $0x0, (%rax)
movl 0x24(%rsp), %eax
addl $0x30, %eax
movb %al, %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, (%rax)
cmpq $0xa, 0x30(%rsp)
jb 0x371c
movq 0x30(%rsp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x30(%rsp)
movl 0xc(%rsp), %eax
addl $0x30, %eax
movb %al, %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, (%rax)
jmp 0x36cd
movq 0x30(%rsp), %rax
addq $0x30, %rax
movb %al, %cl
movq 0x10(%rsp), %rax
movb %cl, (%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
u64toa_length_expr:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov rax, 100000000h
cmp [rsp+48h+var_18], rax
setb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_362C
mov rdi, [rsp+48h+var_10]
mov rax, [rsp+48h+var_18]
mov esi, eax
call u32toa_length_expr
mov [rsp+48h+var_8], rax
jmp loc_3738
loc_362C:
mov [rsp+48h+var_20], 3B9ACA00h
mov rax, [rsp+48h+var_18]
mov ecx, 0Ah
xor edx, edx
div rcx
mov eax, edx
mov [rsp+48h+var_24], eax
mov rax, [rsp+48h+var_18]
mov ecx, 0Ah
xor edx, edx
div rcx
mov [rsp+48h+var_18], rax
mov [rsp+48h+var_30], 0Ah
loc_3667:
mov rax, [rsp+48h+var_18]
cmp rax, [rsp+48h+var_20]
jb short loc_368E
imul rax, [rsp+48h+var_20], 0Ah
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_30]
add rax, 1
mov [rsp+48h+var_30], rax
jmp short loc_3667
loc_368E:
mov rax, [rsp+48h+var_10]
add rax, [rsp+48h+var_30]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_38], rcx
mov byte ptr [rax], 0
mov eax, [rsp+48h+var_24]
add eax, 30h ; '0'
mov cl, al
mov rax, [rsp+48h+var_38]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_38], rdx
mov [rax], cl
loc_36CD:
cmp [rsp+48h+var_18], 0Ah
jb short loc_371C
mov rax, [rsp+48h+var_18]
mov ecx, 0Ah
xor edx, edx
div rcx
mov eax, edx
mov [rsp+48h+var_3C], eax
mov rax, [rsp+48h+var_18]
mov ecx, 0Ah
xor edx, edx
div rcx
mov [rsp+48h+var_18], rax
mov eax, [rsp+48h+var_3C]
add eax, 30h ; '0'
mov cl, al
mov rax, [rsp+48h+var_38]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_38], rdx
mov [rax], cl
jmp short loc_36CD
loc_371C:
mov rax, [rsp+48h+var_18]
add rax, 30h ; '0'
mov cl, al
mov rax, [rsp+48h+var_38]
mov [rax], cl
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_8], rax
loc_3738:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long u64toa_length_expr(_BYTE *a1, unsigned long long a2)
{
_BYTE *v2; // rax
int v4; // [rsp+Ch] [rbp-3Ch]
_BYTE *v5; // [rsp+10h] [rbp-38h]
long long v6; // [rsp+18h] [rbp-30h]
unsigned long long v7; // [rsp+28h] [rbp-20h]
unsigned long long v8; // [rsp+30h] [rbp-18h]
if ( a2 < 0x100000000LL )
return u32toa_length_expr(a1, a2);
v7 = 1000000000LL;
v8 = a2 / 0xA;
v6 = 10LL;
while ( v8 >= v7 )
{
v7 *= 10LL;
++v6;
}
a1[v6] = 0;
v5 = &a1[v6 - 2];
a1[v6 - 1] = a2 % 0xA + 48;
while ( v8 >= 0xA )
{
v4 = v8 % 0xA;
v8 /= 0xAuLL;
v2 = v5--;
*v2 = v4 + 48;
}
*v5 = v8 + 48;
return v6;
}
|
u64toa_length_expr:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV RAX,0x100000000
CMP qword ptr [RSP + 0x30],RAX
SETC AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0010362c
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x30]
MOV ESI,EAX
CALL 0x00103480
MOV qword ptr [RSP + 0x40],RAX
JMP 0x00103738
LAB_0010362c:
MOV qword ptr [RSP + 0x28],0x3b9aca00
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,0xa
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,0xa
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x18],0xa
LAB_00103667:
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,qword ptr [RSP + 0x28]
JC 0x0010368e
IMUL RAX,qword ptr [RSP + 0x28],0xa
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00103667
LAB_0010368e:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + 0x10],RCX
MOV byte ptr [RAX],0x0
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x10],RDX
MOV byte ptr [RAX],CL
LAB_001036cd:
CMP qword ptr [RSP + 0x30],0xa
JC 0x0010371c
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,0xa
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,0xa
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x001036cd
LAB_0010371c:
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
LAB_00103738:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
long u64toa_length_expr(long param_1,ulong param_2)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 *puVar3;
char *local_38;
long local_30;
ulong local_20;
ulong local_18;
long local_8;
if (param_2 < 0x100000000) {
local_8 = u32toa_length_expr(param_1,param_2 & 0xffffffff);
}
else {
auVar1._8_8_ = 0;
auVar1._0_8_ = param_2;
local_18 = param_2 / 10;
local_30 = 10;
for (local_20 = 1000000000; local_20 <= local_18; local_20 = local_20 * 10) {
local_30 = local_30 + 1;
}
puVar3 = (int1 *)(param_1 + local_30);
*puVar3 = 0;
puVar3[-1] = SUB161(auVar1 % ZEXT816(10),0) + '0';
local_38 = puVar3 + -2;
while (9 < local_18) {
auVar2._8_8_ = 0;
auVar2._0_8_ = local_18;
local_18 = local_18 / 10;
*local_38 = SUB161(auVar2 % ZEXT816(10),0) + '0';
local_38 = local_38 + -1;
}
*local_38 = (char)local_18 + '0';
local_8 = local_30;
}
return local_8;
}
|
|
57,090
|
u64toa_length_expr
|
bluesky950520[P]quickjs/tests/test_conv.c
|
size_t u64toa_length_expr(char buf[minimum_length(21)], uint64_t n)
{
if (likely(n < 0x100000000))
return u32toa_length_expr(buf, n);
#if 0
size_t len = 10 + ((n >= 10000000000ULL) +
(n >= 100000000000ULL) +
(n >= 1000000000000ULL) +
(n >= 10000000000000ULL) +
(n >= 100000000000000ULL) +
(n >= 1000000000000000ULL) +
(n >= 10000000000000000ULL) +
(n >= 100000000000000000ULL) +
(n >= 1000000000000000000ULL) +
(n >= 10000000000000000000ULL));
char *end = buf + len;
*end-- = '\0';
#else
uint64_t n10 = 1000000000;
uint32_t last = n % 10;
n /= 10;
size_t len = 10;
while (n >= n10) {
n10 *= 10;
len++;
}
char *end = buf + len;
*end-- = '\0';
*end-- = (char)('0' + last);
#endif
while (n >= 10) {
uint32_t quo = n % 10;
n /= 10;
*end-- = (char)('0' + quo);
}
*end = (char)('0' + n);
return len;
}
|
O1
|
c
|
u64toa_length_expr:
movq %rdi, %rax
movq %rsi, %rcx
shrq $0x20, %rcx
jne 0x2e2c
movq %rax, %rdi
jmp 0x2d65
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rsi, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x23f8
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
|
u64toa_length_expr:
mov rax, rdi
mov rcx, rsi
shr rcx, 20h
jnz short loc_2E2C
mov rdi, rax
jmp u32toa_length_expr
loc_2E2C:
push rbx
sub rsp, 10h
lea rbx, [rsp+18h+var_10]
mov rdi, rsi
mov rsi, rax
mov rdx, rbx
call u64toa_length_expr_cold_1
mov rax, [rbx]
add rsp, 10h
pop rbx
retn
|
long long u64toa_length_expr(_BYTE *a1, unsigned long long a2)
{
long long v3; // [rsp+0h] [rbp-10h] BYREF
if ( !HIDWORD(a2) )
return u32toa_length_expr(a1, a2);
u64toa_length_expr_cold_1(a2, (long long)a1, &v3);
return v3;
}
|
u64toa_length_expr:
MOV RAX,RDI
MOV RCX,RSI
SHR RCX,0x20
JNZ 0x00102e2c
MOV RDI,RAX
JMP 0x00102d65
LAB_00102e2c:
PUSH RBX
SUB RSP,0x10
LEA RBX,[RSP + 0x8]
MOV RDI,RSI
MOV RSI,RAX
MOV RDX,RBX
CALL 0x001023f8
MOV RAX,qword ptr [RBX]
ADD RSP,0x10
POP RBX
RET
|
int8 u64toa_length_expr(int8 param_1,ulong param_2)
{
int8 uVar1;
int8 local_10;
if (param_2 >> 0x20 == 0) {
uVar1 = u32toa_length_expr(param_1);
return uVar1;
}
u64toa_length_expr_cold_1(param_2,param_1,&local_10);
return local_10;
}
|
|
57,091
|
u64toa_length_expr
|
bluesky950520[P]quickjs/tests/test_conv.c
|
size_t u64toa_length_expr(char buf[minimum_length(21)], uint64_t n)
{
if (likely(n < 0x100000000))
return u32toa_length_expr(buf, n);
#if 0
size_t len = 10 + ((n >= 10000000000ULL) +
(n >= 100000000000ULL) +
(n >= 1000000000000ULL) +
(n >= 10000000000000ULL) +
(n >= 100000000000000ULL) +
(n >= 1000000000000000ULL) +
(n >= 10000000000000000ULL) +
(n >= 100000000000000000ULL) +
(n >= 1000000000000000000ULL) +
(n >= 10000000000000000000ULL));
char *end = buf + len;
*end-- = '\0';
#else
uint64_t n10 = 1000000000;
uint32_t last = n % 10;
n /= 10;
size_t len = 10;
while (n >= n10) {
n10 *= 10;
len++;
}
char *end = buf + len;
*end-- = '\0';
*end-- = (char)('0' + last);
#endif
while (n >= 10) {
uint32_t quo = n % 10;
n /= 10;
*end-- = (char)('0' + quo);
}
*end = (char)('0' + n);
return len;
}
|
O2
|
c
|
u64toa_length_expr:
movq %rsi, %rax
shrq $0x20, %rax
jne 0x288d
jmp 0x27e3
pushq $0xa
popq %rcx
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movl $0x3b9aca00, %esi # imm = 0x3B9ACA00
cmpq %rsi, %rax
jb 0x28ab
imulq $0xa, %rsi, %rsi
incq %rcx
jmp 0x289d
leaq (%rdi,%rcx), %rsi
addq $-0x2, %rsi
movb $0x0, 0x2(%rsi)
orb $0x30, %dl
movb %dl, 0x1(%rsi)
pushq $0xa
popq %rdi
cmpq $0xa, %rax
jb 0x28d5
xorl %edx, %edx
divq %rdi
orb $0x30, %dl
movb %dl, (%rsi)
decq %rsi
jmp 0x28c0
orb $0x30, %al
movb %al, (%rsi)
movq %rcx, %rax
retq
|
u64toa_length_expr:
mov rax, rsi
shr rax, 20h
jnz short loc_288D
jmp u32toa_length_expr
loc_288D:
push 0Ah
pop rcx
mov rax, rsi
xor edx, edx
div rcx
mov esi, 3B9ACA00h
loc_289D:
cmp rax, rsi
jb short loc_28AB
imul rsi, 0Ah
inc rcx
jmp short loc_289D
loc_28AB:
lea rsi, [rdi+rcx]
add rsi, 0FFFFFFFFFFFFFFFEh
mov byte ptr [rsi+2], 0
or dl, 30h
mov [rsi+1], dl
push 0Ah
pop rdi
loc_28C0:
cmp rax, 0Ah
jb short loc_28D5
xor edx, edx
div rdi
or dl, 30h
mov [rsi], dl
dec rsi
jmp short loc_28C0
loc_28D5:
or al, 30h
mov [rsi], al
mov rax, rcx
retn
|
long long u64toa_length_expr(_BYTE *a1, unsigned long long a2)
{
long long v3; // rcx
unsigned long long v4; // rax
unsigned long long v5; // rdx
unsigned long long i; // rsi
_BYTE *v7; // rsi
unsigned long long v8; // rtt
if ( !HIDWORD(a2) )
return u32toa_length_expr(a1, a2);
v3 = 10LL;
v4 = a2 / 0xA;
v5 = a2 % 0xA;
for ( i = 1000000000LL; v4 >= i; i *= 10LL )
++v3;
v7 = &a1[v3 - 2];
v7[2] = 0;
v7[1] = v5 | 0x30;
while ( v4 >= 0xA )
{
v8 = v4;
v4 /= 0xAuLL;
*v7-- = (v8 % 0xA) | 0x30;
}
*v7 = v4 | 0x30;
return v3;
}
|
u64toa_length_expr:
MOV RAX,RSI
SHR RAX,0x20
JNZ 0x0010288d
JMP 0x001027e3
LAB_0010288d:
PUSH 0xa
POP RCX
MOV RAX,RSI
XOR EDX,EDX
DIV RCX
MOV ESI,0x3b9aca00
LAB_0010289d:
CMP RAX,RSI
JC 0x001028ab
IMUL RSI,RSI,0xa
INC RCX
JMP 0x0010289d
LAB_001028ab:
LEA RSI,[RDI + RCX*0x1]
ADD RSI,-0x2
MOV byte ptr [RSI + 0x2],0x0
OR DL,0x30
MOV byte ptr [RSI + 0x1],DL
PUSH 0xa
POP RDI
LAB_001028c0:
CMP RAX,0xa
JC 0x001028d5
XOR EDX,EDX
DIV RDI
OR DL,0x30
MOV byte ptr [RSI],DL
DEC RSI
JMP 0x001028c0
LAB_001028d5:
OR AL,0x30
MOV byte ptr [RSI],AL
MOV RAX,RCX
RET
|
long u64toa_length_expr(long param_1,ulong param_2)
{
int1 *puVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte *pbVar5;
if (param_2 >> 0x20 == 0) {
lVar2 = u32toa_length_expr();
return lVar2;
}
lVar2 = 10;
uVar3 = param_2 / 10;
for (uVar4 = 1000000000; uVar4 <= uVar3; uVar4 = uVar4 * 10) {
lVar2 = lVar2 + 1;
}
puVar1 = (int1 *)(param_1 + lVar2);
pbVar5 = puVar1 + -2;
*puVar1 = 0;
puVar1[-1] = (byte)(param_2 % 10) | 0x30;
for (; 9 < uVar3; uVar3 = uVar3 / 10) {
*pbVar5 = (byte)(uVar3 % 10) | 0x30;
pbVar5 = pbVar5 + -1;
}
*pbVar5 = (byte)uVar3 | 0x30;
return lVar2;
}
|
|
57,092
|
ftxui::TerminalInputParser::Parse()
|
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
|
TerminalInputParser::Output TerminalInputParser::Parse() {
if (!Eat()) {
return UNCOMPLETED;
}
switch (Current()) {
case 24: // CAN NOLINT
case 26: // SUB NOLINT
return DROP;
case '\x1B':
return ParseESC();
default:
break;
}
if (Current() < 32) { // C0 NOLINT
return SPECIAL;
}
if (Current() == 127) { // Delete // NOLINT
return SPECIAL;
}
return ParseUTF8();
}
|
O2
|
cpp
|
ftxui::TerminalInputParser::Parse():
pushq %rbx
movq %rdi, %rbx
movslq 0x8(%rsi), %rax
incq %rax
movl %eax, 0x8(%rsi)
cmpl 0x18(%rsi), %eax
jge 0x2ac26
movq 0x10(%rsi), %rcx
movzbl (%rcx,%rax), %eax
cmpl $0x18, %eax
je 0x2ac1e
cmpl $0x1b, %eax
je 0x2ac2e
cmpl $0x1a, %eax
jne 0x2ac38
movl $0x1, (%rbx)
jmp 0x2ac29
andl $0x0, (%rbx)
movq %rbx, %rax
popq %rbx
retq
movq %rbx, %rdi
callq 0x2ac6e
jmp 0x2ac29
cmpb $0x1f, %al
jbe 0x2ac40
cmpb $0x7f, %al
jne 0x2ac48
movl $0x3, (%rbx)
jmp 0x2ac29
movq %rbx, %rdi
callq 0x2acd4
jmp 0x2ac29
|
_ZN5ftxui19TerminalInputParser5ParseEv:
push rbx
mov rbx, rdi
movsxd rax, dword ptr [rsi+8]
inc rax
mov [rsi+8], eax
cmp eax, [rsi+18h]
jge short loc_2AC26
mov rcx, [rsi+10h]
movzx eax, byte ptr [rcx+rax]
cmp eax, 18h
jz short loc_2AC1E
cmp eax, 1Bh
jz short loc_2AC2E
cmp eax, 1Ah
jnz short loc_2AC38
loc_2AC1E:
mov dword ptr [rbx], 1
jmp short loc_2AC29
loc_2AC26:
and dword ptr [rbx], 0
loc_2AC29:
mov rax, rbx
pop rbx
retn
loc_2AC2E:
mov rdi, rbx; this
call _ZN5ftxui19TerminalInputParser8ParseESCEv; ftxui::TerminalInputParser::ParseESC(void)
jmp short loc_2AC29
loc_2AC38:
cmp al, 1Fh
jbe short loc_2AC40
cmp al, 7Fh
jnz short loc_2AC48
loc_2AC40:
mov dword ptr [rbx], 3
jmp short loc_2AC29
loc_2AC48:
mov rdi, rbx; this
call _ZN5ftxui19TerminalInputParser9ParseUTF8Ev; ftxui::TerminalInputParser::ParseUTF8(void)
jmp short loc_2AC29
|
ftxui::TerminalInputParser * ftxui::TerminalInputParser::Parse(ftxui::TerminalInputParser *this, long long a2)
{
long long v2; // rax
int v3; // eax
v2 = *(int *)(a2 + 8) + 1LL;
*(_DWORD *)(a2 + 8) = v2;
if ( (int)v2 >= *(_DWORD *)(a2 + 24) )
{
*(_DWORD *)this = 0;
}
else
{
v3 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 16) + v2);
switch ( v3 )
{
case 24:
goto LABEL_5;
case 27:
ftxui::TerminalInputParser::ParseESC(this);
return this;
case 26:
LABEL_5:
*(_DWORD *)this = 1;
break;
default:
if ( (unsigned __int8)v3 <= 0x1Fu || (_BYTE)v3 == 127 )
*(_DWORD *)this = 3;
else
ftxui::TerminalInputParser::ParseUTF8(this);
break;
}
}
return this;
}
|
Parse:
PUSH RBX
MOV RBX,RDI
MOVSXD RAX,dword ptr [RSI + 0x8]
INC RAX
MOV dword ptr [RSI + 0x8],EAX
CMP EAX,dword ptr [RSI + 0x18]
JGE 0x0012ac26
MOV RCX,qword ptr [RSI + 0x10]
MOVZX EAX,byte ptr [RCX + RAX*0x1]
CMP EAX,0x18
JZ 0x0012ac1e
CMP EAX,0x1b
JZ 0x0012ac2e
CMP EAX,0x1a
JNZ 0x0012ac38
LAB_0012ac1e:
MOV dword ptr [RBX],0x1
JMP 0x0012ac29
LAB_0012ac26:
AND dword ptr [RBX],0x0
LAB_0012ac29:
MOV RAX,RBX
POP RBX
RET
LAB_0012ac2e:
MOV RDI,RBX
CALL 0x0012ac6e
JMP 0x0012ac29
LAB_0012ac38:
CMP AL,0x1f
JBE 0x0012ac40
CMP AL,0x7f
JNZ 0x0012ac48
LAB_0012ac40:
MOV dword ptr [RBX],0x3
JMP 0x0012ac29
LAB_0012ac48:
MOV RDI,RBX
CALL 0x0012acd4
JMP 0x0012ac29
|
/* ftxui::TerminalInputParser::Parse() */
void ftxui::TerminalInputParser::Parse(void)
{
byte bVar1;
int iVar2;
long lVar3;
long in_RSI;
int4 *in_RDI;
lVar3 = (long)*(int *)(in_RSI + 8) + 1;
iVar2 = (int)lVar3;
*(int *)(in_RSI + 8) = iVar2;
if (*(int *)(in_RSI + 0x18) <= iVar2) {
*in_RDI = 0;
return;
}
bVar1 = *(byte *)(*(long *)(in_RSI + 0x10) + lVar3);
if (bVar1 != 0x18) {
if (bVar1 == 0x1b) {
ParseESC();
return;
}
if (bVar1 != 0x1a) {
if ((0x1f < bVar1) && (bVar1 != 0x7f)) {
ParseUTF8();
return;
}
*in_RDI = 3;
return;
}
}
*in_RDI = 1;
return;
}
|
|
57,093
|
translog_page_next
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_page_next(TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor,
struct st_translog_buffer **prev_buffer)
{
struct st_translog_buffer *buffer= cursor->buffer;
DBUG_ENTER("translog_page_next");
*prev_buffer= NULL;
if ((cursor->ptr + TRANSLOG_PAGE_SIZE >
cursor->buffer->buffer + TRANSLOG_WRITE_BUFFER) ||
(LSN_OFFSET(*horizon) >
log_descriptor.log_file_max_size - TRANSLOG_PAGE_SIZE))
{
DBUG_PRINT("info", ("Switch to next buffer Buffer Size: %lu (%lu) => %d "
"File size: %lu max: %lu => %d",
(ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer),
(cursor->ptr + TRANSLOG_PAGE_SIZE >
cursor->buffer->buffer + TRANSLOG_WRITE_BUFFER),
(ulong) LSN_OFFSET(*horizon),
(ulong) log_descriptor.log_file_max_size,
(LSN_OFFSET(*horizon) >
(log_descriptor.log_file_max_size -
TRANSLOG_PAGE_SIZE))));
if (translog_buffer_next(horizon, cursor,
LSN_OFFSET(*horizon) >
(log_descriptor.log_file_max_size -
TRANSLOG_PAGE_SIZE)))
DBUG_RETURN(1);
*prev_buffer= buffer;
DBUG_PRINT("info", ("Buffer #%u (%p): have to be flushed",
(uint) buffer->buffer_no, buffer));
}
else
{
DBUG_PRINT("info", ("Use the same buffer #%u (%p): "
"Buffer Size: %lu (%lu)",
(uint) buffer->buffer_no,
buffer,
(ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer)));
translog_finish_page(horizon, cursor);
translog_new_page_header(horizon, cursor);
}
DBUG_RETURN(0);
}
|
O3
|
c
|
translog_page_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq 0x28(%rsi), %r12
movq $0x0, (%rdx)
movl $0x2000, %eax # imm = 0x2000
addq 0x20(%rsi), %rax
movq %rdi, %r15
movl $0x100000, %ecx # imm = 0x100000
addq 0x28(%rsi), %rcx
cmpq %rcx, %rax
seta %dl
movq (%rdi), %rax
movl %eax, %eax
movl 0x3b2918(%rip), %ecx # 0x3fd170
addl $0xffffe000, %ecx # imm = 0xFFFFE000
cmpq %rcx, %rax
seta %sil
orb %dl, %sil
cmpb $0x1, %sil
jne 0x4a88d
xorl %edx, %edx
cmpl %ecx, %eax
seta %dl
movq %r15, %rdi
movq %r14, %rsi
callq 0x493cf
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x4a8a5
movq %r12, (%rbx)
jmp 0x4a8a3
movq %r15, %rdi
movq %r14, %rsi
callq 0x46eb2
movq %r15, %rdi
movq %r14, %rsi
callq 0x45e80
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
translog_page_next:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov r12, [rsi+28h]
mov qword ptr [rdx], 0
mov eax, 2000h
add rax, [rsi+20h]
mov r15, rdi
mov ecx, offset xmmword_100000
add rcx, [rsi+28h]
cmp rax, rcx
setnbe dl
mov rax, [rdi]
mov eax, eax
mov ecx, cs:dword_3FD170
add ecx, 0FFFFE000h
cmp rax, rcx
setnbe sil
or sil, dl
cmp sil, 1
jnz short loc_4A88D
xor edx, edx
cmp eax, ecx
setnbe dl
mov rdi, r15
mov rsi, r14
call translog_buffer_next
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_4A8A5
mov [rbx], r12
jmp short loc_4A8A3
loc_4A88D:
mov rdi, r15
mov rsi, r14
call translog_finish_page
mov rdi, r15
mov rsi, r14
call translog_new_page_header
loc_4A8A3:
xor eax, eax
loc_4A8A5:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
char translog_page_next(long long *a1, long long a2, _QWORD *a3)
{
long long v4; // r12
unsigned long long v5; // rax
unsigned long long v6; // rcx
char v7; // cl
char result; // al
v4 = *(_QWORD *)(a2 + 40);
*a3 = 0LL;
v5 = (unsigned int)*a1;
v6 = (unsigned int)(dword_3FD170 - 0x2000);
if ( *(_QWORD *)(a2 + 32) + 0x2000LL > (unsigned long long)&xmmword_100000 + *(_QWORD *)(a2 + 40) || v5 > v6 )
{
v7 = translog_buffer_next(a1, (__int128 *)a2, (unsigned int)v5 > (unsigned int)v6);
result = 1;
if ( v7 )
return result;
*a3 = v4;
}
else
{
translog_finish_page(a1, a2);
translog_new_page_header((long long)a1, a2);
}
return 0;
}
|
translog_page_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R12,qword ptr [RSI + 0x28]
MOV qword ptr [RDX],0x0
MOV EAX,0x2000
ADD RAX,qword ptr [RSI + 0x20]
MOV R15,RDI
MOV ECX,0x100000
ADD RCX,qword ptr [RSI + 0x28]
CMP RAX,RCX
SETA DL
MOV RAX,qword ptr [RDI]
MOV EAX,EAX
MOV ECX,dword ptr [0x004fd170]
ADD ECX,0xffffe000
CMP RAX,RCX
SETA SIL
OR SIL,DL
CMP SIL,0x1
JNZ 0x0014a88d
XOR EDX,EDX
CMP EAX,ECX
SETA DL
MOV RDI,R15
MOV RSI,R14
CALL 0x001493cf
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0014a8a5
MOV qword ptr [RBX],R12
JMP 0x0014a8a3
LAB_0014a88d:
MOV RDI,R15
MOV RSI,R14
CALL 0x00146eb2
MOV RDI,R15
MOV RSI,R14
CALL 0x00145e80
LAB_0014a8a3:
XOR EAX,EAX
LAB_0014a8a5:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 translog_page_next(ulong *param_1,long param_2,int8 *param_3)
{
int8 uVar1;
char cVar2;
uVar1 = *(int8 *)(param_2 + 0x28);
*param_3 = 0;
if ((ulong)(DAT_004fd170 - 0x2000U) < (*param_1 & 0xffffffff) ||
*(long *)(param_2 + 0x28) + 0x100000U < *(long *)(param_2 + 0x20) + 0x2000U) {
cVar2 = translog_buffer_next(param_1,param_2,DAT_004fd170 - 0x2000U < (uint)*param_1);
if (cVar2 != '\0') {
return 1;
}
*param_3 = uVar1;
}
else {
translog_finish_page(param_1,param_2);
translog_new_page_header(param_1,param_2);
}
return 0;
}
|
|
57,094
|
get_collation_number
|
eloqsql/mysys/charset.c
|
uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
}
|
O3
|
c
|
get_collation_number:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq 0x392e10(%rip), %rdi # 0x3deb30
leaq 0x80(%rip), %rsi # 0x4bda7
callq 0x26300
movq %rbx, %rdi
callq 0x4bf27
testl %eax, %eax
jne 0x4bd8a
leaq 0x354f6(%rip), %rsi # 0x81235
movl $0x5, %edx
movq %rbx, %rdi
callq 0x26470
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x4bd8a
btl $0xa, %r14d
movl $0x33, %ecx
sbbl $-0x1, %ecx
addq $0x5, %rbx
leaq 0x354cf(%rip), %rdx # 0x8123b
leaq -0x60(%rbp), %r14
movl $0x40, %esi
movq %r14, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x7cf5e
movq %r14, %rdi
callq 0x4bf27
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x4bda2
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x263a0
|
get_collation_number:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
call get_collation_number_internal
test eax, eax
jnz short loc_4BD8A
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
mov rdi, rbx
call _strncasecmp
mov ecx, eax
xor eax, eax
test ecx, ecx
jnz short loc_4BD8A
bt r14d, 0Ah
mov ecx, 33h ; '3'
sbb ecx, 0FFFFFFFFh
add rbx, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
lea r14, [rbp+var_60]
mov esi, 40h ; '@'
mov rdi, r14
mov r8, rbx
xor eax, eax
call my_snprintf
mov rdi, r14
call get_collation_number_internal
loc_4BD8A:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_4BDA2
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_4BDA2:
call ___stack_chk_fail
|
long long get_collation_number(long long a1, __int16 a2)
{
long long result; // rax
int v3; // ecx
int v4; // r9d
_BYTE v5[72]; // [rsp+0h] [rbp-60h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-18h]
v6 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
result = get_collation_number_internal(a1);
if ( !(_DWORD)result )
{
v3 = strncasecmp(a1, "utf8_", 5LL);
result = 0LL;
if ( !v3 )
{
my_snprintf((unsigned int)v5, 64, (unsigned int)"utf8mb%c_%s", 51 - (((a2 & 0x400) != 0) - 1), a1 + 5, v4);
return get_collation_number_internal(v5);
}
}
return result;
}
|
get_collation_number:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0x4deb30]
LEA RSI,[0x14bda7]
CALL 0x00126300
MOV RDI,RBX
CALL 0x0014bf27
TEST EAX,EAX
JNZ 0x0014bd8a
LEA RSI,[0x181235]
MOV EDX,0x5
MOV RDI,RBX
CALL 0x00126470
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JNZ 0x0014bd8a
BT R14D,0xa
MOV ECX,0x33
SBB ECX,-0x1
ADD RBX,0x5
LEA RDX,[0x18123b]
LEA R14,[RBP + -0x60]
MOV ESI,0x40
MOV RDI,R14
MOV R8,RBX
XOR EAX,EAX
CALL 0x0017cf5e
MOV RDI,R14
CALL 0x0014bf27
LAB_0014bd8a:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0014bda2
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0014bda2:
CALL 0x001263a0
|
int8 get_collation_number(char *param_1,uint param_2)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_68 [72];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_collation_number_internal(param_1);
if ((int)uVar2 == 0) {
iVar1 = strncasecmp(param_1,"utf8_",5);
uVar2 = 0;
if (iVar1 == 0) {
my_snprintf(local_68,0x40,"utf8mb%c_%s",0x34 - (uint)((param_2 >> 10 & 1) != 0),param_1 + 5);
uVar2 = get_collation_number_internal(local_68);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,095
|
my_hash_delete
|
eloqsql/mysys/hash.c
|
my_bool my_hash_delete(HASH *hash, uchar *record)
{
uint pos2,idx,empty_index;
my_hash_value_type pos_hashnr, lastpos_hashnr;
size_t blength;
HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty;
DBUG_ENTER("my_hash_delete");
if (!hash->records)
DBUG_RETURN(1);
blength=hash->blength;
data=dynamic_element(&hash->array,0,HASH_LINK*);
/* Search after record with key */
pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records);
gpos = 0;
while (pos->data != record)
{
gpos=pos;
if (pos->next == NO_RECORD)
DBUG_RETURN(1); /* Key not found */
pos=data+pos->next;
}
if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1;
lastpos=data+hash->records;
/* Remove link to record */
empty=pos; empty_index=(uint) (empty-data);
if (gpos)
gpos->next=pos->next; /* unlink current ptr */
else if (pos->next != NO_RECORD)
{
empty=data+(empty_index=pos->next);
pos[0]= empty[0];
}
if (empty == lastpos) /* last key at wrong pos or no next link */
goto exit;
/* Move the last key (lastpos) */
lastpos_hashnr= lastpos->hash_nr;
/* pos is where lastpos should be */
pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records);
if (pos == empty) /* Move to empty position. */
{
empty[0]=lastpos[0];
goto exit;
}
pos_hashnr= pos->hash_nr;
/* pos3 is where the pos should be */
pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records);
if (pos != pos3)
{ /* pos is on wrong posit */
empty[0]=pos[0]; /* Save it here */
pos[0]=lastpos[0]; /* This should be here */
movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index);
goto exit;
}
pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1);
if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1))
{ /* Identical key-positions */
if (pos2 != hash->records)
{
empty[0]=lastpos[0];
movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index);
goto exit;
}
idx= (uint) (pos-data); /* Link pos->next after lastpos */
}
else idx= NO_RECORD; /* Different positions merge */
empty[0]=lastpos[0];
movelink(data,idx,empty_index,pos->next);
pos->next=empty_index;
exit:
(void) pop_dynamic(&hash->array);
if (hash->free)
(*hash->free)((uchar*) record);
DBUG_RETURN(0);
}
|
O0
|
c
|
my_hash_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x6d0a9
jmp 0x6d0a0
movb $0x1, -0x1(%rbp)
jmp 0x6d422
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6d430
movl %eax, %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x6c8b0
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x6d145
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x6d12e
jmp 0x6d125
movb $0x1, -0x1(%rbp)
jmp 0x6d422
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x6d104
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rcx)
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x6d174
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x6d1ba
movq -0x58(%rbp), %rax
movl (%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6d1f5
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x6d1f3
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x24(%rbp)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x6d1f5
movq -0x68(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x6d204
jmp 0x6d3f6
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x2c(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x6c8b0
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x6d266
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x6d3f6
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x28(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x6c8b0
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x6d30c
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0x6d040
jmp 0x6d3f6
movl -0x2c(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0x6c8b0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x28(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0x6c8b0
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jne 0x6d3bb
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x6d3a7
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0x6d040
jmp 0x6d3f6
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x20(%rbp)
jmp 0x6d3c2
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
movq -0x58(%rbp), %rax
movl (%rax), %ecx
callq 0x6d040
movl -0x24(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x69140
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x6d41c
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0x6d41e
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x90, %rsp
popq %rbp
retq
nop
|
my_hash_delete:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jnz short loc_6D0A9
jmp short $+2
loc_6D0A0:
mov [rbp+var_1], 1
jmp loc_6D422
loc_6D0A9:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_70], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rec_hashnr
mov edi, eax
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_70]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov [rbp+var_50], 0
loc_6D104:
mov rax, [rbp+var_58]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jz short loc_6D145
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jnz short loc_6D12E
jmp short $+2
loc_6D125:
mov [rbp+var_1], 1
jmp loc_6D422
loc_6D12E:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
jmp short loc_6D104
loc_6D145:
mov rcx, [rbp+var_10]
mov rax, [rcx+18h]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rcx+18h], rax
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
shr rcx, 1
cmp rax, rcx
jnb short loc_6D174
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
shr rcx, 1
mov [rax+10h], rcx
loc_6D174:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_58]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_24], eax
cmp [rbp+var_50], 0
jz short loc_6D1BA
mov rax, [rbp+var_58]
mov ecx, [rax]
mov rax, [rbp+var_50]
mov [rax], ecx
jmp short loc_6D1F5
loc_6D1BA:
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_6D1F3
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
mov [rbp+var_24], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_68]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
loc_6D1F3:
jmp short $+2
loc_6D1F5:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_48]
jnz short loc_6D204
jmp loc_6D3F6
loc_6D204:
mov rax, [rbp+var_48]
mov eax, [rax+4]
mov [rbp+var_2C], eax
mov rax, [rbp+var_40]
mov [rbp+var_78], rax
mov edi, [rbp+var_2C]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_78]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_68]
jnz short loc_6D266
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
jmp loc_6D3F6
loc_6D266:
mov rax, [rbp+var_58]
mov eax, [rax+4]
mov [rbp+var_28], eax
mov rax, [rbp+var_40]
mov [rbp+var_80], rax
mov edi, [rbp+var_28]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_80]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_60]
jz short loc_6D30C
mov rax, [rbp+var_68]
mov rcx, [rbp+var_58]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp loc_6D3F6
loc_6D30C:
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_84], eax
mov edi, [rbp+var_28]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov ecx, eax
mov eax, [rbp+var_84]
cmp eax, ecx
jnz short loc_6D3BB
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jz short loc_6D3A7
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_48]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp short loc_6D3F6
loc_6D3A7:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_20], eax
jmp short loc_6D3C2
loc_6D3BB:
mov [rbp+var_20], 0FFFFFFFFh
loc_6D3C2:
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov esi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rax, [rbp+var_58]
mov ecx, [rax]
call movelink
mov ecx, [rbp+var_24]
mov rax, [rbp+var_58]
mov [rax], ecx
loc_6D3F6:
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
call pop_dynamic
mov rax, [rbp+var_10]
cmp qword ptr [rax+60h], 0
jz short loc_6D41C
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov rdi, [rbp+var_18]
call rax
loc_6D41C:
jmp short $+2
loc_6D41E:
mov [rbp+var_1], 0
loc_6D422:
mov al, [rbp+var_1]
add rsp, 90h
pop rbp
retn
|
char my_hash_delete(long long a1, long long a2)
{
unsigned int v2; // eax
unsigned long long v3; // rax
_QWORD *v5; // [rsp+28h] [rbp-68h]
long long v6; // [rsp+30h] [rbp-60h]
unsigned int *v7; // [rsp+38h] [rbp-58h]
long long v8; // [rsp+38h] [rbp-58h]
_DWORD *v9; // [rsp+40h] [rbp-50h]
long long v10; // [rsp+48h] [rbp-48h]
long long v11; // [rsp+50h] [rbp-40h]
unsigned long long v12; // [rsp+58h] [rbp-38h]
unsigned int v13; // [rsp+64h] [rbp-2Ch]
unsigned int v14; // [rsp+68h] [rbp-28h]
unsigned int v15; // [rsp+6Ch] [rbp-24h]
int v16; // [rsp+70h] [rbp-20h]
int v17; // [rsp+74h] [rbp-1Ch]
if ( !*(_QWORD *)(a1 + 24) )
return 1;
v12 = *(_QWORD *)(a1 + 16);
v11 = *(_QWORD *)(a1 + 40);
v2 = rec_hashnr(a1, a2);
v7 = (unsigned int *)(16LL * (unsigned int)my_hash_mask(v2, v12, *(_QWORD *)(a1 + 24)) + v11);
v9 = 0LL;
while ( *((_QWORD *)v7 + 1) != a2 )
{
v9 = v7;
if ( *v7 == -1 )
return 1;
v7 = (unsigned int *)(16LL * *v7 + v11);
}
v3 = *(_QWORD *)(a1 + 24) - 1LL;
*(_QWORD *)(a1 + 24) = v3;
if ( v3 < *(_QWORD *)(a1 + 16) >> 1 )
*(_QWORD *)(a1 + 16) >>= 1;
v10 = 16LL * *(_QWORD *)(a1 + 24) + v11;
v5 = v7;
v15 = ((long long)v7 - v11) >> 4;
if ( v9 )
{
*v9 = *v7;
}
else if ( *v7 != -1 )
{
v15 = *v7;
v5 = (_QWORD *)(16LL * *v7 + v11);
*(_QWORD *)v7 = *v5;
*((_QWORD *)v7 + 1) = v5[1];
}
if ( v5 != (_QWORD *)v10 )
{
v13 = *(_DWORD *)(v10 + 4);
v8 = 16LL * (unsigned int)my_hash_mask(v13, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( (_QWORD *)v8 == v5 )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
}
else
{
v14 = *(_DWORD *)(v8 + 4);
v6 = 16LL * (unsigned int)my_hash_mask(v14, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( v8 == v6 )
{
v17 = my_hash_mask(v13, v12, *(_QWORD *)(a1 + 24) + 1LL);
if ( v17 == (unsigned int)my_hash_mask(v14, v12, *(_QWORD *)(a1 + 24) + 1LL) )
{
if ( v17 != *(_QWORD *)(a1 + 24) )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, (v10 - v11) >> 4, (v8 - v11) >> 4, v15);
goto LABEL_25;
}
v16 = (v8 - v11) >> 4;
}
else
{
v16 = -1;
}
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, v16, v15, *(_DWORD *)v8);
*(_DWORD *)v8 = v15;
goto LABEL_25;
}
*v5 = *(_QWORD *)v8;
v5[1] = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = *(_QWORD *)v10;
*(_QWORD *)(v8 + 8) = *(_QWORD *)(v10 + 8);
movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v15);
}
}
LABEL_25:
pop_dynamic((long long *)(a1 + 40));
if ( *(_QWORD *)(a1 + 96) )
(*(void ( **)(long long))(a1 + 96))(a2);
return 0;
}
|
my_hash_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x0016d0a9
JMP 0x0016d0a0
LAB_0016d0a0:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016d422
LAB_0016d0a9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0016d430
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x0016c8b0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x50],0x0
LAB_0016d104:
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x0016d145
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JNZ 0x0016d12e
JMP 0x0016d125
LAB_0016d125:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016d422
LAB_0016d12e:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016d104
LAB_0016d145:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RCX + 0x18]
ADD RAX,-0x1
MOV qword ptr [RCX + 0x18],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
SHR RCX,0x1
CMP RAX,RCX
JNC 0x0016d174
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SHR RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
LAB_0016d174:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x24],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0016d1ba
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
JMP 0x0016d1f5
LAB_0016d1ba:
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JZ 0x0016d1f3
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x24],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_0016d1f3:
JMP 0x0016d1f5
LAB_0016d1f5:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x0016d204
JMP 0x0016d3f6
LAB_0016d204:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x78],RAX
MOV EDI,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x0016c8b0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x0016d266
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0016d3f6
LAB_0016d266:
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x0016c8b0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x60]
JZ 0x0016d30c
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x0016d040
JMP 0x0016d3f6
LAB_0016d30c:
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x0016c8b0
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x84],EAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x0016c8b0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x84]
CMP EAX,ECX
JNZ 0x0016d3bb
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x0016d3a7
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x0016d040
JMP 0x0016d3f6
LAB_0016d3a7:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0016d3c2
LAB_0016d3bb:
MOV dword ptr [RBP + -0x20],0xffffffff
LAB_0016d3c2:
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
CALL 0x0016d040
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],ECX
LAB_0016d3f6:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
CALL 0x00169140
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0016d41c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
LAB_0016d41c:
JMP 0x0016d41e
LAB_0016d41e:
MOV byte ptr [RBP + -0x1],0x0
LAB_0016d422:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x90
POP RBP
RET
|
int1 my_hash_delete(long param_1,long param_2)
{
int8 uVar1;
long lVar2;
int4 uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
uint *puVar8;
uint *puVar9;
uint *puVar10;
uint *local_70;
uint *local_60;
uint *local_58;
uint local_2c;
int4 local_28;
if (*(long *)(param_1 + 0x18) == 0) {
return 1;
}
uVar1 = *(int8 *)(param_1 + 0x10);
lVar2 = *(long *)(param_1 + 0x28);
uVar3 = rec_hashnr(param_1,param_2);
uVar4 = my_hash_mask(uVar3,uVar1,*(int8 *)(param_1 + 0x18));
local_58 = (uint *)0x0;
while (local_60 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_60 + 2) != param_2) {
local_58 = local_60;
if (*local_60 == 0xffffffff) {
return 1;
}
uVar4 = *local_60;
}
uVar7 = *(long *)(param_1 + 0x18) - 1;
*(ulong *)(param_1 + 0x18) = uVar7;
if (uVar7 < *(ulong *)(param_1 + 0x10) >> 1) {
*(ulong *)(param_1 + 0x10) = *(ulong *)(param_1 + 0x10) >> 1;
}
puVar8 = (uint *)(lVar2 + *(long *)(param_1 + 0x18) * 0x10);
local_70 = local_60;
local_2c = (uint)((long)local_60 - lVar2 >> 4);
if (local_58 == (uint *)0x0) {
if (*local_60 != 0xffffffff) {
local_2c = *local_60;
local_70 = (uint *)(lVar2 + (ulong)local_2c * 0x10);
*(int8 *)local_60 = *(int8 *)local_70;
*(int8 *)(local_60 + 2) = *(int8 *)(local_70 + 2);
}
}
else {
*local_58 = *local_60;
}
if (local_70 != puVar8) {
uVar4 = puVar8[1];
uVar5 = my_hash_mask(uVar4,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar9 = (uint *)(lVar2 + (ulong)uVar5 * 0x10);
if (puVar9 == local_70) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
}
else {
uVar5 = puVar9[1];
uVar6 = my_hash_mask(uVar5,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar10 = (uint *)(lVar2 + (ulong)uVar6 * 0x10);
if (puVar9 == puVar10) {
uVar4 = my_hash_mask(uVar4,uVar1,*(long *)(param_1 + 0x18) + 1);
uVar5 = my_hash_mask(uVar5,uVar1,*(long *)(param_1 + 0x18) + 1);
if (uVar4 == uVar5) {
if ((ulong)uVar4 != *(ulong *)(param_1 + 0x18)) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff,
(long)puVar9 - lVar2 >> 4 & 0xffffffff,local_2c);
goto LAB_0016d3f6;
}
local_28 = (int4)((long)puVar9 - lVar2 >> 4);
}
else {
local_28 = 0xffffffff;
}
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,local_28,local_2c,*puVar9);
*puVar9 = local_2c;
}
else {
*(int8 *)local_70 = *(int8 *)puVar9;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar9 + 2);
*(int8 *)puVar9 = *(int8 *)puVar8;
*(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff,
(long)puVar10 - lVar2 >> 4 & 0xffffffff,local_2c);
}
}
}
LAB_0016d3f6:
pop_dynamic(param_1 + 0x28);
if (*(long *)(param_1 + 0x60) != 0) {
(**(code **)(param_1 + 0x60))(param_2);
}
return 0;
}
|
|
57,096
|
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>::at(unsigned long)
|
monkey531[P]llama/common/json.hpp
|
reference at(size_type idx)
{
// at only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
JSON_TRY
{
return set_parent(m_data.m_value.array->at(idx));
}
JSON_CATCH (std::out_of_range&)
{
// create better exception explanation
JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this));
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpb $0x2, (%rdi)
jne 0x7d65b
movq %rsi, %r12
movq 0x8(%rbx), %rdi
callq 0x7d924
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23480
movq %rax, %r14
movq %rbx, %rdi
callq 0x4320e
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x37885(%rip), %rsi # 0xb4f02
movq %rsp, %rdi
callq 0x7d9b5
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x130, %esi # imm = 0x130
movq %rbx, %rcx
callq 0x430c2
xorl %ebp, %ebp
leaq 0x7e8a4(%rip), %rsi # 0xfbf48
leaq -0x3d90d(%rip), %rdx # 0x3fd9e
movq %r14, %rdi
callq 0x23f30
jmp 0x7d72a
movq %rax, %r15
cmpl $0x1, %edx
jne 0x7d785
movq %r15, %rdi
callq 0x233a0
pushq $0x20
popq %rdi
callq 0x23480
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x41ab9
leaq 0x377fc(%rip), %rsi # 0xb4ee4
leaq 0x37802(%rip), %rcx # 0xb4ef1
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x7d945
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x191, %esi # imm = 0x191
movq %rbx, %rcx
callq 0x4196e
xorl %ebp, %ebp
leaq 0x7e7ad(%rip), %rsi # 0xfbec8
leaq -0x3d984(%rip), %rdx # 0x3fd9e
movq %r14, %rdi
callq 0x23f30
movq %rax, %r15
movq %rsp, %rdi
callq 0x24208
jmp 0x7d73d
movq %rax, %r15
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x7d751
jmp 0x7d759
movq %rax, %r15
movq %r14, %rdi
callq 0x236b0
callq 0x23e80
jmp 0x7d785
movq %rax, %rdi
callq 0x27867
movq %rax, %r15
movq %rsp, %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x7d77d
jmp 0x7d785
movq %rax, %r15
movq %r14, %rdi
callq 0x236b0
movq %r15, %rdi
callq 0x23fd0
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov rbx, rdi
cmp byte ptr [rdi], 2
jnz short loc_7D65B
mov r12, rsi
mov rdi, [rbx+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE2atEm; 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>>::at(ulong)
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7D65B:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 130h; int
mov rcx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::at(
long long a1)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // r14
_QWORD v3[13]; // [rsp+0h] [rbp-68h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v3[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v3, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
(long long)v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 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>>::at(*(_QWORD *)(a1 + 8));
}
|
at:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
CMP byte ptr [RDI],0x2
JNZ 0x0017d65b
MOV R12,RSI
MOV RDI,qword ptr [RBX + 0x8]
LAB_0017d649:
CALL 0x0017d924
LAB_0017d64e:
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017d65b:
PUSH 0x20
POP RDI
CALL 0x00123480
MOV R14,RAX
MOV RDI,RBX
CALL 0x0014320e
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_0017d676:
LEA RSI,[0x1b4f02]
MOV RDI,RSP
CALL 0x0017d9b5
MOV BPL,0x1
LAB_0017d688:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x130
MOV RCX,RBX
CALL 0x001430c2
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x13fd9e]
MOV RDI,R14
CALL 0x00123f30
|
/* 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>::at(unsigned long) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::at(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
detail adStack_68 [32];
char *local_48 [4];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
/* try { // try from 0017d649 to 0017d64d has its CatchHandler @ 0017d6b5 */
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>>>
::at(*(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>>>
**)(this + 8),param_1);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)type_name(this);
/* try { // try from 0017d676 to 0017d684 has its CatchHandler @ 0017d77a */
detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 0017d688 to 0017d6b2 has its CatchHandler @ 0017d768 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x130,adStack_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
57,097
|
unpack_dirname
|
eloqsql/mysys/mf_pack.c
|
size_t unpack_dirname(char * to, const char *from)
{
size_t length, h_length;
char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion;
DBUG_ENTER("unpack_dirname");
length= normalize_dirname(buff, from);
if (buff[0] == FN_HOMELIB)
{
suffix=buff+1; tilde_expansion=expand_tilde(&suffix);
if (tilde_expansion)
{
length-= (size_t) (suffix-buff)-1;
if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN)
{
if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR))
h_length--;
if (buff+h_length < suffix)
bmove(buff+h_length,suffix,length);
else
bmove_upp((uchar*) buff+h_length+length, (uchar*) suffix+length, length);
bmove(buff,tilde_expansion,h_length);
}
}
}
#ifdef USE_SYMDIR
if (my_use_symdir)
symdirget(buff);
#endif
DBUG_RETURN(system_filename(to,buff)); /* Fix for open */
}
|
O3
|
c
|
unpack_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rdi, -0x250(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x240(%rbp), %r13
movq %r13, %rdi
callq 0x35247
cmpb $0x7e, (%r13)
jne 0x35409
movq %rax, %r14
leaq -0x23f(%rbp), %r15
cmpb $0x2f, (%r15)
jne 0x35329
leaq 0x343d41(%rip), %rbx # 0x379068
jmp 0x35382
movq %r15, %rdi
movl $0x2f, %esi
callq 0x24130
movq %rax, %r12
testq %rax, %rax
jne 0x35349
movq %r15, %rdi
callq 0x6318c
movq %rax, %r12
movb (%r12), %al
movb %al, -0x241(%rbp)
movb $0x0, (%r12)
movq %r15, %rdi
callq 0x24270
movq %rax, %rbx
movb -0x241(%rbp), %al
movb %al, (%r12)
callq 0x24410
testq %rbx, %rbx
je 0x35409
addq $0x20, %rbx
movq %r12, %r15
movq (%rbx), %r12
testq %r12, %r12
je 0x35409
addq %r13, %r14
subq %r15, %r14
movq %r12, %rdi
callq 0x24170
movq %rax, %r13
addq %r14, %rax
incq %rax
cmpq $0x200, %rax # imm = 0x200
ja 0x35409
testq %r13, %r13
je 0x353be
xorl %eax, %eax
cmpb $0x2f, -0x1(%r12,%r13)
sete %al
subq %rax, %r13
jmp 0x353c1
xorl %r13d, %r13d
incq %r14
leaq -0x240(,%r13), %rdi
addq %rbp, %rdi
cmpq %r15, %rdi
jae 0x353e1
movq %r15, %rsi
movq %r14, %rdx
callq 0x24610
jmp 0x353f2
addq %r14, %rdi
addq %r14, %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x36cb8
leaq -0x240(%rbp), %rdi
movl $0x205, %ecx # imm = 0x205
movq %r12, %rsi
movq %r13, %rdx
callq 0x24280
leaq -0x240(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
movq -0x250(%rbp), %rbx
movq %rbx, %rdi
callq 0x631d4
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x35448
subq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
|
unpack_dirname:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov [rbp+var_250], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r13, [rbp+var_240]
mov rdi, r13
call normalize_dirname
cmp byte ptr [r13+0], 7Eh ; '~'
jnz loc_35409
mov r14, rax
lea r15, [rbp+var_23F]
cmp byte ptr [r15], 2Fh ; '/'
jnz short loc_35329
lea rbx, home_dir
jmp short loc_35382
loc_35329:
mov rdi, r15
mov esi, 2Fh ; '/'
call _strchr
mov r12, rax
test rax, rax
jnz short loc_35349
mov rdi, r15
call strend
mov r12, rax
loc_35349:
mov al, [r12]
mov [rbp+var_241], al
mov byte ptr [r12], 0
mov rdi, r15
call _getpwnam
mov rbx, rax
mov al, [rbp+var_241]
mov [r12], al
call _endpwent
test rbx, rbx
jz loc_35409
add rbx, 20h ; ' '
mov r15, r12
loc_35382:
mov r12, [rbx]
test r12, r12
jz short loc_35409
add r14, r13
sub r14, r15
mov rdi, r12
call _strlen
mov r13, rax
add rax, r14
inc rax
cmp rax, 200h
ja short loc_35409
test r13, r13
jz short loc_353BE
xor eax, eax
cmp byte ptr [r12+r13-1], 2Fh ; '/'
setz al
sub r13, rax
jmp short loc_353C1
loc_353BE:
xor r13d, r13d
loc_353C1:
inc r14
lea rdi, ds:0FFFFFFFFFFFFFDC0h[r13]
add rdi, rbp
cmp rdi, r15
jnb short loc_353E1
mov rsi, r15
mov rdx, r14
call _memmove
jmp short loc_353F2
loc_353E1:
add rdi, r14
add r15, r14
mov rsi, r15
mov rdx, r14
call bmove_upp
loc_353F2:
lea rdi, [rbp+var_240]
mov ecx, 205h
mov rsi, r12
mov rdx, r13
call ___memmove_chk
loc_35409:
lea rsi, [rbp+var_240]
mov edx, 1FFh
mov rbx, [rbp+var_250]
mov rdi, rbx
call strmake
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_35448
sub rax, rbx
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_35448:
call ___stack_chk_fail
|
long long unpack_dirname(long long a1, _BYTE *a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rcx
long long v5; // r14
char *v6; // r15
_QWORD *v7; // rbx
char *v8; // r12
long long v9; // rbx
long long v10; // r12
_BYTE *v11; // r14
long long v12; // r13
long long v13; // r13
_BYTE *v14; // r14
char *v15; // rdi
char v18; // [rsp+Fh] [rbp-241h]
char v19; // [rsp+10h] [rbp-240h] BYREF
_BYTE v20[527]; // [rsp+11h] [rbp-23Fh] BYREF
unsigned long long v21; // [rsp+220h] [rbp-30h]
long long savedregs; // [rsp+250h] [rbp+0h] BYREF
v21 = __readfsqword(0x28u);
v2 = normalize_dirname((long long)&v19, a2);
if ( v19 != 126 )
return strmake(a1, &v19, 511LL) - a1;
v5 = v2;
v6 = v20;
if ( v20[0] == 47 )
{
v7 = &home_dir;
LABEL_8:
v10 = *v7;
if ( *v7 )
{
v11 = (_BYTE *)(&v20[v5 - 1] - v6);
v12 = strlen(*v7);
if ( (unsigned long long)&v11[v12 + 1] <= 0x200 )
{
if ( v12 )
v13 = v12 - (*(_BYTE *)(v10 + v12 - 1) == 47);
else
v13 = 0LL;
v14 = v11 + 1;
v15 = (char *)&savedregs + v13 - 576;
if ( v15 >= v6 )
bmove_upp(&v15[(_QWORD)v14], &v6[(_QWORD)v14], v14);
else
memmove(v15, v6, v14);
__memmove_chk(&v19, v10, v13, 517LL);
}
}
return strmake(a1, &v19, 511LL) - a1;
}
v8 = (char *)strchr(v20, 47LL, v3, v4);
if ( !v8 )
v8 = (char *)strend(v20);
v18 = *v8;
*v8 = 0;
v9 = getpwnam(v20);
*v8 = v18;
endpwent();
if ( v9 )
{
v7 = (_QWORD *)(v9 + 32);
v6 = v8;
goto LABEL_8;
}
return strmake(a1, &v19, 511LL) - a1;
}
|
unpack_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV qword ptr [RBP + -0x250],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R13,[RBP + -0x240]
MOV RDI,R13
CALL 0x00135247
CMP byte ptr [R13],0x7e
JNZ 0x00135409
MOV R14,RAX
LEA R15,[RBP + -0x23f]
CMP byte ptr [R15],0x2f
JNZ 0x00135329
LEA RBX,[0x479068]
JMP 0x00135382
LAB_00135329:
MOV RDI,R15
MOV ESI,0x2f
CALL 0x00124130
MOV R12,RAX
TEST RAX,RAX
JNZ 0x00135349
MOV RDI,R15
CALL 0x0016318c
MOV R12,RAX
LAB_00135349:
MOV AL,byte ptr [R12]
MOV byte ptr [RBP + -0x241],AL
MOV byte ptr [R12],0x0
MOV RDI,R15
CALL 0x00124270
MOV RBX,RAX
MOV AL,byte ptr [RBP + -0x241]
MOV byte ptr [R12],AL
CALL 0x00124410
TEST RBX,RBX
JZ 0x00135409
ADD RBX,0x20
MOV R15,R12
LAB_00135382:
MOV R12,qword ptr [RBX]
TEST R12,R12
JZ 0x00135409
ADD R14,R13
SUB R14,R15
MOV RDI,R12
CALL 0x00124170
MOV R13,RAX
ADD RAX,R14
INC RAX
CMP RAX,0x200
JA 0x00135409
TEST R13,R13
JZ 0x001353be
XOR EAX,EAX
CMP byte ptr [R12 + R13*0x1 + -0x1],0x2f
SETZ AL
SUB R13,RAX
JMP 0x001353c1
LAB_001353be:
XOR R13D,R13D
LAB_001353c1:
INC R14
LEA RDI,[-0x240 + R13*0x1]
ADD RDI,RBP
CMP RDI,R15
JNC 0x001353e1
MOV RSI,R15
MOV RDX,R14
CALL 0x00124610
JMP 0x001353f2
LAB_001353e1:
ADD RDI,R14
ADD R15,R14
MOV RSI,R15
MOV RDX,R14
CALL 0x00136cb8
LAB_001353f2:
LEA RDI,[RBP + -0x240]
MOV ECX,0x205
MOV RSI,R12
MOV RDX,R13
CALL 0x00124280
LAB_00135409:
LEA RSI,[RBP + -0x240]
MOV EDX,0x1ff
MOV RBX,qword ptr [RBP + -0x250]
MOV RDI,RBX
CALL 0x001631d4
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00135448
SUB RAX,RBX
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00135448:
CALL 0x001243e0
|
long unpack_dirname(long param_1)
{
char *pcVar1;
long lVar2;
char *__src;
passwd *ppVar3;
size_t sVar4;
char **ppcVar5;
char *__dest;
long lVar6;
char *__n;
long in_FS_OFFSET;
char acStack_48f [559];
code *pcStack_260;
long local_258;
char local_249;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcStack_260 = (code *)0x135305;
local_258 = param_1;
lVar2 = normalize_dirname(local_248);
if (local_248[0] == '~') {
pcVar1 = local_248 + 1;
if (local_248[1] == '/') {
ppcVar5 = (char **)&home_dir;
__src = pcVar1;
}
else {
pcStack_260 = (code *)0x135336;
__src = strchr(pcVar1,0x2f);
if (__src == (char *)0x0) {
pcStack_260 = (code *)0x135346;
__src = (char *)strend(pcVar1);
}
local_249 = *__src;
*__src = '\0';
pcStack_260 = (code *)0x135360;
ppVar3 = getpwnam(pcVar1);
*__src = local_249;
pcStack_260 = (code *)0x135372;
endpwent();
if (ppVar3 == (passwd *)0x0) goto LAB_00135409;
ppcVar5 = &ppVar3->pw_dir;
}
pcVar1 = *ppcVar5;
if (pcVar1 != (char *)0x0) {
pcStack_260 = (code *)0x135398;
sVar4 = strlen(pcVar1);
if (local_248 + sVar4 + (lVar2 - (long)__src) + 1 < (char *)0x201) {
if (sVar4 == 0) {
lVar6 = 0;
}
else {
lVar6 = sVar4 - (pcVar1[sVar4 - 1] == '/');
}
__n = local_248 + (lVar2 - (long)__src) + 1;
__dest = local_248 + lVar6;
if (__dest < __src) {
pcStack_260 = (code *)0x1353df;
memmove(__dest,__src,(size_t)__n);
}
else {
pcStack_260 = (code *)0x1353f2;
bmove_upp(__dest + (long)__n,__src + (long)__n,__n);
}
pcStack_260 = (code *)0x135409;
__memmove_chk(local_248,pcVar1,lVar6,0x205);
}
}
}
LAB_00135409:
lVar2 = local_258;
pcStack_260 = (code *)0x135424;
lVar6 = strmake(local_258,local_248,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return lVar6 - lVar2;
}
/* WARNING: Subroutine does not return */
pcStack_260 = system_filename;
__stack_chk_fail();
}
|
|
57,098
|
mi_rec_pos
|
eloqsql/storage/myisam/mi_search.c
|
my_off_t _mi_rec_pos(MYISAM_SHARE *s, uchar *ptr)
{
my_off_t pos;
switch (s->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8:
pos= (my_off_t) mi_uint8korr(ptr);
if (pos == HA_OFFSET_ERROR)
return HA_OFFSET_ERROR; /* end of list */
break;
case 7:
pos= (my_off_t) mi_uint7korr(ptr);
if (pos == (((my_off_t) 1) << 56) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 6:
pos= (my_off_t) mi_uint6korr(ptr);
if (pos == (((my_off_t) 1) << 48) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
case 5:
pos= (my_off_t) mi_uint5korr(ptr);
if (pos == (((my_off_t) 1) << 40) -1)
return HA_OFFSET_ERROR; /* end of list */
break;
#else
case 8:
case 7:
case 6:
case 5:
ptr+= (s->rec_reflength-4);
/* fall through */
#endif
case 4:
pos= (my_off_t) mi_uint4korr(ptr);
if (pos == (my_off_t) (uint32) ~0L)
return HA_OFFSET_ERROR;
break;
case 3:
pos= (my_off_t) mi_uint3korr(ptr);
if (pos == (my_off_t) (1 << 24) -1)
return HA_OFFSET_ERROR;
break;
case 2:
pos= (my_off_t) mi_uint2korr(ptr);
if (pos == (my_off_t) (1 << 16) -1)
return HA_OFFSET_ERROR;
break;
default: abort(); /* Impossible */
}
return ((s->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos :
pos*s->base.pack_reclength);
}
|
O3
|
c
|
mi_rec_pos:
movl 0x338(%rdi), %eax
addl $-0x2, %eax
cmpl $0x6, %eax
ja 0xa48fe
leaq 0x69f1f(%rip), %rcx # 0x10e708
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl (%rsi), %ecx
rolw $0x8, %cx
movq $-0x1, %rax
cmpw $-0x1, %cx
je 0xa484c
movzwl %cx, %ecx
jmp 0xa48e1
movl (%rsi), %ecx
movzwl 0x4(%rsi), %eax
shlq $0x30, %rax
shlq $0x10, %rcx
orq %rax, %rcx
bswapq %rcx
movq $-0x1, %rax
movabsq $0xffffffffffff, %rdx # imm = 0xFFFFFFFFFFFF
jmp 0xa48ca
movl (%rsi), %ecx
bswapl %ecx
movq $-0x1, %rax
cmpl $-0x1, %ecx
jne 0xa48e1
retq
movl (%rsi), %ecx
movzbl 0x4(%rsi), %eax
shlq $0x38, %rax
shlq $0x18, %rcx
orq %rax, %rcx
bswapq %rcx
movq $-0x1, %rax
movabsq $0xffffffffff, %rdx # imm = 0xFFFFFFFFFF
jmp 0xa48ca
movzwl 0x1(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzbl (%rsi), %ecx
shll $0x10, %ecx
orq %rax, %rcx
movq $-0x1, %rax
cmpq $0xffffff, %rcx # imm = 0xFFFFFF
je 0xa484c
jmp 0xa48e1
movl (%rsi), %ecx
movzwl 0x4(%rsi), %eax
movzbl 0x6(%rsi), %edx
shlq $0x38, %rdx
shlq $0x28, %rax
shlq $0x8, %rcx
orq %rax, %rcx
orq %rdx, %rcx
bswapq %rcx
movq $-0x1, %rax
movabsq $0xffffffffffffff, %rdx # imm = 0xFFFFFFFFFFFFFF
cmpq %rdx, %rcx
je 0xa484c
jmp 0xa48e1
movq (%rsi), %rcx
bswapq %rcx
cmpq $-0x1, %rcx
je 0xa48f6
testb $0x5, 0x318(%rdi)
jne 0xa48f2
imulq 0x148(%rdi), %rcx
movq %rcx, %rax
retq
movq $-0x1, %rax
retq
pushq %rbp
movq %rsp, %rbp
callq 0x2b6e0
|
_mi_rec_pos:
mov eax, [rdi+338h]
add eax, 0FFFFFFFEh; switch 7 cases
cmp eax, 6
ja def_A47F0; jumptable 00000000000A47F0 default case
lea rcx, jpt_A47F0
movsxd rax, ds:(jpt_A47F0 - 10E708h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_A47F2:
movzx ecx, word ptr [rsi]; jumptable 00000000000A47F0 case 2
rol cx, 8
mov rax, 0FFFFFFFFFFFFFFFFh
cmp cx, 0FFFFh
jz short locret_A484C
movzx ecx, cx
jmp loc_A48E1
loc_A480E:
mov ecx, [rsi]; jumptable 00000000000A47F0 case 6
movzx eax, word ptr [rsi+4]
shl rax, 30h
shl rcx, 10h
or rcx, rax
bswap rcx
mov rax, 0FFFFFFFFFFFFFFFFh
mov rdx, 0FFFFFFFFFFFFh
jmp loc_A48CA
loc_A4838:
mov ecx, [rsi]; jumptable 00000000000A47F0 case 4
bswap ecx
mov rax, 0FFFFFFFFFFFFFFFFh
cmp ecx, 0FFFFFFFFh
jnz loc_A48E1
locret_A484C:
retn
loc_A484D:
mov ecx, [rsi]; jumptable 00000000000A47F0 case 5
movzx eax, byte ptr [rsi+4]
shl rax, 38h
shl rcx, 18h
or rcx, rax
bswap rcx
mov rax, 0FFFFFFFFFFFFFFFFh
mov rdx, 0FFFFFFFFFFh
jmp short loc_A48CA
loc_A4874:
movzx eax, word ptr [rsi+1]; jumptable 00000000000A47F0 case 3
rol ax, 8
movzx eax, ax
movzx ecx, byte ptr [rsi]
shl ecx, 10h
or rcx, rax
mov rax, 0FFFFFFFFFFFFFFFFh
cmp rcx, 0FFFFFFh
jz short locret_A484C
jmp short loc_A48E1
loc_A489A:
mov ecx, [rsi]; jumptable 00000000000A47F0 case 7
movzx eax, word ptr [rsi+4]
movzx edx, byte ptr [rsi+6]
shl rdx, 38h
shl rax, 28h
shl rcx, 8
or rcx, rax
or rcx, rdx
bswap rcx
mov rax, 0FFFFFFFFFFFFFFFFh
mov rdx, 0FFFFFFFFFFFFFFh
loc_A48CA:
cmp rcx, rdx
jz locret_A484C
jmp short loc_A48E1
loc_A48D5:
mov rcx, [rsi]; jumptable 00000000000A47F0 case 8
bswap rcx
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short loc_A48F6
loc_A48E1:
test byte ptr [rdi+318h], 5
jnz short loc_A48F2
imul rcx, [rdi+148h]
loc_A48F2:
mov rax, rcx
retn
loc_A48F6:
mov rax, 0FFFFFFFFFFFFFFFFh
retn
def_A47F0:
push rbp; jumptable 00000000000A47F0 default case
mov rbp, rsp
call _abort
|
long long mi_rec_pos(long long a1, _WORD *a2)
{
unsigned long long v2; // rcx
long long result; // rax
long long v4; // rdx
switch ( *(_DWORD *)(a1 + 824) )
{
case 2:
LOWORD(v2) = __ROL2__(*a2, 8);
result = -1LL;
if ( (_WORD)v2 == 0xFFFF )
return result;
v2 = (unsigned __int16)v2;
goto LABEL_14;
case 3:
v2 = (unsigned __int16)__ROL2__(*(_WORD *)((char *)a2 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)a2 << 16);
result = -1LL;
if ( v2 != 0xFFFFFF )
goto LABEL_14;
return result;
case 4:
v2 = _byteswap_ulong(*(_DWORD *)a2);
result = -1LL;
if ( (_DWORD)v2 == -1 )
return result;
goto LABEL_14;
case 5:
v2 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 4) << 56) | ((unsigned long long)*(unsigned int *)a2 << 24));
result = -1LL;
v4 = 0xFFFFFFFFFFLL;
goto LABEL_11;
case 6:
v2 = _byteswap_uint64(((unsigned long long)(unsigned __int16)a2[2] << 48) | ((unsigned long long)*(unsigned int *)a2 << 16));
result = -1LL;
v4 = 0xFFFFFFFFFFFFLL;
goto LABEL_11;
case 7:
v2 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 6) << 56) | ((unsigned long long)(unsigned __int16)a2[2] << 40) | ((unsigned long long)*(unsigned int *)a2 << 8));
result = -1LL;
v4 = 0xFFFFFFFFFFFFFFLL;
LABEL_11:
if ( v2 != v4 )
goto LABEL_14;
return result;
case 8:
v2 = _byteswap_uint64(*(_QWORD *)a2);
if ( v2 == -1LL )
return -1LL;
LABEL_14:
if ( (*(_BYTE *)(a1 + 792) & 5) == 0 )
v2 *= *(_QWORD *)(a1 + 328);
return v2;
default:
abort(a1);
}
}
|
_mi_rec_pos:
MOV EAX,dword ptr [RDI + 0x338]
ADD EAX,-0x2
CMP EAX,0x6
JA 0x001a48fe
LEA RCX,[0x20e708]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOVZX ECX,word ptr [RSI]
ROL CX,0x8
MOV RAX,-0x1
CMP CX,-0x1
JZ 0x001a484c
MOVZX ECX,CX
JMP 0x001a48e1
caseD_6:
MOV ECX,dword ptr [RSI]
MOVZX EAX,word ptr [RSI + 0x4]
SHL RAX,0x30
SHL RCX,0x10
OR RCX,RAX
BSWAP RCX
MOV RAX,-0x1
MOV RDX,0xffffffffffff
JMP 0x001a48ca
caseD_4:
MOV ECX,dword ptr [RSI]
BSWAP ECX
MOV RAX,-0x1
CMP ECX,-0x1
JNZ 0x001a48e1
LAB_001a484c:
RET
caseD_5:
MOV ECX,dword ptr [RSI]
MOVZX EAX,byte ptr [RSI + 0x4]
SHL RAX,0x38
SHL RCX,0x18
OR RCX,RAX
BSWAP RCX
MOV RAX,-0x1
MOV RDX,0xffffffffff
JMP 0x001a48ca
caseD_3:
MOVZX EAX,word ptr [RSI + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,byte ptr [RSI]
SHL ECX,0x10
OR RCX,RAX
MOV RAX,-0x1
CMP RCX,0xffffff
JZ 0x001a484c
JMP 0x001a48e1
caseD_7:
MOV ECX,dword ptr [RSI]
MOVZX EAX,word ptr [RSI + 0x4]
MOVZX EDX,byte ptr [RSI + 0x6]
SHL RDX,0x38
SHL RAX,0x28
SHL RCX,0x8
OR RCX,RAX
OR RCX,RDX
BSWAP RCX
MOV RAX,-0x1
MOV RDX,0xffffffffffffff
LAB_001a48ca:
CMP RCX,RDX
JZ 0x001a484c
JMP 0x001a48e1
caseD_8:
MOV RCX,qword ptr [RSI]
BSWAP RCX
CMP RCX,-0x1
JZ 0x001a48f6
LAB_001a48e1:
TEST byte ptr [RDI + 0x318],0x5
JNZ 0x001a48f2
IMUL RCX,qword ptr [RDI + 0x148]
LAB_001a48f2:
MOV RAX,RCX
RET
LAB_001a48f6:
MOV RAX,-0x1
RET
default:
PUSH RBP
MOV RBP,RSP
CALL 0x0012b6e0
|
ulong _mi_rec_pos(long param_1,ulong *param_2)
{
ushort uVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
switch(*(int4 *)(param_1 + 0x338)) {
case 2:
uVar1 = (ushort)*param_2 << 8 | (ushort)*param_2 >> 8;
if (uVar1 == 0xffff) {
return 0xffffffffffffffff;
}
uVar4 = (ulong)uVar1;
break;
case 3:
uVar4 = (ulong)CONCAT12((char)*param_2,
*(ushort *)((long)param_2 + 1) << 8 |
*(ushort *)((long)param_2 + 1) >> 8);
if (uVar4 == 0xffffff) {
return 0xffffffffffffffff;
}
break;
case 4:
uVar2 = (uint)*param_2;
uVar2 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
uVar4 = (ulong)uVar2;
if (uVar2 == 0xffffffff) {
return 0xffffffffffffffff;
}
break;
case 5:
uVar4 = (ulong)(uint)*param_2 << 0x18;
uVar4 = (ulong)*(byte *)((long)param_2 + 4) | (uVar4 & 0xff000000000000) >> 0x28 |
(uVar4 & 0xff0000000000) >> 0x18 | (uVar4 & 0xff00000000) >> 8 |
(uVar4 & 0xff000000) << 8;
uVar3 = 0xffffffffff;
goto LAB_001a48ca;
case 6:
uVar4 = (ulong)*(ushort *)((long)param_2 + 4) << 0x30;
uVar3 = (ulong)(uint)*param_2 << 0x10;
uVar4 = uVar4 >> 0x38 | (uVar4 & 0xff000000000000) >> 0x28 | (uVar3 & 0xff0000000000) >> 0x18 |
(uVar3 & 0xff00000000) >> 8 | (uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18;
uVar3 = 0xffffffffffff;
goto LAB_001a48ca;
case 7:
uVar4 = (ulong)*(ushort *)((long)param_2 + 4) << 0x28;
uVar3 = (ulong)(uint)*param_2 << 8;
uVar4 = (ulong)*(byte *)((long)param_2 + 6) | (uVar4 & 0xff000000000000) >> 0x28 |
(uVar4 & 0xff0000000000) >> 0x18 | (uVar3 & 0xff00000000) >> 8 |
(uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18 | (uVar3 & 0xff00) << 0x28;
uVar3 = 0xffffffffffffff;
LAB_001a48ca:
if (uVar4 == uVar3) {
return 0xffffffffffffffff;
}
break;
case 8:
uVar4 = *param_2;
uVar4 = uVar4 >> 0x38 | (uVar4 & 0xff000000000000) >> 0x28 | (uVar4 & 0xff0000000000) >> 0x18 |
(uVar4 & 0xff00000000) >> 8 | (uVar4 & 0xff000000) << 8 | (uVar4 & 0xff0000) << 0x18 |
(uVar4 & 0xff00) << 0x28 | uVar4 << 0x38;
if (uVar4 == 0xffffffffffffffff) {
return 0xffffffffffffffff;
}
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
if ((*(byte *)(param_1 + 0x318) & 5) == 0) {
uVar4 = uVar4 * *(long *)(param_1 + 0x148);
}
return uVar4;
}
|
|
57,099
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json.hpp
|
void push_back(const basic_json& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(val);
set_parent(m_data.m_value.array->back(), old_capacity);
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0x6ec3e
cmpl $0x2, %eax
je 0x6ec6b
movl $0x20, %edi
callq 0x19380
movq %rax, %rbx
movq %r14, %rdi
callq 0x43512
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x44ee6(%rip), %rsi # 0xb3aea
leaq 0x10(%rsp), %rdi
callq 0x43489
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x4f4f8
xorl %ebp, %ebp
leaq 0x74699(%rip), %rsi # 0xe32c8
leaq -0x1d0bc(%rip), %rdx # 0x51b7a
movq %rbx, %rdi
callq 0x19bb0
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x196d0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x42e48
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x74fc4
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6eca5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x196e0
jmp 0x6eca5
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x6ecb2
movq %rbx, %rdi
callq 0x19520
movq %r14, %rdi
callq 0x19c10
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_6EC3E
cmp eax, 2
jz loc_6EC6B
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6EC3E:
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_6EC6B:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; 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>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov r14, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6ECA5
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6ECA5
mov r14, rax
mov bpl, 1
loc_6ECA5:
test bpl, bpl
jz short loc_6ECB2
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6ECB2:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v3; // rax
char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[7]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"cannot use push_back() with ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
else
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = 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>::assert_invariant((char *)a1);
}
return 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>>::push_back(
*(_QWORD *)(a1 + 8),
a2);
}
|
push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0016ec3e
CMP EAX,0x2
JZ 0x0016ec6b
MOV EDI,0x20
CALL 0x00119380
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143512
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0016ebfd:
LEA RSI,[0x1b3aea]
LEA RDI,[RSP + 0x10]
CALL 0x00143489
MOV BPL,0x1
LAB_0016ec11:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x0014f4f8
XOR EBP,EBP
LEA RSI,[0x1e32c8]
LEA RDX,[0x151b7a]
MOV RDI,RBX
CALL 0x00119bb0
LAB_0016ec3e:
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x001196d0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x00142e48
LAB_0016ec6b:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x00174fc4
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 uVar1;
int8 *puVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0016ebfd to 0016ec0d has its CatchHandler @ 0016ec9f */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 0016ec11 to 0016ec3d has its CatchHandler @ 0016ec7f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
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>>>
::push_back(*(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>>>
**)(this + 8),param_1);
return;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.