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
|
---|---|---|---|---|---|---|---|---|---|---|---|
400 | Lecturer::course[abi:cxx11]() const | slashdotted[P]corsocpp_tp_2025/S9/Lecturer.cpp | std::string Lecturer::course() const
{
return m_course;
} | O1 | cpp | Lecturer::course[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x50(%rsi), %rax
movq 0x58(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1d80
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK8Lecturer6courseB5cxx11Ev:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+50h]
mov rdx, [rsi+58h]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * Lecturer::course[abi:cxx11](_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_BYTE **)(a2 + 80), *(_QWORD *)(a2 + 80) + *(_QWORD *)(a2 + 88));
return a1;
}
| course[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x50]
MOV RDX,qword ptr [RSI + 0x58]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00101d80
MOV RAX,RBX
POP RBX
RET
|
/* Lecturer::course[abi:cxx11]() const */
void Lecturer::course_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0x50),*(long *)(in_RSI + 0x58) + *(long *)(in_RSI + 0x50));
return;
}
|
|
401 | Lecturer::course[abi:cxx11]() const | slashdotted[P]corsocpp_tp_2025/S9/Lecturer.cpp | std::string Lecturer::course() const
{
return m_course;
} | O3 | cpp | Lecturer::course[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x50(%rsi), %rax
movq 0x58(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1d80
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK8Lecturer6courseB5cxx11Ev:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+50h]
mov rdx, [rsi+58h]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * Lecturer::course[abi:cxx11](_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>((long long)a1, *(_BYTE **)(a2 + 80), *(_QWORD *)(a2 + 80) + *(_QWORD *)(a2 + 88));
return a1;
}
| course[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x50]
MOV RDX,qword ptr [RSI + 0x58]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00101d80
MOV RAX,RBX
POP RBX
RET
|
/* Lecturer::course[abi:cxx11]() const */
void Lecturer::course_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0x50),*(long *)(in_RSI + 0x58) + *(long *)(in_RSI + 0x50));
return;
}
|
|
402 | find_head | eloqsql/storage/maria/ma_bitmap.c | static my_bool find_head(MARIA_HA *info, uint length, uint position)
{
MARIA_FILE_BITMAP *bitmap= &info->s->bitmap;
MARIA_BITMAP_BLOCK *block;
/*
There is always place for the head block in bitmap_blocks as these are
preallocated at _ma_init_block_record().
*/
block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *);
if (info->s->base.extra_options & MA_EXTRA_OPTIONS_INSERT_ORDER)
{
if (bitmap->page != info->s->last_insert_bitmap &&
_ma_change_bitmap_page(info, bitmap,
info->s->last_insert_bitmap))
return 1;
/* Don't allocate any blocks from earlier pages */
info->s->state.first_bitmap_with_space= info->s->last_insert_bitmap;
}
/*
We need to have DIRENTRY_SIZE here to take into account that we may
need an extra directory entry for the row
*/
while (allocate_head(bitmap, length + DIR_ENTRY_SIZE, block))
if (move_to_next_bitmap(info, bitmap))
return 1;
return 0;
} | O0 | c | find_head:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x2c0(%rax), %rax
movl -0x18(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x428(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x43f7e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0xc30(%rcx), %rax
je 0x43f62
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xc30(%rax), %rdx
callq 0x44510
movsbl %al, %eax
cmpl $0x0, %eax
je 0x43f62
movb $0x1, -0x1(%rbp)
jmp 0x43fb4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xc30(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xd0(%rax)
jmp 0x43f80
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x4, %esi
movq -0x28(%rbp), %rdx
callq 0x45a70
cmpb $0x0, %al
je 0x43fb0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x45db0
cmpb $0x0, %al
je 0x43fae
movb $0x1, -0x1(%rbp)
jmp 0x43fb4
jmp 0x43f80
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| find_head:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
add rax, 0A10h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+2C0h]
mov ecx, [rbp+var_18]
imul rcx, 18h
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+428h]
and eax, 2
cmp eax, 0
jz short loc_43F7E
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
cmp rax, [rcx+0C30h]
jz short loc_43F62
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdx, [rax+0C30h]
call _ma_change_bitmap_page
movsx eax, al
cmp eax, 0
jz short loc_43F62
mov [rbp+var_1], 1
jmp short loc_43FB4
loc_43F62:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rax+0C30h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0D0h], rcx
loc_43F7E:
jmp short $+2
loc_43F80:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_14]
add esi, 4
mov rdx, [rbp+var_28]
call allocate_head
cmp al, 0
jz short loc_43FB0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call move_to_next_bitmap
cmp al, 0
jz short loc_43FAE
mov [rbp+var_1], 1
jmp short loc_43FB4
loc_43FAE:
jmp short loc_43F80
loc_43FB0:
mov [rbp+var_1], 0
loc_43FB4:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char find_head(_QWORD *a1, int a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *a1 + 2576LL;
v4 = 24LL * a3 + a1[88];
if ( (*(_DWORD *)(*a1 + 1064LL) & 2) != 0 )
{
if ( *(_QWORD *)(*a1 + 2592LL) == *(_QWORD *)(*a1 + 3120LL)
|| !(unsigned __int8)ma_change_bitmap_page(a1, v5, *(_QWORD *)(*a1 + 3120LL)) )
{
*(_QWORD *)(*a1 + 208LL) = *(_QWORD *)(*a1 + 3120LL);
goto LABEL_6;
}
return 1;
}
else
{
LABEL_6:
while ( (unsigned __int8)allocate_head(v5, (unsigned int)(a2 + 4), v4) )
{
if ( (unsigned __int8)move_to_next_bitmap(a1, v5) )
return 1;
}
return 0;
}
}
| find_head:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2c0]
MOV ECX,dword ptr [RBP + -0x18]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x428]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00143f7e
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0xc30]
JZ 0x00143f62
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0xc30]
CALL 0x00144510
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00143f62
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00143fb4
LAB_00143f62:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0xc30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xd0],RCX
LAB_00143f7e:
JMP 0x00143f80
LAB_00143f80:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x14]
ADD ESI,0x4
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00145a70
CMP AL,0x0
JZ 0x00143fb0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00145db0
CMP AL,0x0
JZ 0x00143fae
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00143fb4
LAB_00143fae:
JMP 0x00143f80
LAB_00143fb0:
MOV byte ptr [RBP + -0x1],0x0
LAB_00143fb4:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 find_head(long *param_1,int param_2,uint param_3)
{
long lVar1;
char cVar2;
long lVar3;
lVar3 = *param_1 + 0xa10;
lVar1 = param_1[0x58];
if ((*(uint *)(*param_1 + 0x428) & 2) != 0) {
if ((*(long *)(*param_1 + 0xa20) != *(long *)(*param_1 + 0xc30)) &&
(cVar2 = _ma_change_bitmap_page(param_1,lVar3,*(int8 *)(*param_1 + 0xc30)),
cVar2 != '\0')) {
return 1;
}
*(int8 *)(*param_1 + 0xd0) = *(int8 *)(*param_1 + 0xc30);
}
do {
cVar2 = allocate_head(lVar3,param_2 + 4,lVar1 + (ulong)param_3 * 0x18);
if (cVar2 == '\0') {
return 0;
}
cVar2 = move_to_next_bitmap(param_1,lVar3);
} while (cVar2 == '\0');
return 1;
}
|
|
403 | 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 0x4f91a
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x3b08c
cmpq $0x0, 0x30(%r12)
je 0x4f94a
addq $0x30, %r15
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4d696
leaq 0x50(%rsp), %rsi
movq %rsp, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4e412
movq %rsp, %rdi
callq 0x4e4f6
leaq 0x50(%rsp), %rdi
callq 0x3b31c
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %rbx
leaq 0x4eb40(%rip), %rsi # 0x9e46c
movq %rax, %rdi
callq 0x20280
movq 0x926ad(%rip), %rsi # 0xe1fe8
movq 0x9262e(%rip), %rdx # 0xe1f70
movq %rbx, %rdi
callq 0x20b30
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x2
popq %rdx
xorl %ecx, %ecx
callq 0x3b614
leaq 0x4ed97(%rip), %rsi # 0x9e707
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x30398
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x20aa0
xorl %ebp, %ebp
movq 0x92654(%rip), %rsi # 0xe1fe8
movq 0x925d5(%rip), %rdx # 0xe1f70
movq %rbx, %rdi
callq 0x20b30
movq %rax, %r14
movq %rsp, %rdi
callq 0x20d78
jmp 0x4f9b6
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0x20d78
testb %bpl, %bpl
jne 0x4f9ca
jmp 0x4f9f1
movq %rax, %r14
movq %rbx, %rdi
callq 0x20520
jmp 0x4f9f1
movq %rax, %r14
movq %rbx, %rdi
callq 0x20520
jmp 0x4f9fb
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e4f6
jmp 0x4f9f1
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x3b31c
movq %r14, %rdi
callq 0x20b90
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_4F91A
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_4F94A
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_4F91A:
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:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_4F94A:
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:lptinfo; 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_4F9B6
mov r14, rax
mov bpl, 1
loc_4F9B6:
lea rdi, [rsp+0C8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_4F9CA
jmp short loc_4F9F1
mov r14, rax
loc_4F9CA:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_4F9F1
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_4F9FB
mov r14, rax
mov rdi, rsp; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
jmp short loc_4F9F1
mov r14, rax
loc_4F9F1:
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_4F9FB:
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 0x0014f91a
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x50]
MOV RDI,R12
CALL 0x0013b08c
CMP qword ptr [R12 + 0x30],0x0
JZ 0x0014f94a
ADD R15,0x30
LAB_0014f8d4:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x0014d696
LAB_0014f8e2:
LEA RSI,[RSP + 0x50]
MOV RCX,RSP
MOV RDI,RBX
MOV RDX,R14
CALL 0x0014e412
LAB_0014f8f5:
MOV RDI,RSP
CALL 0x0014e4f6
LEA RDI,[RSP + 0x50]
CALL 0x0013b31c
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0014f91a:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV RBX,RAX
LAB_0014f925:
LEA RSI,[0x19e46c]
MOV RDI,RAX
CALL 0x00120280
LAB_0014f934:
MOV RSI,qword ptr [0x001e1fe8]
MOV RDX,qword ptr [0x001e1f70]
MOV RDI,RBX
CALL 0x00120b30
LAB_0014f94a:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV RBX,RAX
LAB_0014f955:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
PUSH 0x2
POP RDX
XOR ECX,ECX
CALL 0x0013b614
LAB_0014f969:
LEA RSI,[0x19e707]
MOV RDI,RSP
LEA RDX,[RSP + 0x30]
CALL 0x00130398
MOV BPL,0x1
LAB_0014f980:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00120aa0
XOR EBP,EBP
MOV RSI,qword ptr [0x001e1fe8]
MOV RDX,qword ptr [0x001e1f70]
MOV RDI,RBX
CALL 0x00120b30
|
/* 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 0014f925 to 0014f933 has its CatchHandler @ 0014f9d4 */
std::runtime_error::runtime_error(prVar1,"CallExpr.object is null");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70);
}
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 0014f8d4 to 0014f8e1 has its CatchHandler @ 0014f9ee */
ArgumentsExpression::evaluate(aAStack_c8,param_1 + 0x30);
/* try { // try from 0014f8e2 to 0014f8f4 has its CatchHandler @ 0014f9e1 */
Value::call((shared_ptr *)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 0014f955 to 0014f968 has its CatchHandler @ 0014f9c7 */
Value::dump_abi_cxx11_((int)local_98,SUB81(local_78,0));
/* try { // try from 0014f969 to 0014f97c has its CatchHandler @ 0014f9b0 */
std::operator+((char *)aAStack_c8,(string *)"Object is not callable: ");
/* try { // try from 0014f980 to 0014f9a2 has its CatchHandler @ 0014f9a3 */
std::runtime_error::runtime_error(prVar1,(string *)aAStack_c8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70);
}
|
|
404 | test_mopts7 | eloqsql/unittest/mysys/my_getopt-t.c | void test_mopts7()
{
int rc;
char **av= (char **)mopts7_argv;
rc= handle_options(&mopts7_argc, &av, mopts_options, &dummy_get_one_option);
ok( (rc == 0), "%s", "test_mopts7 call");
ok( (mopts_num == 1000000L), "%s", "test_mopts7 num");
ok( (strncmp(mopts_str, "ddd", 4) == 0), "%s", "test_mopts7 str");
ok( (mopts_bool == 0), "%s", "test_mopts7 bool");
} | O0 | c | test_mopts7:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1b34f1(%rip), %rax # 0x1d93b0
movq %rax, -0x10(%rbp)
leaq 0x1b34d6(%rip), %rdi # 0x1d93a0
leaq -0x10(%rbp), %rsi
leaq 0x1b313b(%rip), %rdx # 0x1d9010
leaq -0x76c(%rip), %rcx # 0x25770
callq 0x27640
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x60196(%rip), %rsi # 0x8608d
leaq 0x5c389(%rip), %rdx # 0x82287
movb $0x0, %al
callq 0x26ba0
cmpq $0xf4240, 0x36b420(%rip) # imm = 0xF4240
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x6016e(%rip), %rsi # 0x8608d
leaq 0x5c372(%rip), %rdx # 0x82298
movb $0x0, %al
callq 0x26ba0
movq 0x36b404(%rip), %rdi # 0x391338
leaq 0x5c172(%rip), %rsi # 0x820ad
movl $0x4, %edx
callq 0x25150
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x60136(%rip), %rsi # 0x8608d
leaq 0x5c34a(%rip), %rdx # 0x822a8
movb $0x0, %al
callq 0x26ba0
movsbl 0x36b3d4(%rip), %eax # 0x391340
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x6010f(%rip), %rsi # 0x8608d
leaq 0x5c333(%rip), %rdx # 0x822b8
movb $0x0, %al
callq 0x26ba0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_mopts7:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, mopts7_argv
mov [rbp+var_10], rax
lea rdi, mopts7_argc
lea rsi, [rbp+var_10]
lea rdx, mopts_options
lea rcx, dummy_get_one_option
call handle_options
mov [rbp+var_4], eax
cmp [rbp+var_4], 0
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts7Call; "test_mopts7 call"
mov al, 0
call ok
cmp cs:mopts_num, offset unk_F4240
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts7Num; "test_mopts7 num"
mov al, 0
call ok
mov rdi, cs:mopts_str
lea rsi, aDdd; "ddd"
mov edx, 4
call _strncmp
cmp eax, 0
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts7Str; "test_mopts7 str"
mov al, 0
call ok
movsx eax, cs:mopts_bool
cmp eax, 0
setz al
and al, 1
movzx edi, al
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aTestMopts7Bool; "test_mopts7 bool"
mov al, 0
call ok
add rsp, 10h
pop rbp
retn
| long long test_mopts7()
{
int v0; // ecx
int v1; // r8d
int v2; // r9d
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // eax
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // ecx
int v11; // r8d
int v12; // r9d
char **v14; // [rsp+0h] [rbp-10h] BYREF
int v15; // [rsp+Ch] [rbp-4h]
v14 = mopts7_argv;
v15 = handle_options(&mopts7_argc, &v14, &mopts_options, dummy_get_one_option);
ok(v15 == 0, (unsigned int)"%s", (unsigned int)"test_mopts7 call", v0, v1, v2, (char)v14);
ok(mopts_num == (_QWORD)&unk_F4240, (unsigned int)"%s", (unsigned int)"test_mopts7 num", v3, v4, v5, (char)v14);
v6 = strncmp(mopts_str, "ddd", 4LL);
ok(v6 == 0, (unsigned int)"%s", (unsigned int)"test_mopts7 str", v7, v8, v9, (char)v14);
return ok(mopts_bool == 0, (unsigned int)"%s", (unsigned int)"test_mopts7 bool", v10, v11, v12, (char)v14);
}
| test_mopts7:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x2d93b0]
MOV qword ptr [RBP + -0x10],RAX
LEA RDI,[0x2d93a0]
LEA RSI,[RBP + -0x10]
LEA RDX,[0x2d9010]
LEA RCX,[0x125770]
CALL 0x00127640
MOV dword ptr [RBP + -0x4],EAX
CMP dword ptr [RBP + -0x4],0x0
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x182287]
MOV AL,0x0
CALL 0x00126ba0
CMP qword ptr [0x00491330],0xf4240
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x182298]
MOV AL,0x0
CALL 0x00126ba0
MOV RDI,qword ptr [0x00491338]
LEA RSI,[0x1820ad]
MOV EDX,0x4
CALL 0x00125150
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x1822a8]
MOV AL,0x0
CALL 0x00126ba0
MOVSX EAX,byte ptr [0x00491340]
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EDI,AL
LEA RSI,[0x18608d]
LEA RDX,[0x1822b8]
MOV AL,0x0
CALL 0x00126ba0
ADD RSP,0x10
POP RBP
RET
|
void test_mopts7(void)
{
int iVar1;
int1 *local_18;
int local_c;
local_18 = mopts7_argv;
local_c = handle_options(&mopts7_argc,&local_18,mopts_options,dummy_get_one_option);
ok(local_c == 0,"%s","test_mopts7 call");
ok(mopts_num == 1000000,"%s","test_mopts7 num");
iVar1 = strncmp(mopts_str,"ddd",4);
ok(iVar1 == 0,"%s","test_mopts7 str");
ok(mopts_bool == '\0',"%s","test_mopts7 bool");
return;
}
|
|
405 | coro::detail::task_self_deleting coro::detail::make_when_any_tuple_controller_task<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, coro::task<int>, coro::task<double>, coro::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>(coro::event&, std::optional<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, coro::task<int>, coro::task<double>, coro::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>...) (.resume) | AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_any.hpp | [[nodiscard]] auto make_when_any_tuple_controller_task(
coro::event& notify, std::optional<return_type>& return_value, awaitable_type... awaitables)
-> coro::detail::task_self_deleting
{
coro::mutex m{};
std::atomic<bool> return_value_set{false};
co_await when_all(make_when_any_tuple_task(m, return_value_set, notify, return_value, std::move(awaitables))...);
co_return;
} | O3 | cpp | coro::detail::task_self_deleting coro::detail::make_when_any_tuple_controller_task<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, coro::task<int>, coro::task<double>, coro::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>(coro::event&, std::optional<std::variant<int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, coro::task<int>, coro::task<double>, coro::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>...) (.resume):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r13
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movl $0xa0, %edi
callq 0x171f0
movq %rax, %rbx
leaq -0x3172(%rip), %rax # 0x9dce8
movq %rax, (%rbx)
leaq -0x2e3f(%rip), %rax # 0x9e025
movq %rax, 0x8(%rbx)
leaq 0x10(%rbx), %rbp
movq %r12, 0x78(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rbx)
movq (%r15), %rax
movq %rax, %r12
movq %rax, 0x80(%rbx)
xorl %eax, %eax
movq %rax, (%r15)
movq (%r13), %r15
movq %r15, 0x88(%rbx)
movq %rax, (%r13)
movq (%r14), %r13
movq %r13, 0x90(%rbx)
movq %rax, (%r14)
movq %rbp, %rdi
callq 0xc8440
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc846a
movq %rbp, %rdi
callq 0xc8478
movb $0x0, 0x98(%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa0ee2
movq %rax, %r14
movq %rbp, %rdi
callq 0xc8448
jmp 0xa0ef2
movq %rax, %r14
testq %r13, %r13
je 0xa0efe
movq %r13, %rdi
callq *0x8(%r13)
testq %r15, %r15
je 0xa0f0a
movq %r15, %rdi
callq *0x8(%r15)
testq %r12, %r12
je 0xa0f17
movq %r12, %rdi
callq *0x8(%r12)
movl $0xa0, %esi
movq %rbx, %rdi
callq 0x17150
movq %r14, %rdi
callq 0x17740
jmp 0xa0f30
jmp 0xa0f30
movq %rax, %rdi
callq 0x1f2c3
| _ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, r9
mov r13, r8
mov r15, rcx
mov r12, rdx
mov [rsp+48h+var_38], rsi
mov [rsp+48h+var_40], rdi
mov edi, 0A0h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
lea rax, _ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0__resume
mov [rbx], rax
lea rax, _ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0__destroy
mov [rbx+8], rax
lea rbp, [rbx+10h]
mov [rbx+78h], r12
mov rax, [rsp+48h+var_38]
mov [rbx+70h], rax
mov rax, [r15]
mov r12, rax
mov [rbx+80h], rax
xor eax, eax
mov [r15], rax
mov r15, [r13+0]
mov [rbx+88h], r15
mov [r13+0], rax
mov r13, [r14]
mov [rbx+90h], r13
mov [r14], rax
mov rdi, rbp; this
call _ZN4coro6detail21promise_self_deletingC2Ev; coro::detail::promise_self_deleting::promise_self_deleting(void)
mov r14, [rsp+48h+var_40]
mov rdi, r14; this
mov rsi, rbp
call _ZN4coro6detail21promise_self_deleting17get_return_objectEv; coro::detail::promise_self_deleting::get_return_object(void)
mov rdi, rbp; this
call _ZN4coro6detail21promise_self_deleting15initial_suspendEv; coro::detail::promise_self_deleting::initial_suspend(void)
mov byte ptr [rbx+98h], 0
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_A0EE2:
mov r14, rax
mov rdi, rbp; this
call _ZN4coro6detail21promise_self_deletingD2Ev; coro::detail::promise_self_deleting::~promise_self_deleting()
jmp short loc_A0EF2
mov r14, rax
loc_A0EF2:
test r13, r13
jz short loc_A0EFE
mov rdi, r13
call qword ptr [r13+8]
loc_A0EFE:
test r15, r15
jz short loc_A0F0A
mov rdi, r15
call qword ptr [r15+8]
loc_A0F0A:
test r12, r12
jz short loc_A0F17
mov rdi, r12
call qword ptr [r12+8]
loc_A0F17:
mov esi, 0A0h; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
jmp short loc_A0F30
jmp short $+2
loc_A0F30:
mov rdi, rax
call __clang_call_terminate
| coro::detail::promise_self_deleting * ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0_(
coro::detail::promise_self_deleting *a1,
long long a2,
long long a3,
_QWORD *a4,
_QWORD *a5,
_QWORD *a6)
{
long long v10; // rbx
v10 = operator new(0xA0uLL);
*(_QWORD *)v10 = ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0__resume;
*(_QWORD *)(v10 + 8) = ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0__destroy;
*(_QWORD *)(v10 + 120) = a3;
*(_QWORD *)(v10 + 112) = a2;
*(_QWORD *)(v10 + 128) = *a4;
*a4 = 0LL;
*(_QWORD *)(v10 + 136) = *a5;
*a5 = 0LL;
*(_QWORD *)(v10 + 144) = *a6;
*a6 = 0LL;
coro::detail::promise_self_deleting::promise_self_deleting((coro::detail::promise_self_deleting *)(v10 + 16));
coro::detail::promise_self_deleting::get_return_object(a1);
coro::detail::promise_self_deleting::initial_suspend((coro::detail::promise_self_deleting *)(v10 + 16));
*(_BYTE *)(v10 + 152) = 0;
return a1;
}
| _ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R9
MOV R13,R8
MOV R15,RCX
MOV R12,RDX
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
MOV EDI,0xa0
CALL 0x001171f0
MOV RBX,RAX
LEA RAX,[0x19dce8]
MOV qword ptr [RBX],RAX
LEA RAX,[0x19e025]
MOV qword ptr [RBX + 0x8],RAX
LEA RBP,[RBX + 0x10]
MOV qword ptr [RBX + 0x78],R12
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x70],RAX
MOV RAX,qword ptr [R15]
MOV R12,RAX
MOV qword ptr [RBX + 0x80],RAX
XOR EAX,EAX
MOV qword ptr [R15],RAX
MOV R15,qword ptr [R13]
MOV qword ptr [RBX + 0x88],R15
MOV qword ptr [R13],RAX
MOV R13,qword ptr [R14]
MOV qword ptr [RBX + 0x90],R13
MOV qword ptr [R14],RAX
LAB_001a0ea7:
MOV RDI,RBP
CALL 0x001c8440
LAB_001a0eaf:
MOV R14,qword ptr [RSP + 0x8]
MOV RDI,R14
MOV RSI,RBP
CALL 0x001c846a
LAB_001a0ebf:
MOV RDI,RBP
CALL 0x001c8478
MOV byte ptr [RBX + 0x98],0x0
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0_
(int8 param_1,int8 param_2,int8 param_3,int8 *param_4,
int8 *param_5,int8 *param_6)
{
int8 *puVar1;
puVar1 = (int8 *)operator_new(0xa0);
*puVar1 =
_ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0__resume
;
puVar1[1] =
_ZN4coro6detail35make_when_any_tuple_controller_taskISt7variantIJidNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEETpTkNS_8concepts9awaitableEJNS_4taskIiEENSB_IdEENSB_IS8_EEEEENS0_18task_self_deletingERNS_5eventERSt8optionalIT_EDpT0__destroy
;
puVar1[0xf] = param_3;
puVar1[0xe] = param_2;
puVar1[0x10] = *param_4;
*param_4 = 0;
puVar1[0x11] = *param_5;
*param_5 = 0;
puVar1[0x12] = *param_6;
*param_6 = 0;
/* try { // try from 001a0ea7 to 001a0eae has its CatchHandler @ 001a0eef */
coro::detail::promise_self_deleting::promise_self_deleting((promise_self_deleting *)(puVar1 + 2));
/* try { // try from 001a0eaf to 001a0ebe has its CatchHandler @ 001a0ee2 */
coro::detail::promise_self_deleting::get_return_object();
/* try { // try from 001a0ebf to 001a0ec6 has its CatchHandler @ 001a0ee0 */
coro::detail::promise_self_deleting::initial_suspend();
*(int1 *)(puVar1 + 0x13) = 0;
return param_1;
}
|
|
406 | inline_mysql_file_read | eloqsql/include/mysql/psi/mysql_file.h | static inline size_t
inline_mysql_file_read(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, uchar *buffer, size_t count, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_read;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_read(file, buffer, count, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_read= (result == 0) ? count : 0;
else
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
return result;
}
#endif
result= my_read(file, buffer, count, flags);
return result;
} | O0 | c | inline_mysql_file_read:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x1cd868(%rip), %rax # 0x2394a0
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x6, %edx
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 0x6bd47
leaq 0x1cd81e(%rip), %rax # 0x2394a0
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x816d0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x6bcf2
cmpq $0x0, -0x38(%rbp)
jne 0x6bcd7
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x6bce2
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x6bce2
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x6bd1f
cmpq $-0x1, -0x38(%rbp)
je 0x6bd06
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x6bd11
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x6bd11
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x1cd77a(%rip), %rax # 0x2394a0
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6bd67
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x816d0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_read_2:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 6
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 loc_6BD47
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_read
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
and rax, 6
cmp rax, 0
jz short loc_6BCF2
cmp [rbp+var_38], 0
jnz short loc_6BCD7
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_6BCE2
loc_6BCD7:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_6BCE2:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_6BD1F
loc_6BCF2:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_6BD06
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_6BD11
loc_6BD06:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_6BD11:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_6BD1F:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_6BD67
loc_6BD47:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_read
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_6BD67:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| long long inline_mysql_file_read_2(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // [rsp+0h] [rbp-A0h]
long long v8; // [rsp+8h] [rbp-98h]
_BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF
long long v10; // [rsp+60h] [rbp-40h]
long long v11; // [rsp+68h] [rbp-38h]
long long v12; // [rsp+70h] [rbp-30h]
long long v13; // [rsp+78h] [rbp-28h]
long long v14; // [rsp+80h] [rbp-20h]
unsigned int v15; // [rsp+88h] [rbp-18h]
unsigned int v16; // [rsp+8Ch] [rbp-14h]
long long v17; // [rsp+90h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v12 = a6;
v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 6LL);
if ( v10 )
{
((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16);
v11 = my_read(v15, v14, v13, v12);
if ( (v12 & 6) != 0 )
{
if ( v11 )
v8 = 0LL;
else
v8 = v13;
((void ( *)(long long, long long))PSI_server[67])(v10, v8);
}
else
{
if ( v11 == -1 )
v7 = 0LL;
else
v7 = v11;
((void ( *)(long long, long long))PSI_server[67])(v10, v7);
}
return v11;
}
else
{
return my_read(v15, v14, v13, v12);
}
}
| inline_mysql_file_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3394a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x6
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 0x0016bd47
LEA RAX,[0x3394a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001816d0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x6
CMP RAX,0x0
JZ 0x0016bcf2
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0016bcd7
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0016bce2
LAB_0016bcd7:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0016bce2
LAB_0016bce2:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0016bd1f
LAB_0016bcf2:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x0016bd06
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0016bd11
LAB_0016bd06:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0016bd11
LAB_0016bd11:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_0016bd1f:
LEA RAX,[0x3394a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0016bd67
LAB_0016bd47:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001816d0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_0016bd67:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_read
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,ulong param_6)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
ulong local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6);
if (local_48 == 0) {
local_10 = my_read(local_20,local_28,local_30,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_read(local_20,local_28,local_30,local_38);
if ((local_38 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
|
|
407 | minja::Parser::parseVarNames[abi:cxx11]() | monkey531[P]llama/common/minja.hpp | std::vector<std::string> parseVarNames() {
static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)");
std::vector<std::string> group;
if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names");
std::vector<std::string> varnames;
std::istringstream iss(group[1]);
std::string varname;
while (std::getline(iss, varname, ',')) {
varnames.push_back(strip(varname));
}
return varnames;
} | O3 | cpp | minja::Parser::parseVarNames[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp # imm = 0x1E8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x84e7a(%rip), %rax # 0xed170
movb (%rax), %al
testb %al, %al
je 0x68465
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x84e39(%rip), %rdx # 0xed150
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x67c96
leaq 0x20(%rsp), %r14
movaps (%r14), %xmm0
movaps %xmm0, (%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x60(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movaps %xmm0, (%r14)
movq %rax, 0x10(%r14)
callq 0x275ec
movq (%rsp), %r15
movq 0x8(%rsp), %r12
movq %r14, %rdi
callq 0x275ec
cmpq %r12, %r15
je 0x684bc
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq (%rsp), %rsi
addq $0x20, %rsi
leaq 0x60(%rsp), %rdi
movl $0x8, %edx
callq 0x19b20
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x50(%rsp), %rbp
leaq 0x60(%rsp), %r14
leaq 0x20(%rsp), %r15
leaq 0x40(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movl $0x2c, %edx
callq 0x19c90
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x68413
movq %r12, %rdi
movq %r15, %rsi
callq 0x5c8bf
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4cfc4
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x683c6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x683c6
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x6842a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x196b0
movq 0x83b2f(%rip), %rsi # 0xebf60
leaq 0x60(%rsp), %rdi
callq 0x199b0
leaq 0xd8(%rsp), %rdi
callq 0x19200
movq %rsp, %rdi
callq 0x275ec
movq %rbx, %rax
addq $0x1e8, %rsp # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x84d04(%rip), %rdi # 0xed170
callq 0x19c30
testl %eax, %eax
je 0x68300
leaq 0x84cd0(%rip), %rdi # 0xed150
leaq 0x536f4(%rip), %rsi # 0xbbb7b
movl $0x10, %edx
callq 0x35ade
leaq -0x32952(%rip), %rdi # 0x35b46
leaq 0x84cb1(%rip), %rsi # 0xed150
leaq 0x84222(%rip), %rdx # 0xec6c8
callq 0x195e0
leaq 0x84cbe(%rip), %rdi # 0xed170
callq 0x19460
jmp 0x68300
movl $0x10, %edi
callq 0x19370
movq %rax, %rbx
leaq 0x536dd(%rip), %rsi # 0xbbbad
movq %rax, %rdi
callq 0x19270
movq 0x83b09(%rip), %rsi # 0xebfe8
movq 0x83a82(%rip), %rdx # 0xebf68
movq %rbx, %rdi
callq 0x19b70
movq %rax, %r14
leaq 0x84c78(%rip), %rdi # 0xed170
callq 0x19450
jmp 0x6857e
jmp 0x68513
movq %rax, %r14
movq %rbx, %rdi
callq 0x19510
jmp 0x68576
movq %rax, %r14
jmp 0x6856e
movq %rax, %r14
jmp 0x68576
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x68539
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x68539
jmp 0x68536
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x68550
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x196b0
movq 0x83a09(%rip), %rsi # 0xebf60
leaq 0x60(%rsp), %rdi
callq 0x199b0
leaq 0xd8(%rsp), %rdi
callq 0x19200
movq %rbx, %rdi
callq 0x275ec
movq %rsp, %rdi
callq 0x275ec
movq %r14, %rdi
callq 0x19be0
| _ZN5minja6Parser13parseVarNamesB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1E8h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex
mov al, [rax]
test al, al
jz loc_68465
loc_68300:
xorps xmm0, xmm0
movaps xmmword ptr [rsp+218h+var_218], xmm0; int
mov qword ptr [rsp+218h+var_208], 0; int
lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; int
lea rdi, [rsp+218h+var_1F8]; int
mov rsi, r14; int
mov ecx, 1; int
call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea r14, [rsp+218h+var_1F8]
movaps xmm0, xmmword ptr [r14]
movaps xmmword ptr [rsp+218h+var_218], xmm0
mov rax, [r14+10h]
mov qword ptr [rsp+218h+var_208], rax
lea rdi, [rsp+218h+var_1B8]
xorps xmm0, xmm0
movaps xmmword ptr [rdi], xmm0
xor eax, eax
mov [rdi+10h], rax
movaps xmmword ptr [r14], xmm0
mov [r14+10h], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov r15, qword ptr [rsp+218h+var_218]
mov r12, qword ptr [rsp+218h+var_218+8]
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
cmp r15, r12
jz loc_684BC
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov rsi, qword ptr [rsp+218h+var_218]
add rsi, 20h ; ' '
lea rdi, [rsp+218h+var_1B8]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea r13, [rsp+218h+var_1E8]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
lea rbp, [rsp+218h+var_1C8]
lea r14, [rsp+218h+var_1B8]
lea r15, [rsp+218h+var_1F8]
lea r12, [rsp+218h+var_1D8]
loc_683C6:
mov rdi, r14
mov rsi, r15
mov edx, 2Ch ; ','
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_68413
mov rdi, r12
mov rsi, r15
call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&)
mov rdi, rbx
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+218h+var_1D8]; void *
cmp rdi, rbp
jz short loc_683C6
mov rsi, [rsp+218h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_683C6
loc_68413:
mov rdi, [rsp+218h+var_1F8]; void *
cmp rdi, r13
jz short loc_6842A
mov rsi, [rsp+218h+var_1E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6842A:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+218h+var_140]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 1E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_68465:
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_68300
lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex
lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"...
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_68300
loc_684BC:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aExpectedVariab; "Expected variable names"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_6857E
jmp short loc_68513
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_68576
mov r14, rax
jmp short loc_6856E
loc_68513:
mov r14, rax
jmp short loc_68576
mov r14, rax
mov rdi, [rsp+218h+var_1D8]; void *
cmp rdi, rbp
jz short loc_68539
mov rsi, [rsp+218h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_68539
jmp short $+2
loc_68536:
mov r14, rax
loc_68539:
mov rdi, [rsp+218h+var_1F8]; void *
cmp rdi, r13
jz short loc_68550
mov rsi, [rsp+218h+var_1E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_68550:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1B8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+218h+var_140]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_6856E:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_68576:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_6857E:
mov rdi, r14
call __Unwind_Resume
| long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2)
{
_QWORD *v2; // rax
std::runtime_error *exception; // rbx
int v5[4]; // [rsp+0h] [rbp-218h] BYREF
int v6[2]; // [rsp+10h] [rbp-208h]
__int128 v7; // [rsp+20h] [rbp-1F8h] BYREF
_QWORD v8[2]; // [rsp+30h] [rbp-1E8h] BYREF
void *v9[2]; // [rsp+40h] [rbp-1D8h] BYREF
long long v10; // [rsp+50h] [rbp-1C8h] BYREF
__int128 v11; // [rsp+60h] [rbp-1B8h] BYREF
long long v12; // [rsp+70h] [rbp-1A8h]
_BYTE v13[320]; // [rsp+D8h] [rbp-140h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
(long long)"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]);
}
minja::Parser::consumeTokenGroups(
(long long)&v7,
a2,
(long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
1u);
*(_OWORD *)v5 = v7;
*(_QWORD *)v6 = v8[0];
v11 = 0LL;
v12 = 0LL;
v7 = 0LL;
v8[0] = 0LL;
std::vector<std::string>::~vector((long long)&v11);
std::vector<std::string>::~vector((long long)&v7);
if ( *(_QWORD *)v5 == *(_QWORD *)&v5[2] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected variable names");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::istringstream::basic_istringstream(&v11, *(_QWORD *)v5 + 32LL, 8LL);
*(_QWORD *)&v7 = v8;
*((_QWORD *)&v7 + 1) = 0LL;
LOBYTE(v8[0]) = 0;
while ( 1 )
{
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v11, &v7, 44LL);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
minja::strip(v9, (long long)&v7);
std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9);
if ( v9[0] != &v10 )
operator delete(v9[0], v10 + 1);
}
if ( (_QWORD *)v7 != v8 )
operator delete((void *)v7, v8[0] + 1LL);
std::istringstream::~istringstream(&v11, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v13);
std::vector<std::string>::~vector((long long)v5);
return a1;
}
| parseVarNames[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1e8
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x1ed170]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00168465
LAB_00168300:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
LAB_00168310:
LEA RDX,[0x1ed150]
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00167c96
LEA R14,[RSP + 0x20]
MOVAPS XMM0,xmmword ptr [R14]
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x60]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RDI],XMM0
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],RAX
CALL 0x001275ec
MOV R15,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
MOV RDI,R14
CALL 0x001275ec
CMP R15,R12
JZ 0x001684bc
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [RSP]
ADD RSI,0x20
LAB_0016838d:
LEA RDI,[RSP + 0x60]
MOV EDX,0x8
CALL 0x00119b20
LEA R13,[RSP + 0x30]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
LEA RBP,[RSP + 0x50]
LEA R14,[RSP + 0x60]
LEA R15,[RSP + 0x20]
LEA R12,[RSP + 0x40]
LAB_001683c6:
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x2c
CALL 0x00119c90
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00168413
LAB_001683e4:
MOV RDI,R12
MOV RSI,R15
CALL 0x0015c8bf
LAB_001683ef:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0014cfc4
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,RBP
JZ 0x001683c6
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x001196b0
JMP 0x001683c6
LAB_00168413:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x0016842a
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001196b0
LAB_0016842a:
MOV RSI,qword ptr [0x001ebf60]
LEA RDI,[RSP + 0x60]
CALL 0x001199b0
LEA RDI,[RSP + 0xd8]
CALL 0x00119200
MOV RDI,RSP
CALL 0x001275ec
MOV RAX,RBX
ADD RSP,0x1e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00168465:
LEA RDI,[0x1ed170]
CALL 0x00119c30
TEST EAX,EAX
JZ 0x00168300
LAB_00168479:
LEA RDI,[0x1ed150]
LEA RSI,[0x1bbb7b]
MOV EDX,0x10
CALL 0x00135ade
LAB_00168491:
LEA RDI,[0x135b46]
LEA RSI,[0x1ed150]
LEA RDX,[0x1ec6c8]
CALL 0x001195e0
LEA RDI,[0x1ed170]
CALL 0x00119460
JMP 0x00168300
LAB_001684bc:
MOV EDI,0x10
CALL 0x00119370
MOV RBX,RAX
LAB_001684c9:
LEA RSI,[0x1bbbad]
MOV RDI,RAX
CALL 0x00119270
LAB_001684d8:
MOV RSI,qword ptr [0x001ebfe8]
MOV RDX,qword ptr [0x001ebf68]
MOV RDI,RBX
CALL 0x00119b70
|
/* minja::Parser::parseVarNames[abi:cxx11]() */
void minja::Parser::parseVarNames_abi_cxx11_(void)
{
ulong *puVar1;
ulong *puVar2;
int iVar3;
istream *piVar4;
runtime_error *this;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI;
ulong *local_218;
ulong *puStack_210;
ulong local_208;
ulong *local_1f8;
ulong *puStack_1f0;
ulong local_1e8 [2];
long *local_1d8 [2];
long local_1c8 [2];
int8 local_1b8;
int8 uStack_1b0;
int8 local_1a8;
ios_base local_140 [272];
if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 00168479 to 00168490 has its CatchHandler @ 001684ee */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,
"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_);
}
}
local_218 = (ulong *)0x0;
puStack_210 = (ulong *)0x0;
local_208 = 0;
/* try { // try from 00168310 to 00168328 has its CatchHandler @ 00168513 */
consumeTokenGroups(&local_1f8);
local_218 = local_1f8;
puStack_210 = puStack_1f0;
local_208 = local_1e8[0];
local_1b8 = 0;
uStack_1b0 = 0;
local_1a8 = 0;
local_1f8 = (ulong *)0x0;
puStack_1f0 = (ulong *)0x0;
local_1e8[0] = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1b8);
puVar2 = puStack_210;
puVar1 = local_218;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1f8);
if (puVar1 != puVar2) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
/* try { // try from 0016838d to 0016839b has its CatchHandler @ 0016850e */
std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,local_218 + 4,8);
puStack_1f0 = (ulong *)0x0;
local_1e8[0] = local_1e8[0] & 0xffffffffffffff00;
local_1f8 = local_1e8;
while( true ) {
/* try { // try from 001683c6 to 001683d5 has its CatchHandler @ 00168536 */
piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)&local_1b8,(string *)&local_1f8,',');
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break;
/* try { // try from 001683e4 to 001683ee has its CatchHandler @ 00168534 */
strip((minja *)local_1d8,(string *)&local_1f8);
/* try { // try from 001683ef to 001683f9 has its CatchHandler @ 00168518 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1d8);
if (local_1d8[0] != local_1c8) {
operator_delete(local_1d8[0],local_1c8[0] + 1);
}
}
if (local_1f8 != local_1e8) {
operator_delete(local_1f8,local_1e8[0] + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8);
std::ios_base::~ios_base(local_140);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_218);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001684c9 to 001684d7 has its CatchHandler @ 00168501 */
std::runtime_error::runtime_error(this,"Expected variable names");
/* try { // try from 001684d8 to 001684ed has its CatchHandler @ 001684ff */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001ebfe8,PTR__runtime_error_001ebf68);
}
|
|
408 | my_hash_first | eloqsql/mysys/hash.c | uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
uchar *res;
DBUG_ASSERT(my_hash_inited(hash));
res= my_hash_first_from_hash_value(hash,
hash->hash_function(hash->charset, key,
length ? length :
hash->key_length),
key, length, current_record);
return res;
} | O3 | c | my_hash_first:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x58(%rdi), %rax
movq 0x68(%rdi), %rdi
movq %rdx, %r12
testq %rdx, %rdx
jne 0x93cec
movq 0x8(%r15), %rdx
xorl %r12d, %r12d
movq %r14, %rsi
callq *%rax
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x93d23
| my_hash_first:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rcx
mov r14, rsi
mov r15, rdi
mov rax, [rdi+58h]
mov rdi, [rdi+68h]
mov r12, rdx
test rdx, rdx
jnz short loc_93CEC
mov rdx, [r15+8]
xor r12d, r12d
loc_93CEC:
mov rsi, r14
call rax
mov rdi, r15
mov esi, eax
mov rdx, r14
mov rcx, r12
mov r8, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp my_hash_first_from_hash_value
| long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4)
{
long long ( *v6)(long long, long long, long long); // rax
long long v7; // rdi
long long v8; // r12
unsigned int v9; // eax
v6 = (long long ( *)(long long, long long, long long))a1[11];
v7 = a1[13];
v8 = a3;
if ( !a3 )
{
a3 = a1[1];
v8 = 0LL;
}
v9 = v6(v7, a2, a3);
return my_hash_first_from_hash_value(a1, v9, a2, v8, a4);
}
| my_hash_first:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x58]
MOV RDI,qword ptr [RDI + 0x68]
MOV R12,RDX
TEST RDX,RDX
JNZ 0x00193cec
MOV RDX,qword ptr [R15 + 0x8]
XOR R12D,R12D
LAB_00193cec:
MOV RSI,R14
CALL RAX
MOV RDI,R15
MOV ESI,EAX
MOV RDX,R14
MOV RCX,R12
MOV R8,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00193d23
|
void my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4)
{
int4 uVar1;
long lVar2;
lVar2 = param_3;
if (param_3 == 0) {
param_3 = *(long *)(param_1 + 8);
lVar2 = 0;
}
uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,param_3);
my_hash_first_from_hash_value(param_1,uVar1,param_2,lVar2,param_4);
return;
}
|
|
409 | SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _visit_pattern(const std::string & pattern, const std::string & name) {
if (!(pattern.front() == '^' && pattern.back() == '$')) {
_errors.push_back("Pattern must start with '^' and end with '$'");
return "";
}
std::string sub_pattern = pattern.substr(1, pattern.length() - 2);
std::unordered_map<std::string, std::string> sub_rule_ids;
size_t i = 0;
size_t length = sub_pattern.length();
using literal_or_rule = std::pair<std::string, bool>;
auto to_rule = [&](const literal_or_rule & ls) {
auto is_literal = ls.second;
auto s = ls.first;
return is_literal ? "\"" + s + "\"" : s;
};
std::function<literal_or_rule()> transform = [&]() -> literal_or_rule {
size_t start = i;
std::vector<literal_or_rule> seq;
auto get_dot = [&]() {
std::string rule;
if (_dotall) {
rule = "[\\U00000000-\\U0010FFFF]";
} else {
rule = "[^\\x0A\\x0D]";
}
return _add_rule("dot", rule);
};
// Joins the sequence, merging consecutive literals together.
auto join_seq = [&]() {
std::vector<literal_or_rule> ret;
std::string literal;
auto flush_literal = [&]() {
if (literal.empty()) {
return false;
}
ret.emplace_back(literal, true);
literal.clear();
return true;
};
for (const auto & item : seq) {
auto is_literal = item.second;
if (is_literal) {
literal += item.first;
} else {
flush_literal();
ret.push_back(item);
}
}
flush_literal();
std::vector<std::string> results;
for (const auto & item : ret) {
results.push_back(to_rule(item));
}
return std::make_pair(string_join(results, " "), false);
};
while (i < length) {
char c = sub_pattern[i];
if (c == '.') {
seq.emplace_back(get_dot(), false);
i++;
} else if (c == '(') {
i++;
if (i < length) {
if (sub_pattern[i] == '?') {
_warnings.push_back("Unsupported pattern syntax");
}
}
seq.emplace_back("(" + to_rule(transform()) + ")", false);
} else if (c == ')') {
i++;
if (start > 0 && sub_pattern[start - 1] != '(') {
_errors.push_back("Unbalanced parentheses");
}
return join_seq();
} else if (c == '[') {
std::string square_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != ']') {
if (sub_pattern[i] == '\\') {
square_brackets += sub_pattern.substr(i, 2);
i += 2;
} else {
square_brackets += sub_pattern[i];
i++;
}
}
if (i >= length) {
_errors.push_back("Unbalanced square brackets");
}
square_brackets += ']';
i++;
seq.emplace_back(square_brackets, false);
} else if (c == '|') {
seq.emplace_back("|", false);
i++;
} else if (c == '*' || c == '+' || c == '?') {
seq.back() = std::make_pair(to_rule(seq.back()) + c, false);
i++;
} else if (c == '{') {
std::string curly_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != '}') {
curly_brackets += sub_pattern[i];
i++;
}
if (i >= length) {
_errors.push_back("Unbalanced curly brackets");
}
curly_brackets += '}';
i++;
auto nums = string_split(curly_brackets.substr(1, curly_brackets.length() - 2), ",");
int min_times = 0;
int max_times = std::numeric_limits<int>::max();
try {
if (nums.size() == 1) {
min_times = max_times = std::stoi(nums[0]);
} else if (nums.size() != 2) {
_errors.push_back("Wrong number of values in curly brackets");
} else {
if (!nums[0].empty()) {
min_times = std::stoi(nums[0]);
}
if (!nums[1].empty()) {
max_times = std::stoi(nums[1]);
}
}
} catch (const std::invalid_argument & e) {
_errors.push_back("Invalid number in curly brackets");
return std::make_pair("", false);
}
auto &last = seq.back();
auto &sub = last.first;
auto sub_is_literal = last.second;
if (!sub_is_literal) {
std::string & sub_id = sub_rule_ids[sub];
if (sub_id.empty()) {
sub_id = _add_rule(name + "-" + std::to_string(sub_rule_ids.size()), sub);
}
sub = sub_id;
}
seq.back().first = build_repetition(
sub_is_literal ? "\"" + sub + "\"" : sub,
min_times,
max_times,
""
);
seq.back().second = false;
} else {
std::string literal;
auto is_non_literal = [&](char c) {
return NON_LITERAL_SET.find(c) != NON_LITERAL_SET.end();
};
while (i < length) {
if (sub_pattern[i] == '\\' && i < length - 1) {
char next = sub_pattern[i + 1];
if (ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.find(next) != ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.end()) {
i++;
literal += sub_pattern[i];
i++;
} else {
literal += sub_pattern.substr(i, 2);
i += 2;
}
} else if (sub_pattern[i] == '"') {
literal += "\\\"";
i++;
} else if (!is_non_literal(sub_pattern[i]) &&
(i == length - 1 || literal.empty() || sub_pattern[i + 1] == '.' || !is_non_literal(sub_pattern[i + 1]))) {
literal += sub_pattern[i];
i++;
} else {
break;
}
}
if (!literal.empty()) {
seq.emplace_back(literal, true);
}
}
}
return join_seq();
};
return _add_rule(name, "\"\\\"\" (" + to_rule(transform()) + ") \"\\\"\" space");
} | O2 | cpp | SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rax
cmpb $0x5e, (%rax)
jne 0x914dc
movq %rcx, %r15
movq 0x8(%rdx), %rcx
cmpb $0x24, -0x1(%rax,%rcx)
jne 0x914dc
addq $-0x2, %rcx
leaq 0xe0(%rsp), %r12
pushq $0x1
popq %rax
movq %r12, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x23960
leaq 0x130(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
leaq 0xd8(%rsp), %rcx
andq $0x0, (%rcx)
movups %xmm0, -0x8(%rax)
movq 0x8(%r12), %rax
leaq 0xd0(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %r14, 0x8(%rsi)
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rsi)
movq %rdx, 0x18(%rsi)
movq %r12, 0x20(%rsi)
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsi)
leaq 0x100(%rsp), %rax
movq %rax, 0x30(%rsi)
movq %r15, 0x38(%rsi)
callq 0x93f2e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x94014
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x93f76
leaq 0x275db(%rip), %rsi # 0xb8a25
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x58626
leaq 0x275cc(%rip), %rdx # 0xb8a2c
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x38428
leaq 0x90(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8e294
leaq 0x90(%rsp), %rdi
callq 0x24208
leaq 0x70(%rsp), %rdi
callq 0x24208
leaq 0x50(%rsp), %rdi
callq 0x24208
leaq 0x10(%rsp), %rdi
callq 0x24208
leaq 0xb0(%rsp), %rdi
callq 0x47c98
leaq 0x100(%rsp), %rdi
callq 0x93ac0
leaq 0xe0(%rsp), %rdi
callq 0x24208
jmp 0x91527
leaq 0x27515(%rip), %rsi # 0xb89f8
leaq 0x10(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x275c8
addq $0xc8, %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3ac96
leaq 0x10(%rsp), %rdi
callq 0x24208
leaq 0x18e67(%rip), %rsi # 0xaa381
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x275c8
movq %rbx, %rax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x24208
jmp 0x9154e
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x24208
jmp 0x9155d
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x24208
jmp 0x9156c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x24208
jmp 0x9157b
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x47c98
leaq 0x100(%rsp), %rdi
callq 0x93ac0
leaq 0xe0(%rsp), %rdi
jmp 0x915ac
movq %rax, %rbx
jmp 0x91588
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x24208
jmp 0x915b6
movq %rax, %rbx
movq %rbx, %rdi
callq 0x23fd0
| _ZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push r15
push r14
push r12
push rbx
sub rsp, 138h
mov r14, rsi
mov rbx, rdi
mov rax, [rdx]
cmp byte ptr [rax], 5Eh ; '^'
jnz loc_914DC
mov r15, rcx
mov rcx, [rdx+8]
cmp byte ptr [rax+rcx-1], 24h ; '$'
jnz loc_914DC
add rcx, 0FFFFFFFFFFFFFFFEh
lea r12, [rsp+158h+var_78]
push 1
pop rax
mov rdi, r12
mov rsi, rdx
mov rdx, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rax, [rsp+158h+var_28]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
lea rcx, [rsp+158h+var_80]
and qword ptr [rcx], 0
movups xmmword ptr [rax-8], xmm0
mov rax, [r12+8]
lea rdx, [rsp+158h+var_88]
mov [rdx], rax
lea rsi, [rsp+158h+var_148]
mov [rsi], rcx
mov [rsi+8], r14
lea rax, [rsp+158h+var_149]
mov [rsi+10h], rax
mov [rsi+18h], rdx
mov [rsi+20h], r12
lea rdi, [rsp+158h+var_A8]
mov [rsi+28h], rdi
lea rax, [rsp+158h+var_58]
mov [rsi+30h], rax
mov [rsi+38h], r15
call _ZNSt8functionIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEEC2IZN15SchemaConverter14_visit_patternERKS6_SD_EUlvE_vEEOT_; std::function<std::pair<std::string,bool> ()(void)>::function<SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1},void>(SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1} &&)
lea rdi, [rsp+158h+var_148]
lea rsi, [rsp+158h+var_A8]
call _ZNKSt8functionIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEEclEv; std::function<std::pair<std::string,bool> ()(void)>::operator()(void)
lea rdi, [rsp+158h+var_108]
lea rsi, [rsp+158h+var_149]
lea rdx, [rsp+158h+var_148]
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlRKSt4pairIS5_bEE_clB5cxx11ESB_; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()(std::pair<std::string,bool> const&)
lea rsi, asc_B8A25; "\"\\\"\" ("
lea rdi, [rsp+158h+var_E8]
lea rdx, [rsp+158h+var_108]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdx, aSpace; ") \"\\\"\" space"
lea rdi, [rsp+158h+var_C8]
lea rsi, [rsp+158h+var_E8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rcx, [rsp+158h+var_C8]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
lea rdi, [rsp+158h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_108]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_148]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+158h+var_A8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+158h+var_58]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rdi, [rsp+158h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91527
loc_914DC:
lea rsi, aPatternMustSta; "Pattern must start with '^' and end wit"...
lea rdi, [rsp+158h+var_148]
lea rdx, [rsp+158h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add r14, 0C8h
lea rsi, [rsp+158h+var_148]
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rdi, [rsp+158h+var_148]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, aTarget+9; ""
lea rdx, [rsp+158h+var_148]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
loc_91527:
mov rax, rbx
add rsp, 138h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9154E
mov rbx, rax
loc_9154E:
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9155D
mov rbx, rax
loc_9155D:
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9156C
mov rbx, rax
loc_9156C:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9157B
mov rbx, rax
loc_9157B:
lea rdi, [rsp+arg_A8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_91588:
lea rdi, [rsp+arg_F8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rdi, [rsp+arg_D8]
jmp short loc_915AC
mov rbx, rax
jmp short loc_91588
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
loc_915AC:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_915B6
mov rbx, rax
loc_915B6:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * SchemaConverter::_visit_pattern(_QWORD *a1, long long a2, long long a3, _QWORD *a4)
{
long long v5; // rcx
int v6; // ecx
int v7; // r8d
int v8; // r9d
char v10; // [rsp+Fh] [rbp-149h] BYREF
_QWORD v11[8]; // [rsp+10h] [rbp-148h] BYREF
_BYTE v12[32]; // [rsp+50h] [rbp-108h] BYREF
_BYTE v13[32]; // [rsp+70h] [rbp-E8h] BYREF
_QWORD v14[4]; // [rsp+90h] [rbp-C8h] BYREF
_BYTE v15[32]; // [rsp+B0h] [rbp-A8h] BYREF
long long v16; // [rsp+D0h] [rbp-88h] BYREF
long long v17; // [rsp+D8h] [rbp-80h] BYREF
_BYTE v18[8]; // [rsp+E0h] [rbp-78h] BYREF
long long v19; // [rsp+E8h] [rbp-70h]
_QWORD v20[2]; // [rsp+100h] [rbp-58h] BYREF
__int128 v21; // [rsp+110h] [rbp-48h]
int v22; // [rsp+120h] [rbp-38h]
__int128 v23; // [rsp+128h] [rbp-30h] BYREF
if ( **(_BYTE **)a3 == 94 && (v5 = *(_QWORD *)(a3 + 8), *(_BYTE *)(*(_QWORD *)a3 + v5 - 1) == 36) )
{
std::string::substr(v18, a3, 1LL, v5 - 2);
v20[0] = (char *)&v23 + 8;
v20[1] = 1LL;
v21 = 0LL;
v22 = 1065353216;
v17 = 0LL;
v23 = 0LL;
v16 = v19;
v11[0] = &v17;
v11[1] = a2;
v11[2] = &v10;
v11[3] = &v16;
v11[4] = v18;
v11[5] = v15;
v11[6] = v20;
v11[7] = a4;
std::function<std::pair<std::string,bool> ()(void)>::function<SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1},void>(
v15,
v11,
&v16,
&v17);
std::function<std::pair<std::string,bool> ()(void)>::operator()(v11, v15);
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()[abi:cxx11](
(unsigned int)v12,
(unsigned int)&v10,
(unsigned int)v11,
v6,
v7,
v8);
std::operator+<char>((long long)v13, (long long)"\"\\\"\" (", (long long)v12);
std::operator+<char>((long long)v14, (long long)v13, (long long)") \"\\\"\" space");
SchemaConverter::_add_rule((long long)a1, a2, a4, v14);
std::string::~string(v14);
std::string::~string(v13);
std::string::~string(v12);
std::string::~string(v11);
std::_Function_base::~_Function_base((std::_Function_base *)v15);
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v20);
std::string::~string(v18);
}
else
{
std::string::basic_string<std::allocator<char>>(v11, (long long)"Pattern must start with '^' and end with '$'");
std::vector<std::string>::emplace_back<std::string>(a2 + 200, (long long)v11);
std::string::~string(v11);
std::string::basic_string<std::allocator<char>>(a1, (long long)"");
}
return a1;
}
| _visit_pattern:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDX]
CMP byte ptr [RAX],0x5e
JNZ 0x001914dc
MOV R15,RCX
MOV RCX,qword ptr [RDX + 0x8]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x24
JNZ 0x001914dc
ADD RCX,-0x2
LEA R12,[RSP + 0xe0]
PUSH 0x1
POP RAX
MOV RDI,R12
MOV RSI,RDX
MOV RDX,RAX
CALL 0x00123960
LEA RAX,[RSP + 0x130]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
LEA RCX,[RSP + 0xd8]
AND qword ptr [RCX],0x0
MOVUPS xmmword ptr [RAX + -0x8],XMM0
MOV RAX,qword ptr [R12 + 0x8]
LEA RDX,[RSP + 0xd0]
MOV qword ptr [RDX],RAX
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RCX
MOV qword ptr [RSI + 0x8],R14
LEA RAX,[RSP + 0xf]
MOV qword ptr [RSI + 0x10],RAX
MOV qword ptr [RSI + 0x18],RDX
MOV qword ptr [RSI + 0x20],R12
LEA RDI,[RSP + 0xb0]
MOV qword ptr [RSI + 0x28],RDI
LEA RAX,[RSP + 0x100]
MOV qword ptr [RSI + 0x30],RAX
MOV qword ptr [RSI + 0x38],R15
LAB_00191418:
CALL 0x00193f2e
LAB_0019141d:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0xb0]
CALL 0x00194014
LAB_0019142f:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x10]
CALL 0x00193f76
LAB_00191443:
LEA RSI,[0x1b8a25]
LEA RDI,[RSP + 0x70]
LEA RDX,[RSP + 0x50]
CALL 0x00158626
LAB_00191459:
LEA RDX,[0x1b8a2c]
LEA RDI,[RSP + 0x90]
LEA RSI,[RSP + 0x70]
CALL 0x00138428
LAB_00191472:
LEA RCX,[RSP + 0x90]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0018e294
LEA RDI,[RSP + 0x90]
CALL 0x00124208
LEA RDI,[RSP + 0x70]
CALL 0x00124208
LEA RDI,[RSP + 0x50]
CALL 0x00124208
LEA RDI,[RSP + 0x10]
CALL 0x00124208
LEA RDI,[RSP + 0xb0]
CALL 0x00147c98
LEA RDI,[RSP + 0x100]
CALL 0x00193ac0
LEA RDI,[RSP + 0xe0]
CALL 0x00124208
JMP 0x00191527
LAB_001914dc:
LEA RSI,[0x1b89f8]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x100]
CALL 0x001275c8
ADD R14,0xc8
LAB_001914fc:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x0013ac96
LAB_00191509:
LEA RDI,[RSP + 0x10]
CALL 0x00124208
LEA RSI,[0x1aa381]
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x001275c8
LAB_00191527:
MOV RAX,RBX
ADD RSP,0x138
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::_visit_pattern(std::__cxx11::string const&, std::__cxx11::string const&) */
string * SchemaConverter::_visit_pattern(string *param_1,string *param_2)
{
int8 *in_RDX;
int1 local_149;
int8 *local_148;
string *local_140;
int1 *local_138;
int8 *local_130;
string *local_128;
_lambda___1_ *local_120;
int8 **local_118;
string local_108 [32];
string local_e8 [32];
string local_c8 [32];
_lambda___1_ local_a8 [32];
int8 local_88;
int8 local_80;
string local_78 [8];
int8 local_70;
int8 *local_58;
int8 local_50;
int8 local_48;
int8 uStack_40;
int4 local_38;
int8 local_30;
int8 uStack_28;
if ((*(char *)*in_RDX == '^') && (((char *)*in_RDX)[in_RDX[1] + -1] == '$')) {
std::__cxx11::string::substr((ulong)local_78,(ulong)in_RDX);
local_58 = &uStack_28;
local_50 = 1;
local_48 = 0;
uStack_40 = 0;
local_38 = 0x3f800000;
local_148 = &local_80;
local_80 = 0;
local_30 = 0;
uStack_28 = 0;
local_130 = &local_88;
local_88 = local_70;
local_138 = &local_149;
local_120 = local_a8;
local_118 = &local_58;
local_140 = param_2;
local_128 = local_78;
/* try { // try from 00191418 to 0019141c has its CatchHandler @ 0019159f */
std::function<std::pair<std::__cxx11::string,bool>()>::
function<SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_,void>
(local_120);
/* try { // try from 0019141d to 0019142e has its CatchHandler @ 00191578 */
std::function<std::pair<std::__cxx11::string,bool>()>::operator()
((function<std::pair<std::__cxx11::string,bool>()> *)&local_148);
/* try { // try from 0019142f to 00191442 has its CatchHandler @ 00191569 */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::
{lambda(std::pair<std::__cxx11::string,bool>const&)#1}::operator()::string_bool>_const___const
(local_108,&local_149,&local_148);
/* try { // try from 00191443 to 00191458 has its CatchHandler @ 0019155a */
std::operator+((char *)local_e8,(string *)&DAT_001b8a25);
/* try { // try from 00191459 to 00191471 has its CatchHandler @ 0019154b */
std::operator+(local_c8,(char *)local_e8);
/* try { // try from 00191472 to 00191487 has its CatchHandler @ 00191539 */
_add_rule(param_1,param_2);
std::__cxx11::string::~string(local_c8);
std::__cxx11::string::~string(local_e8);
std::__cxx11::string::~string(local_108);
std::__cxx11::string::~string((string *)&local_148);
std::_Function_base::~_Function_base((_Function_base *)local_a8);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)&local_58);
std::__cxx11::string::~string(local_78);
}
else {
/* try { // try from 001914dc to 001914f4 has its CatchHandler @ 001915b3 */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_148,"Pattern must start with \'^\' and end with \'$\'",
(allocator *)&local_58);
/* try { // try from 001914fc to 00191508 has its CatchHandler @ 001915a4 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(param_2 + 200),
(string *)&local_148);
std::__cxx11::string::~string((string *)&local_148);
std::__cxx11::string::string<std::allocator<char>>(param_1,"",(allocator *)&local_148);
}
return param_1;
}
|
|
410 | mi_keylength_part | eloqsql/storage/myisam/mi_search.c | uint _mi_keylength_part(MI_KEYDEF *keyinfo, register uchar *key,
HA_KEYSEG *end)
{
reg1 HA_KEYSEG *keyseg;
uchar *start= key;
for (keyseg=keyinfo->seg ; keyseg != end ; keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
if (!*key++)
continue;
if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART))
{
uint length;
get_key_length(length,key);
key+=length;
}
else
key+= keyseg->length;
}
return (uint) (key-start);
} | O0 | c | mi_keylength_part:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xc35fa
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xc355d
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpb $0x0, (%rax)
jne 0xc355b
jmp 0xc35e9
jmp 0xc355d
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x29, %eax
cmpl $0x0, %eax
je 0xc35d1
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0xc3592
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0xc35bf
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0xc35e7
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0xc35e9
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x20(%rbp)
jmp 0xc3524
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)
| _mi_keylength_part:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_20], rax
loc_C3524:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_18]
jz loc_C35FA
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jz short loc_C355D
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
cmp byte ptr [rax], 0
jnz short loc_C355B
jmp loc_C35E9
loc_C355B:
jmp short $+2
loc_C355D:
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 29h
cmp eax, 0
jz short loc_C35D1
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_C3592
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
jmp short loc_C35BF
loc_C3592:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_C35BF:
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_C35E7
loc_C35D1:
mov rax, [rbp+var_20]
movzx ecx, word ptr [rax+14h]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
loc_C35E7:
jmp short $+2
loc_C35E9:
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov [rbp+var_20], rax
jmp loc_C3524
loc_C35FA:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
sub rax, rcx
pop rbp
retn
| unsigned __int8 * mi_keylength_part(long long a1, unsigned __int8 *a2, long long a3)
{
unsigned __int8 *v3; // rax
unsigned __int8 *v4; // rax
int v6; // [rsp+0h] [rbp-2Ch]
long long i; // [rsp+Ch] [rbp-20h]
unsigned __int8 *v8; // [rsp+1Ch] [rbp-10h]
unsigned __int8 *v9; // [rsp+1Ch] [rbp-10h]
v8 = a2;
for ( i = *(_QWORD *)(a1 + 40); i != a3; i += 32LL )
{
if ( (*(_WORD *)(i + 18) & 0x10) != 0 )
{
v3 = v8++;
if ( !*v3 )
continue;
}
if ( (*(_WORD *)(i + 18) & 0x29) != 0 )
{
if ( *v8 == 255 )
{
v6 = _byteswap_ushort(*(_WORD *)(v8 + 1));
v9 = v8 + 3;
}
else
{
v4 = v8;
v9 = v8 + 1;
v6 = *v4;
}
v8 = &v9[v6];
}
else
{
v8 += *(unsigned __int16 *)(i + 20);
}
}
return (unsigned __int8 *)(v8 - a2);
}
| _mi_keylength_part:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_001c3524:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x001c35fa
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001c355d
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
CMP byte ptr [RAX],0x0
JNZ 0x001c355b
JMP 0x001c35e9
LAB_001c355b:
JMP 0x001c355d
LAB_001c355d:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x29
CMP EAX,0x0
JZ 0x001c35d1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001c3592
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001c35bf
LAB_001c3592:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_001c35bf:
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001c35e7
LAB_001c35d1:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001c35e7:
JMP 0x001c35e9
LAB_001c35e9:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x20
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001c3524
LAB_001c35fa:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
POP RBP
RET
|
long _mi_keylength_part(long param_1,byte *param_2,long param_3)
{
byte bVar1;
byte *pbVar2;
uint local_34;
long local_28;
byte *local_18;
local_18 = param_2;
for (local_28 = *(long *)(param_1 + 0x28); local_28 != param_3; local_28 = local_28 + 0x20) {
if (((*(ushort *)(local_28 + 0x12) & 0x10) == 0) ||
(pbVar2 = local_18 + 1, bVar1 = *local_18, local_18 = pbVar2, bVar1 != 0)) {
if ((*(ushort *)(local_28 + 0x12) & 0x29) == 0) {
local_18 = local_18 + (int)(uint)*(ushort *)(local_28 + 0x14);
}
else {
if (*local_18 == 0xff) {
local_34 = (uint)CONCAT11(local_18[1],local_18[2]);
local_18 = local_18 + 3;
}
else {
local_34 = (uint)*local_18;
local_18 = local_18 + 1;
}
local_18 = local_18 + local_34;
}
}
}
return (long)local_18 - (long)param_2;
}
|
|
411 | hi0bits | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O3 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shll $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi # imm = 0x10000
setb %cl
cmovael %edi, %eax
shll $0x4, %ecx
movl %eax, %edx
shll $0x8, %edx
cmpl $0x1000000, %eax # imm = 0x1000000
cmovael %eax, %edx
leal 0x8(%rcx), %eax
cmovael %ecx, %eax
movl %edx, %ecx
shll $0x4, %ecx
cmpl $0x10000000, %edx # imm = 0x10000000
cmovael %edx, %ecx
leal 0x4(%rax), %edx
cmovael %eax, %edx
leal (,%rcx,4), %esi
movl $0x40000000, %eax # imm = 0x40000000
cmpl %eax, %ecx
cmovael %ecx, %esi
leal 0x2(%rdx), %ecx
cmovael %edx, %ecx
leal 0x1(%rcx), %edx
cmpl %eax, %esi
movl $0x20, %eax
cmovael %edx, %eax
testl %esi, %esi
cmovsl %ecx, %eax
popq %rbp
retq
| hi0bits:
push rbp
mov rbp, rsp
mov eax, edi
shl eax, 10h
xor ecx, ecx
cmp edi, 10000h
setb cl
cmovnb eax, edi
shl ecx, 4
mov edx, eax
shl edx, 8
cmp eax, 1000000h
cmovnb edx, eax
lea eax, [rcx+8]
cmovnb eax, ecx
mov ecx, edx
shl ecx, 4
cmp edx, 10000000h
cmovnb ecx, edx
lea edx, [rax+4]
cmovnb edx, eax
lea esi, ds:0[rcx*4]
mov eax, 40000000h
cmp ecx, eax
cmovnb esi, ecx
lea ecx, [rdx+2]
cmovnb ecx, edx
lea edx, [rcx+1]
cmp esi, eax
mov eax, 20h ; ' '
cmovnb eax, edx
test esi, esi
cmovs eax, ecx
pop rbp
retn
| long long hi0bits(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // edx
bool v3; // cf
int v4; // eax
unsigned int v5; // ecx
bool v6; // cf
int v7; // edx
int v8; // esi
bool v9; // cf
unsigned int v10; // ecx
long long result; // rax
v1 = a1 << 16;
if ( a1 >= 0x10000 )
v1 = a1;
v2 = v1 << 8;
v3 = v1 < 0x1000000;
if ( v1 >= 0x1000000 )
v2 = v1;
v4 = 16 * (a1 < 0x10000) + 8;
if ( !v3 )
v4 = 16 * (a1 < 0x10000);
v5 = 16 * v2;
v6 = v2 < 0x10000000;
if ( v2 >= 0x10000000 )
v5 = v2;
v7 = v4 + 4;
if ( !v6 )
v7 = v4;
v8 = 4 * v5;
v9 = v5 < 0x40000000;
if ( v5 >= 0x40000000 )
v8 = v5;
v10 = v7 + 2;
if ( !v9 )
v10 = v7;
result = 32LL;
if ( (unsigned int)v8 >= 0x40000000 )
result = v10 + 1;
if ( v8 < 0 )
return v10;
return result;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL EAX,0x10
XOR ECX,ECX
CMP EDI,0x10000
SETC CL
CMOVNC EAX,EDI
SHL ECX,0x4
MOV EDX,EAX
SHL EDX,0x8
CMP EAX,0x1000000
CMOVNC EDX,EAX
LEA EAX,[RCX + 0x8]
CMOVNC EAX,ECX
MOV ECX,EDX
SHL ECX,0x4
CMP EDX,0x10000000
CMOVNC ECX,EDX
LEA EDX,[RAX + 0x4]
CMOVNC EDX,EAX
LEA ESI,[RCX*0x4]
MOV EAX,0x40000000
CMP ECX,EAX
CMOVNC ESI,ECX
LEA ECX,[RDX + 0x2]
CMOVNC ECX,EDX
LEA EDX,[RCX + 0x1]
CMP ESI,EAX
MOV EAX,0x20
CMOVNC EAX,EDX
TEST ESI,ESI
CMOVS EAX,ECX
POP RBP
RET
|
int hi0bits(uint param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
uVar2 = param_1 << 0x10;
if (param_1 >= 0x10000) {
uVar2 = param_1;
}
iVar4 = (uint)(param_1 < 0x10000) * 0x10;
uVar1 = uVar2 << 8;
if (0xffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 8;
if (0xffffff < uVar2) {
iVar3 = iVar4;
}
uVar2 = uVar1 << 4;
if (0xfffffff < uVar1) {
uVar2 = uVar1;
}
iVar4 = iVar3 + 4;
if (0xfffffff < uVar1) {
iVar4 = iVar3;
}
uVar1 = uVar2 * 4;
if (0x3fffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 2;
if (0x3fffffff < uVar2) {
iVar3 = iVar4;
}
iVar4 = 0x20;
if (0x3fffffff < uVar1) {
iVar4 = iVar3 + 1;
}
if ((int)uVar1 < 0) {
iVar4 = iVar3;
}
return iVar4;
}
|
|
412 | r3d_skybox_generate_prefilter | r3d/src/r3d_skybox.c | static TextureCubemap r3d_skybox_generate_prefilter(TextureCubemap sky)
{
static const int PREFILTER_SIZE = 128;
static const int MAX_MIP_LEVELS = 8;
// Create prefilter cubemap texture
unsigned int prefilterId = 0;
glGenTextures(1, &prefilterId);
glBindTexture(GL_TEXTURE_CUBE_MAP, prefilterId);
for (int i = 0; i < 6; i++) {
glTexImage2D(
GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGB16F,
128, 128, 0, GL_RGB, GL_FLOAT, NULL
);
}
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
// Generate mipmaps
rlEnableTextureCubemap(prefilterId);
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
rlDisableTextureCubemap();
// Create depth renderbuffer and framebuffer
unsigned int rbo = 0;
glGenRenderbuffers(1, &rbo);
unsigned int fbo = rlLoadFramebuffer();
rlFramebufferAttach(fbo, prefilterId, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_CUBEMAP_POSITIVE_X, 0);
// Enable shader for prefiltering
r3d_shader_enable(generate.prefilter);
r3d_shader_set_mat4(generate.prefilter, uMatProj, MatrixPerspective(90.0 * DEG2RAD, 1.0, 0.1, 10.0));
r3d_shader_bind_samplerCube(generate.prefilter, uCubemap, sky.id);
// Configure framebuffer and rendering parameters
rlEnableFramebuffer(fbo);
rlDisableBackfaceCulling();
// Process each mipmap level
for (int mip = 0; mip < MAX_MIP_LEVELS; mip++) {
int mipWidth = (int)(PREFILTER_SIZE * powf(0.5, (float)mip));
int mipHeight = (int)(PREFILTER_SIZE * powf(0.5, (float)mip));
glBindRenderbuffer(GL_RENDERBUFFER, rbo);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, mipWidth, mipHeight);
rlViewport(0, 0, mipWidth, mipHeight);
float roughness = (float)mip / (float)(MAX_MIP_LEVELS - 1);
r3d_shader_set_float(generate.prefilter, uRoughness, roughness);
// Render all faces of the cubemap
for (int i = 0; i < 6; i++) {
r3d_shader_set_mat4(generate.prefilter, uMatView, R3D.misc.matCubeViews[i]);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, prefilterId, mip);
rlClearScreenBuffers();
r3d_primitive_draw_cube();
}
}
// Disable shader
r3d_shader_unbind_samplerCube(generate.prefilter, uCubemap);
r3d_shader_disable();
// Clean up
rlDisableFramebuffer();
rlUnloadFramebuffer(fbo);
// Reset viewport to default dimensions
rlViewport(0, 0, rlGetFramebufferWidth(), rlGetFramebufferHeight());
rlDisableBackfaceCulling();
// Return prefiltered cubemap
TextureCubemap prefilter = {
.id = prefilterId,
.width = PREFILTER_SIZE,
.height = PREFILTER_SIZE,
.mipmaps = MAX_MIP_LEVELS,
.format = RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16
};
return prefilter;
} | O3 | c | r3d_skybox_generate_prefilter:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %esi, %ebx
movq %rdi, -0x40(%rbp)
leaq -0x2c(%rbp), %r14
movl $0x0, (%r14)
leaq 0xc492a(%rip), %rax # 0x182780
movl $0x1, %edi
movq %r14, %rsi
callq *(%rax)
leaq 0xc41c9(%rip), %r12 # 0x182030
movl (%r14), %esi
movl $0x8513, %edi # imm = 0x8513
callq *(%r12)
movl $0x8515, %r14d # imm = 0x8515
leaq 0xc5790(%rip), %r15 # 0x183610
movq $0x0, 0x10(%rsp)
movl $0x1406, 0x8(%rsp) # imm = 0x1406
movl $0x1907, (%rsp) # imm = 0x1907
movl %r14d, %edi
xorl %esi, %esi
movl $0x881b, %edx # imm = 0x881B
movl $0x80, %ecx
movl $0x80, %r8d
xorl %r9d, %r9d
callq *(%r15)
incl %r14d
cmpl $0x851b, %r14d # imm = 0x851B
jne 0xbde80
leaq 0xc578a(%rip), %r14 # 0x183650
movl $0x8513, %edi # imm = 0x8513
movl $0x2802, %esi # imm = 0x2802
movl $0x812f, %edx # imm = 0x812F
callq *(%r14)
movl $0x8513, %edi # imm = 0x8513
movl $0x2803, %esi # imm = 0x2803
movl $0x812f, %edx # imm = 0x812F
callq *(%r14)
movl $0x8513, %edi # imm = 0x8513
movl $0x8072, %esi # imm = 0x8072
movl $0x812f, %edx # imm = 0x812F
callq *(%r14)
movl $0x8513, %edi # imm = 0x8513
movl $0x2801, %esi # imm = 0x2801
movl $0x2703, %edx # imm = 0x2703
callq *(%r14)
movl $0x8513, %edi # imm = 0x8513
movl $0x2800, %esi # imm = 0x2800
movl $0x2601, %edx # imm = 0x2601
callq *(%r14)
leaq 0xc4871(%rip), %r14 # 0x182798
movl $0x8513, %edi # imm = 0x8513
callq *(%r14)
movl -0x2c(%rbp), %edi
callq 0x1bb52
movl $0x8513, %edi # imm = 0x8513
callq *(%r14)
callq 0x1bb67
leaq -0x34(%rbp), %rsi
movl $0x0, (%rsi)
leaq 0xc4813(%rip), %rax # 0x182768
movl $0x1, %edi
callq *(%rax)
callq 0x1dff3
movl %eax, %r14d
movl -0x2c(%rbp), %esi
xorl %r15d, %r15d
movl %eax, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1e027
leaq 0xf23f1(%rip), %r13 # 0x1b0370
movl 0x1d8(%r13), %edi
callq 0x1be32
movl 0x1dc(%r13), %edi
xorps %xmm0, %xmm0
movups %xmm0, -0x84(%rbp)
movups %xmm0, -0x74(%rbp)
movups %xmm0, -0x68(%rbp)
movups %xmm0, -0x94(%rbp)
movl $0x3f800000, -0x98(%rbp) # imm = 0x3F800000
movq $0x3f800000, -0x84(%rbp) # imm = 0x3F800000
movabsq $-0x41b1219c407d6a05, %rax # imm = 0xBE4EDE63BF8295FB
movq %rax, -0x70(%rbp)
movl $0xbf800000, -0x60(%rbp) # imm = 0xBF800000
movups -0x98(%rbp), %xmm0
movups -0x88(%rbp), %xmm1
movups -0x78(%rbp), %xmm2
movups -0x68(%rbp), %xmm3
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1eb31
leaq 0xc3f36(%rip), %rax # 0x181f40
movl $0x84c0, %edi # imm = 0x84C0
addl 0x1e4(%r13), %edi
callq *(%rax)
movl $0x8513, %edi # imm = 0x8513
movl %ebx, %esi
callq *(%r12)
movq %r13, %r12
movl %r14d, -0x30(%rbp)
movl %r14d, %edi
callq 0x1be4a
callq 0x1bf8d
leaq 0x1ec(%r13), %rax
movq %rax, -0x48(%rbp)
movl $0x1728, %eax # imm = 0x1728
addq 0xc1f62(%rip), %rax # 0x17ffb0
movq %rax, -0x58(%rbp)
leaq 0x1558(%r13), %rax
movq %rax, -0x50(%rbp)
movl %r15d, %r13d
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
movaps %xmm0, -0xc0(%rbp)
xorps 0x2324a(%rip), %xmm0 # 0xe12c0
movaps %xmm0, -0xb0(%rbp)
callq 0x87b0
movss 0x230ea(%rip), %xmm1 # 0xe1174
mulss %xmm1, %xmm0
cvttss2si %xmm0, %ebx
movaps -0xb0(%rbp), %xmm0
callq 0x87b0
mulss 0x230ce(%rip), %xmm0 # 0xe1174
cvttss2si %xmm0, %r14d
movl -0x34(%rbp), %esi
movl $0x8d41, %edi # imm = 0x8D41
leaq 0xc3f56(%rip), %rax # 0x182010
callq *(%rax)
movl $0x8d41, %edi # imm = 0x8D41
movl $0x81a6, %esi # imm = 0x81A6
movl %ebx, %edx
movl %r14d, %ecx
leaq 0xc53ce(%rip), %rax # 0x1834a0
callq *(%rax)
xorl %edi, %edi
xorl %esi, %esi
movl %ebx, %edx
movl %r14d, %ecx
callq 0x19e25
movaps -0xc0(%rbp), %xmm1
divss 0x22f17(%rip), %xmm1 # 0xe1008
movss 0x1ec(%r12), %xmm0
ucomiss %xmm1, %xmm0
jne 0xbe102
jnp 0xbe124
movss %xmm1, 0x1ec(%r12)
movl 0x1f0(%r12), %edi
movq -0x48(%rbp), %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x1ea22
movq $-0x6, %r14
movq %r12, %rbx
movq -0x58(%rbp), %r12
movq -0x50(%rbp), %r15
movl 0x1e0(%rbx), %edi
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups 0x30(%r12), %xmm3
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1eb31
movl -0x2c(%rbp), %ecx
leal 0x851b(%r14), %edx
movl $0x8d40, %edi # imm = 0x8D40
movl $0x8ce0, %esi # imm = 0x8CE0
movl %r13d, %r8d
leaq 0xc454f(%rip), %rax # 0x1826d8
callq *(%rax)
callq 0x1c113
movq %r15, %rdi
callq 0xd0490
addq $0x40, %r12
incq %r14
jne 0xbe136
incl %r13d
cmpl $0x8, %r13d
movq %rbx, %r12
movl %r13d, %r15d
jne 0xbe05d
movl $0x84c0, %edi # imm = 0x84C0
addl 0x1e4(%r12), %edi
leaq 0xc3d78(%rip), %rax # 0x181f40
callq *(%rax)
movl $0x8513, %edi # imm = 0x8513
xorl %esi, %esi
leaq 0xc3e58(%rip), %rax # 0x182030
callq *(%rax)
callq 0x1be3d
callq 0x1be86
movl -0x30(%rbp), %edi
callq 0x1e1bf
callq 0x1d4c4
movl %eax, %r14d
callq 0x1d4d0
xorl %edi, %edi
xorl %esi, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x19e25
callq 0x1bf8d
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %rcx
movl %eax, (%rcx)
movaps 0x236b4(%rip), %xmm0 # 0xe18d0
movups %xmm0, 0x4(%rcx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| r3d_skybox_generate_prefilter:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov ebx, esi
mov [rbp+var_40], rdi
lea r14, [rbp+var_2C]
mov dword ptr [r14], 0
lea rax, glad_glGenTextures
mov edi, 1
mov rsi, r14
call qword ptr [rax]
lea r12, glad_glBindTexture
mov esi, [r14]
mov edi, 8513h
call qword ptr [r12]
mov r14d, 8515h
lea r15, glad_glTexImage2D
loc_BDE80:
mov qword ptr [rsp+100h+var_F0], 0
mov dword ptr [rsp+100h+var_100+8], 1406h
mov dword ptr [rsp+100h+var_100], 1907h
mov edi, r14d
xor esi, esi
mov edx, 881Bh
mov ecx, 80h
mov r8d, 80h
xor r9d, r9d
call qword ptr [r15]
inc r14d
cmp r14d, 851Bh
jnz short loc_BDE80
lea r14, glad_glTexParameteri
mov edi, 8513h
mov esi, 2802h
mov edx, 812Fh
call qword ptr [r14]
mov edi, 8513h
mov esi, 2803h
mov edx, 812Fh
call qword ptr [r14]
mov edi, 8513h
mov esi, 8072h
mov edx, 812Fh
call qword ptr [r14]
mov edi, 8513h
mov esi, 2801h
mov edx, 2703h
call qword ptr [r14]
mov edi, 8513h
mov esi, 2800h
mov edx, 2601h
call qword ptr [r14]
lea r14, glad_glGenerateMipmap
mov edi, 8513h
call qword ptr [r14]
mov edi, [rbp+var_2C]
call rlEnableTextureCubemap
mov edi, 8513h
call qword ptr [r14]
call rlDisableTextureCubemap
lea rsi, [rbp+var_34]
mov dword ptr [rsi], 0
lea rax, glad_glGenRenderbuffers
mov edi, 1
call qword ptr [rax]
call rlLoadFramebuffer
mov r14d, eax
mov esi, [rbp+var_2C]
xor r15d, r15d
mov edi, eax
xor edx, edx
xor ecx, ecx
xor r8d, r8d
call rlFramebufferAttach
lea r13, R3D
mov edi, [r13+1D8h]
call rlEnableShader
mov edi, [r13+1DCh]
xorps xmm0, xmm0
movups [rbp+var_84], xmm0
movups [rbp+var_74], xmm0
movups [rbp+var_74+0Ch], xmm0
movups [rbp+var_98+4], xmm0
mov dword ptr [rbp+var_98], 3F800000h
mov qword ptr [rbp+var_84], 3F800000h
mov rax, 0BE4EDE63BF8295FBh
mov qword ptr [rbp+var_74+4], rax
mov [rbp+var_60], 0BF800000h
movups xmm0, [rbp+var_98]
movups xmm1, xmmword ptr [rbp-88h]
movups xmm2, [rbp+var_84+0Ch]
movups xmm3, [rbp+var_74+0Ch]
movups [rsp+100h+var_D0], xmm3
movups [rsp+100h+var_E0], xmm2
movups [rsp+100h+var_F0], xmm1
movups [rsp+100h+var_100], xmm0
call rlSetUniformMatrix
lea rax, glad_glActiveTexture
mov edi, 84C0h
add edi, [r13+1E4h]
call qword ptr [rax]
mov edi, 8513h
mov esi, ebx
call qword ptr [r12]
mov r12, r13
mov [rbp+var_30], r14d
mov edi, r14d
call rlEnableFramebuffer
call rlDisableBackfaceCulling
lea rax, [r13+1ECh]
mov [rbp+var_48], rax
mov eax, 1728h
add rax, cs:R3D_ptr
mov [rbp+var_58], rax
lea rax, [r13+1558h]
mov [rbp+var_50], rax
loc_BE05D:
mov r13d, r15d
xorps xmm0, xmm0
cvtsi2ss xmm0, r15d
movaps [rbp+var_C0], xmm0
xorps xmm0, cs:xmmword_E12C0
movaps [rbp+var_B0], xmm0
call _exp2f
movss xmm1, cs:dword_E1174
mulss xmm0, xmm1
cvttss2si ebx, xmm0
movaps xmm0, [rbp+var_B0]
call _exp2f
mulss xmm0, cs:dword_E1174
cvttss2si r14d, xmm0
mov esi, [rbp+var_34]
mov edi, 8D41h
lea rax, glad_glBindRenderbuffer
call qword ptr [rax]
mov edi, 8D41h
mov esi, 81A6h
mov edx, ebx
mov ecx, r14d
lea rax, glad_glRenderbufferStorage
call qword ptr [rax]
xor edi, edi
xor esi, esi
mov edx, ebx
mov ecx, r14d
call rlViewport
movaps xmm1, [rbp+var_C0]
divss xmm1, cs:dword_E1008
movss xmm0, dword ptr [r12+1ECh]
ucomiss xmm0, xmm1
jnz short loc_BE102
jnp short loc_BE124
loc_BE102:
movss dword ptr [r12+1ECh], xmm1
mov edi, [r12+1F0h]
mov rsi, [rbp+var_48]
xor edx, edx
mov ecx, 1
call rlSetUniform
loc_BE124:
mov r14, 0FFFFFFFFFFFFFFFAh
mov rbx, r12
mov r12, [rbp+var_58]
mov r15, [rbp+var_50]
loc_BE136:
mov edi, [rbx+1E0h]
movups xmm0, xmmword ptr [r12]
movups xmm1, xmmword ptr [r12+10h]
movups xmm2, xmmword ptr [r12+20h]
movups xmm3, xmmword ptr [r12+30h]
movups [rsp+100h+var_D0], xmm3
movups [rsp+100h+var_E0], xmm2
movups [rsp+100h+var_F0], xmm1
movups [rsp+100h+var_100], xmm0
call rlSetUniformMatrix
mov ecx, [rbp+var_2C]
lea edx, [r14+851Bh]
mov edi, 8D40h
mov esi, 8CE0h
mov r8d, r13d
lea rax, glad_glFramebufferTexture2D
call qword ptr [rax]
call rlClearScreenBuffers
mov rdi, r15
call r3d_primitive_draw
add r12, 40h ; '@'
inc r14
jnz short loc_BE136
inc r13d
cmp r13d, 8
mov r12, rbx
mov r15d, r13d
jnz loc_BE05D
mov edi, 84C0h
add edi, [r12+1E4h]
lea rax, glad_glActiveTexture
call qword ptr [rax]
mov edi, 8513h
xor esi, esi
lea rax, glad_glBindTexture
call qword ptr [rax]
call rlDisableShader
call rlDisableFramebuffer
mov edi, [rbp+var_30]
call rlUnloadFramebuffer
call rlGetFramebufferWidth
mov r14d, eax
call rlGetFramebufferHeight
xor edi, edi
xor esi, esi
mov edx, r14d
mov ecx, eax
call rlViewport
call rlDisableBackfaceCulling
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_40]
mov [rcx], eax
movaps xmm0, cs:xmmword_E18D0
movups xmmword ptr [rcx+4], xmm0
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long r3d_skybox_generate_prefilter(long long a1, unsigned int a2)
{
unsigned int i; // r14d
unsigned int Framebuffer; // r14d
long long v5; // rsi
int v6; // r15d
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
char *v11; // r12
int v12; // r13d
unsigned int v13; // ebx
unsigned int v14; // r14d
char *v15; // rsi
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
float v20; // xmm1_4
long long v21; // r14
char *v22; // rbx
long long *v23; // r12
unsigned int FramebufferWidth; // r14d
unsigned int FramebufferHeight; // eax
long long result; // rax
long long v27; // [rsp+0h] [rbp-100h]
long long v28; // [rsp+8h] [rbp-F8h]
float v29; // [rsp+50h] [rbp-B0h]
_BYTE v30[24]; // [rsp+68h] [rbp-98h]
__int128 v31; // [rsp+98h] [rbp-68h]
unsigned int v32; // [rsp+CCh] [rbp-34h] BYREF
unsigned int v33; // [rsp+D0h] [rbp-30h]
unsigned int v34[11]; // [rsp+D4h] [rbp-2Ch] BYREF
v34[0] = 0;
glad_glGenTextures(1LL, v34);
glad_glBindTexture(34067LL, v34[0]);
for ( i = 34069; i != 34075; ++i )
{
LODWORD(v28) = 5126;
LODWORD(v27) = 6407;
glad_glTexImage2D(i, 0LL, 34843LL, 128LL, 128LL, 0LL, v27, v28, 0LL);
}
glad_glTexParameteri(34067LL, 10242LL, 33071LL);
glad_glTexParameteri(34067LL, 10243LL, 33071LL);
glad_glTexParameteri(34067LL, 32882LL, 33071LL);
glad_glTexParameteri(34067LL, 10241LL, 9987LL);
glad_glTexParameteri(34067LL, 10240LL, 9729LL);
glad_glGenerateMipmap(34067LL);
rlEnableTextureCubemap(v34[0]);
glad_glGenerateMipmap(34067LL);
rlDisableTextureCubemap();
v32 = 0;
glad_glGenRenderbuffers(1LL, &v32);
Framebuffer = rlLoadFramebuffer(1LL);
v5 = v34[0];
v6 = 0;
rlFramebufferAttach(Framebuffer, v34[0], 0, 0, 0);
rlEnableShader(*((unsigned int *)&R3D + 118));
v31 = 0LL;
*(_OWORD *)&v30[4] = 0LL;
*(_DWORD *)v30 = 1065353216;
*(_DWORD *)&v30[20] = 1065353216;
DWORD2(v31) = -1082130432;
rlSetUniformMatrix(
*((unsigned int *)&R3D + 119),
v5,
v7,
v8,
v9,
v10,
*(long long *)v30,
0LL,
*(long long *)&v30[16],
0LL,
(unsigned __int128)0x3F800000uLL >> 96,
0xBE4EDE63BF8295FBLL,
0LL,
*((long long *)&v31 + 1));
glad_glActiveTexture((unsigned int)(*((_DWORD *)&R3D + 121) + 33984));
glad_glBindTexture(34067LL, a2);
v11 = &R3D;
v33 = Framebuffer;
rlEnableFramebuffer(Framebuffer);
rlDisableBackfaceCulling();
do
{
v12 = v6;
v29 = -(float)v6;
v13 = (int)(float)(exp2f(v29) * 128.0);
v14 = (int)(float)(exp2f(v29) * 128.0);
glad_glBindRenderbuffer(36161LL, v32);
glad_glRenderbufferStorage(36161LL, 33190LL, v13, v14);
v15 = 0LL;
rlViewport(0LL, 0LL, v13, v14);
v20 = (float)v6 / 7.0;
if ( *((float *)v11 + 123) != v20 )
{
*((float *)v11 + 123) = v20;
v15 = &R3D + 492;
rlSetUniform(*((unsigned int *)v11 + 124), (long long)(&R3D + 492), 0, 1u, v18, v19);
}
v21 = -6LL;
v22 = v11;
v23 = (long long *)(&R3D + 5928);
do
{
rlSetUniformMatrix(
*((unsigned int *)v22 + 120),
(long long)v15,
v16,
v17,
v18,
v19,
*v23,
v23[1],
v23[2],
v23[3],
v23[4],
v23[5],
v23[6],
v23[7]);
v15 = (_BYTE *)(&loc_8CDE + 2);
glad_glFramebufferTexture2D(36160LL, 36064LL, (unsigned int)(v21 + 34075), v34[0], (unsigned int)v6);
rlClearScreenBuffers();
r3d_primitive_draw(&R3D + 5464);
v23 += 8;
++v21;
}
while ( v21 );
v11 = v22;
++v6;
}
while ( v12 != 7 );
glad_glActiveTexture((unsigned int)(*((_DWORD *)v22 + 121) + 33984));
glad_glBindTexture(34067LL, 0LL);
rlDisableShader();
rlDisableFramebuffer();
rlUnloadFramebuffer(v33);
FramebufferWidth = rlGetFramebufferWidth();
FramebufferHeight = rlGetFramebufferHeight();
rlViewport(0LL, 0LL, FramebufferWidth, FramebufferHeight);
rlDisableBackfaceCulling();
result = v34[0];
*(_DWORD *)a1 = v34[0];
*(_OWORD *)(a1 + 4) = xmmword_E18D0;
return result;
}
| r3d_skybox_generate_prefilter:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV EBX,ESI
MOV qword ptr [RBP + -0x40],RDI
LEA R14,[RBP + -0x2c]
MOV dword ptr [R14],0x0
LEA RAX,[0x282780]
MOV EDI,0x1
MOV RSI,R14
CALL qword ptr [RAX]
LEA R12,[0x282030]
MOV ESI,dword ptr [R14]
MOV EDI,0x8513
CALL qword ptr [R12]
MOV R14D,0x8515
LEA R15,[0x283610]
LAB_001bde80:
MOV qword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x8],0x1406
MOV dword ptr [RSP],0x1907
MOV EDI,R14D
XOR ESI,ESI
MOV EDX,0x881b
MOV ECX,0x80
MOV R8D,0x80
XOR R9D,R9D
CALL qword ptr [R15]
INC R14D
CMP R14D,0x851b
JNZ 0x001bde80
LEA R14,[0x283650]
MOV EDI,0x8513
MOV ESI,0x2802
MOV EDX,0x812f
CALL qword ptr [R14]
MOV EDI,0x8513
MOV ESI,0x2803
MOV EDX,0x812f
CALL qword ptr [R14]
MOV EDI,0x8513
MOV ESI,0x8072
MOV EDX,0x812f
CALL qword ptr [R14]
MOV EDI,0x8513
MOV ESI,0x2801
MOV EDX,0x2703
CALL qword ptr [R14]
MOV EDI,0x8513
MOV ESI,0x2800
MOV EDX,0x2601
CALL qword ptr [R14]
LEA R14,[0x282798]
MOV EDI,0x8513
CALL qword ptr [R14]
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x0011bb52
MOV EDI,0x8513
CALL qword ptr [R14]
CALL 0x0011bb67
LEA RSI,[RBP + -0x34]
MOV dword ptr [RSI],0x0
LEA RAX,[0x282768]
MOV EDI,0x1
CALL qword ptr [RAX]
CALL 0x0011dff3
MOV R14D,EAX
MOV ESI,dword ptr [RBP + -0x2c]
XOR R15D,R15D
MOV EDI,EAX
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0011e027
LEA R13,[0x2b0370]
MOV EDI,dword ptr [R13 + 0x1d8]
CALL 0x0011be32
MOV EDI,dword ptr [R13 + 0x1dc]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + -0x84],XMM0
MOVUPS xmmword ptr [RBP + -0x74],XMM0
MOVUPS xmmword ptr [RBP + -0x68],XMM0
MOVUPS xmmword ptr [RBP + -0x94],XMM0
MOV dword ptr [RBP + -0x98],0x3f800000
MOV qword ptr [RBP + -0x84],0x3f800000
MOV RAX,-0x41b1219c407d6a05
MOV qword ptr [RBP + -0x70],RAX
MOV dword ptr [RBP + -0x60],0xbf800000
MOVUPS XMM0,xmmword ptr [RBP + -0x98]
MOVUPS XMM1,xmmword ptr [RBP + -0x88]
MOVUPS XMM2,xmmword ptr [RBP + -0x78]
MOVUPS XMM3,xmmword ptr [RBP + -0x68]
MOVUPS xmmword ptr [RSP + 0x30],XMM3
MOVUPS xmmword ptr [RSP + 0x20],XMM2
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0011eb31
LEA RAX,[0x281f40]
MOV EDI,0x84c0
ADD EDI,dword ptr [R13 + 0x1e4]
CALL qword ptr [RAX]
MOV EDI,0x8513
MOV ESI,EBX
CALL qword ptr [R12]
MOV R12,R13
MOV dword ptr [RBP + -0x30],R14D
MOV EDI,R14D
CALL 0x0011be4a
CALL 0x0011bf8d
LEA RAX,[R13 + 0x1ec]
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,0x1728
ADD RAX,qword ptr [0x0027ffb0]
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[R13 + 0x1558]
MOV qword ptr [RBP + -0x50],RAX
LAB_001be05d:
MOV R13D,R15D
XORPS XMM0,XMM0
CVTSI2SS XMM0,R15D
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
XORPS XMM0,xmmword ptr [0x001e12c0]
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
CALL 0x001087b0
MOVSS XMM1,dword ptr [0x001e1174]
MULSS XMM0,XMM1
CVTTSS2SI EBX,XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0xb0]
CALL 0x001087b0
MULSS XMM0,dword ptr [0x001e1174]
CVTTSS2SI R14D,XMM0
MOV ESI,dword ptr [RBP + -0x34]
MOV EDI,0x8d41
LEA RAX,[0x282010]
CALL qword ptr [RAX]
MOV EDI,0x8d41
MOV ESI,0x81a6
MOV EDX,EBX
MOV ECX,R14D
LEA RAX,[0x2834a0]
CALL qword ptr [RAX]
XOR EDI,EDI
XOR ESI,ESI
MOV EDX,EBX
MOV ECX,R14D
CALL 0x00119e25
MOVAPS XMM1,xmmword ptr [RBP + -0xc0]
DIVSS XMM1,dword ptr [0x001e1008]
MOVSS XMM0,dword ptr [R12 + 0x1ec]
UCOMISS XMM0,XMM1
JNZ 0x001be102
JNP 0x001be124
LAB_001be102:
MOVSS dword ptr [R12 + 0x1ec],XMM1
MOV EDI,dword ptr [R12 + 0x1f0]
MOV RSI,qword ptr [RBP + -0x48]
XOR EDX,EDX
MOV ECX,0x1
CALL 0x0011ea22
LAB_001be124:
MOV R14,-0x6
MOV RBX,R12
MOV R12,qword ptr [RBP + -0x58]
MOV R15,qword ptr [RBP + -0x50]
LAB_001be136:
MOV EDI,dword ptr [RBX + 0x1e0]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS XMM1,xmmword ptr [R12 + 0x10]
MOVUPS XMM2,xmmword ptr [R12 + 0x20]
MOVUPS XMM3,xmmword ptr [R12 + 0x30]
MOVUPS xmmword ptr [RSP + 0x30],XMM3
MOVUPS xmmword ptr [RSP + 0x20],XMM2
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0011eb31
MOV ECX,dword ptr [RBP + -0x2c]
LEA EDX,[R14 + 0x851b]
MOV EDI,0x8d40
MOV ESI,0x8ce0
MOV R8D,R13D
LEA RAX,[0x2826d8]
CALL qword ptr [RAX]
CALL 0x0011c113
MOV RDI,R15
CALL 0x001d0490
ADD R12,0x40
INC R14
JNZ 0x001be136
INC R13D
CMP R13D,0x8
MOV R12,RBX
MOV R15D,R13D
JNZ 0x001be05d
MOV EDI,0x84c0
ADD EDI,dword ptr [R12 + 0x1e4]
LEA RAX,[0x281f40]
CALL qword ptr [RAX]
MOV EDI,0x8513
XOR ESI,ESI
LEA RAX,[0x282030]
CALL qword ptr [RAX]
CALL 0x0011be3d
CALL 0x0011be86
MOV EDI,dword ptr [RBP + -0x30]
CALL 0x0011e1bf
CALL 0x0011d4c4
MOV R14D,EAX
CALL 0x0011d4d0
XOR EDI,EDI
XOR ESI,ESI
MOV EDX,R14D
MOV ECX,EAX
CALL 0x00119e25
CALL 0x0011bf8d
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x40]
MOV dword ptr [RCX],EAX
MOVAPS XMM0,xmmword ptr [0x001e18d0]
MOVUPS xmmword ptr [RCX + 0x4],XMM0
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void r3d_skybox_generate_prefilter(int4 *param_1,int4 param_2)
{
int8 uVar1;
int4 uVar2;
int4 uVar3;
int iVar4;
long lVar5;
float fVar6;
float fVar7;
int4 local_34;
local_34 = 0;
(*glad_glGenTextures)(1,&local_34);
(*glad_glBindTexture)(0x8513,local_34);
iVar4 = 0x8515;
do {
(*glad_glTexImage2D)(iVar4,0,0x881b,0x80,0x80,0,0x1907,0x1406,0);
iVar4 = iVar4 + 1;
} while (iVar4 != 0x851b);
(*glad_glTexParameteri)(0x8513,0x2802,0x812f);
(*glad_glTexParameteri)(0x8513,0x2803,0x812f);
(*glad_glTexParameteri)(0x8513,0x8072,0x812f);
(*glad_glTexParameteri)(0x8513,0x2801,0x2703);
(*glad_glTexParameteri)(0x8513,0x2800,0x2601);
(*glad_glGenerateMipmap)(0x8513);
rlEnableTextureCubemap(local_34);
(*glad_glGenerateMipmap)(0x8513);
rlDisableTextureCubemap();
(*glad_glGenRenderbuffers)(1);
uVar2 = rlLoadFramebuffer();
iVar4 = 0;
rlFramebufferAttach(uVar2,local_34,0,0,0);
rlEnableShader(DAT_002b0548);
rlSetUniformMatrix(_DAT_002b054c);
(*glad_glActiveTexture)(_DAT_002b0554 + 0x84c0);
(*glad_glBindTexture)(0x8513,param_2);
rlEnableFramebuffer(uVar2);
rlDisableBackfaceCulling();
do {
fVar6 = (float)((uint)(float)iVar4 ^ _DAT_001e12c0);
fVar7 = exp2f(fVar6);
fVar7 = fVar7 * DAT_001e1174;
fVar6 = exp2f(fVar6);
fVar6 = fVar6 * DAT_001e1174;
(*glad_glBindRenderbuffer)(0x8d41,0);
(*glad_glRenderbufferStorage)(0x8d41,0x81a6,(int)fVar7,(int)fVar6);
rlViewport(0,0,(int)fVar7,(int)fVar6);
fVar6 = (float)iVar4 / DAT_001e1008;
if ((_DAT_002b055c != fVar6) || (NAN(_DAT_002b055c) || NAN(fVar6))) {
_DAT_002b055c = fVar6;
rlSetUniform(_DAT_002b0560,&DAT_002b055c,0,1);
}
lVar5 = -6;
do {
rlSetUniformMatrix(_DAT_002b0550);
(*glad_glFramebufferTexture2D)(0x8d40,0x8ce0,(int)lVar5 + 0x851b,local_34,iVar4);
rlClearScreenBuffers();
r3d_primitive_draw(&DAT_002b18c8);
lVar5 = lVar5 + 1;
} while (lVar5 != 0);
iVar4 = iVar4 + 1;
} while (iVar4 != 8);
(*glad_glActiveTexture)(_DAT_002b0554 + 0x84c0);
(*glad_glBindTexture)(0x8513,0);
rlDisableShader();
rlDisableFramebuffer();
rlUnloadFramebuffer(uVar2);
uVar2 = rlGetFramebufferWidth();
uVar3 = rlGetFramebufferHeight();
rlViewport(0,0,uVar2,uVar3);
rlDisableBackfaceCulling();
*param_1 = local_34;
uVar1 = _UNK_001e18d8;
*(int8 *)(param_1 + 1) = _DAT_001e18d0;
*(int8 *)(param_1 + 3) = uVar1;
return;
}
|
|
413 | my_wc_mb_sjis | eloqsql/strings/ctype-sjis.c | static int
my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */
{
/*
This branch is for performance purposes on ASCII range,
to avoid using unicode_to_cp932[]: about 10% improvement.
*/
if (wc == 0x5c)
{
/*
Special case when converting from Unicode to SJIS:
U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS
*/
code= MB2(0x815F);
goto mb;
}
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= (uchar) wc; /* ASCII */
return 1;
}
if (wc > 0xFFFF ||
!(code= unicode_to_sjis[wc])) /* Bad Unicode code point */
return MY_CS_ILUNI;
if (code <= 0xFF)
{
/* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= code;
return 1;
}
mb:
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, code); /* JIS-X-0208 */
return 2;
} | O3 | c | my_wc_mb_sjis:
pushq %rbp
movq %rsp, %rbp
cmpl $0x7f, %esi
jg 0x9621e
movl $0x815f, %edi # imm = 0x815F
cmpq $0x5c, %rsi
je 0x96254
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x9626e
movb %sil, (%rdx)
jmp 0x9624d
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x9626e
leaq 0x192ba0(%rip), %rdi # 0x228dd0
movzwl (%rdi,%rsi,2), %edi
testl %edi, %edi
je 0x9626e
cmpl $0xff, %edi
ja 0x96254
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x9626e
movb %dil, (%rdx)
movl $0x1, %eax
jmp 0x9626e
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x9626e
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
popq %rbp
retq
| my_wc_mb_sjis:
push rbp
mov rbp, rsp
cmp esi, 7Fh
jg short loc_9621E
mov edi, 815Fh
cmp rsi, 5Ch ; '\'
jz short loc_96254
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_9626E
mov [rdx], sil
jmp short loc_9624D
loc_9621E:
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_9626E
lea rdi, unicode_to_sjis
movzx edi, word ptr [rdi+rsi*2]
test edi, edi
jz short loc_9626E
cmp edi, 0FFh
ja short loc_96254
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_9626E
mov [rdx], dil
loc_9624D:
mov eax, 1
jmp short loc_9626E
loc_96254:
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short loc_9626E
rol di, 8
mov [rdx], di
mov eax, 2
loc_9626E:
pop rbp
retn
| long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
unsigned int v4; // edi
long long result; // rax
if ( (int)a2 <= 127 )
{
LOWORD(v4) = -32417;
if ( a2 != 92 )
{
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
*a3 = a2;
return 1LL;
}
LABEL_11:
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*(_WORD *)a3 = __ROL2__(v4, 8);
return 2LL;
}
return result;
}
result = 0LL;
if ( a2 <= 0xFFFF )
{
v4 = unicode_to_sjis[a2];
if ( unicode_to_sjis[a2] )
{
if ( v4 <= 0xFF )
{
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
*a3 = v4;
return 1LL;
}
goto LABEL_11;
}
}
return result;
}
| my_wc_mb_sjis:
PUSH RBP
MOV RBP,RSP
CMP ESI,0x7f
JG 0x0019621e
MOV EDI,0x815f
CMP RSI,0x5c
JZ 0x00196254
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0019626e
MOV byte ptr [RDX],SIL
JMP 0x0019624d
LAB_0019621e:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x0019626e
LEA RDI,[0x328dd0]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST EDI,EDI
JZ 0x0019626e
CMP EDI,0xff
JA 0x00196254
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0019626e
MOV byte ptr [RDX],DIL
LAB_0019624d:
MOV EAX,0x1
JMP 0x0019626e
LAB_00196254:
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x0019626e
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_0019626e:
POP RBP
RET
|
int8 my_wc_mb_sjis(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
if ((int)param_2 < 0x80) {
uVar1 = 0x815f;
if (param_2 == 0x5c) {
LAB_00196254:
if (param_4 < param_3 + 1) {
return 0xffffff9a;
}
*param_3 = uVar1 << 8 | uVar1 >> 8;
return 2;
}
if (param_4 <= param_3) {
return 0xffffff9b;
}
*(char *)param_3 = (char)param_2;
}
else {
if (0xffff < param_2) {
return 0;
}
uVar1 = *(ushort *)(unicode_to_sjis + param_2 * 2);
if (uVar1 == 0) {
return 0;
}
if (0xff < uVar1) goto LAB_00196254;
if (param_4 <= param_3) {
return 0xffffff9b;
}
*(char *)param_3 = (char)uVar1;
}
return 1;
}
|
|
414 | ma_tls_close | eloqsql/libmariadb/libmariadb/secure/openssl.c | my_bool ma_tls_close(MARIADB_TLS *ctls)
{
int i, rc;
SSL *ssl;
SSL_CTX *ctx= NULL;
if (!ctls || !ctls->ssl)
return 1;
ssl= (SSL *)ctls->ssl;
ctx= SSL_get_SSL_CTX(ssl);
if (ctx)
SSL_CTX_free(ctx);
SSL_set_quiet_shutdown(ssl, 1);
/* 2 x pending + 2 * data = 4 */
for (i=0; i < 4; i++)
if ((rc= SSL_shutdown(ssl)))
break;
/* Since we transferred ownership of BIO to ssl, BIO will
automatically freed - no need for an explicit BIO_free_all */
SSL_free(ssl);
ctls->ssl= NULL;
return rc;
} | O3 | c | ma_tls_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb $0x1, %r15b
testq %rdi, %rdi
je 0x2854b
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x2854b
movq %r14, %rdi
callq 0x130f0
testq %rax, %rax
je 0x2850d
movq %rax, %rdi
callq 0x13090
movq %r14, %rdi
movl $0x1, %esi
callq 0x134a0
movl $0x3, %r12d
movq %r14, %rdi
callq 0x13510
movl %eax, %r15d
subl $0x1, %r12d
setb %al
testl %r15d, %r15d
jne 0x2853b
testb %al, %al
je 0x28520
movq %r14, %rdi
callq 0x13280
movq $0x0, 0x10(%rbx)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_close:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15b, 1
test rdi, rdi
jz short loc_2854B
mov rbx, rdi
mov r14, [rdi+10h]
test r14, r14
jz short loc_2854B
mov rdi, r14
call _SSL_get_SSL_CTX
test rax, rax
jz short loc_2850D
mov rdi, rax
call _SSL_CTX_free
loc_2850D:
mov rdi, r14
mov esi, 1
call _SSL_set_quiet_shutdown
mov r12d, 3
loc_28520:
mov rdi, r14
call _SSL_shutdown
mov r15d, eax
sub r12d, 1
setb al
test r15d, r15d
jnz short loc_2853B
test al, al
jz short loc_28520
loc_2853B:
mov rdi, r14
call _SSL_free
mov qword ptr [rbx+10h], 0
loc_2854B:
mov eax, r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_tls_close(long long a1)
{
unsigned int v1; // r15d
long long v2; // r14
long long SSL_CTX; // rax
int v4; // r12d
bool v5; // cf
LOBYTE(v1) = 1;
if ( a1 )
{
v2 = *(_QWORD *)(a1 + 16);
if ( v2 )
{
SSL_CTX = SSL_get_SSL_CTX(*(_QWORD *)(a1 + 16));
if ( SSL_CTX )
SSL_CTX_free(SSL_CTX);
SSL_set_quiet_shutdown(v2, 1LL);
v4 = 3;
do
{
v1 = SSL_shutdown(v2);
v5 = v4-- == 0;
}
while ( !v1 && !v5 );
SSL_free(v2);
*(_QWORD *)(a1 + 16) = 0LL;
}
}
return v1;
}
| ma_tls_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15B,0x1
TEST RDI,RDI
JZ 0x0012854b
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x10]
TEST R14,R14
JZ 0x0012854b
MOV RDI,R14
CALL 0x001130f0
TEST RAX,RAX
JZ 0x0012850d
MOV RDI,RAX
CALL 0x00113090
LAB_0012850d:
MOV RDI,R14
MOV ESI,0x1
CALL 0x001134a0
MOV R12D,0x3
LAB_00128520:
MOV RDI,R14
CALL 0x00113510
MOV R15D,EAX
SUB R12D,0x1
SETC AL
TEST R15D,R15D
JNZ 0x0012853b
TEST AL,AL
JZ 0x00128520
LAB_0012853b:
MOV RDI,R14
CALL 0x00113280
MOV qword ptr [RBX + 0x10],0x0
LAB_0012854b:
MOV EAX,R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong ma_tls_close(long param_1)
{
SSL *ssl;
uint uVar1;
SSL_CTX *pSVar2;
int iVar3;
int8 unaff_R15;
ulong uVar4;
bool bVar5;
uVar4 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1);
if ((param_1 != 0) && (ssl = *(SSL **)(param_1 + 0x10), ssl != (SSL *)0x0)) {
pSVar2 = SSL_get_SSL_CTX(ssl);
if (pSVar2 != (SSL_CTX *)0x0) {
SSL_CTX_free(pSVar2);
}
SSL_set_quiet_shutdown(ssl,1);
iVar3 = 3;
do {
uVar1 = SSL_shutdown(ssl);
uVar4 = (ulong)uVar1;
bVar5 = iVar3 != 0;
iVar3 = iVar3 + -1;
if (uVar1 != 0) break;
} while (bVar5);
SSL_free(ssl);
*(int8 *)(param_1 + 0x10) = 0;
}
return uVar4 & 0xffffffff;
}
|
|
415 | escape_string_for_mysql | eloqsql/mysys/charset.c | size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
char escape= 0;
#ifdef USE_MB
int tmp_length= my_ci_charlen(charset_info, (const uchar *) from, (const uchar *) end);
if (tmp_length > 1)
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
If the next character appears to begin a multi-byte character, we
escape that first byte of that apparent multi-byte character. (The
character just looks like a multi-byte character -- if it were actually
a multi-byte character, it would have been passed through in the test
above.)
Without this check, we can create a problem by converting an invalid
multi-byte character into a valid one. For example, 0xbf27 is not
a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
*/
if (tmp_length < 1) /* Bad byte sequence */
escape= *from;
else
#endif
switch (*from) {
case 0: /* Must be escaped for 'mysql' */
escape= '0';
break;
case '\n': /* Must be escaped for logs */
escape= 'n';
break;
case '\r':
escape= 'r';
break;
case '\\':
escape= '\\';
break;
case '\'':
escape= '\'';
break;
case '"': /* Better safe than sorry */
escape= '"';
break;
case '\032': /* This gives problems on Win32 */
escape= 'Z';
break;
}
if (escape)
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\\';
*to++= escape;
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
} | O3 | c | escape_string_for_mysql:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
leaq (%r8,%r8), %rax
subq $0x1, %r12
cmovbq %rax, %r12
movq %r9, -0x38(%rbp)
movb $0x0, (%r9)
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
testq %r8, %r8
jle 0x2f7a3
movq %r8, %r15
movq %rcx, %r13
movq %rdi, %r14
movq -0x30(%rbp), %rbx
addq %rbx, %r12
addq %rcx, %r15
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
cmpl $0x2, %eax
jl 0x2f71a
movl %ecx, %eax
addq %rbx, %rax
cmpq %r12, %rax
ja 0x2f799
decq %r13
movq %r13, %rdx
leaq 0x1(%rdx), %r13
leaq 0x1(%rbx), %rax
movb 0x1(%rdx), %dl
movb %dl, (%rbx)
movq %r13, %rdx
movq %rax, %rbx
decl %ecx
jne 0x2f701
jmp 0x2f770
movb (%r13), %dl
cmpl $0x1, %ecx
jne 0x2f73c
movzbl %dl, %eax
cmpl $0x19, %eax
jle 0x2f751
cmpl $0x26, %eax
jg 0x2f781
cmpl $0x1a, %eax
je 0x2f791
cmpl $0x22, %eax
je 0x2f740
jmp 0x2f765
testb %dl, %dl
je 0x2f763
leaq 0x2(%rbx), %rax
cmpq %r12, %rax
ja 0x2f799
movb $0x5c, (%rbx)
movb %dl, 0x1(%rbx)
jmp 0x2f770
testl %eax, %eax
je 0x2f78d
cmpl $0xa, %eax
je 0x2f795
cmpl $0xd, %eax
jne 0x2f765
movb $0x72, %dl
jmp 0x2f740
xorl %edx, %edx
leaq 0x1(%rbx), %rax
cmpq %r12, %rax
ja 0x2f799
movb %dl, (%rbx)
incq %r13
movq %rax, %rbx
cmpq %r15, %r13
jb 0x2f6d0
jmp 0x2f7a3
cmpl $0x27, %eax
je 0x2f740
cmpl $0x5c, %eax
je 0x2f740
jmp 0x2f765
movb $0x30, %dl
jmp 0x2f740
movb $0x5a, %dl
jmp 0x2f740
movb $0x6e, %dl
jmp 0x2f740
movq -0x38(%rbp), %rax
movb $0x1, (%rax)
movq %rbx, %rax
movb $0x0, (%rax)
subq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| escape_string_for_mysql:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
lea rax, [r8+r8]
sub r12, 1
cmovb r12, rax
mov [rbp+var_38], r9
mov byte ptr [r9], 0
mov [rbp+var_30], rsi
mov rax, rsi
test r8, r8
jle loc_2F7A3
mov r15, r8
mov r13, rcx
mov r14, rdi
mov rbx, [rbp+var_30]
add r12, rbx
add r15, rcx
loc_2F6D0:
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r13
mov rdx, r15
call qword ptr [rax+0C0h]
mov ecx, eax
cmp eax, 2
jl short loc_2F71A
mov eax, ecx
add rax, rbx
cmp rax, r12
ja loc_2F799
dec r13
mov rdx, r13
loc_2F701:
lea r13, [rdx+1]
lea rax, [rbx+1]
mov dl, [rdx+1]
mov [rbx], dl
mov rdx, r13
mov rbx, rax
dec ecx
jnz short loc_2F701
jmp short loc_2F770
loc_2F71A:
mov dl, [r13+0]
cmp ecx, 1
jnz short loc_2F73C
movzx eax, dl
cmp eax, 19h
jle short loc_2F751
cmp eax, 26h ; '&'
jg short loc_2F781
cmp eax, 1Ah
jz short loc_2F791
cmp eax, 22h ; '"'
jz short loc_2F740
jmp short loc_2F765
loc_2F73C:
test dl, dl
jz short loc_2F763
loc_2F740:
lea rax, [rbx+2]
cmp rax, r12
ja short loc_2F799
mov byte ptr [rbx], 5Ch ; '\'
mov [rbx+1], dl
jmp short loc_2F770
loc_2F751:
test eax, eax
jz short loc_2F78D
cmp eax, 0Ah
jz short loc_2F795
cmp eax, 0Dh
jnz short loc_2F765
mov dl, 72h ; 'r'
jmp short loc_2F740
loc_2F763:
xor edx, edx
loc_2F765:
lea rax, [rbx+1]
cmp rax, r12
ja short loc_2F799
mov [rbx], dl
loc_2F770:
inc r13
mov rbx, rax
cmp r13, r15
jb loc_2F6D0
jmp short loc_2F7A3
loc_2F781:
cmp eax, 27h ; '''
jz short loc_2F740
cmp eax, 5Ch ; '\'
jz short loc_2F740
jmp short loc_2F765
loc_2F78D:
mov dl, 30h ; '0'
jmp short loc_2F740
loc_2F791:
mov dl, 5Ah ; 'Z'
jmp short loc_2F740
loc_2F795:
mov dl, 6Eh ; 'n'
jmp short loc_2F740
loc_2F799:
mov rax, [rbp+var_38]
mov byte ptr [rax], 1
mov rax, rbx
loc_2F7A3:
mov byte ptr [rax], 0
sub rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * escape_string_for_mysql(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
_BYTE *a6)
{
long long v6; // r12
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // r13
unsigned __int8 *v9; // rbx
unsigned long long v10; // r12
unsigned long long v11; // r15
int v12; // ecx
unsigned __int8 *v13; // rdx
unsigned __int8 v14; // dl
v6 = a3 - 1;
if ( !a3 )
v6 = 2 * a5;
*a6 = 0;
v7 = a2;
if ( a5 > 0 )
{
v8 = a4;
v9 = a2;
v10 = (unsigned long long)&a2[v6];
v11 = (unsigned long long)&a4[a5];
do
{
v12 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v8,
v11);
if ( v12 >= 2 )
{
if ( (unsigned long long)&v9[v12] > v10 )
goto LABEL_34;
v13 = v8 - 1;
do
{
v8 = v13 + 1;
v7 = v9 + 1;
*v9++ = *++v13;
--v12;
}
while ( v12 );
goto LABEL_26;
}
v14 = *v8;
if ( v12 == 1 )
{
if ( v14 <= 0x19u )
{
switch ( v14 )
{
case 0u:
v14 = 48;
goto LABEL_17;
case 0xAu:
v14 = 110;
goto LABEL_17;
case 0xDu:
v14 = 114;
LABEL_17:
v7 = v9 + 2;
if ( (unsigned long long)(v9 + 2) > v10 )
goto LABEL_34;
*v9 = 92;
v9[1] = v14;
goto LABEL_26;
}
}
else if ( v14 > 0x26u )
{
if ( v14 == 39 || v14 == 92 )
goto LABEL_17;
}
else
{
if ( v14 == 26 )
{
v14 = 90;
goto LABEL_17;
}
if ( v14 == 34 )
goto LABEL_17;
}
}
else
{
if ( v14 )
goto LABEL_17;
v14 = 0;
}
v7 = v9 + 1;
if ( (unsigned long long)(v9 + 1) > v10 )
{
LABEL_34:
*a6 = 1;
v7 = v9;
break;
}
*v9 = v14;
LABEL_26:
++v8;
v9 = v7;
}
while ( (unsigned long long)v8 < v11 );
}
*v7 = 0;
return (_BYTE *)(v7 - a2);
}
| escape_string_for_mysql:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
LEA RAX,[R8 + R8*0x1]
SUB R12,0x1
CMOVC R12,RAX
MOV qword ptr [RBP + -0x38],R9
MOV byte ptr [R9],0x0
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
TEST R8,R8
JLE 0x0012f7a3
MOV R15,R8
MOV R13,RCX
MOV R14,RDI
MOV RBX,qword ptr [RBP + -0x30]
ADD R12,RBX
ADD R15,RCX
LAB_0012f6d0:
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
CMP EAX,0x2
JL 0x0012f71a
MOV EAX,ECX
ADD RAX,RBX
CMP RAX,R12
JA 0x0012f799
DEC R13
MOV RDX,R13
LAB_0012f701:
LEA R13,[RDX + 0x1]
LEA RAX,[RBX + 0x1]
MOV DL,byte ptr [RDX + 0x1]
MOV byte ptr [RBX],DL
MOV RDX,R13
MOV RBX,RAX
DEC ECX
JNZ 0x0012f701
JMP 0x0012f770
LAB_0012f71a:
MOV DL,byte ptr [R13]
CMP ECX,0x1
JNZ 0x0012f73c
MOVZX EAX,DL
CMP EAX,0x19
JLE 0x0012f751
CMP EAX,0x26
JG 0x0012f781
CMP EAX,0x1a
JZ 0x0012f791
CMP EAX,0x22
JZ 0x0012f740
JMP 0x0012f765
LAB_0012f73c:
TEST DL,DL
JZ 0x0012f763
LAB_0012f740:
LEA RAX,[RBX + 0x2]
CMP RAX,R12
JA 0x0012f799
MOV byte ptr [RBX],0x5c
MOV byte ptr [RBX + 0x1],DL
JMP 0x0012f770
LAB_0012f751:
TEST EAX,EAX
JZ 0x0012f78d
CMP EAX,0xa
JZ 0x0012f795
CMP EAX,0xd
JNZ 0x0012f765
MOV DL,0x72
JMP 0x0012f740
LAB_0012f763:
XOR EDX,EDX
LAB_0012f765:
LEA RAX,[RBX + 0x1]
CMP RAX,R12
JA 0x0012f799
MOV byte ptr [RBX],DL
LAB_0012f770:
INC R13
MOV RBX,RAX
CMP R13,R15
JC 0x0012f6d0
JMP 0x0012f7a3
LAB_0012f781:
CMP EAX,0x27
JZ 0x0012f740
CMP EAX,0x5c
JZ 0x0012f740
JMP 0x0012f765
LAB_0012f78d:
MOV DL,0x30
JMP 0x0012f740
LAB_0012f791:
MOV DL,0x5a
JMP 0x0012f740
LAB_0012f795:
MOV DL,0x6e
JMP 0x0012f740
LAB_0012f799:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x1
MOV RAX,RBX
LAB_0012f7a3:
MOV byte ptr [RAX],0x0
SUB RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long escape_string_for_mysql
(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,
int1 *param_6)
{
uint uVar1;
byte *pbVar2;
ulong uVar3;
byte bVar4;
byte *pbVar5;
byte *pbVar6;
long lVar7;
byte *pbVar8;
byte *pbVar9;
lVar7 = param_3 + -1;
if (param_3 == 0) {
lVar7 = param_5 * 2;
}
*param_6 = 0;
pbVar2 = param_2;
if (0 < param_5) {
pbVar8 = param_2 + lVar7;
pbVar9 = param_4 + param_5;
pbVar6 = param_2;
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_4,pbVar9);
uVar3 = (ulong)uVar1;
if ((int)uVar1 < 2) {
bVar4 = *param_4;
if (uVar1 == 1) {
if (bVar4 < 0x1a) {
if (bVar4 == 0) {
bVar4 = 0x30;
}
else if (bVar4 == 10) {
bVar4 = 0x6e;
}
else {
if (bVar4 != 0xd) goto LAB_0012f765;
bVar4 = 0x72;
}
}
else if (bVar4 < 0x27) {
if (bVar4 == 0x1a) {
bVar4 = 0x5a;
}
else if (bVar4 != 0x22) goto LAB_0012f765;
}
else if ((bVar4 != 0x27) && (bVar4 != 0x5c)) {
LAB_0012f765:
pbVar2 = pbVar6 + 1;
if (pbVar8 < pbVar2) goto LAB_0012f799;
*pbVar6 = bVar4;
goto LAB_0012f770;
}
}
else if (bVar4 == 0) {
bVar4 = 0;
goto LAB_0012f765;
}
pbVar2 = pbVar6 + 2;
if (pbVar8 < pbVar2) goto LAB_0012f799;
*pbVar6 = 0x5c;
pbVar6[1] = bVar4;
}
else {
if (pbVar8 < pbVar6 + uVar3) {
LAB_0012f799:
*param_6 = 1;
pbVar2 = pbVar6;
break;
}
pbVar5 = param_4 + -1;
do {
param_4 = pbVar5 + 1;
pbVar2 = pbVar6 + 1;
*pbVar6 = pbVar5[1];
uVar1 = (int)uVar3 - 1;
uVar3 = (ulong)uVar1;
pbVar5 = param_4;
pbVar6 = pbVar2;
} while (uVar1 != 0);
}
LAB_0012f770:
param_4 = param_4 + 1;
pbVar6 = pbVar2;
} while (param_4 < pbVar9);
}
*pbVar2 = 0;
return (long)pbVar2 - (long)param_2;
}
|
|
416 | google::protobuf::SourceCodeInfo::_InternalParse(char const*, google::protobuf::internal::ParseContext*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | const char* SourceCodeInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .google.protobuf.SourceCodeInfo.Location location = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_location(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
} | O3 | cpp | google::protobuf::SourceCodeInfo::_InternalParse(char const*, google::protobuf::internal::ParseContext*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movl 0x5c(%rdx), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7347e
testb %al, %al
jne 0xf91fd
leaq 0x8(%r14), %r15
addq $0x10, %r14
leaq 0x8(%rsp), %r12
movq 0x8(%rsp), %rdi
movzbl (%rdi), %r13d
leaq 0x1(%rdi), %rax
testb %r13b, %r13b
jns 0xf9135
movzbl (%rax), %eax
movl %eax, %ecx
shll $0x7, %ecx
addl %ecx, %r13d
addl $-0x80, %r13d
testb %al, %al
js 0xf912a
addq $0x2, %rdi
movq %rdi, %rax
jmp 0xf9135
movl %r13d, %esi
callq 0x7ce8e
movl %edx, %r13d
movq %rax, 0x8(%rsp)
cmpl $0xa, %r13d
je 0xf9183
testl %r13d, %r13d
je 0xf91e6
movl %r13d, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
je 0xf91e6
movq (%r15), %rsi
testb $0x1, %sil
je 0xf91d4
andq $-0x4, %rsi
addq $0x8, %rsi
movl %r13d, %edi
movq %rax, %rdx
movq %rbx, %rcx
callq 0xa3709
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0xf91bc
jmp 0xf91f4
decq %rax
incq %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0xe3034
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2fce4
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0xf91f4
cmpq %rax, (%rbx)
jbe 0xf91bc
cmpb $0xa, (%rax)
je 0xf9186
movl 0x5c(%rbx), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7347e
testb %al, %al
je 0xf90fc
jmp 0xf91fd
movq %r15, %rdi
callq 0x735aa
movq %rax, %rsi
movq 0x8(%rsp), %rax
jmp 0xf9169
testq %rax, %rax
je 0xf91f4
decl %r13d
movl %r13d, 0x50(%rbx)
jmp 0xf91fd
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN6google8protobuf14SourceCodeInfo14_InternalParseEPKcPNS0_8internal12ParseContextE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rdi
lea rax, [rsp+38h+var_30]
mov [rax], rsi
mov edx, [rdx+5Ch]; int
mov rdi, rbx; this
mov rsi, rax; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
test al, al
jnz loc_F91FD
lea r15, [r14+8]
add r14, 10h
lea r12, [rsp+38h+var_30]
loc_F90FC:
mov rdi, [rsp+38h+var_30]; this
movzx r13d, byte ptr [rdi]
lea rax, [rdi+1]
test r13b, r13b
jns short loc_F9135
movzx eax, byte ptr [rax]
mov ecx, eax
shl ecx, 7
add r13d, ecx
add r13d, 0FFFFFF80h
test al, al
js short loc_F912A
add rdi, 2
mov rax, rdi
jmp short loc_F9135
loc_F912A:
mov esi, r13d; char *
call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint)
mov r13d, edx
loc_F9135:
mov [rsp+38h+var_30], rax
cmp r13d, 0Ah
jz short loc_F9183
test r13d, r13d
jz loc_F91E6
mov ecx, r13d
and ecx, 7
cmp ecx, 4
jz loc_F91E6
mov rsi, [r15]
test sil, 1
jz short loc_F91D4
and rsi, 0FFFFFFFFFFFFFFFCh
add rsi, 8; unsigned __int64
loc_F9169:
mov edi, r13d; this
mov rdx, rax; google::protobuf::UnknownFieldSet *
mov rcx, rbx; char *
call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *)
mov [rsp+38h+var_30], rax
test rax, rax
jnz short loc_F91BC
jmp short loc_F91F4
loc_F9183:
dec rax
loc_F9186:
inc rax
mov [rsp+38h+var_30], rax
mov rdi, r14; this
xor esi, esi
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS0_16RepeatedPtrFieldINS0_23SourceCodeInfo_LocationEE11TypeHandlerEEEPNT_4TypeEPKS9_; google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler::Type * const*)
mov rdx, [rsp+38h+var_30]; char *
mov rdi, rbx; this
mov rsi, rax; google::protobuf::MessageLite *
call _ZN6google8protobuf8internal12ParseContext12ParseMessageEPNS0_11MessageLiteEPKc; google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite *,char const*)
mov [rsp+38h+var_30], rax
test rax, rax
jz short loc_F91F4
cmp [rbx], rax
jbe short loc_F91BC
cmp byte ptr [rax], 0Ah
jz short loc_F9186
loc_F91BC:
mov edx, [rbx+5Ch]; int
mov rdi, rbx; this
mov rsi, r12; char **
call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int)
test al, al
jz loc_F90FC
jmp short loc_F91FD
loc_F91D4:
mov rdi, r15
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void)
mov rsi, rax
mov rax, [rsp+38h+var_30]
jmp short loc_F9169
loc_F91E6:
test rax, rax
jz short loc_F91F4
dec r13d
mov [rbx+50h], r13d
jmp short loc_F91FD
loc_F91F4:
mov [rsp+38h+var_30], 0
loc_F91FD:
mov rax, [rsp+38h+var_30]
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| google::protobuf::internal * google::protobuf::SourceCodeInfo::_InternalParse(
google::protobuf::SourceCodeInfo *this,
google::protobuf::internal *a2,
google::protobuf::internal::ParseContext *a3)
{
google::protobuf::internal::ParseContext *v4; // r8
long long *v5; // r15
unsigned int v6; // r13d
google::protobuf::internal *TagFallback; // rax
int v8; // eax
unsigned int v9; // edx
unsigned long long v10; // rsi
unsigned long long v11; // rax
google::protobuf::MessageLite *v12; // rax
google::protobuf::internal *v14[6]; // [rsp+8h] [rbp-30h] BYREF
v14[0] = a2;
if ( !google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(a3, (const char **)v14, *((_DWORD *)a3 + 23)) )
{
v5 = (long long *)((char *)this + 8);
while ( 1 )
{
v6 = *(unsigned __int8 *)v14[0];
TagFallback = (google::protobuf::internal *)((char *)v14[0] + 1);
if ( (v6 & 0x80u) != 0 )
{
v8 = *(unsigned __int8 *)TagFallback;
v6 = (v8 << 7) + v6 - 128;
if ( (v8 & 0x80u) != 0 )
{
TagFallback = (google::protobuf::internal *)google::protobuf::internal::ReadTagFallback(
v14[0],
(const char *)v6);
v6 = v9;
}
else
{
TagFallback = (google::protobuf::internal *)((char *)v14[0] + 2);
}
}
v14[0] = TagFallback;
if ( v6 == 10 )
{
v11 = (unsigned long long)TagFallback - 1;
while ( 1 )
{
v14[0] = (google::protobuf::internal *)(v11 + 1);
v12 = (google::protobuf::MessageLite *)google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>((google::protobuf::SourceCodeInfo *)((char *)this + 16));
v11 = google::protobuf::internal::ParseContext::ParseMessage(a3, v12, (const char *)v14[0]);
v14[0] = (google::protobuf::internal *)v11;
if ( !v11 )
goto LABEL_23;
if ( *(_QWORD *)a3 <= v11 || *(_BYTE *)v11 != 10 )
goto LABEL_18;
}
}
if ( !v6 || (v6 & 7) == 4 )
break;
if ( (*v5 & 1) != 0 )
{
v10 = (*v5 & 0xFFFFFFFFFFFFFFFCLL) + 8;
}
else
{
v10 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(v5);
TagFallback = v14[0];
}
v14[0] = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse(
(google::protobuf::internal *)v6,
v10,
TagFallback,
(const char *)a3,
v4);
if ( !v14[0] )
goto LABEL_23;
LABEL_18:
if ( google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(a3, (const char **)v14, *((_DWORD *)a3 + 23)) )
return v14[0];
}
if ( TagFallback )
{
*((_DWORD *)a3 + 20) = v6 - 1;
return v14[0];
}
LABEL_23:
v14[0] = 0LL;
}
return v14[0];
}
| _InternalParse:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RDI
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX],RSI
MOV EDX,dword ptr [RDX + 0x5c]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017347e
TEST AL,AL
JNZ 0x001f91fd
LEA R15,[R14 + 0x8]
ADD R14,0x10
LEA R12,[RSP + 0x8]
LAB_001f90fc:
MOV RDI,qword ptr [RSP + 0x8]
MOVZX R13D,byte ptr [RDI]
LEA RAX,[RDI + 0x1]
TEST R13B,R13B
JNS 0x001f9135
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
SHL ECX,0x7
ADD R13D,ECX
ADD R13D,-0x80
TEST AL,AL
JS 0x001f912a
ADD RDI,0x2
MOV RAX,RDI
JMP 0x001f9135
LAB_001f912a:
MOV ESI,R13D
CALL 0x0017ce8e
MOV R13D,EDX
LAB_001f9135:
MOV qword ptr [RSP + 0x8],RAX
CMP R13D,0xa
JZ 0x001f9183
TEST R13D,R13D
JZ 0x001f91e6
MOV ECX,R13D
AND ECX,0x7
CMP ECX,0x4
JZ 0x001f91e6
MOV RSI,qword ptr [R15]
TEST SIL,0x1
JZ 0x001f91d4
AND RSI,-0x4
ADD RSI,0x8
LAB_001f9169:
MOV EDI,R13D
MOV RDX,RAX
MOV RCX,RBX
CALL 0x001a3709
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JNZ 0x001f91bc
JMP 0x001f91f4
LAB_001f9183:
DEC RAX
LAB_001f9186:
INC RAX
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x001e3034
MOV RDX,qword ptr [RSP + 0x8]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012fce4
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x001f91f4
CMP qword ptr [RBX],RAX
JBE 0x001f91bc
CMP byte ptr [RAX],0xa
JZ 0x001f9186
LAB_001f91bc:
MOV EDX,dword ptr [RBX + 0x5c]
MOV RDI,RBX
MOV RSI,R12
CALL 0x0017347e
TEST AL,AL
JZ 0x001f90fc
JMP 0x001f91fd
LAB_001f91d4:
MOV RDI,R15
CALL 0x001735aa
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x8]
JMP 0x001f9169
LAB_001f91e6:
TEST RAX,RAX
JZ 0x001f91f4
DEC R13D
MOV dword ptr [RBX + 0x50],R13D
JMP 0x001f91fd
LAB_001f91f4:
MOV qword ptr [RSP + 0x8],0x0
LAB_001f91fd:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* google::protobuf::SourceCodeInfo::_InternalParse(char const*,
google::protobuf::internal::ParseContext*) */
byte * __thiscall
google::protobuf::SourceCodeInfo::_InternalParse
(SourceCodeInfo *this,char *param_1,ParseContext *param_2)
{
byte bVar1;
byte bVar2;
ulong uVar3;
char cVar4;
Type *pTVar5;
UnknownFieldSet *pUVar6;
uint uVar7;
int1 auVar8 [12];
byte *local_30;
local_30 = (byte *)param_1;
cVar4 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_30,*(int *)(param_2 + 0x5c));
if (cVar4 == '\0') {
do {
bVar1 = *local_30;
auVar8[8] = bVar1;
auVar8._0_8_ = local_30 + 1;
auVar8._9_3_ = 0;
if ((char)bVar1 < '\0') {
bVar2 = local_30[1];
uVar7 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80;
if ((char)bVar2 < '\0') {
auVar8 = internal::ReadTagFallback((char *)local_30,uVar7);
}
else {
auVar8._8_4_ = uVar7;
auVar8._0_8_ = local_30 + 2;
}
}
uVar7 = auVar8._8_4_;
local_30 = auVar8._0_8_;
if (uVar7 == 10) {
local_30 = local_30 + -1;
do {
local_30 = local_30 + 1;
pTVar5 = internal::RepeatedPtrFieldBase::
Add<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>
((Type *)(this + 0x10));
local_30 = (byte *)internal::ParseContext::ParseMessage
(param_2,(MessageLite *)pTVar5,(char *)local_30);
if (local_30 == (byte *)0x0) {
return (byte *)0x0;
}
} while ((local_30 < *(byte **)param_2) && (*local_30 == 10));
}
else {
if ((uVar7 == 0) || ((uVar7 & 7) == 4)) {
if (local_30 == (byte *)0x0) {
return (byte *)0x0;
}
*(uint *)(param_2 + 0x50) = uVar7 - 1;
return local_30;
}
uVar3 = *(ulong *)(this + 8);
if ((uVar3 & 1) == 0) {
pUVar6 = internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
else {
pUVar6 = (UnknownFieldSet *)((uVar3 & 0xfffffffffffffffc) + 8);
}
local_30 = (byte *)internal::UnknownFieldParse((ulong)uVar7,pUVar6,(char *)local_30,param_2)
;
if (local_30 == (byte *)0x0) {
return (byte *)0x0;
}
}
cVar4 = internal::EpsCopyInputStream::DoneWithCheck
((EpsCopyInputStream *)param_2,(char **)&local_30,*(int *)(param_2 + 0x5c));
} while (cVar4 == '\0');
}
return local_30;
}
|
|
417 | 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 0x26e9e
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x26f25
movq -0x10(%rbp), %rax
cmpl $0x0, 0x368(%rax)
je 0x26f1d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x370(%rax)
je 0x26ed6
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x370(%rcx), %rcx
imulq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x26f25
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x3954e(%rip), %rax # 0x60430
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0x26f0b
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x26f25
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x26f25
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_26E9E
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp loc_26F25
loc_26E9E:
mov rax, [rbp+var_10]
cmp dword ptr [rax+368h], 0
jz short loc_26F1D
mov rax, [rbp+var_10]
cmp qword ptr [rax+370h], 0
jz short loc_26ED6
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_26F25
loc_26ED6:
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_26F0B
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_26F25
loc_26F0B:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
jmp short loc_26F25
loc_26F1D:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_26F25:
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 0x00126e9e
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00126f25
LAB_00126e9e:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x368],0x0
JZ 0x00126f1d
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x370],0x0
JZ 0x00126ed6
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 0x00126f25
LAB_00126ed6:
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,EAX
LEA RAX,[0x160430]
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 0x00126f0b
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 0x00126f25
LAB_00126f0b:
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 0x00126f25
LAB_00126f1d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00126f25:
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_00160438)[(ulong)param_2 * 6] < 1) {
local_10 = *(long *)(param_3 + param_4 * 8);
}
else {
local_10 = param_3 + (int)(&DAT_00160438)[(ulong)param_2 * 6] * param_4;
}
}
else {
local_10 = param_3 + *(long *)(param_1 + 0x370) * param_4;
}
}
return local_10;
}
|
|
418 | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [13], 0>(char const (&) [13]) const | monkey531[P]llama/common/./json.hpp | constexpr bool is_object() const noexcept
{
return m_data.m_type == value_t::object;
} | O3 | cpp | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [13], 0>(char const (&) [13]) const:
cmpb $0x1, (%rdi)
jne 0x2d0b7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq (%r12), %rbx
cmpq 0x8(%r12), %rbx
je 0x2d0ba
movq %rsi, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x191d0
testl %eax, %eax
je 0x2d0aa
addq $0x30, %rbx
cmpq 0x8(%r12), %rbx
jne 0x2d090
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
jmp 0x2d0bd
xorl %eax, %eax
retq
movq %rbx, %rax
cmpq %rbx, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
cmp byte ptr [rdi], 1
jnz short loc_2D0B7
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
mov r12, [rdi+8]
mov rbx, [r12]
cmp rbx, [r12+8]
jz short loc_2D0BA
mov r15, rsi
loc_2D090:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_2D0AA
add rbx, 30h ; '0'
cmp rbx, [r12+8]
jnz short loc_2D090
loc_2D0AA:
mov rax, rbx
mov rcx, [r14+8]
mov rbx, [rcx+8]
jmp short loc_2D0BD
loc_2D0B7:
xor eax, eax
retn
loc_2D0BA:
mov rax, rbx
loc_2D0BD:
cmp rax, rbx
setnz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
long long a1,
long long a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
if ( *(_BYTE *)a1 != 1 )
return 0;
v2 = *(long long **)(a1 + 8);
v3 = *v2;
if ( *v2 == v2[1] )
{
v4 = *v2;
}
else
{
do
{
if ( !(unsigned int)std::string::compare(v3, a2) )
break;
v3 += 48LL;
}
while ( v3 != v2[1] );
v4 = v3;
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
return v4 != v3;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
CMP byte ptr [RDI],0x1
JNZ 0x0012d0b7
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [R12]
CMP RBX,qword ptr [R12 + 0x8]
JZ 0x0012d0ba
MOV R15,RSI
LAB_0012d090:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001191d0
TEST EAX,EAX
JZ 0x0012d0aa
ADD RBX,0x30
CMP RBX,qword ptr [R12 + 0x8]
JNZ 0x0012d090
LAB_0012d0aa:
MOV RAX,RBX
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
JMP 0x0012d0bd
LAB_0012d0b7:
XOR EAX,EAX
RET
LAB_0012d0ba:
MOV RAX,RBX
LAB_0012d0bd:
CMP RAX,RBX
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(char *param_1)
{
long *plVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
if (*param_1 != '\x01') {
return 0;
}
plVar1 = *(long **)(param_1 + 8);
pcVar3 = (char *)*plVar1;
pcVar4 = pcVar3;
if (pcVar3 != (char *)plVar1[1]) {
do {
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar3 = pcVar3 + 0x30;
} while (pcVar3 != (char *)plVar1[1]);
pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8);
}
return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4);
}
|
|
419 | radix_sort_int | davidesantangelo[P]vsort/vsort.c | static void radix_sort_int(int arr[], int n)
{
if (n <= 1)
return;
// Find min and max to handle range and negative numbers
int max_val = arr[0];
int min_val = arr[0];
for (int i = 1; i < n; i++)
{
if (arr[i] > max_val)
max_val = arr[i];
if (arr[i] < min_val)
min_val = arr[i];
}
// Shift values to be non-negative for radix sort
// Use unsigned int for intermediate calculations to avoid overflow with shift
unsigned int *temp_arr = malloc(n * sizeof(unsigned int));
if (!temp_arr)
{
vsort_log_error("Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort");
quicksort_int(arr, 0, n - 1);
return;
}
unsigned int max_shifted = 0;
long long current_val; // Use long long for intermediate addition
unsigned int shift_amount = 0;
// Determine shift amount carefully to avoid overflow
if (min_val < 0)
{
// Need to shift by abs(min_val). Check if max_val + abs(min_val) overflows unsigned int
current_val = (long long)max_val - (long long)min_val; // max_val + abs(min_val)
if (current_val > UINT_MAX)
{
vsort_log_error("Radix sort range exceeds unsigned int capacity after shift, falling back to quicksort.");
free(temp_arr);
quicksort_int(arr, 0, n - 1);
return;
}
shift_amount = (unsigned int)(-min_val);
max_shifted = (unsigned int)current_val;
}
else
{
shift_amount = 0;
max_shifted = (unsigned int)max_val;
}
// Apply shift
for (int i = 0; i < n; ++i)
{
temp_arr[i] = (unsigned int)arr[i] + shift_amount;
}
// Temporary buffer for sorted output during passes
unsigned int *output = malloc(n * sizeof(unsigned int));
if (!output)
{
vsort_log_error("Memory allocation failed in radix_sort_int output, falling back to quicksort");
free(temp_arr);
quicksort_int(arr, 0, n - 1);
return;
}
// Process 8 bits (1 byte) at a time
const int bits_per_pass = 8;
const int num_bins = 1 << bits_per_pass; // 256 bins
const unsigned int mask = num_bins - 1;
int count[256]; // Count array on stack
// Determine number of passes needed based on max shifted value
int passes = 0;
if (max_shifted > 0)
{
// Calculate number of bits needed for max_shifted value using __builtin_clz
int leading_zeros = __builtin_clz(max_shifted);
int num_bits = sizeof(unsigned int) * 8 - leading_zeros;
passes = (num_bits + bits_per_pass - 1) / bits_per_pass; // Ceiling division
}
else
{
passes = 1; // At least one pass even if all numbers are 0 after shift
}
if (passes <= 0)
passes = 1; // Ensure at least one pass
// LSD Radix Sort passes
unsigned int *current_input = temp_arr;
unsigned int *current_output = output;
for (int p = 0; p < passes; ++p)
{
int bit_shift = p * bits_per_pass;
// Clear count array
memset(count, 0, sizeof(count));
// Count occurrences of each byte value from current_input
for (int i = 0; i < n; i++)
{
unsigned int bin_index = (current_input[i] >> bit_shift) & mask;
count[bin_index]++;
}
// Compute cumulative counts (prefix sum)
for (int i = 1; i < num_bins; i++)
{
count[i] += count[i - 1];
}
// Build the output array based on counts
// Iterate backwards for stability
for (int i = n - 1; i >= 0; i--)
{
unsigned int bin_index = (current_input[i] >> bit_shift) & mask;
current_output[--count[bin_index]] = current_input[i]; // Place in correct sorted position
}
// Swap input and output buffers for the next pass
unsigned int *swap_temp = current_input;
current_input = current_output;
current_output = swap_temp;
}
// The final sorted data is in current_input (which might be temp_arr or output)
// Undo shift and copy back to original int array
for (int i = 0; i < n; ++i)
{
arr[i] = (int)(current_input[i] - shift_amount);
}
free(temp_arr); // Free original temp buffer
free(output); // Free the other buffer used for swapping
} | O0 | c | radix_sort_int:
subq $0x4a8, %rsp # imm = 0x4A8
movq %rdi, 0x4a0(%rsp)
movl %esi, 0x49c(%rsp)
cmpl $0x1, 0x49c(%rsp)
jg 0x2b65
jmp 0x303e
movq 0x4a0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x498(%rsp)
movq 0x4a0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x494(%rsp)
movl $0x1, 0x490(%rsp)
movl 0x490(%rsp), %eax
cmpl 0x49c(%rsp), %eax
jge 0x2c2a
movq 0x4a0(%rsp), %rax
movslq 0x490(%rsp), %rcx
movl (%rax,%rcx,4), %eax
cmpl 0x498(%rsp), %eax
jle 0x2bdc
movq 0x4a0(%rsp), %rax
movslq 0x490(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x498(%rsp)
movq 0x4a0(%rsp), %rax
movslq 0x490(%rsp), %rcx
movl (%rax,%rcx,4), %eax
cmpl 0x494(%rsp), %eax
jge 0x2c12
movq 0x4a0(%rsp), %rax
movslq 0x490(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x494(%rsp)
jmp 0x2c14
movl 0x490(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x490(%rsp)
jmp 0x2b92
movslq 0x49c(%rsp), %rdi
shlq $0x2, %rdi
callq 0x1130
movq %rax, 0x488(%rsp)
cmpq $0x0, 0x488(%rsp)
jne 0x2c7a
leaq 0x2b17(%rip), %rdi # 0x576c
movb $0x0, %al
callq 0x4400
movq 0x4a0(%rsp), %rdi
movl 0x49c(%rsp), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x3050
jmp 0x303e
movl $0x0, 0x484(%rsp)
movl $0x0, 0x474(%rsp)
cmpl $0x0, 0x494(%rsp)
jge 0x2d22
movslq 0x498(%rsp), %rax
movslq 0x494(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x478(%rsp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, 0x478(%rsp)
jle 0x2d01
leaq 0x2aec(%rip), %rdi # 0x57bb
movb $0x0, %al
callq 0x4400
movq 0x488(%rsp), %rdi
callq 0x1030
movq 0x4a0(%rsp), %rdi
movl 0x49c(%rsp), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x3050
jmp 0x303e
xorl %eax, %eax
subl 0x494(%rsp), %eax
movl %eax, 0x474(%rsp)
movq 0x478(%rsp), %rax
movl %eax, 0x484(%rsp)
jmp 0x2d3b
movl $0x0, 0x474(%rsp)
movl 0x498(%rsp), %eax
movl %eax, 0x484(%rsp)
movl $0x0, 0x470(%rsp)
movl 0x470(%rsp), %eax
cmpl 0x49c(%rsp), %eax
jge 0x2d96
movq 0x4a0(%rsp), %rax
movslq 0x470(%rsp), %rcx
movl (%rax,%rcx,4), %edx
addl 0x474(%rsp), %edx
movq 0x488(%rsp), %rax
movslq 0x470(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x470(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x470(%rsp)
jmp 0x2d46
movslq 0x49c(%rsp), %rdi
shlq $0x2, %rdi
callq 0x1130
movq %rax, 0x468(%rsp)
cmpq $0x0, 0x468(%rsp)
jne 0x2df3
leaq 0x2a51(%rip), %rdi # 0x5812
movb $0x0, %al
callq 0x4400
movq 0x488(%rsp), %rdi
callq 0x1030
movq 0x4a0(%rsp), %rdi
movl 0x49c(%rsp), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x3050
jmp 0x303e
movl $0x8, 0x464(%rsp)
movl $0x100, 0x460(%rsp) # imm = 0x100
movl $0xff, 0x45c(%rsp)
movl $0x0, 0x4c(%rsp)
cmpl $0x0, 0x484(%rsp)
jbe 0x2e60
movl 0x484(%rsp), %eax
bsrl %eax, %eax
xorl $0x1f, %eax
movl %eax, 0x48(%rsp)
movslq 0x48(%rsp), %rcx
movl $0x20, %eax
subq %rcx, %rax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addl $0x8, %eax
subl $0x1, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, 0x4c(%rsp)
jmp 0x2e68
movl $0x1, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
jg 0x2e77
movl $0x1, 0x4c(%rsp)
movq 0x488(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x468(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x2fde
movl 0x2c(%rsp), %eax
shll $0x3, %eax
movl %eax, 0x28(%rsp)
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx # imm = 0x400
callq 0x10d0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x49c(%rsp), %eax
jge 0x2f10
movq 0x38(%rsp), %rax
movslq 0x24(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl 0x28(%rsp), %ecx
shrl %cl, %eax
andl $0xff, %eax
movl %eax, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl 0x50(%rsp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, 0x50(%rsp,%rax,4)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x2ecb
movl $0x1, 0x1c(%rsp)
cmpl $0x100, 0x1c(%rsp) # imm = 0x100
jge 0x2f49
movl 0x1c(%rsp), %eax
subl $0x1, %eax
cltq
movl 0x50(%rsp,%rax,4), %ecx
movslq 0x1c(%rsp), %rax
addl 0x50(%rsp,%rax,4), %ecx
movl %ecx, 0x50(%rsp,%rax,4)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2f18
movl 0x49c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
jl 0x2fb0
movq 0x38(%rsp), %rax
movslq 0x18(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl 0x28(%rsp), %ecx
shrl %cl, %eax
andl $0xff, %eax
movl %eax, 0x14(%rsp)
movq 0x38(%rsp), %rax
movslq 0x18(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x30(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, %esi
movl 0x50(%rsp,%rsi,4), %ecx
addl $-0x1, %ecx
movl %ecx, 0x50(%rsp,%rsi,4)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl 0x18(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x2f57
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2e99
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x49c(%rsp), %eax
jge 0x3024
movq 0x38(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl (%rax,%rcx,4), %edx
subl 0x474(%rsp), %edx
movq 0x4a0(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x2fe6
movq 0x488(%rsp), %rdi
callq 0x1030
movq 0x468(%rsp), %rdi
callq 0x1030
addq $0x4a8, %rsp # imm = 0x4A8
retq
nopw %cs:(%rax,%rax)
| radix_sort_int:
sub rsp, 4A8h
mov [rsp+4A8h+var_8], rdi
mov [rsp+4A8h+var_C], esi
cmp [rsp+4A8h+var_C], 1
jg short loc_2B65
jmp loc_303E
loc_2B65:
mov rax, [rsp+4A8h+var_8]
mov eax, [rax]
mov [rsp+4A8h+var_10], eax
mov rax, [rsp+4A8h+var_8]
mov eax, [rax]
mov [rsp+4A8h+var_14], eax
mov [rsp+4A8h+var_18], 1
loc_2B92:
mov eax, [rsp+4A8h+var_18]
cmp eax, [rsp+4A8h+var_C]
jge loc_2C2A
mov rax, [rsp+4A8h+var_8]
movsxd rcx, [rsp+4A8h+var_18]
mov eax, [rax+rcx*4]
cmp eax, [rsp+4A8h+var_10]
jle short loc_2BDC
mov rax, [rsp+4A8h+var_8]
movsxd rcx, [rsp+4A8h+var_18]
mov eax, [rax+rcx*4]
mov [rsp+4A8h+var_10], eax
loc_2BDC:
mov rax, [rsp+4A8h+var_8]
movsxd rcx, [rsp+4A8h+var_18]
mov eax, [rax+rcx*4]
cmp eax, [rsp+4A8h+var_14]
jge short loc_2C12
mov rax, [rsp+4A8h+var_8]
movsxd rcx, [rsp+4A8h+var_18]
mov eax, [rax+rcx*4]
mov [rsp+4A8h+var_14], eax
loc_2C12:
jmp short $+2
loc_2C14:
mov eax, [rsp+4A8h+var_18]
add eax, 1
mov [rsp+4A8h+var_18], eax
jmp loc_2B92
loc_2C2A:
movsxd rdi, [rsp+4A8h+var_C]
shl rdi, 2
call _malloc
mov [rsp+4A8h+var_20], rax
cmp [rsp+4A8h+var_20], 0
jnz short loc_2C7A
lea rdi, aMemoryAllocati; "Memory allocation failed in radix_sort_"...
mov al, 0
call vsort_log_error
mov rdi, [rsp+4A8h+var_8]
mov edx, [rsp+4A8h+var_C]
sub edx, 1
xor esi, esi
call quicksort_int
jmp loc_303E
loc_2C7A:
mov [rsp+4A8h+var_24], 0
mov [rsp+4A8h+var_34], 0
cmp [rsp+4A8h+var_14], 0
jge loc_2D22
movsxd rax, [rsp+4A8h+var_10]
movsxd rcx, [rsp+4A8h+var_14]
sub rax, rcx
mov [rsp+4A8h+var_30], rax
mov eax, 0FFFFFFFFh
cmp [rsp+4A8h+var_30], rax
jle short loc_2D01
lea rdi, aRadixSortRange; "Radix sort range exceeds unsigned int c"...
mov al, 0
call vsort_log_error
mov rdi, [rsp+4A8h+var_20]
call _free
mov rdi, [rsp+4A8h+var_8]
mov edx, [rsp+4A8h+var_C]
sub edx, 1
xor esi, esi
call quicksort_int
jmp loc_303E
loc_2D01:
xor eax, eax
sub eax, [rsp+4A8h+var_14]
mov [rsp+4A8h+var_34], eax
mov rax, [rsp+4A8h+var_30]
mov [rsp+4A8h+var_24], eax
jmp short loc_2D3B
loc_2D22:
mov [rsp+4A8h+var_34], 0
mov eax, [rsp+4A8h+var_10]
mov [rsp+4A8h+var_24], eax
loc_2D3B:
mov [rsp+4A8h+var_38], 0
loc_2D46:
mov eax, [rsp+4A8h+var_38]
cmp eax, [rsp+4A8h+var_C]
jge short loc_2D96
mov rax, [rsp+4A8h+var_8]
movsxd rcx, [rsp+4A8h+var_38]
mov edx, [rax+rcx*4]
add edx, [rsp+4A8h+var_34]
mov rax, [rsp+4A8h+var_20]
movsxd rcx, [rsp+4A8h+var_38]
mov [rax+rcx*4], edx
mov eax, [rsp+4A8h+var_38]
add eax, 1
mov [rsp+4A8h+var_38], eax
jmp short loc_2D46
loc_2D96:
movsxd rdi, [rsp+4A8h+var_C]
shl rdi, 2
call _malloc
mov [rsp+4A8h+var_40], rax
cmp [rsp+4A8h+var_40], 0
jnz short loc_2DF3
lea rdi, aMemoryAllocati_0; "Memory allocation failed in radix_sort_"...
mov al, 0
call vsort_log_error
mov rdi, [rsp+4A8h+var_20]
call _free
mov rdi, [rsp+4A8h+var_8]
mov edx, [rsp+4A8h+var_C]
sub edx, 1
xor esi, esi
call quicksort_int
jmp loc_303E
loc_2DF3:
mov [rsp+4A8h+var_44], 8
mov [rsp+4A8h+var_48], 100h
mov [rsp+4A8h+var_4C], 0FFh
mov [rsp+4A8h+var_45C], 0
cmp [rsp+4A8h+var_24], 0
jbe short loc_2E60
mov eax, [rsp+4A8h+var_24]
bsr eax, eax
xor eax, 1Fh
mov [rsp+4A8h+var_460], eax
movsxd rcx, [rsp+4A8h+var_460]
mov eax, 20h ; ' '
sub rax, rcx
mov [rsp+4A8h+var_464], eax
mov eax, [rsp+4A8h+var_464]
add eax, 8
sub eax, 1
mov ecx, 8
cdq
idiv ecx
mov [rsp+4A8h+var_45C], eax
jmp short loc_2E68
loc_2E60:
mov [rsp+4A8h+var_45C], 1
loc_2E68:
cmp [rsp+4A8h+var_45C], 0
jg short loc_2E77
mov [rsp+4A8h+var_45C], 1
loc_2E77:
mov rax, [rsp+4A8h+var_20]
mov [rsp+4A8h+var_470], rax
mov rax, [rsp+4A8h+var_40]
mov [rsp+4A8h+var_478], rax
mov [rsp+4A8h+var_47C], 0
loc_2E99:
mov eax, [rsp+4A8h+var_47C]
cmp eax, [rsp+4A8h+var_45C]
jge loc_2FDE
mov eax, [rsp+4A8h+var_47C]
shl eax, 3
mov [rsp+4A8h+var_480], eax
lea rdi, [rsp+4A8h+var_458]
xor esi, esi
mov edx, 400h
call _memset
mov [rsp+4A8h+var_484], 0
loc_2ECB:
mov eax, [rsp+4A8h+var_484]
cmp eax, [rsp+4A8h+var_C]
jge short loc_2F10
mov rax, [rsp+4A8h+var_470]
movsxd rcx, [rsp+4A8h+var_484]
mov eax, [rax+rcx*4]
mov ecx, [rsp+4A8h+var_480]
shr eax, cl
and eax, 0FFh
mov [rsp+4A8h+var_488], eax
mov eax, [rsp+4A8h+var_488]
mov ecx, [rsp+rax*4+4A8h+var_458]
add ecx, 1
mov [rsp+rax*4+4A8h+var_458], ecx
mov eax, [rsp+4A8h+var_484]
add eax, 1
mov [rsp+4A8h+var_484], eax
jmp short loc_2ECB
loc_2F10:
mov [rsp+4A8h+var_48C], 1
loc_2F18:
cmp [rsp+4A8h+var_48C], 100h
jge short loc_2F49
mov eax, [rsp+4A8h+var_48C]
sub eax, 1
cdqe
mov ecx, [rsp+rax*4+4A8h+var_458]
movsxd rax, [rsp+4A8h+var_48C]
add ecx, [rsp+rax*4+4A8h+var_458]
mov [rsp+rax*4+4A8h+var_458], ecx
mov eax, [rsp+4A8h+var_48C]
add eax, 1
mov [rsp+4A8h+var_48C], eax
jmp short loc_2F18
loc_2F49:
mov eax, [rsp+4A8h+var_C]
sub eax, 1
mov [rsp+4A8h+var_490], eax
loc_2F57:
cmp [rsp+4A8h+var_490], 0
jl short loc_2FB0
mov rax, [rsp+4A8h+var_470]
movsxd rcx, [rsp+4A8h+var_490]
mov eax, [rax+rcx*4]
mov ecx, [rsp+4A8h+var_480]
shr eax, cl
and eax, 0FFh
mov [rsp+4A8h+var_494], eax
mov rax, [rsp+4A8h+var_470]
movsxd rcx, [rsp+4A8h+var_490]
mov edx, [rax+rcx*4]
mov rax, [rsp+4A8h+var_478]
mov ecx, [rsp+4A8h+var_494]
mov esi, ecx
mov ecx, [rsp+rsi*4+4A8h+var_458]
add ecx, 0FFFFFFFFh
mov [rsp+rsi*4+4A8h+var_458], ecx
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov eax, [rsp+4A8h+var_490]
add eax, 0FFFFFFFFh
mov [rsp+4A8h+var_490], eax
jmp short loc_2F57
loc_2FB0:
mov rax, [rsp+4A8h+var_470]
mov [rsp+4A8h+var_4A0], rax
mov rax, [rsp+4A8h+var_478]
mov [rsp+4A8h+var_470], rax
mov rax, [rsp+4A8h+var_4A0]
mov [rsp+4A8h+var_478], rax
mov eax, [rsp+4A8h+var_47C]
add eax, 1
mov [rsp+4A8h+var_47C], eax
jmp loc_2E99
loc_2FDE:
mov [rsp+4A8h+var_4A4], 0
loc_2FE6:
mov eax, [rsp+4A8h+var_4A4]
cmp eax, [rsp+4A8h+var_C]
jge short loc_3024
mov rax, [rsp+4A8h+var_470]
movsxd rcx, [rsp+4A8h+var_4A4]
mov edx, [rax+rcx*4]
sub edx, [rsp+4A8h+var_34]
mov rax, [rsp+4A8h+var_8]
movsxd rcx, [rsp+4A8h+var_4A4]
mov [rax+rcx*4], edx
mov eax, [rsp+4A8h+var_4A4]
add eax, 1
mov [rsp+4A8h+var_4A4], eax
jmp short loc_2FE6
loc_3024:
mov rdi, [rsp+4A8h+var_20]
call _free
mov rdi, [rsp+4A8h+var_40]
call _free
loc_303E:
add rsp, 4A8h
retn
| void radix_sort_int(signed int *a1, int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
unsigned int v10; // eax
unsigned int v11; // edx
int v12; // ecx
int jj; // [rsp+4h] [rbp-4A4h]
long long v14; // [rsp+8h] [rbp-4A0h]
int ii; // [rsp+18h] [rbp-490h]
int n; // [rsp+1Ch] [rbp-48Ch]
int m; // [rsp+24h] [rbp-484h]
char v18; // [rsp+28h] [rbp-480h]
int k; // [rsp+2Ch] [rbp-47Ch]
long long v20; // [rsp+30h] [rbp-478h]
long long v21; // [rsp+38h] [rbp-470h]
int v22; // [rsp+4Ch] [rbp-45Ch]
_DWORD v23[262]; // [rsp+50h] [rbp-458h] BYREF
long long v24; // [rsp+468h] [rbp-40h]
int j; // [rsp+470h] [rbp-38h]
int v26; // [rsp+474h] [rbp-34h]
long long v27; // [rsp+478h] [rbp-30h]
unsigned int v28; // [rsp+484h] [rbp-24h]
long long v29; // [rsp+488h] [rbp-20h]
int i; // [rsp+490h] [rbp-18h]
int v31; // [rsp+494h] [rbp-14h]
signed int v32; // [rsp+498h] [rbp-10h]
int v33; // [rsp+49Ch] [rbp-Ch]
signed int *v34; // [rsp+4A0h] [rbp-8h]
v34 = a1;
v33 = a2;
if ( a2 > 1 )
{
v32 = *v34;
v31 = *v34;
for ( i = 1; i < v33; ++i )
{
if ( v34[i] > v32 )
v32 = v34[i];
if ( v34[i] < v31 )
v31 = v34[i];
}
v29 = malloc(4LL * v33);
if ( !v29 )
{
vsort_log_error(
(unsigned int)"Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort",
a2,
v2,
v3,
v4,
v5);
quicksort_int(v34, 0LL, (unsigned int)(v33 - 1));
return;
}
v28 = 0;
v26 = 0;
if ( v31 >= 0 )
{
v26 = 0;
v28 = v32;
}
else
{
v27 = v32 - (long long)v31;
if ( v27 > 0xFFFFFFFFLL )
{
vsort_log_error(
(unsigned int)"Radix sort range exceeds unsigned int capacity after shift, falling back to quicksort.",
a2,
v2,
v31,
v4,
v5);
free(v29);
quicksort_int(v34, 0LL, (unsigned int)(v33 - 1));
return;
}
v26 = -v31;
v28 = v27;
}
for ( j = 0; j < v33; ++j )
*(_DWORD *)(v29 + 4LL * j) = v26 + v34[j];
v24 = malloc(4LL * v33);
if ( v24 )
{
v23[261] = 8;
v23[260] = 256;
v23[259] = 255;
if ( v28 )
{
_BitScanReverse(&v10, v28);
v22 = (int)(32 - (v10 ^ 0x1F) + 7) / 8;
}
else
{
v22 = 1;
}
if ( v22 <= 0 )
v22 = 1;
v21 = v29;
v20 = v24;
for ( k = 0; k < v22; ++k )
{
v18 = 8 * k;
memset(v23, 0LL, 1024LL);
for ( m = 0; m < v33; ++m )
++v23[(unsigned __int8)(*(_DWORD *)(v21 + 4LL * m) >> v18)];
for ( n = 1; n < 256; ++n )
v23[n] += v23[n - 1];
for ( ii = v33 - 1; ii >= 0; --ii )
{
v11 = *(_DWORD *)(v21 + 4LL * ii);
v12 = v23[(unsigned __int8)(v11 >> v18)] - 1;
v23[(unsigned __int8)(v11 >> v18)] = v12;
*(_DWORD *)(v20 + 4LL * v12) = v11;
}
v14 = v21;
v21 = v20;
v20 = v14;
}
for ( jj = 0; jj < v33; ++jj )
v34[jj] = *(_DWORD *)(v21 + 4LL * jj) - v26;
free(v29);
free(v24);
}
else
{
vsort_log_error(
(unsigned int)"Memory allocation failed in radix_sort_int output, falling back to quicksort",
a2,
v6,
v7,
v8,
v9);
free(v29);
quicksort_int(v34, 0LL, (unsigned int)(v33 - 1));
}
}
}
| radix_sort_int:
SUB RSP,0x4a8
MOV qword ptr [RSP + 0x4a0],RDI
MOV dword ptr [RSP + 0x49c],ESI
CMP dword ptr [RSP + 0x49c],0x1
JG 0x00102b65
JMP 0x0010303e
LAB_00102b65:
MOV RAX,qword ptr [RSP + 0x4a0]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x498],EAX
MOV RAX,qword ptr [RSP + 0x4a0]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x494],EAX
MOV dword ptr [RSP + 0x490],0x1
LAB_00102b92:
MOV EAX,dword ptr [RSP + 0x490]
CMP EAX,dword ptr [RSP + 0x49c]
JGE 0x00102c2a
MOV RAX,qword ptr [RSP + 0x4a0]
MOVSXD RCX,dword ptr [RSP + 0x490]
MOV EAX,dword ptr [RAX + RCX*0x4]
CMP EAX,dword ptr [RSP + 0x498]
JLE 0x00102bdc
MOV RAX,qword ptr [RSP + 0x4a0]
MOVSXD RCX,dword ptr [RSP + 0x490]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x498],EAX
LAB_00102bdc:
MOV RAX,qword ptr [RSP + 0x4a0]
MOVSXD RCX,dword ptr [RSP + 0x490]
MOV EAX,dword ptr [RAX + RCX*0x4]
CMP EAX,dword ptr [RSP + 0x494]
JGE 0x00102c12
MOV RAX,qword ptr [RSP + 0x4a0]
MOVSXD RCX,dword ptr [RSP + 0x490]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x494],EAX
LAB_00102c12:
JMP 0x00102c14
LAB_00102c14:
MOV EAX,dword ptr [RSP + 0x490]
ADD EAX,0x1
MOV dword ptr [RSP + 0x490],EAX
JMP 0x00102b92
LAB_00102c2a:
MOVSXD RDI,dword ptr [RSP + 0x49c]
SHL RDI,0x2
CALL 0x00101130
MOV qword ptr [RSP + 0x488],RAX
CMP qword ptr [RSP + 0x488],0x0
JNZ 0x00102c7a
LEA RDI,[0x10576c]
MOV AL,0x0
CALL 0x00104400
MOV RDI,qword ptr [RSP + 0x4a0]
MOV EDX,dword ptr [RSP + 0x49c]
SUB EDX,0x1
XOR ESI,ESI
CALL 0x00103050
JMP 0x0010303e
LAB_00102c7a:
MOV dword ptr [RSP + 0x484],0x0
MOV dword ptr [RSP + 0x474],0x0
CMP dword ptr [RSP + 0x494],0x0
JGE 0x00102d22
MOVSXD RAX,dword ptr [RSP + 0x498]
MOVSXD RCX,dword ptr [RSP + 0x494]
SUB RAX,RCX
MOV qword ptr [RSP + 0x478],RAX
MOV EAX,0xffffffff
CMP qword ptr [RSP + 0x478],RAX
JLE 0x00102d01
LEA RDI,[0x1057bb]
MOV AL,0x0
CALL 0x00104400
MOV RDI,qword ptr [RSP + 0x488]
CALL 0x00101030
MOV RDI,qword ptr [RSP + 0x4a0]
MOV EDX,dword ptr [RSP + 0x49c]
SUB EDX,0x1
XOR ESI,ESI
CALL 0x00103050
JMP 0x0010303e
LAB_00102d01:
XOR EAX,EAX
SUB EAX,dword ptr [RSP + 0x494]
MOV dword ptr [RSP + 0x474],EAX
MOV RAX,qword ptr [RSP + 0x478]
MOV dword ptr [RSP + 0x484],EAX
JMP 0x00102d3b
LAB_00102d22:
MOV dword ptr [RSP + 0x474],0x0
MOV EAX,dword ptr [RSP + 0x498]
MOV dword ptr [RSP + 0x484],EAX
LAB_00102d3b:
MOV dword ptr [RSP + 0x470],0x0
LAB_00102d46:
MOV EAX,dword ptr [RSP + 0x470]
CMP EAX,dword ptr [RSP + 0x49c]
JGE 0x00102d96
MOV RAX,qword ptr [RSP + 0x4a0]
MOVSXD RCX,dword ptr [RSP + 0x470]
MOV EDX,dword ptr [RAX + RCX*0x4]
ADD EDX,dword ptr [RSP + 0x474]
MOV RAX,qword ptr [RSP + 0x488]
MOVSXD RCX,dword ptr [RSP + 0x470]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0x470]
ADD EAX,0x1
MOV dword ptr [RSP + 0x470],EAX
JMP 0x00102d46
LAB_00102d96:
MOVSXD RDI,dword ptr [RSP + 0x49c]
SHL RDI,0x2
CALL 0x00101130
MOV qword ptr [RSP + 0x468],RAX
CMP qword ptr [RSP + 0x468],0x0
JNZ 0x00102df3
LEA RDI,[0x105812]
MOV AL,0x0
CALL 0x00104400
MOV RDI,qword ptr [RSP + 0x488]
CALL 0x00101030
MOV RDI,qword ptr [RSP + 0x4a0]
MOV EDX,dword ptr [RSP + 0x49c]
SUB EDX,0x1
XOR ESI,ESI
CALL 0x00103050
JMP 0x0010303e
LAB_00102df3:
MOV dword ptr [RSP + 0x464],0x8
MOV dword ptr [RSP + 0x460],0x100
MOV dword ptr [RSP + 0x45c],0xff
MOV dword ptr [RSP + 0x4c],0x0
CMP dword ptr [RSP + 0x484],0x0
JBE 0x00102e60
MOV EAX,dword ptr [RSP + 0x484]
BSR EAX,EAX
XOR EAX,0x1f
MOV dword ptr [RSP + 0x48],EAX
MOVSXD RCX,dword ptr [RSP + 0x48]
MOV EAX,0x20
SUB RAX,RCX
MOV dword ptr [RSP + 0x44],EAX
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,0x8
SUB EAX,0x1
MOV ECX,0x8
CDQ
IDIV ECX
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x00102e68
LAB_00102e60:
MOV dword ptr [RSP + 0x4c],0x1
LAB_00102e68:
CMP dword ptr [RSP + 0x4c],0x0
JG 0x00102e77
MOV dword ptr [RSP + 0x4c],0x1
LAB_00102e77:
MOV RAX,qword ptr [RSP + 0x488]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x468]
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x0
LAB_00102e99:
MOV EAX,dword ptr [RSP + 0x2c]
CMP EAX,dword ptr [RSP + 0x4c]
JGE 0x00102fde
MOV EAX,dword ptr [RSP + 0x2c]
SHL EAX,0x3
MOV dword ptr [RSP + 0x28],EAX
LEA RDI,[RSP + 0x50]
XOR ESI,ESI
MOV EDX,0x400
CALL 0x001010d0
MOV dword ptr [RSP + 0x24],0x0
LAB_00102ecb:
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,dword ptr [RSP + 0x49c]
JGE 0x00102f10
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x24]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV ECX,dword ptr [RSP + 0x28]
SHR EAX,CL
AND EAX,0xff
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + RAX*0x4 + 0x50]
ADD ECX,0x1
MOV dword ptr [RSP + RAX*0x4 + 0x50],ECX
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00102ecb
LAB_00102f10:
MOV dword ptr [RSP + 0x1c],0x1
LAB_00102f18:
CMP dword ptr [RSP + 0x1c],0x100
JGE 0x00102f49
MOV EAX,dword ptr [RSP + 0x1c]
SUB EAX,0x1
CDQE
MOV ECX,dword ptr [RSP + RAX*0x4 + 0x50]
MOVSXD RAX,dword ptr [RSP + 0x1c]
ADD ECX,dword ptr [RSP + RAX*0x4 + 0x50]
MOV dword ptr [RSP + RAX*0x4 + 0x50],ECX
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x00102f18
LAB_00102f49:
MOV EAX,dword ptr [RSP + 0x49c]
SUB EAX,0x1
MOV dword ptr [RSP + 0x18],EAX
LAB_00102f57:
CMP dword ptr [RSP + 0x18],0x0
JL 0x00102fb0
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV ECX,dword ptr [RSP + 0x28]
SHR EAX,CL
AND EAX,0xff
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x18]
MOV EDX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x14]
MOV ESI,ECX
MOV ECX,dword ptr [RSP + RSI*0x4 + 0x50]
ADD ECX,-0x1
MOV dword ptr [RSP + RSI*0x4 + 0x50],ECX
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x18],EAX
JMP 0x00102f57
LAB_00102fb0:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x00102e99
LAB_00102fde:
MOV dword ptr [RSP + 0x4],0x0
LAB_00102fe6:
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP + 0x49c]
JGE 0x00103024
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV EDX,dword ptr [RAX + RCX*0x4]
SUB EDX,dword ptr [RSP + 0x474]
MOV RAX,qword ptr [RSP + 0x4a0]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00102fe6
LAB_00103024:
MOV RDI,qword ptr [RSP + 0x488]
CALL 0x00101030
MOV RDI,qword ptr [RSP + 0x468]
CALL 0x00101030
LAB_0010303e:
ADD RSP,0x4a8
RET
|
void radix_sort_int(uint *param_1,int param_2)
{
int4 uVar1;
int iVar2;
void *pvVar3;
uint uVar4;
byte bVar5;
int iStack_4a4;
int iStack_490;
int iStack_48c;
int iStack_484;
int iStack_47c;
void *pvStack_478;
void *pvStack_470;
int local_45c;
int aiStack_458 [259];
int4 local_4c;
int4 local_48;
int4 local_44;
void *local_40;
int local_38;
int local_34;
long local_30;
uint local_24;
void *local_20;
int local_18;
uint local_14;
uint local_10;
int local_c;
uint *local_8;
if (1 < param_2) {
local_10 = *param_1;
local_14 = *param_1;
for (local_18 = 1; local_18 < param_2; local_18 = local_18 + 1) {
if ((int)local_10 < (int)param_1[local_18]) {
local_10 = param_1[local_18];
}
if ((int)param_1[local_18] < (int)local_14) {
local_14 = param_1[local_18];
}
}
local_c = param_2;
local_8 = param_1;
local_20 = malloc((long)param_2 << 2);
if (local_20 == (void *)0x0) {
vsort_log_error(
"Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort"
);
quicksort_int(local_8,0,local_c + -1);
}
else {
local_24 = 0;
local_34 = 0;
if ((int)local_14 < 0) {
local_30 = (long)(int)local_10 - (long)(int)local_14;
if (0xffffffff < local_30) {
vsort_log_error(
"Radix sort range exceeds unsigned int capacity after shift, falling back to quicksort."
);
free(local_20);
quicksort_int(local_8,0,local_c + -1);
return;
}
local_34 = -local_14;
local_24 = (uint)local_30;
}
else {
local_34 = 0;
local_24 = local_10;
}
for (local_38 = 0; local_38 < local_c; local_38 = local_38 + 1) {
*(uint *)((long)local_20 + (long)local_38 * 4) = local_8[local_38] + local_34;
}
pvStack_478 = malloc((long)local_c << 2);
local_40 = pvStack_478;
if (pvStack_478 == (void *)0x0) {
vsort_log_error(
"Memory allocation failed in radix_sort_int output, falling back to quicksort"
);
free(local_20);
quicksort_int(local_8,0,local_c + -1);
}
else {
local_44 = 8;
local_48 = 0x100;
local_4c = 0xff;
if (local_24 == 0) {
local_45c = 1;
}
else {
uVar4 = 0x1f;
if (local_24 != 0) {
for (; local_24 >> uVar4 == 0; uVar4 = uVar4 - 1) {
}
}
local_45c = (int)(0x27 - (uVar4 ^ 0x1f)) / 8;
}
if (local_45c < 1) {
local_45c = 1;
}
pvStack_470 = local_20;
for (iStack_47c = 0; iStack_47c < local_45c; iStack_47c = iStack_47c + 1) {
memset(aiStack_458,0,0x400);
for (iStack_484 = 0; bVar5 = (byte)(iStack_47c << 3), iStack_484 < local_c;
iStack_484 = iStack_484 + 1) {
uVar4 = *(uint *)((long)pvStack_470 + (long)iStack_484 * 4) >> (bVar5 & 0x1f) & 0xff;
aiStack_458[uVar4] = aiStack_458[uVar4] + 1;
}
for (iStack_48c = 1; iStack_490 = local_c, iStack_48c < 0x100; iStack_48c = iStack_48c + 1
) {
aiStack_458[iStack_48c] = aiStack_458[iStack_48c + -1] + aiStack_458[iStack_48c];
}
while (iStack_490 = iStack_490 + -1, -1 < iStack_490) {
uVar4 = *(uint *)((long)pvStack_470 + (long)iStack_490 * 4) >> (bVar5 & 0x1f) & 0xff;
uVar1 = *(int4 *)((long)pvStack_470 + (long)iStack_490 * 4);
iVar2 = aiStack_458[uVar4];
aiStack_458[uVar4] = iVar2 + -1;
*(int4 *)((long)pvStack_478 + (long)(iVar2 + -1) * 4) = uVar1;
}
pvVar3 = pvStack_478;
pvStack_478 = pvStack_470;
pvStack_470 = pvVar3;
}
for (iStack_4a4 = 0; iStack_4a4 < local_c; iStack_4a4 = iStack_4a4 + 1) {
local_8[iStack_4a4] = *(int *)((long)pvStack_470 + (long)iStack_4a4 * 4) - local_34;
}
free(local_20);
free(local_40);
}
}
}
return;
}
|
|
420 | minja::CommentTemplateToken::~CommentTemplateToken() | monkey531[P]llama/common/minja.hpp | CommentTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, location, pre, post), text(t) {} | O1 | cpp | minja::CommentTemplateToken::~CommentTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0xa7809(%rip), %rax # 0x1322a0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x8aab6
movq (%rax), %rsi
incq %rsi
callq 0x1b910
leaq 0xa782b(%rip), %rax # 0x1322e8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x8aad3
popq %rbx
jmp 0x33c28
popq %rbx
retq
nop
| _ZN5minja20CommentTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+30h]; void *
lea rax, [rbx+40h]
cmp rdi, rax
jz short loc_8AAB6
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AAB6:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_8AAD3
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_8AAD3:
pop rbx
retn
| void minja::CommentTemplateToken::~CommentTemplateToken(minja::CommentTemplateToken *this)
{
char *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::CommentTemplateToken + 2;
v2 = (char *)*((_QWORD *)this + 6);
if ( v2 != (char *)this + 64 )
operator delete(v2, *((_QWORD *)this + 8) + 1LL);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~CommentTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x2322a0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x30]
LEA RAX,[RBX + 0x40]
CMP RDI,RAX
JZ 0x0018aab6
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b910
LAB_0018aab6:
LEA RAX,[0x2322e8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0018aad3
POP RBX
JMP 0x00133c28
LAB_0018aad3:
POP RBX
RET
|
/* minja::CommentTemplateToken::~CommentTemplateToken() */
void __thiscall minja::CommentTemplateToken::~CommentTemplateToken(CommentTemplateToken *this)
{
*(int ***)this = &PTR__CommentTemplateToken_002322b0;
if (*(CommentTemplateToken **)(this + 0x30) != this + 0x40) {
operator_delete(*(CommentTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1);
}
*(int ***)this = &PTR__TemplateToken_002322f8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
|
|
421 | ma_SHA1Final | eloqsql/libmariadb/libmariadb/ma_sha1.c | void ma_SHA1Final(unsigned char digest[20], _MA_SHA1_CTX * context)
{
unsigned char bits[8];
unsigned int index, padLen;
/* Save number of bits */
bits[7] = context->count[0] & 0xFF;
bits[6] = (context->count[0] >> 8) & 0xFF;
bits[5] = (context->count[0] >> 16) & 0xFF;
bits[4] = (context->count[0] >> 24) & 0xFF;
bits[3] = context->count[1] & 0xFF;
bits[2] = (context->count[1] >> 8) & 0xFF;
bits[1] = (context->count[1] >> 16) & 0xFF;
bits[0] = (context->count[1] >> 24) & 0xFF;
/* Pad out to 56 mod 64.
*/
index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
ma_SHA1Update(context, PADDING, padLen);
/* Append length (before padding) */
ma_SHA1Update(context, bits, 8);
/* Store state in digest */
ma_SHA1Encode(digest, context->state, 20);
/* Zeroize sensitive information.
*/
memset((unsigned char*) context, 0, sizeof(*context));
} | O3 | c | ma_SHA1Final:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movl 0x14(%rsi), %eax
movl %eax, %ecx
bswapl %ecx
leaq -0x28(%rbp), %r15
movl %ecx, 0x4(%r15)
movl 0x18(%rsi), %ecx
bswapl %ecx
movl %ecx, (%r15)
shrl $0x3, %eax
andl $0x3f, %eax
xorl %edx, %edx
cmpl $0x38, %eax
setae %dl
shll $0x6, %edx
orl $0x38, %edx
subl %eax, %edx
leaq 0x1523c(%rip), %rsi # 0x48ca0
movq %rbx, %rdi
callq 0x32888
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32888
xorl %eax, %eax
movb 0x3(%rbx,%rax,4), %cl
movb %cl, (%r14,%rax,4)
movb 0x2(%rbx,%rax,4), %cl
movb %cl, 0x1(%r14,%rax,4)
movb 0x1(%rbx,%rax,4), %cl
movb %cl, 0x2(%r14,%rax,4)
movb (%rbx,%rax,4), %cl
movb %cl, 0x3(%r14,%rax,4)
incq %rax
cmpq $0x5, %rax
jne 0x33a7e
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x33add
xorps %xmm0, %xmm0
movups %xmm0, 0x4c(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| ma_SHA1Final:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
mov eax, [rsi+14h]
mov ecx, eax
bswap ecx
lea r15, [rbp+var_28]
mov [r15+4], ecx
mov ecx, [rsi+18h]
bswap ecx
mov [r15], ecx
shr eax, 3
and eax, 3Fh
xor edx, edx
cmp eax, 38h ; '8'
setnb dl
shl edx, 6
or edx, 38h
sub edx, eax
lea rsi, PADDING
mov rdi, rbx
call ma_SHA1Update
mov edx, 8
mov rdi, rbx
mov rsi, r15
call ma_SHA1Update
xor eax, eax
loc_33A7E:
mov cl, [rbx+rax*4+3]
mov [r14+rax*4], cl
mov cl, [rbx+rax*4+2]
mov [r14+rax*4+1], cl
mov cl, [rbx+rax*4+1]
mov [r14+rax*4+2], cl
mov cl, [rbx+rax*4]
mov [r14+rax*4+3], cl
inc rax
cmp rax, 5
jnz short loc_33A7E
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_33ADD
xorps xmm0, xmm0
movups xmmword ptr [rbx+4Ch], xmm0
movups xmmword ptr [rbx+40h], xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx], xmm0
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_33ADD:
call ___stack_chk_fail
| unsigned long long ma_SHA1Final(long long a1, long long a2)
{
unsigned int v2; // eax
long long i; // rax
unsigned long long result; // rax
_DWORD v5[2]; // [rsp+8h] [rbp-28h] BYREF
unsigned long long v6; // [rsp+10h] [rbp-20h]
v6 = __readfsqword(0x28u);
v2 = *(_DWORD *)(a2 + 20);
v5[1] = _byteswap_ulong(v2);
v5[0] = _byteswap_ulong(*(_DWORD *)(a2 + 24));
ma_SHA1Update(a2, (long long)&PADDING, (((((v2 >> 3) & 0x3F) >= 0x38) << 6) | 0x38) - ((v2 >> 3) & 0x3F));
ma_SHA1Update(a2, (long long)v5, 8uLL);
for ( i = 0LL; i != 5; ++i )
{
*(_BYTE *)(a1 + 4 * i) = *(_BYTE *)(a2 + 4 * i + 3);
*(_BYTE *)(a1 + 4 * i + 1) = *(_BYTE *)(a2 + 4 * i + 2);
*(_BYTE *)(a1 + 4 * i + 2) = *(_BYTE *)(a2 + 4 * i + 1);
*(_BYTE *)(a1 + 4 * i + 3) = *(_BYTE *)(a2 + 4 * i);
}
result = __readfsqword(0x28u);
*(_OWORD *)(a2 + 76) = 0LL;
*(_OWORD *)(a2 + 64) = 0LL;
*(_OWORD *)(a2 + 48) = 0LL;
*(_OWORD *)(a2 + 32) = 0LL;
*(_OWORD *)(a2 + 16) = 0LL;
*(_OWORD *)a2 = 0LL;
return result;
}
| ma_SHA1Final:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RSI + 0x14]
MOV ECX,EAX
BSWAP ECX
LEA R15,[RBP + -0x28]
MOV dword ptr [R15 + 0x4],ECX
MOV ECX,dword ptr [RSI + 0x18]
BSWAP ECX
MOV dword ptr [R15],ECX
SHR EAX,0x3
AND EAX,0x3f
XOR EDX,EDX
CMP EAX,0x38
SETNC DL
SHL EDX,0x6
OR EDX,0x38
SUB EDX,EAX
LEA RSI,[0x148ca0]
MOV RDI,RBX
CALL 0x00132888
MOV EDX,0x8
MOV RDI,RBX
MOV RSI,R15
CALL 0x00132888
XOR EAX,EAX
LAB_00133a7e:
MOV CL,byte ptr [RBX + RAX*0x4 + 0x3]
MOV byte ptr [R14 + RAX*0x4],CL
MOV CL,byte ptr [RBX + RAX*0x4 + 0x2]
MOV byte ptr [R14 + RAX*0x4 + 0x1],CL
MOV CL,byte ptr [RBX + RAX*0x4 + 0x1]
MOV byte ptr [R14 + RAX*0x4 + 0x2],CL
MOV CL,byte ptr [RBX + RAX*0x4]
MOV byte ptr [R14 + RAX*0x4 + 0x3],CL
INC RAX
CMP RAX,0x5
JNZ 0x00133a7e
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00133add
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x4c],XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX],XMM0
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00133add:
CALL 0x00113500
|
void ma_SHA1Final(long param_1,int8 *param_2)
{
uint uVar1;
uint uVar2;
long lVar3;
long in_FS_OFFSET;
uint local_30;
uint local_2c;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = *(uint *)((long)param_2 + 0x14);
local_2c = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
uVar1 = *(uint *)(param_2 + 3);
local_30 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
uVar2 = uVar2 >> 3 & 0x3f;
ma_SHA1Update(param_2,PADDING,((uint)(0x37 < uVar2) << 6 | 0x38) - uVar2);
ma_SHA1Update(param_2,&local_30,8);
lVar3 = 0;
do {
*(int1 *)(param_1 + lVar3 * 4) = *(int1 *)((long)param_2 + lVar3 * 4 + 3);
*(int1 *)(param_1 + 1 + lVar3 * 4) = *(int1 *)((long)param_2 + lVar3 * 4 + 2);
*(int1 *)(param_1 + 2 + lVar3 * 4) = *(int1 *)((long)param_2 + lVar3 * 4 + 1);
*(int1 *)(param_1 + 3 + lVar3 * 4) = *(int1 *)((long)param_2 + lVar3 * 4);
lVar3 = lVar3 + 1;
} while (lVar3 != 5);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
*(int8 *)((long)param_2 + 0x4c) = 0;
*(int8 *)((long)param_2 + 0x54) = 0;
param_2[8] = 0;
param_2[9] = 0;
param_2[6] = 0;
param_2[7] = 0;
param_2[4] = 0;
param_2[5] = 0;
param_2[2] = 0;
param_2[3] = 0;
*param_2 = 0;
param_2[1] = 0;
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
422 | ma_bitmap_create_missing_into_pagecache | eloqsql/storage/maria/ma_bitmap.c | static my_bool
_ma_bitmap_create_missing_into_pagecache(MARIA_SHARE *share,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t from,
pgcache_page_no_t to,
uchar *zeroes)
{
pgcache_page_no_t i;
/*
We do not use my_chsize() because there can be a race between when it
reads the physical size and when it writes (assume data_file_length is 10,
physical length is 8 and two data pages are in cache, and here we do a
my_chsize: my_chsize sees physical length is 8, then the two data pages go
to disk then my_chsize writes from page 8 and so overwrites the two data
pages, wrongly).
We instead rely on the filesystem filling gaps with zeroes.
*/
for (i= from; i <= to; i+= bitmap->pages_covered)
{
/**
No need to keep them pinned, they are new so flushable.
@todo but we may want to keep them pinned, as an optimization: if they
are not pinned they may go to disk before the data pages go (so, the
physical pages would be in non-ascending "sparse" order on disk), or the
filesystem may fill gaps with zeroes physically which is a waste of
time.
*/
if (pagecache_write(share->pagecache,
&bitmap->file, i, 0,
zeroes, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE))
goto err;
}
/*
Data pages after data_file_length are full of zeroes but that is allowed
as they are marked empty in the bitmap.
*/
return FALSE;
err:
_ma_set_fatal_error_with_share(share, my_errno);
return TRUE;
} | O0 | c | ma_bitmap_create_missing_into_pagecache:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x63c76
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x9d4c0
cmpb $0x0, %al
je 0x63c5c
jmp 0x63c7c
jmp 0x63c5e
movq -0x18(%rbp), %rax
movq 0x138(%rax), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x63bd7
movb $0x0, -0x1(%rbp)
jmp 0x63c98
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xfdd30
movq -0x40(%rbp), %rdi
movl (%rax), %esi
callq 0x39c00
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_bitmap_create_missing_into_pagecache:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
loc_63BD7:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_28]
ja loc_63C76
mov rax, [rbp+var_10]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rdx, [rbp+var_38]
mov r8, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor ecx, ecx
mov r9d, 1
xor r10d, r10d
mov [rsp+80h+var_80], 0
mov [rsp+80h+var_78], 1
mov [rsp+80h+var_70], 0
mov [rsp+80h+var_68], 0
mov [rsp+80h+var_60], 0
mov [rsp+80h+var_58], 0
mov [rsp+80h+var_50], eax
call pagecache_write_part
cmp al, 0
jz short loc_63C5C
jmp short loc_63C7C
loc_63C5C:
jmp short $+2
loc_63C5E:
mov rax, [rbp+var_18]
mov rax, [rax+138h]
add rax, [rbp+var_38]
mov [rbp+var_38], rax
jmp loc_63BD7
loc_63C76:
mov [rbp+var_1], 0
jmp short loc_63C98
loc_63C7C:
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
call _my_thread_var
mov rdi, [rbp+var_40]
mov esi, [rax]
call _ma_set_fatal_error_with_share
mov [rbp+var_1], 1
loc_63C98:
mov al, [rbp+var_1]
add rsp, 80h
pop rbp
retn
| char ma_bitmap_create_missing_into_pagecache(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5)
{
long long v5; // rdi
int *v6; // rax
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
int v10; // r9d
while ( 1 )
{
if ( a3 > a4 )
return 0;
v5 = *(_QWORD *)(a1 + 1536);
if ( (unsigned __int8)pagecache_write_part(
v5,
(int)a2 + 64,
a3,
0,
a5,
1,
0,
1,
0,
0LL,
0LL,
0,
*(_DWORD *)(v5 + 128)) )
break;
a3 += *(_QWORD *)(a2 + 312);
}
v6 = (int *)my_thread_var(v5, (const char *)(a2 + 64));
ma_set_fatal_error_with_share(a1, *v6, v7, v8, v9, v10);
return 1;
}
| _ma_bitmap_create_missing_into_pagecache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
LAB_00163bd7:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x00163c76
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RDX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR ECX,ECX
MOV R9D,0x1
XOR R10D,R10D
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x0019d4c0
CMP AL,0x0
JZ 0x00163c5c
JMP 0x00163c7c
LAB_00163c5c:
JMP 0x00163c5e
LAB_00163c5e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x138]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00163bd7
LAB_00163c76:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00163c98
LAB_00163c7c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x001fdd30
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RAX]
CALL 0x00139c00
MOV byte ptr [RBP + -0x1],0x1
LAB_00163c98:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x80
POP RBP
RET
|
int1
_ma_bitmap_create_missing_into_pagecache
(long param_1,long param_2,ulong param_3,ulong param_4,int8 param_5)
{
char cVar1;
int4 *puVar2;
ulong local_40;
local_40 = param_3;
while( true ) {
if (param_4 < local_40) {
return 0;
}
cVar1 = pagecache_write_part
(*(int8 *)(param_1 + 0x600),param_2 + 0x40,local_40,0,param_5,1,0,1,0,0,
0,0,*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
if (cVar1 != '\0') break;
local_40 = *(long *)(param_2 + 0x138) + local_40;
}
puVar2 = (int4 *)_my_thread_var();
_ma_set_fatal_error_with_share(param_1,*puVar2);
return 1;
}
|
|
423 | mysql_stmt_close_start | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_close_start(my_bool *ret, MYSQL_STMT *stmt)
{
MK_ASYNC_START_BODY(
mysql_stmt_close,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
},
TRUE,
r_my_bool,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_close(stmt);
return 0;
})
} | O0 | c | mysql_stmt_close_start:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x644d8
movq -0x18(%rbp), %rdi
callq 0x50570
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x645e6
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
leaq 0xe2(%rip), %rsi # 0x645f0
leaq -0x30(%rbp), %rdx
callq 0x661d0
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, 0x15(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x1c(%rbp)
jle 0x64546
movq -0x28(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x645e6
cmpl $0x0, -0x1c(%rbp)
jge 0x645d2
jmp 0x64552
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x1d31d6(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x1d31b4(%rip), %rax # 0x237760
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x37150
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x645df
movq -0x28(%rbp), %rax
movb 0x8(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
| mysql_stmt_close_start:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jnz short loc_644D8
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov [rbp+var_4], 0
jmp loc_645E6
loc_644D8:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov byte ptr [rax+14h], 1
mov rdi, [rbp+var_28]
add rdi, 38h ; '8'
lea rsi, mysql_stmt_close_start_internal
lea rdx, [rbp+var_30]
call my_context_spawn
mov [rbp+var_1C], eax
mov rax, [rbp+var_28]
mov byte ptr [rax+15h], 0
mov rax, [rbp+var_28]
mov byte ptr [rax+14h], 0
cmp [rbp+var_1C], 0
jle short loc_64546
mov rax, [rbp+var_28]
mov byte ptr [rax+15h], 1
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_645E6
loc_64546:
cmp [rbp+var_1C], 0
jge loc_645D2
jmp short $+2
loc_64552:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7D8h
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
mov rax, [rbp+var_10]
mov byte ptr [rax], 1
jmp short loc_645DF
loc_645D2:
mov rax, [rbp+var_28]
mov cl, [rax+8]
mov rax, [rbp+var_10]
mov [rax], cl
loc_645DF:
mov [rbp+var_4], 0
loc_645E6:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mysql_stmt_close_start(char *a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-30h] BYREF
_BYTE *v4; // [rsp+8h] [rbp-28h]
int v5; // [rsp+14h] [rbp-1Ch]
long long v6; // [rsp+18h] [rbp-18h]
char *v7; // [rsp+20h] [rbp-10h]
v7 = a1;
v6 = a2;
if ( *(_QWORD *)(a2 + 56) )
{
v4 = *(_BYTE **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL);
v3 = v6;
v4[20] = 1;
v5 = my_context_spawn(v4 + 56, mysql_stmt_close_start_internal, &v3);
v4[21] = 0;
v4[20] = 0;
if ( v5 <= 0 )
{
if ( v5 >= 0 )
{
*v7 = v4[8];
}
else
{
*(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0;
*v7 = 1;
}
return 0;
}
else
{
v4[21] = 1;
return *(unsigned int *)v4;
}
}
else
{
*v7 = mysql_stmt_close(v6);
return 0;
}
}
| mysql_stmt_close_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x001644d8
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00150570
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001645e6
LAB_001644d8:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x14],0x1
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x38
LEA RSI,[0x1645f0]
LEA RDX,[RBP + -0x30]
CALL 0x001661d0
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x15],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x1c],0x0
JLE 0x00164546
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x15],0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001645e6
LAB_00164546:
CMP dword ptr [RBP + -0x1c],0x0
JGE 0x001645d2
JMP 0x00164552
LAB_00164552:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x337760]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x1
JMP 0x001645df
LAB_001645d2:
MOV RAX,qword ptr [RBP + -0x28]
MOV CL,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
LAB_001645df:
MOV dword ptr [RBP + -0x4],0x0
LAB_001645e6:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_stmt_close_start(int1 *param_1,long param_2)
{
int1 uVar1;
long local_38;
int4 *local_30;
int local_24;
long local_20;
int1 *local_18;
int4 local_c;
local_20 = param_2;
local_18 = param_1;
if (*(long *)(param_2 + 0x38) == 0) {
uVar1 = mysql_stmt_close(param_2);
*local_18 = uVar1;
local_c = 0;
}
else {
local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(local_30 + 5) = 1;
local_38 = param_2;
local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_close_start_internal,&local_38);
*(int1 *)((long)local_30 + 0x15) = 0;
*(int1 *)(local_30 + 5) = 0;
if (local_24 < 1) {
if (local_24 < 0) {
*(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_003377a0,
0x1ff);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0;
*local_18 = 1;
}
else {
*local_18 = *(int1 *)(local_30 + 2);
}
local_c = 0;
}
else {
*(int1 *)((long)local_30 + 0x15) = 1;
local_c = *local_30;
}
}
return local_c;
}
|
|
424 | mariadb_set_conf_option | eloqsql/libmariadb/libmariadb/mariadb_lib.c | my_bool _mariadb_set_conf_option(MYSQL *mysql, const char *config_option, const char *config_value)
{
if (config_option)
{
int i;
char *c;
/* CONC-395: replace underscore "_" by dash "-" */
while ((c= strchr(config_option, '_')))
*c= '-';
for (i=0; mariadb_defaults[i].conf_key; i++)
{
if (!strcmp(mariadb_defaults[i].conf_key, config_option))
{
my_bool val_bool;
int val_int;
size_t val_sizet;
int rc;
void *option_val= NULL;
switch (mariadb_defaults[i].type) {
case MARIADB_OPTION_FUNC:
return mariadb_defaults[i].u.option_func(mysql, config_option, config_value, -1);
break;
case MARIADB_OPTION_BOOL:
val_bool= 0;
if (config_value)
val_bool= atoi(config_value);
option_val= &val_bool;
break;
case MARIADB_OPTION_INT:
val_int= 0;
if (config_value)
val_int= atoi(config_value);
option_val= &val_int;
break;
case MARIADB_OPTION_SIZET:
val_sizet= 0;
if (config_value)
val_sizet= strtol(config_value, NULL, 10);
option_val= &val_sizet;
break;
case MARIADB_OPTION_STR:
option_val= (void*)config_value;
break;
case MARIADB_OPTION_NONE:
break;
}
rc= mysql_optionsv(mysql, mariadb_defaults[i].u.option, option_val);
return(test(rc));
}
}
}
/* unknown key */
return 1;
} | O3 | c | mariadb_set_conf_option:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb $0x1, %r12b
testq %rsi, %rsi
je 0x1d9d4
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %r15, %rdi
movl $0x5f, %esi
callq 0x171d0
testq %rax, %rax
je 0x1d8dd
movb $0x2d, (%rax)
jmp 0x1d8c6
leaq 0x2e70c(%rip), %r13 # 0x4bff0
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x1d9d4
movq %r15, %rsi
callq 0x17800
testl %eax, %eax
je 0x1d921
leaq 0x2e6ec(%rip), %r13 # 0x4bff0
movq 0x28(%r13), %rdi
testq %rdi, %rdi
je 0x1d9d4
movq %r15, %rsi
callq 0x17800
addq $0x18, %r13
testl %eax, %eax
jne 0x1d904
movl 0x8(%r13), %eax
decl %eax
cmpl $0x4, %eax
ja 0x1d9ba
leaq 0x1db4d(%rip), %rcx # 0x3b484
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x29(%rbp), %r15
movb $0x0, (%r15)
testq %r14, %r14
je 0x1d9bd
movq %r14, %rdi
callq 0x17900
movb %al, -0x29(%rbp)
jmp 0x1d9bd
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq $-0x1, %rcx
callq *(%r13)
movl %eax, %r12d
jmp 0x1d9d4
leaq -0x38(%rbp), %r15
movq $0x0, (%r15)
testq %r14, %r14
je 0x1d9bd
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x17810
movq %rax, -0x38(%rbp)
jmp 0x1d9bd
movq %r14, %r15
jmp 0x1d9bd
leaq -0x30(%rbp), %r15
movl $0x0, (%r15)
testq %r14, %r14
je 0x1d9bd
movq %r14, %rdi
callq 0x17900
movl %eax, -0x30(%rbp)
jmp 0x1d9bd
xorl %r15d, %r15d
movl (%r13), %esi
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x178c0
testl %eax, %eax
setne %r12b
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mariadb_set_conf_option:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12b, 1
test rsi, rsi
jz loc_1D9D4
mov r14, rdx
mov r15, rsi
mov rbx, rdi
loc_1D8C6:
mov rdi, r15
mov esi, 5Fh ; '_'
call _strchr
test rax, rax
jz short loc_1D8DD
mov byte ptr [rax], 2Dh ; '-'
jmp short loc_1D8C6
loc_1D8DD:
lea r13, mariadb_defaults
mov rdi, [r13+10h]
test rdi, rdi
jz loc_1D9D4
mov rsi, r15
call _strcmp
test eax, eax
jz short loc_1D921
lea r13, mariadb_defaults
loc_1D904:
mov rdi, [r13+28h]
test rdi, rdi
jz loc_1D9D4
mov rsi, r15
call _strcmp
add r13, 18h
test eax, eax
jnz short loc_1D904
loc_1D921:
mov eax, [r13+8]
dec eax; switch 5 cases
cmp eax, 4
ja def_1D93E; jumptable 000000000001D93E default case
lea rcx, jpt_1D93E
movsxd rax, ds:(jpt_1D93E - 3B484h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1D940:
lea r15, [rbp+var_29]; jumptable 000000000001D93E case 1
mov byte ptr [r15], 0
test r14, r14
jz short loc_1D9BD
mov rdi, r14
call _atoi
mov [rbp+var_29], al
jmp short loc_1D9BD
loc_1D95A:
mov rdi, rbx; jumptable 000000000001D93E case 5
mov rsi, r15
mov rdx, r14
mov rcx, 0FFFFFFFFFFFFFFFFh
call qword ptr [r13+0]
mov r12d, eax
jmp short loc_1D9D4
loc_1D973:
lea r15, [rbp+var_38]; jumptable 000000000001D93E case 3
mov qword ptr [r15], 0
test r14, r14
jz short loc_1D9BD
mov rdi, r14
xor esi, esi
mov edx, 0Ah
call _strtol
mov [rbp+var_38], rax
jmp short loc_1D9BD
loc_1D998:
mov r15, r14; jumptable 000000000001D93E case 4
jmp short loc_1D9BD
loc_1D99D:
lea r15, [rbp+var_30]; jumptable 000000000001D93E case 2
mov dword ptr [r15], 0
test r14, r14
jz short loc_1D9BD
mov rdi, r14
call _atoi
mov [rbp+var_30], eax
jmp short loc_1D9BD
def_1D93E:
xor r15d, r15d; jumptable 000000000001D93E default case
loc_1D9BD:
mov esi, [r13+0]
mov rdi, rbx
mov rdx, r15
xor eax, eax
call _mysql_optionsv
test eax, eax
setnz r12b
loc_1D9D4:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mariadb_set_conf_option(long long a1, long long a2, long long a3)
{
unsigned int v3; // r12d
_BYTE *v6; // rax
_DWORD *v7; // r13
long long v8; // rdi
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v12; // rdi
long long *v13; // r15
long long v15; // [rsp+8h] [rbp-38h] BYREF
int v16; // [rsp+10h] [rbp-30h] BYREF
char v17; // [rsp+17h] [rbp-29h] BYREF
LOBYTE(v3) = 1;
if ( a2 )
{
while ( 1 )
{
v6 = (_BYTE *)strchr(a2, 95LL);
if ( !v6 )
break;
*v6 = 45;
}
v7 = &mariadb_defaults;
v8 = *((_QWORD *)&mariadb_defaults + 2);
if ( v8 )
{
if ( !(unsigned int)strcmp(v8, a2) )
{
LABEL_9:
switch ( v7[2] )
{
case 1:
v13 = (long long *)&v17;
v17 = 0;
if ( a3 )
v17 = atoi(a3);
goto LABEL_19;
case 2:
v13 = (long long *)&v16;
v16 = 0;
if ( a3 )
v16 = atoi(a3);
goto LABEL_19;
case 3:
v13 = &v15;
v15 = 0LL;
if ( a3 )
v15 = strtol(a3, 0LL, 10LL);
goto LABEL_19;
case 4:
LODWORD(v13) = a3;
goto LABEL_19;
case 5:
return (*(unsigned int ( **)(long long, long long, long long, long long))v7)(a1, a2, a3, -1LL);
default:
LODWORD(v13) = 0;
LABEL_19:
LOBYTE(v3) = (unsigned int)mysql_optionsv(a1, *v7, (_DWORD)v13, v9, v10, v11) != 0;
break;
}
}
else
{
v7 = &mariadb_defaults;
while ( 1 )
{
v12 = *((_QWORD *)v7 + 5);
if ( !v12 )
break;
v7 += 6;
if ( !(unsigned int)strcmp(v12, a2) )
goto LABEL_9;
}
}
}
}
return v3;
}
| _mariadb_set_conf_option:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12B,0x1
TEST RSI,RSI
JZ 0x0011d9d4
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LAB_0011d8c6:
MOV RDI,R15
MOV ESI,0x5f
CALL 0x001171d0
TEST RAX,RAX
JZ 0x0011d8dd
MOV byte ptr [RAX],0x2d
JMP 0x0011d8c6
LAB_0011d8dd:
LEA R13,[0x14bff0]
MOV RDI,qword ptr [R13 + 0x10]
TEST RDI,RDI
JZ 0x0011d9d4
MOV RSI,R15
CALL 0x00117800
TEST EAX,EAX
JZ 0x0011d921
LEA R13,[0x14bff0]
LAB_0011d904:
MOV RDI,qword ptr [R13 + 0x28]
TEST RDI,RDI
JZ 0x0011d9d4
MOV RSI,R15
CALL 0x00117800
ADD R13,0x18
TEST EAX,EAX
JNZ 0x0011d904
LAB_0011d921:
MOV EAX,dword ptr [R13 + 0x8]
DEC EAX
CMP EAX,0x4
JA 0x0011d9ba
LEA RCX,[0x13b484]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
LEA R15,[RBP + -0x29]
MOV byte ptr [R15],0x0
TEST R14,R14
JZ 0x0011d9bd
MOV RDI,R14
CALL 0x00117900
MOV byte ptr [RBP + -0x29],AL
JMP 0x0011d9bd
caseD_5:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,-0x1
CALL qword ptr [R13]
MOV R12D,EAX
JMP 0x0011d9d4
caseD_3:
LEA R15,[RBP + -0x38]
MOV qword ptr [R15],0x0
TEST R14,R14
JZ 0x0011d9bd
MOV RDI,R14
XOR ESI,ESI
MOV EDX,0xa
CALL 0x00117810
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0011d9bd
caseD_4:
MOV R15,R14
JMP 0x0011d9bd
caseD_2:
LEA R15,[RBP + -0x30]
MOV dword ptr [R15],0x0
TEST R14,R14
JZ 0x0011d9bd
MOV RDI,R14
CALL 0x00117900
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0011d9bd
default:
XOR R15D,R15D
LAB_0011d9bd:
MOV ESI,dword ptr [R13]
MOV RDI,RBX
MOV RDX,R15
XOR EAX,EAX
CALL 0x001178c0
TEST EAX,EAX
SETNZ R12B
LAB_0011d9d4:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _mariadb_set_conf_option(int8 param_1,char *param_2,long *param_3)
{
int iVar1;
uint uVar2;
char *pcVar3;
int8 unaff_R12;
ulong uVar4;
int1 *puVar6;
long *plVar7;
long local_40;
int local_38;
int1 local_31;
int7 uVar5;
uVar5 = (int7)((ulong)unaff_R12 >> 8);
uVar4 = CONCAT71(uVar5,1);
if (param_2 != (char *)0x0) {
while (pcVar3 = strchr(param_2,0x5f), pcVar3 != (char *)0x0) {
*pcVar3 = '-';
}
puVar6 = mariadb_defaults;
if (mariadb_defaults._16_8_ != 0) {
iVar1 = strcmp((char *)mariadb_defaults._16_8_,param_2);
if (iVar1 != 0) {
puVar6 = mariadb_defaults;
do {
if (*(char **)((long)puVar6 + 0x28) == (char *)0x0) goto LAB_0011d9d4;
iVar1 = strcmp(*(char **)((long)puVar6 + 0x28),param_2);
puVar6 = (int1 *)((long)puVar6 + 0x18);
} while (iVar1 != 0);
}
switch(*(int4 *)((long)puVar6 + 8)) {
case 1:
plVar7 = (long *)&local_31;
local_31 = 0;
if (param_3 != (long *)0x0) {
iVar1 = atoi((char *)param_3);
local_31 = (int1)iVar1;
}
break;
case 2:
plVar7 = (long *)&local_38;
local_38 = 0;
if (param_3 != (long *)0x0) {
local_38 = atoi((char *)param_3);
}
break;
case 3:
plVar7 = &local_40;
local_40 = 0;
if (param_3 != (long *)0x0) {
local_40 = strtol((char *)param_3,(char **)0x0,10);
}
break;
case 4:
plVar7 = param_3;
break;
case 5:
uVar2 = (**(code **)puVar6)(param_1,param_2,param_3,0xffffffffffffffff);
uVar4 = (ulong)uVar2;
goto LAB_0011d9d4;
default:
plVar7 = (long *)0x0;
}
iVar1 = mysql_optionsv(param_1,*(int4 *)puVar6,plVar7);
uVar4 = CONCAT71(uVar5,iVar1 != 0);
}
}
LAB_0011d9d4:
return uVar4 & 0xffffffff;
}
|
|
425 | find_free_position | eloqsql/storage/maria/ma_blockrec.c | static uchar *find_free_position(MARIA_HA *info,
uchar *buff, uint block_size, uint *res_rownr,
uint *res_length, uint *empty_space,
my_bool head_page)
{
uint max_entry, free_entry;
uint length, first_pos;
uchar *dir, *first_dir;
MARIA_SHARE *share= info->s;
DBUG_ENTER("find_free_position");
max_entry= (uint) buff[DIR_COUNT_OFFSET];
free_entry= (uint) buff[DIR_FREE_OFFSET];
*empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
DBUG_PRINT("info", ("max_entry: %u free_entry: %u", max_entry, free_entry));
first_dir= dir_entry_pos(buff, block_size, max_entry - 1);
/* Search after first free position */
if (free_entry != END_OF_DIR_FREE_LIST)
{
if (free_entry >= max_entry)
DBUG_RETURN(0); /* Consistency error */
dir= dir_entry_pos(buff, block_size, free_entry);
DBUG_ASSERT(uint2korr(dir) == 0 && dir[2] == END_OF_DIR_FREE_LIST);
/* Relink free list */
if ((buff[DIR_FREE_OFFSET]= dir[3]) != END_OF_DIR_FREE_LIST)
{
uchar *next_entry= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT((uint) next_entry[2] == free_entry &&
uint2korr(next_entry) == 0);
next_entry[2]= END_OF_DIR_FREE_LIST; /* Backlink */
}
first_pos= end_of_previous_entry(share,
dir, buff + block_size -
PAGE_SUFFIX_SIZE);
length= start_of_next_entry(dir) - first_pos;
int2store(dir, first_pos); /* Update dir entry */
int2store(dir + 2, 0);
*res_rownr= free_entry;
*res_length= length;
check_directory(share, buff, block_size,
head_page ? share->base.min_block_length : 0, (uint) -1);
DBUG_RETURN(dir);
}
/* No free places in dir; create a new one */
/* Check if there is place for the directory entry */
if (max_entry == MAX_ROWS_PER_PAGE)
DBUG_RETURN(0);
if (make_space_for_directory(info, buff, max_entry, 1,
first_dir, empty_space, &first_pos, head_page))
DBUG_RETURN(0);
dir= first_dir - DIR_ENTRY_SIZE;
length= (uint) (dir - buff - first_pos);
DBUG_ASSERT(length <= *empty_space);
int2store(dir, first_pos);
int2store(dir + 2, 0); /* Max length of region */
*res_rownr= max_entry;
*res_length= length;
check_directory(share,
buff, block_size,
head_page ? share->base.min_block_length : 0,
*empty_space);
DBUG_RETURN(dir);
} | O0 | c | find_free_position:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movb 0x10(%rbp), %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x9(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
jmp 0x39636
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x3c(%rbp), %edx
subl $0x1, %edx
callq 0x2e640
movq %rax, -0x58(%rbp)
cmpl $0xff, -0x40(%rbp)
je 0x39737
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jb 0x39670
jmp 0x39663
movq $0x0, -0x8(%rbp)
jmp 0x397fc
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x40(%rbp), %edx
callq 0x2e640
movq %rax, -0x50(%rbp)
jmp 0x39685
movq -0x50(%rbp), %rax
movb 0x3(%rax), %al
movq -0x18(%rbp), %rcx
movb %al, 0x9(%rcx)
movzbl %al, %eax
cmpl $0xff, %eax
je 0x396bf
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x50(%rbp), %rax
movzbl 0x3(%rax), %edx
callq 0x2e640
movq %rax, -0x68(%rbp)
jmp 0x396b7
movq -0x68(%rbp), %rax
movb $-0x1, 0x2(%rax)
movq -0x60(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %eax
addq %rax, %rdx
addq $-0x4, %rdx
callq 0x39810
movl %eax, -0x48(%rbp)
movq -0x50(%rbp), %rdi
callq 0x39880
subl -0x48(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x48(%rbp), %eax
movw %ax, %cx
movq -0x70(%rbp), %rax
movw %cx, (%rax)
jmp 0x39703
movq -0x50(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movw $0x0, (%rax)
movl -0x40(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x44(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x397fc
cmpl $0xff, -0x3c(%rbp)
jne 0x3974f
jmp 0x39742
movq $0x0, -0x8(%rbp)
jmp 0x397fc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq -0x58(%rbp), %r8
movq -0x38(%rbp), %r9
movl $0x1, %ecx
leaq -0x48(%rbp), %rax
movq %rax, (%rsp)
movsbl 0x10(%rbp), %eax
movl %eax, 0x8(%rsp)
callq 0x398e0
cmpb $0x0, %al
je 0x3978c
jmp 0x39782
movq $0x0, -0x8(%rbp)
jmp 0x397fc
movq -0x58(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl -0x48(%rbp), %ecx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
jmp 0x397ae
jmp 0x397b0
movq -0x50(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x48(%rbp), %eax
movw %ax, %cx
movq -0x80(%rbp), %rax
movw %cx, (%rax)
jmp 0x397c7
movq -0x50(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movw $0x0, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x44(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
| find_free_position:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov al, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+8]
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+9]
mov [rbp+var_40], eax
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+0Ah]
mov rax, [rbp+var_38]
mov [rax], ecx
jmp short $+2
loc_39636:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov edx, [rbp+var_3C]
sub edx, 1
call dir_entry_pos
mov [rbp+var_58], rax
cmp [rbp+var_40], 0FFh
jz loc_39737
mov eax, [rbp+var_40]
cmp eax, [rbp+var_3C]
jb short loc_39670
jmp short $+2
loc_39663:
mov [rbp+var_8], 0
jmp loc_397FC
loc_39670:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov edx, [rbp+var_40]
call dir_entry_pos
mov [rbp+var_50], rax
jmp short $+2
loc_39685:
mov rax, [rbp+var_50]
mov al, [rax+3]
mov rcx, [rbp+var_18]
mov [rcx+9], al
movzx eax, al
cmp eax, 0FFh
jz short loc_396BF
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov rax, [rbp+var_50]
movzx edx, byte ptr [rax+3]
call dir_entry_pos
mov [rbp+var_68], rax
jmp short $+2
loc_396B7:
mov rax, [rbp+var_68]
mov byte ptr [rax+2], 0FFh
loc_396BF:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_18]
mov eax, [rbp+var_1C]
add rdx, rax
add rdx, 0FFFFFFFFFFFFFFFCh
call end_of_previous_entry
mov [rbp+var_48], eax
mov rdi, [rbp+var_50]
call start_of_next_entry
sub eax, [rbp+var_48]
mov [rbp+var_44], eax
mov rax, [rbp+var_50]
mov [rbp+var_70], rax
mov eax, [rbp+var_48]
mov cx, ax
mov rax, [rbp+var_70]
mov [rax], cx
jmp short $+2
loc_39703:
mov rax, [rbp+var_50]
add rax, 2
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov word ptr [rax], 0
mov ecx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], ecx
mov ecx, [rbp+var_44]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
jmp loc_397FC
loc_39737:
cmp [rbp+var_3C], 0FFh
jnz short loc_3974F
jmp short $+2
loc_39742:
mov [rbp+var_8], 0
jmp loc_397FC
loc_3974F:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_3C]
mov r8, [rbp+var_58]
mov r9, [rbp+var_38]
mov ecx, 1
lea rax, [rbp+var_48]
mov [rsp+0A0h+var_A0], rax
movsx eax, [rbp+arg_0]
mov [rsp+0A0h+var_98], eax
call make_space_for_directory
cmp al, 0
jz short loc_3978C
jmp short $+2
loc_39782:
mov [rbp+var_8], 0
jmp short loc_397FC
loc_3978C:
mov rax, [rbp+var_58]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_18]
sub rax, rcx
mov ecx, [rbp+var_48]
sub rax, rcx
mov [rbp+var_44], eax
jmp short $+2
loc_397AE:
jmp short $+2
loc_397B0:
mov rax, [rbp+var_50]
mov [rbp+var_80], rax
mov eax, [rbp+var_48]
mov cx, ax
mov rax, [rbp+var_80]
mov [rax], cx
jmp short $+2
loc_397C7:
mov rax, [rbp+var_50]
add rax, 2
mov [rbp+var_88], rax
mov rax, [rbp+var_88]
mov word ptr [rax], 0
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_28]
mov [rax], ecx
mov ecx, [rbp+var_44]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
loc_397FC:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| long long find_free_position(
_QWORD *a1,
long long a2,
unsigned int a3,
unsigned int *a4,
_DWORD *a5,
_DWORD *a6,
char a7)
{
unsigned __int8 v7; // al
_WORD *v9; // [rsp+20h] [rbp-80h]
long long v10; // [rsp+40h] [rbp-60h]
long long v11; // [rsp+48h] [rbp-58h]
long long v12; // [rsp+50h] [rbp-50h]
int v13; // [rsp+58h] [rbp-48h] BYREF
int v14; // [rsp+5Ch] [rbp-44h]
unsigned int v15; // [rsp+60h] [rbp-40h]
unsigned int v16; // [rsp+64h] [rbp-3Ch]
_DWORD *v17; // [rsp+68h] [rbp-38h]
_DWORD *v18; // [rsp+70h] [rbp-30h]
unsigned int *v19; // [rsp+78h] [rbp-28h]
unsigned int v20; // [rsp+84h] [rbp-1Ch]
long long v21; // [rsp+88h] [rbp-18h]
_QWORD *v22; // [rsp+90h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v10 = *a1;
v16 = *(unsigned __int8 *)(a2 + 8);
v15 = *(unsigned __int8 *)(a2 + 9);
*a6 = *(unsigned __int16 *)(a2 + 10);
v11 = dir_entry_pos(v21, v20, v16 - 1);
if ( v15 == 255 )
{
if ( v16 == 255 )
{
return 0LL;
}
else if ( (unsigned __int8)make_space_for_directory((_DWORD)v22, v21, v16, 1, v11, (_DWORD)v17, (long long)&v13, a7) )
{
return 0LL;
}
else
{
v14 = v11 - 4 - v21 - v13;
v9 = (_WORD *)(v11 - 4);
*v9 = v13;
v9[1] = 0;
*v19 = v16;
*v18 = v14;
return v11 - 4;
}
}
else if ( v15 < v16 )
{
v12 = dir_entry_pos(v21, v20, v15);
v7 = *(_BYTE *)(v12 + 3);
*(_BYTE *)(v21 + 9) = v7;
if ( v7 != 255 )
*(_BYTE *)(dir_entry_pos(v21, v20, *(unsigned __int8 *)(v12 + 3)) + 2) = -1;
v13 = end_of_previous_entry(v10, v12, v20 + v21 - 4);
v14 = start_of_next_entry(v12) - v13;
*(_WORD *)v12 = v13;
*(_WORD *)(v12 + 2) = 0;
*v19 = v15;
*v18 = v14;
return v12;
}
else
{
return 0LL;
}
}
| find_free_position:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV AL,byte ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x9]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0xa]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
JMP 0x00139636
LAB_00139636:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV EDX,dword ptr [RBP + -0x3c]
SUB EDX,0x1
CALL 0x0012e640
MOV qword ptr [RBP + -0x58],RAX
CMP dword ptr [RBP + -0x40],0xff
JZ 0x00139737
MOV EAX,dword ptr [RBP + -0x40]
CMP EAX,dword ptr [RBP + -0x3c]
JC 0x00139670
JMP 0x00139663
LAB_00139663:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001397fc
LAB_00139670:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV EDX,dword ptr [RBP + -0x40]
CALL 0x0012e640
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00139685
LAB_00139685:
MOV RAX,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RCX + 0x9],AL
MOVZX EAX,AL
CMP EAX,0xff
JZ 0x001396bf
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x50]
MOVZX EDX,byte ptr [RAX + 0x3]
CALL 0x0012e640
MOV qword ptr [RBP + -0x68],RAX
JMP 0x001396b7
LAB_001396b7:
MOV RAX,qword ptr [RBP + -0x68]
MOV byte ptr [RAX + 0x2],0xff
LAB_001396bf:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x1c]
ADD RDX,RAX
ADD RDX,-0x4
CALL 0x00139810
MOV dword ptr [RBP + -0x48],EAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00139880
SUB EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x70],RAX
MOV EAX,dword ptr [RBP + -0x48]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX],CX
JMP 0x00139703
LAB_00139703:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x2
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV word ptr [RAX],0x0
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001397fc
LAB_00139737:
CMP dword ptr [RBP + -0x3c],0xff
JNZ 0x0013974f
JMP 0x00139742
LAB_00139742:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001397fc
LAB_0013974f:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x3c]
MOV R8,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x38]
MOV ECX,0x1
LEA RAX,[RBP + -0x48]
MOV qword ptr [RSP],RAX
MOVSX EAX,byte ptr [RBP + 0x10]
MOV dword ptr [RSP + 0x8],EAX
CALL 0x001398e0
CMP AL,0x0
JZ 0x0013978c
JMP 0x00139782
LAB_00139782:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001397fc
LAB_0013978c:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x48]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001397ae
LAB_001397ae:
JMP 0x001397b0
LAB_001397b0:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,dword ptr [RBP + -0x48]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x80]
MOV word ptr [RAX],CX
JMP 0x001397c7
LAB_001397c7:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x2
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV word ptr [RAX],0x0
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
LAB_001397fc:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
int2 *
find_free_position(int8 *param_1,long param_2,uint param_3,uint *param_4,int *param_5,
uint *param_6,char param_7)
{
int8 uVar1;
char cVar2;
int iVar3;
long lVar4;
int2 *puVar5;
int local_50 [2];
uint local_48;
uint local_44;
uint *local_40;
int *local_38;
uint *local_30;
uint local_24;
long local_20;
int8 *local_18;
int2 *local_10;
uVar1 = *param_1;
local_44 = (uint)*(byte *)(param_2 + 8);
local_48 = (uint)*(byte *)(param_2 + 9);
*param_6 = (uint)*(ushort *)(param_2 + 10);
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
lVar4 = dir_entry_pos(param_2,param_3,local_44 - 1);
if (local_48 == 0xff) {
if (local_44 == 0xff) {
local_10 = (int2 *)0x0;
}
else {
cVar2 = make_space_for_directory
(local_18,local_20,local_44,1,lVar4,local_40,local_50,(int)param_7);
if (cVar2 == '\0') {
local_10 = (int2 *)(lVar4 + -4);
*local_10 = (short)local_50[0];
*(int2 *)(lVar4 + -2) = 0;
*local_30 = local_44;
*local_38 = ((int)local_10 - (int)local_20) - local_50[0];
}
else {
local_10 = (int2 *)0x0;
}
}
}
else if (local_48 < local_44) {
puVar5 = (int2 *)dir_entry_pos(local_20,local_24,local_48);
cVar2 = *(char *)((long)puVar5 + 3);
*(char *)(local_20 + 9) = cVar2;
if (cVar2 != -1) {
lVar4 = dir_entry_pos(local_20,local_24,*(int1 *)((long)puVar5 + 3));
*(int1 *)(lVar4 + 2) = 0xff;
}
local_50[0] = end_of_previous_entry(uVar1,puVar5,local_20 + (ulong)local_24 + -4);
iVar3 = start_of_next_entry(puVar5);
*puVar5 = (short)local_50[0];
puVar5[1] = 0;
*local_30 = local_48;
*local_38 = iVar3 - local_50[0];
local_10 = puVar5;
}
else {
local_10 = (int2 *)0x0;
}
return local_10;
}
|
|
426 | uf_endspace_selected | eloqsql/storage/maria/ma_packrec.c | static void uf_endspace_selected(MARIA_COLUMNDEF *rec,
MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill(end - spaces, spaces, ' ');
}
else
decode_bytes(rec,bit_buff,to,end);
} | O3 | c | uf_endspace_selected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x3ae5c
movl (%r15), %r14d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r14d
jb 0x3ae9b
jmp 0x3ae7a
movq %r15, %rdi
movq %rdx, %r14
callq 0x3a7b0
movq %r14, %rdx
movl $0x1f, 0x4(%r15)
movl (%r15), %r14d
testl %r14d, %r14d
js 0x3ae96
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a96d
movl $0x1f, %eax
movl 0x24(%r12), %r13d
movl %eax, %ecx
subl %r13d, %ecx
jae 0x3aeef
subl %eax, %r13d
movl %eax, %eax
leaq 0xa627d(%rip), %rcx # 0xe1130
andl (%rcx,%rax,4), %r14d
movl %r13d, %ecx
shll %cl, %r14d
movq %r15, %rdi
movq %r12, -0x30(%rbp)
movq %rdx, %r12
callq 0x3a7b0
movq %r12, %rdx
movq -0x30(%rbp), %r12
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r14d
jmp 0x3af06
movl %ecx, 0x4(%r15)
shrl %cl, %r14d
movl 0x24(%r12), %eax
leaq 0xa622e(%rip), %rcx # 0xe1130
andl (%rcx,%rax,4), %r14d
movl %r14d, %r13d
leaq (%rdx,%r13), %rax
cmpq %rbx, %rax
jbe 0x3af29
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r14
negq %r14
cmpq %rbx, %rax
je 0x3af43
leaq (%rbx,%r14), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x3a96d
addq %r14, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
| uf_endspace_selected:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r15, rsi
mov r12, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_3AE5C
mov r14d, [r15]
dec eax
mov [r15+4], eax
bt r14d, eax
jb short loc_3AE9B
jmp short loc_3AE7A
loc_3AE5C:
mov rdi, r15
mov r14, rdx
call fill_buffer
mov rdx, r14
mov dword ptr [r15+4], 1Fh
mov r14d, [r15]
test r14d, r14d
js short loc_3AE96
loc_3AE7A:
mov rdi, r12
mov rsi, r15
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes
loc_3AE96:
mov eax, 1Fh
loc_3AE9B:
mov r13d, [r12+24h]
mov ecx, eax
sub ecx, r13d
jnb short loc_3AEEF
sub r13d, eax
mov eax, eax
lea rcx, mask
and r14d, [rcx+rax*4]
mov ecx, r13d
shl r14d, cl
mov rdi, r15
mov [rbp+var_30], r12
mov r12, rdx
call fill_buffer
mov rdx, r12
mov r12, [rbp+var_30]
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r14d, eax
jmp short loc_3AF06
loc_3AEEF:
mov [r15+4], ecx
shr r14d, cl
mov eax, [r12+24h]
lea rcx, mask
and r14d, [rcx+rax*4]
loc_3AF06:
mov r13d, r14d
lea rax, [rdx+r13]
cmp rax, rbx
jbe short loc_3AF29
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3AF29:
mov r14, r13
neg r14
cmp rax, rbx
jz short loc_3AF43
lea rcx, [rbx+r14]
mov rdi, r12
mov rsi, r15
call decode_bytes
loc_3AF43:
add rbx, r14
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
| _BYTE * uf_endspace_selected(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4)
{
long long v5; // r12
unsigned int v6; // eax
unsigned int v7; // r14d
unsigned int v8; // eax
_BYTE *v9; // r14
_BYTE *result; // rax
unsigned int v11; // r13d
unsigned int v12; // ecx
int v13; // r13d
int v14; // r14d
_BYTE *v15; // r12
unsigned int v16; // r14d
v5 = a1;
v6 = a2[1];
if ( v6 )
{
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( !_bittest((const int *)&v7, v8) )
return decode_bytes(a1, (long long)a2, a3, a4);
}
else
{
v9 = a3;
fill_buffer((long long)a2);
a3 = v9;
a2[1] = 31;
v7 = *a2;
if ( (*a2 & 0x80000000) == 0 )
return decode_bytes(a1, (long long)a2, a3, a4);
v8 = 31;
}
v11 = *(_DWORD *)(a1 + 36);
v12 = v8 - v11;
if ( v8 >= v11 )
{
a2[1] = v12;
v16 = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v12);
}
else
{
v13 = v11 - v8;
v14 = (mask[v8] & v7) << v13;
v15 = a3;
fill_buffer((long long)a2);
a3 = v15;
v5 = a1;
a2[1] = 32 - v13;
v16 = (*a2 >> -(char)v13) + v14;
}
result = &a3[v16];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes(v5, (long long)a2, a3, &a4[-v16]);
return (_BYTE *)memset(&a4[-v16], 32LL, v16);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_endspace_selected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R15,RSI
MOV R12,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x0013ae5c
MOV R14D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R14D,EAX
JC 0x0013ae9b
JMP 0x0013ae7a
LAB_0013ae5c:
MOV RDI,R15
MOV R14,RDX
CALL 0x0013a7b0
MOV RDX,R14
MOV dword ptr [R15 + 0x4],0x1f
MOV R14D,dword ptr [R15]
TEST R14D,R14D
JS 0x0013ae96
LAB_0013ae7a:
MOV RDI,R12
MOV RSI,R15
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013a96d
LAB_0013ae96:
MOV EAX,0x1f
LAB_0013ae9b:
MOV R13D,dword ptr [R12 + 0x24]
MOV ECX,EAX
SUB ECX,R13D
JNC 0x0013aeef
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e1130]
AND R14D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R14D,CL
MOV RDI,R15
MOV qword ptr [RBP + -0x30],R12
MOV R12,RDX
CALL 0x0013a7b0
MOV RDX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R14D,EAX
JMP 0x0013af06
LAB_0013aeef:
MOV dword ptr [R15 + 0x4],ECX
SHR R14D,CL
MOV EAX,dword ptr [R12 + 0x24]
LEA RCX,[0x1e1130]
AND R14D,dword ptr [RCX + RAX*0x4]
LAB_0013af06:
MOV R13D,R14D
LEA RAX,[RDX + R13*0x1]
CMP RAX,RBX
JBE 0x0013af29
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013af29:
MOV R14,R13
NEG R14
CMP RAX,RBX
JZ 0x0013af43
LEA RCX,[RBX + R14*0x1]
MOV RDI,R12
MOV RSI,R15
CALL 0x0013a96d
LAB_0013af43:
ADD RBX,R14
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
|
void uf_endspace_selected(long param_1,uint *param_2,long param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
ulong __n;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
if ((int)uVar5 < 0) {
uVar3 = 0x1f;
goto LAB_0013ae9b;
}
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) {
LAB_0013ae9b:
uVar1 = *(uint *)(param_1 + 0x24);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)];
}
__n = (ulong)uVar5;
if (param_3 + __n <= param_4) {
if (param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
memset((void *)(param_4 + -__n),0x20,__n);
return;
}
param_2[10] = 1;
return;
}
}
decode_bytes(param_1,param_2,param_3,param_4);
return;
}
|
|
427 | JS_ToQuotedStringFree | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToQuotedStringFree(JSContext *ctx, JSValue val) {
JSValue r = JS_ToQuotedString(ctx, val);
JS_FreeValue(ctx, val);
return r;
} | O1 | c | JS_ToQuotedStringFree:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x419eb
movq %rdx, %r12
movq %rax, 0x30(%rsp)
cmpl $0x6, %r12d
jne 0x4c41a
movq %rax, %r13
jmp 0x4c4ac
movq %rbx, 0x38(%rsp)
movq 0x30(%rsp), %r13
movl $0x7fffffff, %esi # imm = 0x7FFFFFFF
andl 0x4(%r13), %esi
addl $0x2, %esi
movq %r15, 0x10(%rsp)
movl %esi, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq %r15, %rdi
xorl %edx, %edx
callq 0x1ff5f
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x4c61d
leaq 0x10(%rsp), %rdi
movl $0x22, %esi
callq 0x4ac4d
testl %eax, %eax
je 0x4c4d0
movq 0x30(%rsp), %rsi
movq 0x18(%r15), %rdi
movq %r12, %rdx
callq 0x1ccb2
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1bf85
movq $0x0, 0x18(%rsp)
movl $0x6, %r12d
xorl %r13d, %r13d
movq 0x38(%rsp), %rbx
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1ccb2
movq %r13, %rax
movq %r12, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0xc(%rsp)
testl $0x7fffffff, 0x4(%r13) # imm = 0x7FFFFFFF
je 0x4c5e0
movq %r13, %rdi
leaq 0xc(%rsp), %rsi
callq 0x4b999
movl %eax, %ebp
leal -0x8(%rbp), %eax
cmpl $0x5, %eax
ja 0x4c519
leaq 0x4f12c(%rip), %rcx # 0x9b630
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x10(%rsp), %rbx
jmpq *%rax
movl $0x62, %ebp
jmp 0x4c596
cmpl $0x22, %ebp
je 0x4c591
cmpl $0x5c, %ebp
leaq 0x10(%rsp), %rbx
je 0x4c596
cmpl $0x20, %ebp
setae %al
movl %ebp, %ecx
andl $0x1ff800, %ecx # imm = 0x1FF800
cmpl $0xd800, %ecx # imm = 0xD800
setne %cl
testb %cl, %al
jne 0x4c5d4
movl $0x10, %esi
leaq 0x40(%rsp), %rdi
leaq 0x51fd8(%rip), %rdx # 0x9e530
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe2d0
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
movl $0x6, %edx
callq 0x41424
jmp 0x4c5b5
movl $0x74, %ebp
jmp 0x4c596
movl $0x6e, %ebp
jmp 0x4c596
movl $0x66, %ebp
jmp 0x4c596
movl $0x72, %ebp
jmp 0x4c596
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x4ac4d
testl %eax, %eax
jne 0x4c475
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4ac4d
testl %eax, %eax
jne 0x4c475
movl 0x4(%r13), %eax
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andl %ecx, %eax
cmpl %eax, 0xc(%rsp)
jl 0x4c4e6
jmp 0x4c5e0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x327dc
jmp 0x4c5b5
leaq 0x10(%rsp), %rdi
movl $0x22, %esi
callq 0x4ac4d
testl %eax, %eax
jne 0x4c475
movq 0x30(%rsp), %rsi
movq 0x18(%r15), %rdi
movq %r12, %rdx
callq 0x1ccb2
leaq 0x10(%rsp), %rdi
callq 0x32830
movq %rax, %r13
movq %rdx, %r12
jmp 0x4c4a7
movl $0x0, 0x24(%rsp)
movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4c475
| JS_ToQuotedStringFree:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call JS_ToStringCheckObject
mov r12, rdx
mov [rsp+88h+var_58], rax
cmp r12d, 6
jnz short loc_4C41A
mov r13, rax
jmp loc_4C4AC
loc_4C41A:
mov [rsp+88h+var_50], rbx
mov r13, [rsp+88h+var_58]
mov esi, 7FFFFFFFh
and esi, [r13+4]
add esi, 2
mov [rsp+88h+var_78], r15
mov [rsp+88h+var_64], esi
mov [rsp+88h+var_68], 0
mov [rsp+88h+var_60], 0
mov rdi, r15
xor edx, edx
call js_alloc_string
mov [rsp+88h+var_70], rax
test rax, rax
jz loc_4C61D
lea rdi, [rsp+88h+var_78]
mov esi, 22h ; '"'
call string_buffer_putc8
test eax, eax
jz short loc_4C4D0
loc_4C475:
mov rsi, [rsp+88h+var_58]
mov rdi, [r15+18h]
mov rdx, r12
call JS_FreeValueRT
mov rdi, [rsp+88h+var_78]
mov rsi, [rsp+88h+var_70]
call js_free
mov [rsp+88h+var_70], 0
mov r12d, 6
xor r13d, r13d
loc_4C4A7:
mov rbx, [rsp+88h+var_50]
loc_4C4AC:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, rbx
call JS_FreeValueRT
mov rax, r13
mov rdx, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4C4D0:
mov [rsp+88h+var_7C], 0
test dword ptr [r13+4], 7FFFFFFFh
jz loc_4C5E0
loc_4C4E6:
mov rdi, r13
lea rsi, [rsp+88h+var_7C]
call string_getc
mov ebp, eax
lea eax, [rbp-8]; switch 6 cases
cmp eax, 5
ja short def_4C510; jumptable 000000000004C510 default case
lea rcx, jpt_4C510
movsxd rax, ds:(jpt_4C510 - 9B630h)[rcx+rax*4]
add rax, rcx
lea rbx, [rsp+88h+var_78]
jmp rax; switch jump
loc_4C512:
mov ebp, 62h ; 'b'; jumptable 000000000004C510 case 8
jmp short loc_4C596
def_4C510:
cmp ebp, 22h ; '"'; jumptable 000000000004C510 default case
jz short loc_4C591
cmp ebp, 5Ch ; '\'
lea rbx, [rsp+88h+var_78]
jz short loc_4C596
loc_4C528:
cmp ebp, 20h ; ' '; jumptable 000000000004C510 case 11
setnb al
mov ecx, ebp
and ecx, 1FF800h
cmp ecx, 0D800h
setnz cl
test al, cl
jnz loc_4C5D4
mov esi, 10h
lea rdi, [rsp+88h+var_48]
lea rdx, aU04x; "\\u%04x"
mov ecx, ebp
xor eax, eax
call _snprintf
mov rdi, rbx
lea rsi, [rsp+88h+var_48]
mov edx, 6
call string_buffer_write8
jmp short loc_4C5B5
loc_4C575:
mov ebp, 74h ; 't'; jumptable 000000000004C510 case 9
jmp short loc_4C596
loc_4C57C:
mov ebp, 6Eh ; 'n'; jumptable 000000000004C510 case 10
jmp short loc_4C596
loc_4C583:
mov ebp, 66h ; 'f'; jumptable 000000000004C510 case 12
jmp short loc_4C596
loc_4C58A:
mov ebp, 72h ; 'r'; jumptable 000000000004C510 case 13
jmp short loc_4C596
loc_4C591:
lea rbx, [rsp+88h+var_78]
loc_4C596:
mov rdi, rbx
mov esi, 5Ch ; '\'
call string_buffer_putc8
test eax, eax
jnz loc_4C475
mov rdi, rbx
mov esi, ebp
call string_buffer_putc8
loc_4C5B5:
test eax, eax
jnz loc_4C475
mov eax, [r13+4]
mov ecx, 7FFFFFFFh
and eax, ecx
cmp [rsp+88h+var_7C], eax
jl loc_4C4E6
jmp short loc_4C5E0
loc_4C5D4:
mov rdi, rbx
mov esi, ebp
call string_buffer_putc
jmp short loc_4C5B5
loc_4C5E0:
lea rdi, [rsp+88h+var_78]
mov esi, 22h ; '"'
call string_buffer_putc8
test eax, eax
jnz loc_4C475
mov rsi, [rsp+88h+var_58]
mov rdi, [r15+18h]
mov rdx, r12
call JS_FreeValueRT
lea rdi, [rsp+88h+var_78]
call string_buffer_end
mov r13, rax
mov r12, rdx
jmp loc_4C4A7
loc_4C61D:
mov [rsp+88h+var_64], 0
mov dword ptr [rsp+88h+var_60+4], 0FFFFFFFFh
jmp loc_4C475
| _DWORD * JS_ToQuotedStringFree(
long long a1,
_DWORD *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; // rbx
_DWORD *v16; // rax
long long v17; // rdx
long long v18; // r12
_DWORD *v19; // r13
_DWORD *v20; // r13
long long v21; // rsi
long long v22; // rdx
long long v23; // rcx
long long v24; // r8
long long v25; // r9
__m128 v26; // xmm4
__m128 v27; // xmm5
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v35; // rdx
long long v36; // rcx
unsigned int v37; // ebp
long long v38; // r8
long long v39; // r9
__m128 v40; // xmm4
__m128 v41; // xmm5
int v42; // eax
long long v43; // rdx
long long v44; // rcx
long long v45; // r8
long long v46; // r9
__m128 v47; // xmm4
__m128 v48; // xmm5
int v49; // [rsp+Ch] [rbp-7Ch] BYREF
long long v50; // [rsp+10h] [rbp-78h] BYREF
long long v51; // [rsp+18h] [rbp-70h]
int v52; // [rsp+20h] [rbp-68h]
int v53; // [rsp+24h] [rbp-64h]
long long v54; // [rsp+28h] [rbp-60h]
_DWORD *v55; // [rsp+30h] [rbp-58h]
long long v56; // [rsp+38h] [rbp-50h]
_BYTE v57[72]; // [rsp+40h] [rbp-48h] BYREF
v14 = a3;
v16 = (_DWORD *)JS_ToStringCheckObject(a1, (long long)a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v18 = v17;
v55 = v16;
if ( (_DWORD)v17 != 6 )
{
v56 = v14;
v20 = v55;
v21 = (v55[1] & 0x7FFFFFFFu) + 2;
v50 = a1;
v53 = v21;
v52 = 0;
v54 = 0LL;
v51 = js_alloc_string(a1, v21, 0);
if ( v51 )
{
if ( !(unsigned int)string_buffer_putc8(
(long long)&v50,
0x22u,
a7,
a8,
a9,
a10,
v26,
v27,
a13,
a14,
v22,
v23,
v24,
v25) )
{
v49 = 0;
if ( (v20[1] & 0x7FFFFFFF) != 0 )
{
while ( 2 )
{
v37 = string_getc((long long)v20, &v49);
switch ( v37 )
{
case 8u:
v37 = 98;
goto LABEL_19;
case 9u:
v37 = 116;
goto LABEL_19;
case 0xAu:
v37 = 110;
goto LABEL_19;
case 0xBu:
goto LABEL_13;
case 0xCu:
v37 = 102;
goto LABEL_19;
case 0xDu:
v37 = 114;
goto LABEL_19;
default:
if ( v37 == 34 || v37 == 92 )
{
LABEL_19:
if ( (unsigned int)string_buffer_putc8(
(long long)&v50,
0x5Cu,
a7,
a8,
a9,
a10,
v40,
v41,
a13,
a14,
v35,
v36,
v38,
v39) )
goto LABEL_5;
v42 = string_buffer_putc8((long long)&v50, v37, a7, a8, a9, a10, v47, v48, a13, a14, v43, v44, v45, v46);
}
else
{
LABEL_13:
if ( (v37 & 0x1FF800) != 55296 && v37 >= 0x20 )
{
v42 = string_buffer_putc((long long)&v50, v37);
}
else
{
snprintf(v57, 16LL, "\\u%04x", v37);
v42 = string_buffer_write8((long long)&v50, (long long)v57, 6);
}
}
if ( v42 )
goto LABEL_5;
v29 = 0x7FFFFFFFLL;
if ( v49 >= (v20[1] & 0x7FFFFFFF) )
break;
continue;
}
break;
}
}
if ( !(unsigned int)string_buffer_putc8(
(long long)&v50,
0x22u,
a7,
a8,
a9,
a10,
v32,
v33,
a13,
a14,
v28,
v29,
v30,
v31) )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v55, v18);
v19 = string_buffer_end((long long)&v50);
goto LABEL_6;
}
}
}
else
{
v53 = 0;
HIDWORD(v54) = -1;
}
LABEL_5:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v55, v18);
js_free(v50, v51);
v51 = 0LL;
v19 = 0LL;
LABEL_6:
v14 = v56;
goto LABEL_7;
}
v19 = v16;
LABEL_7:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a2, v14);
return v19;
}
| JS_ToQuotedStringFree:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x001419eb
MOV R12,RDX
MOV qword ptr [RSP + 0x30],RAX
CMP R12D,0x6
JNZ 0x0014c41a
MOV R13,RAX
JMP 0x0014c4ac
LAB_0014c41a:
MOV qword ptr [RSP + 0x38],RBX
MOV R13,qword ptr [RSP + 0x30]
MOV ESI,0x7fffffff
AND ESI,dword ptr [R13 + 0x4]
ADD ESI,0x2
MOV qword ptr [RSP + 0x10],R15
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV RDI,R15
XOR EDX,EDX
CALL 0x0011ff5f
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x0014c61d
LEA RDI,[RSP + 0x10]
MOV ESI,0x22
CALL 0x0014ac4d
TEST EAX,EAX
JZ 0x0014c4d0
LAB_0014c475:
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [R15 + 0x18]
MOV RDX,R12
CALL 0x0011ccb2
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0011bf85
MOV qword ptr [RSP + 0x18],0x0
MOV R12D,0x6
XOR R13D,R13D
LAB_0014c4a7:
MOV RBX,qword ptr [RSP + 0x38]
LAB_0014c4ac:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011ccb2
MOV RAX,R13
MOV RDX,R12
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014c4d0:
MOV dword ptr [RSP + 0xc],0x0
TEST dword ptr [R13 + 0x4],0x7fffffff
JZ 0x0014c5e0
LAB_0014c4e6:
MOV RDI,R13
LEA RSI,[RSP + 0xc]
CALL 0x0014b999
MOV EBP,EAX
LEA EAX,[RBP + -0x8]
CMP EAX,0x5
JA 0x0014c519
LEA RCX,[0x19b630]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
LEA RBX,[RSP + 0x10]
switchD:
JMP RAX
caseD_8:
MOV EBP,0x62
JMP 0x0014c596
default:
CMP EBP,0x22
JZ 0x0014c591
CMP EBP,0x5c
LEA RBX,[RSP + 0x10]
JZ 0x0014c596
caseD_b:
CMP EBP,0x20
SETNC AL
MOV ECX,EBP
AND ECX,0x1ff800
CMP ECX,0xd800
SETNZ CL
TEST AL,CL
JNZ 0x0014c5d4
MOV ESI,0x10
LEA RDI,[RSP + 0x40]
LEA RDX,[0x19e530]
MOV ECX,EBP
XOR EAX,EAX
CALL 0x0010e2d0
MOV RDI,RBX
LEA RSI,[RSP + 0x40]
MOV EDX,0x6
CALL 0x00141424
JMP 0x0014c5b5
caseD_9:
MOV EBP,0x74
JMP 0x0014c596
caseD_a:
MOV EBP,0x6e
JMP 0x0014c596
caseD_c:
MOV EBP,0x66
JMP 0x0014c596
caseD_d:
MOV EBP,0x72
JMP 0x0014c596
LAB_0014c591:
LEA RBX,[RSP + 0x10]
LAB_0014c596:
MOV RDI,RBX
MOV ESI,0x5c
CALL 0x0014ac4d
TEST EAX,EAX
JNZ 0x0014c475
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0014ac4d
LAB_0014c5b5:
TEST EAX,EAX
JNZ 0x0014c475
MOV EAX,dword ptr [R13 + 0x4]
MOV ECX,0x7fffffff
AND EAX,ECX
CMP dword ptr [RSP + 0xc],EAX
JL 0x0014c4e6
JMP 0x0014c5e0
LAB_0014c5d4:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001327dc
JMP 0x0014c5b5
LAB_0014c5e0:
LEA RDI,[RSP + 0x10]
MOV ESI,0x22
CALL 0x0014ac4d
TEST EAX,EAX
JNZ 0x0014c475
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [R15 + 0x18]
MOV RDX,R12
CALL 0x0011ccb2
LEA RDI,[RSP + 0x10]
CALL 0x00132830
MOV R13,RAX
MOV R12,RDX
JMP 0x0014c4a7
LAB_0014c61d:
MOV dword ptr [RSP + 0x24],0x0
MOV dword ptr [RSP + 0x2c],0xffffffff
JMP 0x0014c475
|
int1 [16] JS_ToQuotedStringFree(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
uint uVar2;
long lVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int local_7c;
long local_78;
long local_70;
int4 local_68;
int local_64;
int8 local_60;
long local_58;
int8 local_50;
char local_48 [24];
auVar4 = JS_ToStringCheckObject();
lVar3 = auVar4._0_8_;
if (auVar4._8_4_ != 6) {
local_64 = (*(uint *)(lVar3 + 4) & 0x7fffffff) + 2;
local_68 = 0;
local_60 = 0;
local_78 = param_1;
local_58 = lVar3;
local_50 = param_3;
local_70 = js_alloc_string(param_1,local_64,0);
if (local_70 == 0) {
local_64 = 0;
local_60 = CONCAT44(0xffffffff,(int4)local_60);
}
else {
iVar1 = string_buffer_putc8(&local_78,0x22);
if (iVar1 == 0) {
local_7c = 0;
if ((*(uint *)(lVar3 + 4) & 0x7fffffff) != 0) {
do {
uVar2 = string_getc(lVar3,&local_7c);
switch(uVar2) {
case 8:
uVar2 = 0x62;
break;
case 9:
uVar2 = 0x74;
break;
case 10:
uVar2 = 0x6e;
break;
case 0xb:
switchD_0014c510_caseD_b:
if (uVar2 < 0x20 || (uVar2 & 0x1ff800) == 0xd800) {
snprintf(local_48,0x10,"\\u%04x",(ulong)uVar2);
iVar1 = string_buffer_write8(&local_78,local_48,6);
}
else {
iVar1 = string_buffer_putc(&local_78,uVar2);
}
goto LAB_0014c5b5;
case 0xc:
uVar2 = 0x66;
break;
case 0xd:
uVar2 = 0x72;
break;
default:
if ((uVar2 != 0x22) && (uVar2 != 0x5c)) goto switchD_0014c510_caseD_b;
}
iVar1 = string_buffer_putc8(&local_78,0x5c);
if (iVar1 != 0) goto LAB_0014c475;
iVar1 = string_buffer_putc8(&local_78,uVar2);
LAB_0014c5b5:
if (iVar1 != 0) goto LAB_0014c475;
} while (local_7c < (int)(*(uint *)(lVar3 + 4) & 0x7fffffff));
}
iVar1 = string_buffer_putc8(&local_78,0x22);
if (iVar1 == 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,auVar4._8_8_);
auVar5 = string_buffer_end(&local_78);
auVar4._8_8_ = auVar5._8_8_;
auVar4._0_8_ = local_58;
lVar3 = auVar5._0_8_;
param_3 = local_50;
goto LAB_0014c4ac;
}
}
}
LAB_0014c475:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,auVar4._8_8_);
js_free(local_78,local_70);
local_70 = 0;
auVar4._8_8_ = 6;
auVar4._0_8_ = local_58;
lVar3 = 0;
param_3 = local_50;
}
LAB_0014c4ac:
local_58 = auVar4._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2,param_3);
auVar5._8_8_ = auVar4._8_8_;
auVar5._0_8_ = lVar3;
return auVar5;
}
|
|
428 | JS_ToQuotedStringFree | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToQuotedStringFree(JSContext *ctx, JSValue val) {
JSValue r = JS_ToQuotedString(ctx, val);
JS_FreeValue(ctx, val);
return r;
} | O3 | c | JS_ToQuotedStringFree:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4350b
movq %rax, %r13
movq %rdx, %r12
cmpl $0x6, %r12d
je 0x4e32e
movq %rbx, 0x28(%rsp)
movl $0x7fffffff, %esi # imm = 0x7FFFFFFF
andl 0x4(%r13), %esi
addl $0x2, %esi
movq %r15, 0x8(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq %r15, %rdi
xorl %edx, %edx
callq 0x20686
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x4e2ec
leaq 0x8(%rsp), %rdi
movl $0x22, %esi
callq 0x4cb90
testl %eax, %eax
je 0x4e365
cmpl $-0x9, %r12d
jb 0x4e311
movq 0x18(%r15), %rdi
movl (%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r13)
cmpl $0x1, %eax
jg 0x4e311
movq %r13, %rsi
movq %r12, %rdx
callq 0x20d90
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1c845
movl $0x6, %r12d
xorl %r13d, %r13d
movq 0x28(%rsp), %rbx
cmpl $-0x9, %ebx
jb 0x4e350
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x4e350
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20d90
movq %r13, %rax
movq %r12, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x4(%rsp)
testl $0x7fffffff, 0x4(%r13) # imm = 0x7FFFFFFF
je 0x4e475
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0x4d7fe
movl %eax, %ebp
leal -0x8(%rbp), %eax
cmpl $0x5, %eax
ja 0x4e3ae
leaq 0x502af(%rip), %rcx # 0x9e648
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x8(%rsp), %rbx
jmpq *%rax
movl $0x62, %ebp
jmp 0x4e42b
cmpl $0x22, %ebp
je 0x4e426
cmpl $0x5c, %ebp
leaq 0x8(%rsp), %rbx
je 0x4e42b
cmpl $0x20, %ebp
setae %al
movl %ebp, %ecx
andl $0x1ff800, %ecx # imm = 0x1FF800
cmpl $0xd800, %ecx # imm = 0xD800
setne %cl
testb %cl, %al
jne 0x4e469
movl $0x10, %esi
leaq 0x30(%rsp), %rdi
leaq 0x53113(%rip), %rdx # 0xa1500
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe2d0
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
movl $0x6, %edx
callq 0x42ef0
jmp 0x4e44a
movl $0x74, %ebp
jmp 0x4e42b
movl $0x6e, %ebp
jmp 0x4e42b
movl $0x66, %ebp
jmp 0x4e42b
movl $0x72, %ebp
jmp 0x4e42b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x4cb90
testl %eax, %eax
jne 0x4e2ec
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4cb90
testl %eax, %eax
jne 0x4e2ec
movl 0x4(%r13), %eax
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andl %ecx, %eax
cmpl %eax, 0x4(%rsp)
jl 0x4e37b
jmp 0x4e475
movq %rbx, %rdi
movl %ebp, %esi
callq 0x33621
jmp 0x4e44a
leaq 0x8(%rsp), %rdi
movl $0x22, %esi
callq 0x4cb90
testl %eax, %eax
jne 0x4e2ec
cmpl $-0x9, %r12d
jb 0x4e4b1
movq 0x18(%r15), %rdi
movl (%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r13)
cmpl $0x1, %eax
jg 0x4e4b1
movq %r13, %rsi
movq %r12, %rdx
callq 0x20d90
leaq 0x8(%rsp), %rdi
callq 0x33675
movq %rax, %r13
movq %rdx, %r12
jmp 0x4e329
| JS_ToQuotedStringFree:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call JS_ToStringCheckObject
mov r13, rax
mov r12, rdx
cmp r12d, 6
jz loc_4E32E
mov [rsp+78h+var_50], rbx
mov esi, 7FFFFFFFh
and esi, [r13+4]
add esi, 2
mov [rsp+78h+var_70], r15
mov [rsp+78h+var_5C], esi
mov [rsp+78h+var_60], 0
mov [rsp+78h+var_58], 0
mov rdi, r15
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_68], rax
test rax, rax
jz short loc_4E2EC
lea rdi, [rsp+78h+var_70]
mov esi, 22h ; '"'
call string_buffer_putc8
test eax, eax
jz short loc_4E365
loc_4E2EC:
cmp r12d, 0FFFFFFF7h
jb short loc_4E311
mov rdi, [r15+18h]
mov eax, [r13+0]
lea ecx, [rax-1]
mov [r13+0], ecx
cmp eax, 1
jg short loc_4E311
mov rsi, r13
mov rdx, r12
call js_free_value_rt
loc_4E311:
mov rdi, [rsp+78h+var_70]
mov rsi, [rsp+78h+var_68]
call js_free
mov r12d, 6
xor r13d, r13d
loc_4E329:
mov rbx, [rsp+78h+var_50]
loc_4E32E:
cmp ebx, 0FFFFFFF7h
jb short loc_4E350
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_4E350
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
loc_4E350:
mov rax, r13
mov rdx, r12
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4E365:
mov [rsp+78h+var_74], 0
test dword ptr [r13+4], 7FFFFFFFh
jz loc_4E475
loc_4E37B:
mov rdi, r13
lea rsi, [rsp+78h+var_74]
call string_getc
mov ebp, eax
lea eax, [rbp-8]; switch 6 cases
cmp eax, 5
ja short def_4E3A5; jumptable 000000000004E3A5 default case
lea rcx, jpt_4E3A5
movsxd rax, ds:(jpt_4E3A5 - 9E648h)[rcx+rax*4]
add rax, rcx
lea rbx, [rsp+78h+var_70]
jmp rax; switch jump
loc_4E3A7:
mov ebp, 62h ; 'b'; jumptable 000000000004E3A5 case 8
jmp short loc_4E42B
def_4E3A5:
cmp ebp, 22h ; '"'; jumptable 000000000004E3A5 default case
jz short loc_4E426
cmp ebp, 5Ch ; '\'
lea rbx, [rsp+78h+var_70]
jz short loc_4E42B
loc_4E3BD:
cmp ebp, 20h ; ' '; jumptable 000000000004E3A5 case 11
setnb al
mov ecx, ebp
and ecx, 1FF800h
cmp ecx, 0D800h
setnz cl
test al, cl
jnz loc_4E469
mov esi, 10h
lea rdi, [rsp+78h+var_48]
lea rdx, aU04x; "\\u%04x"
mov ecx, ebp
xor eax, eax
call _snprintf
mov rdi, rbx
lea rsi, [rsp+78h+var_48]
mov edx, 6
call string_buffer_write8
jmp short loc_4E44A
loc_4E40A:
mov ebp, 74h ; 't'; jumptable 000000000004E3A5 case 9
jmp short loc_4E42B
loc_4E411:
mov ebp, 6Eh ; 'n'; jumptable 000000000004E3A5 case 10
jmp short loc_4E42B
loc_4E418:
mov ebp, 66h ; 'f'; jumptable 000000000004E3A5 case 12
jmp short loc_4E42B
loc_4E41F:
mov ebp, 72h ; 'r'; jumptable 000000000004E3A5 case 13
jmp short loc_4E42B
loc_4E426:
lea rbx, [rsp+78h+var_70]
loc_4E42B:
mov rdi, rbx
mov esi, 5Ch ; '\'
call string_buffer_putc8
test eax, eax
jnz loc_4E2EC
mov rdi, rbx
mov esi, ebp
call string_buffer_putc8
loc_4E44A:
test eax, eax
jnz loc_4E2EC
mov eax, [r13+4]
mov ecx, 7FFFFFFFh
and eax, ecx
cmp [rsp+78h+var_74], eax
jl loc_4E37B
jmp short loc_4E475
loc_4E469:
mov rdi, rbx
mov esi, ebp
call string_buffer_putc
jmp short loc_4E44A
loc_4E475:
lea rdi, [rsp+78h+var_70]
mov esi, 22h ; '"'
call string_buffer_putc8
test eax, eax
jnz loc_4E2EC
cmp r12d, 0FFFFFFF7h
jb short loc_4E4B1
mov rdi, [r15+18h]
mov eax, [r13+0]
lea ecx, [rax-1]
mov [r13+0], ecx
cmp eax, 1
jg short loc_4E4B1
mov rsi, r13
mov rdx, r12
call js_free_value_rt
loc_4E4B1:
lea rdi, [rsp+78h+var_70]
call string_buffer_end
mov r13, rax
mov r12, rdx
jmp loc_4E329
| long long JS_ToQuotedStringFree(
long long a1,
int *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; // rbx
unsigned long long v17; // rax
long long v18; // r8
long long v19; // r9
long long v20; // r13
long long v21; // rdx
long long v22; // r12
long long v23; // rsi
long long v24; // rdx
long long v25; // rcx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v30; // rdx
long long v31; // rcx
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rdi
int v35; // eax
long long v36; // rcx
long long v37; // rdi
int v38; // eax
long long v39; // rcx
long long v41; // rdx
long long v42; // rcx
unsigned int v43; // ebp
long long v44; // r8
long long v45; // r9
__m128 v46; // xmm4
__m128 v47; // xmm5
int v48; // eax
long long v49; // rdx
long long v50; // rcx
__m128 v51; // xmm4
__m128 v52; // xmm5
long long v53; // rdi
int v54; // eax
long long v55; // rcx
int v56; // [rsp+4h] [rbp-74h] BYREF
long long v57; // [rsp+8h] [rbp-70h] BYREF
long long v58; // [rsp+10h] [rbp-68h]
int v59; // [rsp+18h] [rbp-60h]
int v60; // [rsp+1Ch] [rbp-5Ch]
long long v61; // [rsp+20h] [rbp-58h]
long long v62; // [rsp+28h] [rbp-50h]
_BYTE v63[72]; // [rsp+30h] [rbp-48h] BYREF
v14 = a3;
v17 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v20 = v17;
v22 = v21;
if ( (_DWORD)v21 != 6 )
{
v62 = v14;
v23 = (*(_DWORD *)(v17 + 4) & 0x7FFFFFFFu) + 2;
v57 = a1;
v60 = v23;
v59 = 0;
v61 = 0LL;
v58 = js_alloc_string(a1, v23, 0);
if ( !v58
|| (unsigned int)string_buffer_putc8(
(long long)&v57,
0x22u,
a7,
a8,
a9,
a10,
v28,
v29,
a13,
a14,
v24,
v25,
v26,
v27) )
{
goto LABEL_4;
}
v56 = 0;
if ( (*(_DWORD *)(v20 + 4) & 0x7FFFFFFF) != 0 )
{
while ( 2 )
{
v43 = string_getc(v20, &v56);
switch ( v43 )
{
case 8u:
v43 = 98;
goto LABEL_24;
case 9u:
v43 = 116;
goto LABEL_24;
case 0xAu:
v43 = 110;
goto LABEL_24;
case 0xBu:
goto LABEL_18;
case 0xCu:
v43 = 102;
goto LABEL_24;
case 0xDu:
v43 = 114;
goto LABEL_24;
default:
if ( v43 == 34 || v43 == 92 )
{
LABEL_24:
if ( (unsigned int)string_buffer_putc8(
(long long)&v57,
0x5Cu,
a7,
a8,
a9,
a10,
v46,
v47,
a13,
a14,
v41,
v42,
v44,
v45) )
goto LABEL_4;
v48 = string_buffer_putc8((long long)&v57, v43, a7, a8, a9, a10, v51, v52, a13, a14, v49, v50, v26, v27);
}
else
{
LABEL_18:
if ( (v43 & 0x1FF800) != 55296 && v43 >= 0x20 )
{
v48 = string_buffer_putc((long long)&v57, v43);
}
else
{
snprintf(v63, 16LL, "\\u%04x", v43);
v48 = string_buffer_write8((long long)&v57, (long long)v63, 6);
}
}
if ( v48 )
goto LABEL_4;
v31 = 0x7FFFFFFFLL;
if ( v56 >= (*(_DWORD *)(v20 + 4) & 0x7FFFFFFF) )
break;
continue;
}
break;
}
}
if ( (unsigned int)string_buffer_putc8(
(long long)&v57,
0x22u,
a7,
a8,
a9,
a10,
v32,
v33,
a13,
a14,
v30,
v31,
v26,
v27) )
{
LABEL_4:
if ( (unsigned int)v22 >= 0xFFFFFFF7 )
{
v34 = *(_QWORD *)(a1 + 24);
v35 = *(_DWORD *)v20;
v36 = (unsigned int)(*(_DWORD *)v20 - 1);
*(_DWORD *)v20 = v36;
if ( v35 <= 1 )
js_free_value_rt(v34, (_QWORD *)v20, v22, v36, v26, v27);
}
js_free(v57, v58);
v20 = 0LL;
}
else
{
if ( (unsigned int)v22 >= 0xFFFFFFF7 )
{
v53 = *(_QWORD *)(a1 + 24);
v54 = *(_DWORD *)v20;
v55 = (unsigned int)(*(_DWORD *)v20 - 1);
*(_DWORD *)v20 = v55;
if ( v54 <= 1 )
js_free_value_rt(v53, (_QWORD *)v20, v22, v55, v26, v27);
}
v20 = string_buffer_end(&v57);
}
v14 = v62;
}
if ( (unsigned int)v14 >= 0xFFFFFFF7 )
{
v37 = *(_QWORD *)(a1 + 24);
v38 = *a2;
v39 = (unsigned int)(*a2 - 1);
*a2 = v39;
if ( v38 <= 1 )
js_free_value_rt(v37, a2, v14, v39, v18, v19);
}
return v20;
}
| JS_ToQuotedStringFree:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x0014350b
MOV R13,RAX
MOV R12,RDX
CMP R12D,0x6
JZ 0x0014e32e
MOV qword ptr [RSP + 0x28],RBX
MOV ESI,0x7fffffff
AND ESI,dword ptr [R13 + 0x4]
ADD ESI,0x2
MOV qword ptr [RSP + 0x8],R15
MOV dword ptr [RSP + 0x1c],ESI
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV RDI,R15
XOR EDX,EDX
CALL 0x00120686
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0014e2ec
LEA RDI,[RSP + 0x8]
MOV ESI,0x22
CALL 0x0014cb90
TEST EAX,EAX
JZ 0x0014e365
LAB_0014e2ec:
CMP R12D,-0x9
JC 0x0014e311
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R13]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R13],ECX
CMP EAX,0x1
JG 0x0014e311
MOV RSI,R13
MOV RDX,R12
CALL 0x00120d90
LAB_0014e311:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0011c845
MOV R12D,0x6
XOR R13D,R13D
LAB_0014e329:
MOV RBX,qword ptr [RSP + 0x28]
LAB_0014e32e:
CMP EBX,-0x9
JC 0x0014e350
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0014e350
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120d90
LAB_0014e350:
MOV RAX,R13
MOV RDX,R12
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014e365:
MOV dword ptr [RSP + 0x4],0x0
TEST dword ptr [R13 + 0x4],0x7fffffff
JZ 0x0014e475
LAB_0014e37b:
MOV RDI,R13
LEA RSI,[RSP + 0x4]
CALL 0x0014d7fe
MOV EBP,EAX
LEA EAX,[RBP + -0x8]
CMP EAX,0x5
JA 0x0014e3ae
LEA RCX,[0x19e648]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
LEA RBX,[RSP + 0x8]
switchD:
JMP RAX
caseD_8:
MOV EBP,0x62
JMP 0x0014e42b
default:
CMP EBP,0x22
JZ 0x0014e426
CMP EBP,0x5c
LEA RBX,[RSP + 0x8]
JZ 0x0014e42b
caseD_b:
CMP EBP,0x20
SETNC AL
MOV ECX,EBP
AND ECX,0x1ff800
CMP ECX,0xd800
SETNZ CL
TEST AL,CL
JNZ 0x0014e469
MOV ESI,0x10
LEA RDI,[RSP + 0x30]
LEA RDX,[0x1a1500]
MOV ECX,EBP
XOR EAX,EAX
CALL 0x0010e2d0
MOV RDI,RBX
LEA RSI,[RSP + 0x30]
MOV EDX,0x6
CALL 0x00142ef0
JMP 0x0014e44a
caseD_9:
MOV EBP,0x74
JMP 0x0014e42b
caseD_a:
MOV EBP,0x6e
JMP 0x0014e42b
caseD_c:
MOV EBP,0x66
JMP 0x0014e42b
caseD_d:
MOV EBP,0x72
JMP 0x0014e42b
LAB_0014e426:
LEA RBX,[RSP + 0x8]
LAB_0014e42b:
MOV RDI,RBX
MOV ESI,0x5c
CALL 0x0014cb90
TEST EAX,EAX
JNZ 0x0014e2ec
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0014cb90
LAB_0014e44a:
TEST EAX,EAX
JNZ 0x0014e2ec
MOV EAX,dword ptr [R13 + 0x4]
MOV ECX,0x7fffffff
AND EAX,ECX
CMP dword ptr [RSP + 0x4],EAX
JL 0x0014e37b
JMP 0x0014e475
LAB_0014e469:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00133621
JMP 0x0014e44a
LAB_0014e475:
LEA RDI,[RSP + 0x8]
MOV ESI,0x22
CALL 0x0014cb90
TEST EAX,EAX
JNZ 0x0014e2ec
CMP R12D,-0x9
JC 0x0014e4b1
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R13]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R13],ECX
CMP EAX,0x1
JG 0x0014e4b1
MOV RSI,R13
MOV RDX,R12
CALL 0x00120d90
LAB_0014e4b1:
LEA RDI,[RSP + 0x8]
CALL 0x00133675
MOV R13,RAX
MOV R12,RDX
JMP 0x0014e329
|
int1 [16] JS_ToQuotedStringFree(long param_1,int *param_2,int8 param_3)
{
int8 uVar1;
int iVar2;
uint uVar3;
int *piVar4;
uint uVar5;
int1 auVar6 [16];
int local_74;
long local_70;
long local_68;
int4 local_60;
int local_5c;
int8 local_58;
int8 local_50;
char local_48 [24];
auVar6 = JS_ToStringCheckObject();
piVar4 = auVar6._0_8_;
uVar5 = auVar6._8_4_;
if (uVar5 != 6) {
local_5c = (piVar4[1] & 0x7fffffffU) + 2;
local_60 = 0;
local_58 = 0;
local_70 = param_1;
local_50 = param_3;
local_68 = js_alloc_string(param_1,local_5c,0);
if ((local_68 != 0) && (iVar2 = string_buffer_putc8(&local_70,0x22), iVar2 == 0)) {
local_74 = 0;
if ((piVar4[1] & 0x7fffffffU) != 0) {
do {
uVar3 = string_getc(piVar4,&local_74);
switch(uVar3) {
case 8:
uVar3 = 0x62;
break;
case 9:
uVar3 = 0x74;
break;
case 10:
uVar3 = 0x6e;
break;
case 0xb:
switchD_0014e3a5_caseD_b:
if (uVar3 < 0x20 || (uVar3 & 0x1ff800) == 0xd800) {
snprintf(local_48,0x10,"\\u%04x",(ulong)uVar3);
iVar2 = string_buffer_write8(&local_70,local_48,6);
}
else {
iVar2 = string_buffer_putc(&local_70,uVar3);
}
goto LAB_0014e44a;
case 0xc:
uVar3 = 0x66;
break;
case 0xd:
uVar3 = 0x72;
break;
default:
if ((uVar3 != 0x22) && (uVar3 != 0x5c)) goto switchD_0014e3a5_caseD_b;
}
iVar2 = string_buffer_putc8(&local_70,0x5c);
if (iVar2 != 0) goto LAB_0014e2ec;
iVar2 = string_buffer_putc8(&local_70,uVar3);
LAB_0014e44a:
if (iVar2 != 0) goto LAB_0014e2ec;
} while (local_74 < (int)(piVar4[1] & 0x7fffffffU));
}
iVar2 = string_buffer_putc8(&local_70,0x22);
if (iVar2 == 0) {
if (0xfffffff6 < uVar5) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar4;
*piVar4 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar4,auVar6._8_8_);
}
}
auVar6 = string_buffer_end(&local_70);
param_3 = local_50;
goto LAB_0014e32e;
}
}
LAB_0014e2ec:
if (0xfffffff6 < uVar5) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar4;
*piVar4 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar4,auVar6._8_8_);
}
}
js_free(local_70,local_68);
auVar6 = ZEXT816(6) << 0x40;
param_3 = local_50;
}
LAB_0014e32e:
if (0xfffffff6 < (uint)param_3) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *param_2;
*param_2 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,param_2,param_3);
}
}
return auVar6;
}
|
|
429 | delete_dynamic_element | eloqsql/mysys/array.c | void delete_dynamic_element(DYNAMIC_ARRAY *array, uint idx)
{
char *ptr= (char*) array->buffer+array->size_of_element*idx;
array->elements--;
memmove(ptr,ptr+array->size_of_element,
(array->elements-idx)*array->size_of_element);
} | O3 | c | delete_dynamic_element:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %edx
movl 0x14(%rdi), %ecx
movl %ecx, %eax
imull %esi, %eax
addq (%rdi), %rax
decl %edx
movl %edx, 0x8(%rdi)
subl %esi, %edx
imull %ecx, %edx
movq %rcx, %rsi
addq %rax, %rsi
movq %rax, %rdi
popq %rbp
jmp 0x24640
| delete_dynamic_element:
push rbp
mov rbp, rsp
mov edx, [rdi+8]
mov ecx, [rdi+14h]
mov eax, ecx
imul eax, esi
add rax, [rdi]
dec edx
mov [rdi+8], edx
sub edx, esi
imul edx, ecx
mov rsi, rcx
add rsi, rax
mov rdi, rax
pop rbp
jmp _memmove
| long long delete_dynamic_element(long long a1, int a2)
{
long long v2; // rcx
long long v3; // rax
int v4; // edx
v2 = *(unsigned int *)(a1 + 20);
v3 = *(_QWORD *)a1 + (unsigned int)(a2 * *(_DWORD *)(a1 + 20));
v4 = *(_DWORD *)(a1 + 8) - 1;
*(_DWORD *)(a1 + 8) = v4;
return memmove(v3, v3 + v2, (unsigned int)(v2 * (v4 - a2)));
}
| delete_dynamic_element:
PUSH RBP
MOV RBP,RSP
MOV EDX,dword ptr [RDI + 0x8]
MOV ECX,dword ptr [RDI + 0x14]
MOV EAX,ECX
IMUL EAX,ESI
ADD RAX,qword ptr [RDI]
DEC EDX
MOV dword ptr [RDI + 0x8],EDX
SUB EDX,ESI
IMUL EDX,ECX
MOV RSI,RCX
ADD RSI,RAX
MOV RDI,RAX
POP RBP
JMP 0x00124640
|
void delete_dynamic_element(long *param_1,int param_2)
{
uint uVar1;
void *__dest;
int iVar2;
uVar1 = *(uint *)((long)param_1 + 0x14);
__dest = (void *)((ulong)(uVar1 * param_2) + *param_1);
iVar2 = (int)param_1[1] + -1;
*(int *)(param_1 + 1) = iVar2;
memmove(__dest,(void *)((ulong)uVar1 + (long)__dest),(ulong)((iVar2 - param_2) * uVar1));
return;
}
|
|
430 | my_xml_enter | eloqsql/strings/xml.c | static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len)
{
if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */))
return MY_XML_ERROR;
if (st->attr.end > st->attr.start)
{
st->attr.end[0]= '/';
st->attr.end++;
}
memcpy(st->attr.end, str, len);
st->attr.end+= len;
st->attr.end[0]= '\0';
if (st->flags & MY_XML_FLAG_RELATIVE_NAMES)
return st->enter ? st->enter(st, str, len) : MY_XML_OK;
else
return st->enter ?
st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK;
} | O0 | c | my_xml_enter:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
callq 0x87bd0
cmpl $0x0, %eax
je 0x87706
movl $0x1, -0x4(%rbp)
jmp 0x8781c
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x118(%rcx), %rax
jbe 0x87742
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movb $0x2f, (%rax)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x29270
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x120(%rax), %rcx
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x877c7
movq -0x10(%rbp), %rax
cmpq $0x0, 0x148(%rax)
je 0x877b8
movq -0x10(%rbp), %rax
movq 0x148(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
jmp 0x877bf
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x877bf
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8781c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x148(%rax)
je 0x8780f
movq -0x10(%rbp), %rax
movq 0x148(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq 0x120(%rcx), %rdx
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rdx
callq *%rax
movl %eax, -0x28(%rbp)
jmp 0x87816
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x87816
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_xml_enter:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
add rsi, 1
call my_xml_attr_ensure_space
cmp eax, 0
jz short loc_87706
mov [rbp+var_4], 1
jmp loc_8781C
loc_87706:
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+118h]
jbe short loc_87742
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov byte ptr [rax], 2Fh ; '/'
mov rax, [rbp+var_10]
mov rcx, [rax+120h]
add rcx, 1
mov [rax+120h], rcx
loc_87742:
mov rax, [rbp+var_10]
mov rdi, [rax+120h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+120h]
mov [rax+120h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_877C7
mov rax, [rbp+var_10]
cmp qword ptr [rax+148h], 0
jz short loc_877B8
mov rax, [rbp+var_10]
mov rax, [rax+148h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_24], eax
jmp short loc_877BF
loc_877B8:
xor eax, eax
mov [rbp+var_24], eax
jmp short $+2
loc_877BF:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_8781C
loc_877C7:
mov rax, [rbp+var_10]
cmp qword ptr [rax+148h], 0
jz short loc_8780F
mov rax, [rbp+var_10]
mov rax, [rax+148h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_10]
mov rsi, [rcx+118h]
mov rcx, [rbp+var_10]
mov rdx, [rcx+120h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+118h]
sub rdx, rcx
call rax
mov [rbp+var_28], eax
jmp short loc_87816
loc_8780F:
xor eax, eax
mov [rbp+var_28], eax
jmp short $+2
loc_87816:
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
loc_8781C:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_xml_enter(long long a1, long long a2, long long a3)
{
if ( (unsigned int)my_xml_attr_ensure_space(a1, a3 + 1) )
{
return 1;
}
else
{
if ( *(_QWORD *)(a1 + 288) > *(_QWORD *)(a1 + 280) )
*(_BYTE *)(*(_QWORD *)(a1 + 288))++ = 47;
memcpy(*(_QWORD *)(a1 + 288), a2, a3);
*(_QWORD *)(a1 + 288) += a3;
**(_BYTE **)(a1 + 288) = 0;
if ( (*(_DWORD *)a1 & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 328) )
return (unsigned int)(*(long long ( **)(long long, long long, long long))(a1 + 328))(a1, a2, a3);
else
return 0;
}
else if ( *(_QWORD *)(a1 + 328) )
{
return (unsigned int)(*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 328))(
a1,
*(_QWORD *)(a1 + 280),
*(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280));
}
else
{
return 0;
}
}
}
| my_xml_enter:
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 RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x1
CALL 0x00187bd0
CMP EAX,0x0
JZ 0x00187706
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0018781c
LAB_00187706:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x118]
JBE 0x00187742
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV byte ptr [RAX],0x2f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x120]
ADD RCX,0x1
MOV qword ptr [RAX + 0x120],RCX
LAB_00187742:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x120]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00129270
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x120]
MOV qword ptr [RAX + 0x120],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001877c7
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x148],0x0
JZ 0x001877b8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x148]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001877bf
LAB_001877b8:
XOR EAX,EAX
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001877bf
LAB_001877bf:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018781c
LAB_001877c7:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x148],0x0
JZ 0x0018780f
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x148]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x118]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x118]
SUB RDX,RCX
CALL RAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00187816
LAB_0018780f:
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00187816
LAB_00187816:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
LAB_0018781c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_xml_enter(uint *param_1,void *param_2,size_t param_3)
{
int iVar1;
int4 local_30;
int4 local_2c;
int4 local_c;
iVar1 = my_xml_attr_ensure_space(param_1,param_3 + 1);
if (iVar1 == 0) {
if (*(ulong *)(param_1 + 0x46) < *(ulong *)(param_1 + 0x48)) {
**(int1 **)(param_1 + 0x48) = 0x2f;
*(long *)(param_1 + 0x48) = *(long *)(param_1 + 0x48) + 1;
}
memcpy(*(void **)(param_1 + 0x48),param_2,param_3);
*(size_t *)(param_1 + 0x48) = param_3 + *(long *)(param_1 + 0x48);
**(int1 **)(param_1 + 0x48) = 0;
if ((*param_1 & 1) == 0) {
if (*(long *)(param_1 + 0x52) == 0) {
local_30 = 0;
}
else {
local_30 = (**(code **)(param_1 + 0x52))
(param_1,*(int8 *)(param_1 + 0x46),
*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46));
}
local_c = local_30;
}
else {
if (*(long *)(param_1 + 0x52) == 0) {
local_2c = 0;
}
else {
local_2c = (**(code **)(param_1 + 0x52))(param_1,param_2,param_3);
}
local_c = local_2c;
}
}
else {
local_c = 1;
}
return local_c;
}
|
|
431 | 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 0x1e2a00(%rip), %rax # 0x2c00b8
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 0xdd752
leaq 0x1e29b2(%rip), %rax # 0x2c00b8
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 0xf4270
movl %eax, -0x34(%rbp)
leaq 0x1e2981(%rip), %rax # 0x2c00b8
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 0xdd76b
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xf4270
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_3:
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_DD752
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_DD76B
loc_DD752:
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_DD76B:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
| long long inline_mysql_file_open_3(
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,[0x3c00b8]
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 0x001dd752
LEA RAX,[0x3c00b8]
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 0x001f4270
MOV dword ptr [RBP + -0x34],EAX
LEA RAX,[0x3c00b8]
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 0x001dd76b
LAB_001dd752:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001f4270
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
LAB_001dd76b:
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;
}
|
|
432 | 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;
} | O3 | c | inline_mysql_file_open:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %r12d
movl %edi, %esi
leaq 0x3372e0(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %r13
movl $0x2, %edx
movq %r15, %rcx
movq %r13, %r8
callq *0x148(%rax)
movq %rax, (%r13)
testq %rax, %rax
jne 0x4ed76
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xa03e0
movl %eax, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x337293(%rip), %r13 # 0x386010
movq (%r13), %rcx
leaq 0x8b0d7(%rip), %rsi # 0xd9e5f
movq %rax, %rdi
movl %r12d, %edx
callq *0x1f0(%rcx)
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xa03e0
movl %eax, %ebx
movq (%r13), %rax
movq -0x30(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x4ed65
| inline_mysql_file_open:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r8
mov r14d, ecx
mov r15, rdx
mov r12d, esi
mov esi, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
lea r13, [rbp+var_30]
mov edx, 2
mov rcx, r15
mov r8, r13
call qword ptr [rax+148h]
mov [r13+0], rax
test rax, rax
jnz short loc_4ED76
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
loc_4ED65:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4ED76:
lea r13, PSI_server
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, r12d
call qword ptr [rcx+1F0h]
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
mov rax, [r13+0]
mov rdi, [rbp+var_30]
mov esi, ebx
call qword ptr [rax+200h]
jmp short loc_4ED65
| long long inline_mysql_file_open(unsigned int a1, unsigned int a2, long long a3, unsigned int a4, long long a5)
{
long long v8; // rax
_BYTE v10[72]; // [rsp+8h] [rbp-78h] BYREF
long long v11[6]; // [rsp+50h] [rbp-30h] BYREF
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v10, a1, 2LL, a3, v11);
v11[0] = v8;
if ( v8 )
{
((void ( *)(long long, const char *, _QWORD))PSI_server[62])(
v8,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
a2);
a5 = (unsigned int)my_open(a3, a4, a5);
((void ( *)(long long, long long))PSI_server[64])(v11[0], a5);
}
else
{
LODWORD(a5) = my_open(a3, a4, a5);
}
return (unsigned int)a5;
}
| inline_mysql_file_open:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R8
MOV R14D,ECX
MOV R15,RDX
MOV R12D,ESI
MOV ESI,EDI
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
LEA R13,[RBP + -0x30]
MOV EDX,0x2
MOV RCX,R15
MOV R8,R13
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R13],RAX
TEST RAX,RAX
JNZ 0x0014ed76
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x001a03e0
MOV EBX,EAX
LAB_0014ed65:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014ed76:
LEA R13,[0x486010]
MOV RCX,qword ptr [R13]
LEA RSI,[0x1d9e5f]
MOV RDI,RAX
MOV EDX,R12D
CALL qword ptr [RCX + 0x1f0]
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x001a03e0
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x0014ed65
|
int4
inline_mysql_file_open
(int4 param_1,int4 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int4 uVar1;
int1 local_80 [72];
long local_38;
local_38 = (**(code **)(PSI_server + 0x148))(local_80,param_1,2,param_3,&local_38);
if (local_38 == 0) {
uVar1 = my_open(param_3,param_4,param_5);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_38,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
param_2);
uVar1 = my_open(param_3,param_4,param_5);
(**(code **)(PSI_server + 0x200))(local_38,uVar1);
}
return uVar1;
}
|
|
433 | ImPlot3D::PushStyleColor(int, unsigned int) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | void PushStyleColor(ImPlot3DCol idx, ImU32 col) {
ImPlot3DContext& gp = *GImPlot3D;
ImGuiColorMod backup;
backup.Col = (ImGuiCol)idx;
backup.BackupValue = gp.Style.Colors[idx];
gp.ColorModifiers.push_back(backup);
gp.Style.Colors[idx] = ImGui::ColorConvertU32ToFloat4(col);
} | O1 | cpp | ImPlot3D::PushStyleColor(int, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %ebp
movq 0x2e3524(%rip), %r12 # 0x336c98
movslq %edi, %rax
shlq $0x4, %rax
leaq (%r12,%rax), %r15
addq $0xe0, %r15
movups (%r15), %xmm0
movaps %xmm0, (%rsp)
movl 0x1d8(%r12), %r13d
movl 0x1dc(%r12), %eax
cmpl %eax, %r13d
jne 0x5381d
incl %r13d
testl %eax, %eax
je 0x537b7
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x537bc
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x5381d
movslq %r13d, %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdi
callq 0x2130dc
movq %rax, %r14
movq 0x1e0(%r12), %rsi
testq %rsi, %rsi
je 0x5380d
movslq 0x1d8(%r12), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
movq %r14, %rdi
callq 0xf810
movq 0x1e0(%r12), %rdi
callq 0x21318e
movq %r14, 0x1e0(%r12)
movl %r13d, 0x1dc(%r12)
movq 0x1e0(%r12), %rax
movslq 0x1d8(%r12), %rcx
leaq (%rcx,%rcx,4), %rcx
movl %ebp, (%rax,%rcx,4)
movaps (%rsp), %xmm0
movups %xmm0, 0x4(%rax,%rcx,4)
incl 0x1d8(%r12)
movl %ebx, %edi
callq 0x213cb2
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, (%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN8ImPlot3D14PushStyleColorEij:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebx, esi
mov ebp, edi
mov r12, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
movsxd rax, edi
shl rax, 4
lea r15, [r12+rax]
add r15, 0E0h
movups xmm0, xmmword ptr [r15]
movaps [rsp+48h+var_48], xmm0
mov r13d, [r12+1D8h]
mov eax, [r12+1DCh]
cmp r13d, eax
jnz short loc_5381D
inc r13d
test eax, eax
jz short loc_537B7
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add ecx, eax
jmp short loc_537BC
loc_537B7:
mov ecx, 8
loc_537BC:
cmp ecx, r13d
cmovg r13d, ecx
cmp eax, r13d
jge short loc_5381D
movsxd rax, r13d
shl rax, 2
lea rdi, [rax+rax*4]; this
call _ZN5ImGui8MemAllocEm; ImGui::MemAlloc(ulong)
mov r14, rax
mov rsi, [r12+1E0h]; unsigned int
test rsi, rsi
jz short loc_5380D
movsxd rax, dword ptr [r12+1D8h]
shl rax, 2
lea rdx, [rax+rax*4]
mov rdi, r14
call _memcpy
mov rdi, [r12+1E0h]; this
call _ZN5ImGui7MemFreeEPv; ImGui::MemFree(void *)
loc_5380D:
mov [r12+1E0h], r14
mov [r12+1DCh], r13d
loc_5381D:
mov rax, [r12+1E0h]
movsxd rcx, dword ptr [r12+1D8h]
lea rcx, [rcx+rcx*4]
mov [rax+rcx*4], ebp
movaps xmm0, [rsp+48h+var_48]
movups xmmword ptr [rax+rcx*4+4], xmm0
inc dword ptr [r12+1D8h]
mov edi, ebx; this
call _ZN5ImGui23ColorConvertU32ToFloat4Ej; ImGui::ColorConvertU32ToFloat4(uint)
movlhps xmm0, xmm1
movups xmmword ptr [r15], xmm0
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ImPlot3D::PushStyleColor(ImPlot3D *this, void *a2, double a3, __m128 a4)
{
unsigned int v4; // ebx
ImGui *v5; // r12
__m128 *v6; // r15
int v7; // r13d
int v8; // eax
int v9; // r13d
int v10; // ecx
long long v11; // r14
long long v12; // rax
long long v13; // rcx
long long result; // rax
__m128 v15; // [rsp+0h] [rbp-48h]
v4 = (unsigned int)a2;
v5 = ImPlot3D::GImPlot3D;
v6 = (__m128 *)((char *)ImPlot3D::GImPlot3D + 16 * (int)this + 224);
v15 = *v6;
v7 = *((_DWORD *)ImPlot3D::GImPlot3D + 118);
v8 = *((_DWORD *)ImPlot3D::GImPlot3D + 119);
if ( v7 == v8 )
{
v9 = v7 + 1;
if ( v8 )
v10 = v8 + v8 / 2;
else
v10 = 8;
if ( v10 > v9 )
v9 = v10;
if ( v8 < v9 )
{
v11 = ImGui::MemAlloc((ImGui *)(20LL * v9), (unsigned long long)a2);
a2 = (void *)*((_QWORD *)v5 + 60);
if ( a2 )
{
memcpy(v11, a2, 20LL * *((int *)v5 + 118));
ImGui::MemFree(*((ImGui **)v5 + 60), a2);
}
*((_QWORD *)v5 + 60) = v11;
*((_DWORD *)v5 + 119) = v9;
}
}
v12 = *((_QWORD *)v5 + 60);
v13 = 5LL * *((int *)v5 + 118);
*(_DWORD *)(v12 + 4 * v13) = (_DWORD)this;
*(__m128 *)(v12 + 4 * v13 + 4) = v15;
++*((_DWORD *)v5 + 118);
result = ImGui::ColorConvertU32ToFloat4((ImGui *)v4, (unsigned int)a2);
*v6 = _mm_movelh_ps(v15, a4);
return result;
}
| PushStyleColor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBX,ESI
MOV EBP,EDI
MOV R12,qword ptr [0x00436c98]
MOVSXD RAX,EDI
SHL RAX,0x4
LEA R15,[R12 + RAX*0x1]
ADD R15,0xe0
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP],XMM0
MOV R13D,dword ptr [R12 + 0x1d8]
MOV EAX,dword ptr [R12 + 0x1dc]
CMP R13D,EAX
JNZ 0x0015381d
INC R13D
TEST EAX,EAX
JZ 0x001537b7
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD ECX,EAX
JMP 0x001537bc
LAB_001537b7:
MOV ECX,0x8
LAB_001537bc:
CMP ECX,R13D
CMOVG R13D,ECX
CMP EAX,R13D
JGE 0x0015381d
MOVSXD RAX,R13D
SHL RAX,0x2
LEA RDI,[RAX + RAX*0x4]
CALL 0x003130dc
MOV R14,RAX
MOV RSI,qword ptr [R12 + 0x1e0]
TEST RSI,RSI
JZ 0x0015380d
MOVSXD RAX,dword ptr [R12 + 0x1d8]
SHL RAX,0x2
LEA RDX,[RAX + RAX*0x4]
MOV RDI,R14
CALL 0x0010f810
MOV RDI,qword ptr [R12 + 0x1e0]
CALL 0x0031318e
LAB_0015380d:
MOV qword ptr [R12 + 0x1e0],R14
MOV dword ptr [R12 + 0x1dc],R13D
LAB_0015381d:
MOV RAX,qword ptr [R12 + 0x1e0]
MOVSXD RCX,dword ptr [R12 + 0x1d8]
LEA RCX,[RCX + RCX*0x4]
MOV dword ptr [RAX + RCX*0x4],EBP
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RAX + RCX*0x4 + 0x4],XMM0
INC dword ptr [R12 + 0x1d8]
MOV EDI,EBX
CALL 0x00313cb2
MOVLHPS XMM0,XMM1
MOVUPS xmmword ptr [R15],XMM0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ImPlot3D::PushStyleColor(int, unsigned int) */
void ImPlot3D::PushStyleColor(int param_1,uint param_2)
{
long lVar1;
int8 *puVar2;
int iVar3;
long lVar4;
int8 uVar5;
long lVar6;
void *__dest;
int iVar7;
int iVar8;
int8 uVar9;
int8 in_XMM1_Qa;
lVar6 = GImPlot3D;
lVar1 = GImPlot3D + (long)param_1 * 0x10;
uVar9 = *(int8 *)(lVar1 + 0xe0);
uVar5 = *(int8 *)(lVar1 + 0xe8);
iVar3 = *(int *)(GImPlot3D + 0x1dc);
if (*(int *)(GImPlot3D + 0x1d8) == iVar3) {
iVar8 = *(int *)(GImPlot3D + 0x1d8) + 1;
if (iVar3 == 0) {
iVar7 = 8;
}
else {
iVar7 = iVar3 / 2 + iVar3;
}
if (iVar8 < iVar7) {
iVar8 = iVar7;
}
if (iVar3 < iVar8) {
__dest = (void *)ImGui::MemAlloc((long)iVar8 * 0x14);
if (*(void **)(lVar6 + 0x1e0) != (void *)0x0) {
memcpy(__dest,*(void **)(lVar6 + 0x1e0),(long)*(int *)(lVar6 + 0x1d8) * 0x14);
ImGui::MemFree(*(void **)(lVar6 + 0x1e0));
}
*(void **)(lVar6 + 0x1e0) = __dest;
*(int *)(lVar6 + 0x1dc) = iVar8;
}
}
lVar4 = *(long *)(lVar6 + 0x1e0);
iVar3 = *(int *)(lVar6 + 0x1d8);
*(int *)(lVar4 + (long)iVar3 * 0x14) = param_1;
puVar2 = (int8 *)(lVar4 + 4 + (long)iVar3 * 0x14);
*puVar2 = uVar9;
puVar2[1] = uVar5;
*(int *)(lVar6 + 0x1d8) = *(int *)(lVar6 + 0x1d8) + 1;
uVar9 = ImGui::ColorConvertU32ToFloat4(param_2);
*(int8 *)(lVar1 + 0xe0) = uVar9;
*(int *)(lVar1 + 0xe8) = (int)in_XMM1_Qa;
*(int *)(lVar1 + 0xec) = (int)((ulong)in_XMM1_Qa >> 0x20);
return;
}
|
|
434 | thr_print_locks | eloqsql/mysys/thr_lock.c | void thr_print_locks(void)
{
LIST *list;
uint count=0;
mysql_mutex_lock(&THR_LOCK_lock);
puts("Current active THR (table level locks):");
for (list= thr_lock_thread_list; list && count++ < MAX_THREADS;
list= list_rest(list))
{
THR_LOCK *lock=(THR_LOCK*) list->data;
mysql_mutex_lock(&lock->mutex);
if ((lock->write.data || lock->read.data ||
lock->write_wait.data || lock->read_wait.data))
{
printf("lock: %p:", lock);
if ((lock->write_wait.data || lock->read_wait.data) &&
(! lock->read.data && ! lock->write.data))
printf(" WARNING: ");
if (lock->write.data)
printf(" write");
if (lock->write_wait.data)
printf(" write_wait");
if (lock->read.data)
printf(" read");
if (lock->read_wait.data)
printf(" read_wait");
puts("");
thr_print_lock("write",&lock->write);
thr_print_lock("write_wait",&lock->write_wait);
thr_print_lock("read",&lock->read);
thr_print_lock("read_wait",&lock->read_wait);
puts("");
}
mysql_mutex_unlock(&lock->mutex);
}
fflush(stdout);
mysql_mutex_unlock(&THR_LOCK_lock);
} | O0 | c | thr_print_locks:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0xc(%rbp)
leaq 0xb89ab2(%rip), %rdi # 0xc83378
leaq 0x5adbb(%rip), %rsi # 0x154688
movl $0x61b, %edx # imm = 0x61B
callq 0xf7900
leaq 0x5ade4(%rip), %rdi # 0x1546c2
callq 0x2a790
leaq 0xb89d3e(%rip), %rax # 0xc83628
movq (%rax), %rax
movq %rax, -0x8(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x19(%rbp)
je 0xf9913
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x3e8, %eax # imm = 0x3E8
setb %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xf991f
jmp 0xf9ac2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5ad4e(%rip), %rsi # 0x154688
movl $0x621, %edx # imm = 0x621
callq 0xf7900
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0xf997a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0xf997a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0xf997a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xf9aa4
movq -0x18(%rbp), %rsi
leaq 0x5ad65(%rip), %rdi # 0x1546ea
movb $0x0, %al
callq 0x2a050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0xf99a5
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xf99cc
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0xf99cc
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0xf99cc
leaq 0x5ad2f(%rip), %rdi # 0x1546f4
movb $0x0, %al
callq 0x2a050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0xf99e8
leaq 0x5ad1e(%rip), %rdi # 0x1546ff
movb $0x0, %al
callq 0x2a050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0xf9a04
leaq 0x5ad09(%rip), %rdi # 0x154706
movb $0x0, %al
callq 0x2a050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xf9a1d
leaq 0x5eb13(%rip), %rdi # 0x158529
movb $0x0, %al
callq 0x2a050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xf9a36
leaq 0x5ace3(%rip), %rdi # 0x154712
movb $0x0, %al
callq 0x2a050
leaq 0x5e270(%rip), %rdi # 0x157cad
callq 0x2a790
movq -0x18(%rbp), %rsi
addq $0x90, %rsi
leaq 0x5acac(%rip), %rdi # 0x154700
callq 0xf9af0
movq -0x18(%rbp), %rsi
addq $0x80, %rsi
leaq 0x5ac9c(%rip), %rdi # 0x154707
callq 0xf9af0
movq -0x18(%rbp), %rsi
addq $0x70, %rsi
leaq 0x5eaab(%rip), %rdi # 0x15852a
callq 0xf9af0
movq -0x18(%rbp), %rsi
addq $0x60, %rsi
leaq 0x5ac80(%rip), %rdi # 0x154713
callq 0xf9af0
leaq 0x5e20e(%rip), %rdi # 0x157cad
callq 0x2a790
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7970
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xf98f1
movq 0x1c3507(%rip), %rax # 0x2bcfd0
movq (%rax), %rdi
callq 0x2a3e0
leaq 0xb898a0(%rip), %rdi # 0xc83378
callq 0xf7970
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| thr_print_locks:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], 0
lea rdi, THR_LOCK_lock
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 61Bh
call inline_mysql_mutex_lock_27
lea rdi, aCurrentActiveT; "Current active THR (table level locks):"
call _puts
lea rax, thr_lock_thread_list
mov rax, [rax]
mov [rbp+var_8], rax
loc_F98F1:
xor eax, eax
cmp [rbp+var_8], 0
mov [rbp+var_19], al
jz short loc_F9913
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 1
mov [rbp+var_C], ecx
cmp eax, 3E8h
setb al
mov [rbp+var_19], al
loc_F9913:
mov al, [rbp+var_19]
test al, 1
jnz short loc_F991F
jmp loc_F9AC2
loc_F991F:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 621h
call inline_mysql_mutex_lock_27
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jnz short loc_F997A
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jnz short loc_F997A
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jnz short loc_F997A
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz loc_F9AA4
loc_F997A:
mov rsi, [rbp+var_18]
lea rdi, aLockP; "lock: %p:"
mov al, 0
call _printf
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jnz short loc_F99A5
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz short loc_F99CC
loc_F99A5:
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jnz short loc_F99CC
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jnz short loc_F99CC
lea rdi, aWarning; " WARNING: "
mov al, 0
call _printf
loc_F99CC:
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jz short loc_F99E8
lea rdi, aWrite_0; " write"
mov al, 0
call _printf
loc_F99E8:
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jz short loc_F9A04
lea rdi, aWriteWait; " write_wait"
mov al, 0
call _printf
loc_F9A04:
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jz short loc_F9A1D
lea rdi, aTheEventWasCor+34h; " read"
mov al, 0
call _printf
loc_F9A1D:
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz short loc_F9A36
lea rdi, aReadWait; " read_wait"
mov al, 0
call _printf
loc_F9A36:
lea rdi, asc_157CA9+4; ""
call _puts
mov rsi, [rbp+var_18]
add rsi, 90h
lea rdi, aWrite_0+1; "write"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 80h
lea rdi, aWriteWait+1; "write_wait"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 70h ; 'p'
lea rdi, aTheEventWasCor+35h; "read"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 60h ; '`'
lea rdi, aReadWait+1; "read_wait"
call thr_print_lock
lea rdi, asc_157CA9+4; ""
call _puts
loc_F9AA4:
mov rdi, [rbp+var_18]
add rdi, 18h
call inline_mysql_mutex_unlock_28
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp loc_F98F1
loc_F9AC2:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
lea rdi, THR_LOCK_lock
call inline_mysql_mutex_unlock_28
add rsp, 20h
pop rbp
retn
| long long thr_print_locks()
{
unsigned int v0; // eax
bool v2; // [rsp+7h] [rbp-19h]
_QWORD *v3; // [rsp+8h] [rbp-18h]
unsigned int v4; // [rsp+14h] [rbp-Ch]
long long i; // [rsp+18h] [rbp-8h]
v4 = 0;
inline_mysql_mutex_lock_27(
(long long)&THR_LOCK_lock,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x61Bu);
puts("Current active THR (table level locks):");
for ( i = thr_lock_thread_list; ; i = *(_QWORD *)(i + 8) )
{
v2 = 0;
if ( i )
{
v0 = v4++;
v2 = v0 < 0x3E8;
}
if ( !v2 )
break;
v3 = *(_QWORD **)(i + 16);
inline_mysql_mutex_lock_27(
(long long)(v3 + 3),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x621u);
if ( v3[18] || v3[14] || v3[16] || v3[12] )
{
printf("lock: %p:", v3);
if ( (v3[16] || v3[12]) && !v3[14] && !v3[18] )
printf(" WARNING: ");
if ( v3[18] )
printf(" write");
if ( v3[16] )
printf(" write_wait");
if ( v3[14] )
printf(" read");
if ( v3[12] )
printf(" read_wait");
puts("");
thr_print_lock("write", v3 + 18);
thr_print_lock("write_wait", v3 + 16);
thr_print_lock("read", v3 + 14);
thr_print_lock("read_wait", v3 + 12);
puts("");
}
inline_mysql_mutex_unlock_28((long long)(v3 + 3));
}
fflush(stdout);
return inline_mysql_mutex_unlock_28((long long)&THR_LOCK_lock);
}
| thr_print_locks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],0x0
LEA RDI,[0xd83378]
LEA RSI,[0x254688]
MOV EDX,0x61b
CALL 0x001f7900
LEA RDI,[0x2546c2]
CALL 0x0012a790
LEA RAX,[0xd83628]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f98f1:
XOR EAX,EAX
CMP qword ptr [RBP + -0x8],0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x001f9913
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x3e8
SETC AL
MOV byte ptr [RBP + -0x19],AL
LAB_001f9913:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x001f991f
JMP 0x001f9ac2
LAB_001f991f:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
LEA RSI,[0x254688]
MOV EDX,0x621
CALL 0x001f7900
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JNZ 0x001f997a
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x001f997a
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x001f997a
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001f9aa4
LAB_001f997a:
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x2546ea]
MOV AL,0x0
CALL 0x0012a050
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x001f99a5
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001f99cc
LAB_001f99a5:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x001f99cc
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JNZ 0x001f99cc
LEA RDI,[0x2546f4]
MOV AL,0x0
CALL 0x0012a050
LAB_001f99cc:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x001f99e8
LEA RDI,[0x2546ff]
MOV AL,0x0
CALL 0x0012a050
LAB_001f99e8:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JZ 0x001f9a04
LEA RDI,[0x254706]
MOV AL,0x0
CALL 0x0012a050
LAB_001f9a04:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JZ 0x001f9a1d
LEA RDI,[0x258529]
MOV AL,0x0
CALL 0x0012a050
LAB_001f9a1d:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001f9a36
LEA RDI,[0x254712]
MOV AL,0x0
CALL 0x0012a050
LAB_001f9a36:
LEA RDI,[0x257cad]
CALL 0x0012a790
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x90
LEA RDI,[0x254700]
CALL 0x001f9af0
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x80
LEA RDI,[0x254707]
CALL 0x001f9af0
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x70
LEA RDI,[0x25852a]
CALL 0x001f9af0
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x60
LEA RDI,[0x254713]
CALL 0x001f9af0
LEA RDI,[0x257cad]
CALL 0x0012a790
LAB_001f9aa4:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x001f7970
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f98f1
LAB_001f9ac2:
MOV RAX,qword ptr [0x003bcfd0]
MOV RDI,qword ptr [RAX]
CALL 0x0012a3e0
LEA RDI,[0xd83378]
CALL 0x001f7970
ADD RSP,0x20
POP RBP
RET
|
void thr_print_locks(void)
{
long lVar1;
uint uVar2;
uint local_14;
long local_10;
local_14 = 0;
inline_mysql_mutex_lock
(THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x61b);
puts("Current active THR (table level locks):");
local_10 = thr_lock_thread_list;
while( true ) {
uVar2 = local_14;
if (local_10 != 0) {
local_14 = local_14 + 1;
}
if (local_10 == 0 || 999 < uVar2) break;
lVar1 = *(long *)(local_10 + 0x10);
inline_mysql_mutex_lock
(lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x621);
if ((((*(long *)(lVar1 + 0x90) != 0) || (*(long *)(lVar1 + 0x70) != 0)) ||
(*(long *)(lVar1 + 0x80) != 0)) || (*(long *)(lVar1 + 0x60) != 0)) {
printf("lock: %p:",lVar1);
if (((*(long *)(lVar1 + 0x80) != 0) || (*(long *)(lVar1 + 0x60) != 0)) &&
((*(long *)(lVar1 + 0x70) == 0 && (*(long *)(lVar1 + 0x90) == 0)))) {
printf(" WARNING: ");
}
if (*(long *)(lVar1 + 0x90) != 0) {
printf(" write");
}
if (*(long *)(lVar1 + 0x80) != 0) {
printf(" write_wait");
}
if (*(long *)(lVar1 + 0x70) != 0) {
printf(" read");
}
if (*(long *)(lVar1 + 0x60) != 0) {
printf(" read_wait");
}
puts("");
thr_print_lock("write",lVar1 + 0x90);
thr_print_lock("write_wait",lVar1 + 0x80);
thr_print_lock("read",lVar1 + 0x70);
thr_print_lock("read_wait",lVar1 + 0x60);
puts("");
}
inline_mysql_mutex_unlock(lVar1 + 0x18);
local_10 = *(long *)(local_10 + 8);
}
fflush(*(FILE **)PTR_stdout_003bcfd0);
inline_mysql_mutex_unlock(THR_LOCK_lock);
return;
}
|
|
435 | lunasvg::SVGElement::currentViewportSize() const | dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp | Size SVGElement::currentViewportSize() const
{
auto parent = parentElement();
if(parent == nullptr) {
auto element = static_cast<const SVGSVGElement*>(this);
const auto& viewBox = element->viewBox();
if(viewBox.value().isValid())
return viewBox.value().size();
return Size(300, 150);
}
if(parent->id() == ElementID::Svg) {
auto element = static_cast<const SVGSVGElement*>(parent);
const auto& viewBox = element->viewBox();
if(viewBox.value().isValid())
return viewBox.value().size();
LengthContext lengthContext(element);
auto width = lengthContext.valueForLength(element->width());
auto height = lengthContext.valueForLength(element->height());
return Size(width, height);
}
return parent->currentViewportSize();
} | O0 | cpp | lunasvg::SVGElement::currentViewportSize() const:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0xe710
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x19b30
movq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x98, %rdi
callq 0x1ffc0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1ffd0
movq %rax, %rdi
callq 0x14530
testb $0x1, %al
jne 0x19af7
jmp 0x19b12
movq -0x28(%rbp), %rdi
callq 0x1ffd0
movq %rax, %rdi
callq 0x1fff0
movlpd %xmm0, -0x8(%rbp)
jmp 0x19bf2
leaq -0x8(%rbp), %rdi
movss 0x728aa(%rip), %xmm0 # 0x8c3c8
movss 0x728a6(%rip), %xmm1 # 0x8c3cc
callq 0x20020
jmp 0x19bf2
movq -0x18(%rbp), %rdi
callq 0x1fe70
cmpb $0x14, %al
jne 0x19be4
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
addq $0x98, %rdi
callq 0x1ffc0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1ffd0
movq %rax, %rdi
callq 0x14530
testb $0x1, %al
jne 0x19b74
jmp 0x19b8c
movq -0x38(%rbp), %rdi
callq 0x1ffd0
movq %rax, %rdi
callq 0x1fff0
movlpd %xmm0, -0x8(%rbp)
jmp 0x19bf2
movq -0x30(%rbp), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq 0x20050
movq -0x30(%rbp), %rdi
callq 0x200d0
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0x20080
movss %xmm0, -0x4c(%rbp)
movq -0x30(%rbp), %rdi
callq 0x200f0
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0x20080
movss %xmm0, -0x50(%rbp)
movss -0x4c(%rbp), %xmm0
movss -0x50(%rbp), %xmm1
leaq -0x8(%rbp), %rdi
callq 0x20020
jmp 0x19bf2
movq -0x18(%rbp), %rdi
callq 0x19aa0
movlpd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ZNK7lunasvg10SVGElement19currentViewportSizeEv:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]; this
mov [rbp+var_58], rdi
call _ZNK7lunasvg7SVGNode13parentElementEv; lunasvg::SVGNode::parentElement(void)
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_19B30
mov rax, [rbp+var_58]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
add rdi, 98h; this
call _ZNK7lunasvg15SVGFitToViewBox7viewBoxEv; lunasvg::SVGFitToViewBox::viewBox(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]; this
call _ZNK7lunasvg7SVGRect5valueEv; lunasvg::SVGRect::value(void)
mov rdi, rax; this
call _ZNK7lunasvg4Rect7isValidEv; lunasvg::Rect::isValid(void)
test al, 1
jnz short loc_19AF7
jmp short loc_19B12
loc_19AF7:
mov rdi, [rbp+var_28]; this
call _ZNK7lunasvg7SVGRect5valueEv; lunasvg::SVGRect::value(void)
mov rdi, rax; this
call _ZNK7lunasvg4Rect4sizeEv; lunasvg::Rect::size(void)
movlpd [rbp+var_8], xmm0
jmp loc_19BF2
loc_19B12:
lea rdi, [rbp+var_8]; this
movss xmm0, cs:flt_8C3C8; float
movss xmm1, cs:flt_8C3CC; float
call _ZN7lunasvg4SizeC2Eff; lunasvg::Size::Size(float,float)
jmp loc_19BF2
loc_19B30:
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg10SVGElement2idEv; lunasvg::SVGElement::id(void)
cmp al, 14h
jnz loc_19BE4
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
add rdi, 98h; this
call _ZNK7lunasvg15SVGFitToViewBox7viewBoxEv; lunasvg::SVGFitToViewBox::viewBox(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]; this
call _ZNK7lunasvg7SVGRect5valueEv; lunasvg::SVGRect::value(void)
mov rdi, rax; this
call _ZNK7lunasvg4Rect7isValidEv; lunasvg::Rect::isValid(void)
test al, 1
jnz short loc_19B74
jmp short loc_19B8C
loc_19B74:
mov rdi, [rbp+var_38]; this
call _ZNK7lunasvg7SVGRect5valueEv; lunasvg::SVGRect::value(void)
mov rdi, rax; this
call _ZNK7lunasvg4Rect4sizeEv; lunasvg::Rect::size(void)
movlpd [rbp+var_8], xmm0
jmp short loc_19BF2
loc_19B8C:
mov rsi, [rbp+var_30]
lea rdi, [rbp+var_48]
xor edx, edx
call _ZN7lunasvg13LengthContextC2EPKNS_10SVGElementENS_5UnitsE; lunasvg::LengthContext::LengthContext(lunasvg::SVGElement const*,lunasvg::Units)
mov rdi, [rbp+var_30]; this
call _ZNK7lunasvg13SVGSVGElement5widthEv; lunasvg::SVGSVGElement::width(void)
mov rsi, rax; lunasvg::SVGLength *
lea rdi, [rbp+var_48]; this
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&)
movss [rbp+var_4C], xmm0
mov rdi, [rbp+var_30]; this
call _ZNK7lunasvg13SVGSVGElement6heightEv; lunasvg::SVGSVGElement::height(void)
mov rsi, rax; lunasvg::SVGLength *
lea rdi, [rbp+var_48]; this
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&)
movss [rbp+var_50], xmm0
movss xmm0, [rbp+var_4C]; float
movss xmm1, [rbp+var_50]; float
lea rdi, [rbp+var_8]; this
call _ZN7lunasvg4SizeC2Eff; lunasvg::Size::Size(float,float)
jmp short loc_19BF2
loc_19BE4:
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg10SVGElement19currentViewportSizeEv; lunasvg::SVGElement::currentViewportSize(void)
movlpd [rbp+var_8], xmm0
loc_19BF2:
movsd xmm0, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| double lunasvg::SVGElement::currentViewportSize(lunasvg::SVGElement *this, double a2)
{
lunasvg::Rect *v2; // rax
lunasvg::Rect *v3; // rax
lunasvg::Rect *v4; // rax
lunasvg::Rect *v5; // rax
const lunasvg::SVGLength *v6; // rax
const lunasvg::SVGLength *v7; // rax
_BYTE v9[16]; // [rsp+18h] [rbp-48h] BYREF
lunasvg::SVGRect *v10; // [rsp+28h] [rbp-38h]
lunasvg::SVGSVGElement *v11; // [rsp+30h] [rbp-30h]
lunasvg::SVGRect *v12; // [rsp+38h] [rbp-28h]
lunasvg::SVGElement *v13; // [rsp+40h] [rbp-20h]
lunasvg::SVGElement *v14; // [rsp+48h] [rbp-18h]
lunasvg::SVGNode *v15; // [rsp+50h] [rbp-10h]
double v16; // [rsp+58h] [rbp-8h] BYREF
v15 = this;
v14 = (lunasvg::SVGElement *)lunasvg::SVGNode::parentElement(this);
if ( v14 )
{
if ( (unsigned __int8)lunasvg::SVGElement::id(v14) == 20 )
{
v11 = v14;
v10 = (lunasvg::SVGRect *)lunasvg::SVGFitToViewBox::viewBox((lunasvg::SVGElement *)((char *)v14 + 152));
v4 = (lunasvg::Rect *)lunasvg::SVGRect::value(v10);
if ( lunasvg::Rect::isValid(v4) )
{
v5 = (lunasvg::Rect *)lunasvg::SVGRect::value(v10);
lunasvg::Rect::size(v5);
return a2;
}
else
{
lunasvg::LengthContext::LengthContext(v9, v11, 0LL);
v6 = (const lunasvg::SVGLength *)lunasvg::SVGSVGElement::width(v11);
lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v9, v6);
v7 = (const lunasvg::SVGLength *)lunasvg::SVGSVGElement::height(v11);
lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v9, v7);
lunasvg::Size::Size((lunasvg::Size *)&v16, *(float *)&a2, *(float *)&a2);
}
}
else
{
lunasvg::SVGElement::currentViewportSize(v14);
return a2;
}
}
else
{
v13 = this;
v12 = (lunasvg::SVGRect *)lunasvg::SVGFitToViewBox::viewBox((lunasvg::SVGElement *)((char *)this + 152));
v2 = (lunasvg::Rect *)lunasvg::SVGRect::value(v12);
if ( lunasvg::Rect::isValid(v2) )
{
v3 = (lunasvg::Rect *)lunasvg::SVGRect::value(v12);
lunasvg::Rect::size(v3);
return a2;
}
else
{
lunasvg::Size::Size((lunasvg::Size *)&v16, 300.0, 150.0);
}
}
return v16;
}
| currentViewportSize:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x58],RDI
CALL 0x0010e710
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00119b30
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x98
CALL 0x0011ffc0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011ffd0
MOV RDI,RAX
CALL 0x00114530
TEST AL,0x1
JNZ 0x00119af7
JMP 0x00119b12
LAB_00119af7:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011ffd0
MOV RDI,RAX
CALL 0x0011fff0
MOVLPD qword ptr [RBP + -0x8],XMM0
JMP 0x00119bf2
LAB_00119b12:
LEA RDI,[RBP + -0x8]
MOVSS XMM0,dword ptr [0x0018c3c8]
MOVSS XMM1,dword ptr [0x0018c3cc]
CALL 0x00120020
JMP 0x00119bf2
LAB_00119b30:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0011fe70
CMP AL,0x14
JNZ 0x00119be4
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x98
CALL 0x0011ffc0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0011ffd0
MOV RDI,RAX
CALL 0x00114530
TEST AL,0x1
JNZ 0x00119b74
JMP 0x00119b8c
LAB_00119b74:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0011ffd0
MOV RDI,RAX
CALL 0x0011fff0
MOVLPD qword ptr [RBP + -0x8],XMM0
JMP 0x00119bf2
LAB_00119b8c:
MOV RSI,qword ptr [RBP + -0x30]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL 0x00120050
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001200d0
MOV RSI,RAX
LEA RDI,[RBP + -0x48]
CALL 0x00120080
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001200f0
MOV RSI,RAX
LEA RDI,[RBP + -0x48]
CALL 0x00120080
MOVSS dword ptr [RBP + -0x50],XMM0
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOVSS XMM1,dword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x8]
CALL 0x00120020
JMP 0x00119bf2
LAB_00119be4:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00119aa0
MOVLPD qword ptr [RBP + -0x8],XMM0
LAB_00119bf2:
MOVSD XMM0,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
/* lunasvg::SVGElement::currentViewportSize() const */
int8 __thiscall lunasvg::SVGElement::currentViewportSize(SVGElement *this)
{
char cVar1;
Rect *pRVar2;
ulong uVar3;
SVGLength *pSVar4;
float fVar5;
float fVar6;
LengthContext local_50 [16];
SVGRect *local_40;
SVGSVGElement *local_38;
SVGRect *local_30;
SVGElement *local_28;
SVGElement *local_20;
SVGElement *local_18;
int8 local_10;
local_18 = this;
local_20 = (SVGElement *)SVGNode::parentElement((SVGNode *)this);
if (local_20 == (SVGElement *)0x0) {
local_28 = this;
local_30 = (SVGRect *)SVGFitToViewBox::viewBox((SVGFitToViewBox *)(this + 0x98));
pRVar2 = (Rect *)SVGRect::value(local_30);
uVar3 = Rect::isValid(pRVar2);
if ((uVar3 & 1) == 0) {
Size::Size((Size *)&local_10,DAT_0018c3c8,DAT_0018c3cc);
}
else {
pRVar2 = (Rect *)SVGRect::value(local_30);
local_10 = Rect::size(pRVar2);
}
}
else {
cVar1 = id(local_20);
if (cVar1 == '\x14') {
local_38 = (SVGSVGElement *)local_20;
local_40 = (SVGRect *)SVGFitToViewBox::viewBox((SVGFitToViewBox *)(local_20 + 0x98));
pRVar2 = (Rect *)SVGRect::value(local_40);
uVar3 = Rect::isValid(pRVar2);
if ((uVar3 & 1) == 0) {
LengthContext::LengthContext(local_50,local_38,0);
pSVar4 = (SVGLength *)SVGSVGElement::width(local_38);
fVar5 = (float)LengthContext::valueForLength(local_50,pSVar4);
pSVar4 = (SVGLength *)SVGSVGElement::height(local_38);
fVar6 = (float)LengthContext::valueForLength(local_50,pSVar4);
Size::Size((Size *)&local_10,fVar5,fVar6);
}
else {
pRVar2 = (Rect *)SVGRect::value(local_40);
local_10 = Rect::size(pRVar2);
}
}
else {
local_10 = currentViewportSize(local_20);
}
}
return local_10;
}
|
|
436 | sql_ex_info::write_data(Log_event_writer*) | eloqsql/sql/log_event_server.cc | bool sql_ex_info::write_data(Log_event_writer *writer)
{
if (new_format())
{
return write_str(writer, field_term, field_term_len) ||
write_str(writer, enclosed, enclosed_len) ||
write_str(writer, line_term, line_term_len) ||
write_str(writer, line_start, line_start_len) ||
write_str(writer, escaped, escaped_len) ||
writer->write_data((uchar*) &opt_flags, 1);
}
else
{
uchar old_ex[7];
old_ex[0]= *field_term;
old_ex[1]= *enclosed;
old_ex[2]= *line_term;
old_ex[3]= *line_start;
old_ex[4]= *escaped;
old_ex[5]= opt_flags;
old_ex[6]= empty_flags;
return writer->write_data(old_ex, sizeof(old_ex));
}
} | O0 | cpp | sql_ex_info::write_data(Log_event_writer*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0xd4fd90
testb $0x1, %al
jne 0xd5a4e3
jmp 0xd5a5b8
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movq (%rax), %rsi
movzbl 0x2c(%rax), %edx
callq 0xd630d0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x29(%rbp)
jne 0xd5a5ae
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movq 0x8(%rax), %rsi
movzbl 0x2d(%rax), %edx
callq 0xd630d0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x29(%rbp)
jne 0xd5a5ae
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movq 0x10(%rax), %rsi
movzbl 0x2e(%rax), %edx
callq 0xd630d0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x29(%rbp)
jne 0xd5a5ae
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movq 0x18(%rax), %rsi
movzbl 0x2f(%rax), %edx
callq 0xd630d0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x29(%rbp)
jne 0xd5a5ae
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movq 0x20(%rax), %rsi
movzbl 0x30(%rax), %edx
callq 0xd630d0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x29(%rbp)
jne 0xd5a5ae
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdi
addq $0x31, %rsi
movl $0x1, %edx
callq 0xd559a0
cmpl $0x0, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x10(%rbp)
jmp 0xd5a611
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movb (%rcx), %cl
movb %cl, -0xf(%rbp)
movq 0x8(%rax), %rcx
movb (%rcx), %cl
movb %cl, -0xe(%rbp)
movq 0x10(%rax), %rcx
movb (%rcx), %cl
movb %cl, -0xd(%rbp)
movq 0x18(%rax), %rcx
movb (%rcx), %cl
movb %cl, -0xc(%rbp)
movq 0x20(%rax), %rcx
movb (%rcx), %cl
movb %cl, -0xb(%rbp)
movb 0x31(%rax), %cl
movb %cl, -0xa(%rbp)
movb 0x32(%rax), %al
movb %al, -0x9(%rbp)
movq -0x20(%rbp), %rdi
leaq -0xf(%rbp), %rsi
movl $0x7, %edx
callq 0xd559a0
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x10(%rbp)
movb -0x10(%rbp), %al
movb %al, -0x2a(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xd5a634
movb -0x2a(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
callq 0x758480
nopl (%rax)
| _ZN11sql_ex_info10write_dataEP16Log_event_writer:
push rbp
mov rbp, rsp
sub rsp, 30h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rdi, [rbp+var_18]; this
mov [rbp+var_28], rdi
call _ZN11sql_ex_info10new_formatEv; sql_ex_info::new_format(void)
test al, 1
jnz short loc_D5A4E3
jmp loc_D5A5B8
loc_D5A4E3:
mov rax, [rbp+var_28]
mov rdi, [rbp+var_20]; Log_event_writer *
mov rsi, [rax]; char *
movzx edx, byte ptr [rax+2Ch]; unsigned int
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_29], al
jnz loc_D5A5AE
mov rax, [rbp+var_28]
mov rdi, [rbp+var_20]; Log_event_writer *
mov rsi, [rax+8]; char *
movzx edx, byte ptr [rax+2Dh]; unsigned int
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_29], al
jnz loc_D5A5AE
mov rax, [rbp+var_28]
mov rdi, [rbp+var_20]; Log_event_writer *
mov rsi, [rax+10h]; char *
movzx edx, byte ptr [rax+2Eh]; unsigned int
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_29], al
jnz short loc_D5A5AE
mov rax, [rbp+var_28]
mov rdi, [rbp+var_20]; Log_event_writer *
mov rsi, [rax+18h]; char *
movzx edx, byte ptr [rax+2Fh]; unsigned int
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_29], al
jnz short loc_D5A5AE
mov rax, [rbp+var_28]
mov rdi, [rbp+var_20]; Log_event_writer *
mov rsi, [rax+20h]; char *
movzx edx, byte ptr [rax+30h]; unsigned int
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_29], al
jnz short loc_D5A5AE
mov rsi, [rbp+var_28]
mov rdi, [rbp+var_20]; this
add rsi, 31h ; '1'; unsigned __int8 *
mov edx, 1; unsigned __int64
call _ZN16Log_event_writer10write_dataEPKhm; Log_event_writer::write_data(uchar const*,ulong)
cmp eax, 0
setnz al
mov [rbp+var_29], al
loc_D5A5AE:
mov al, [rbp+var_29]
and al, 1
mov [rbp+var_10], al
jmp short loc_D5A611
loc_D5A5B8:
mov rax, [rbp+var_28]
mov rcx, [rax]
mov cl, [rcx]
mov [rbp+var_F], cl
mov rcx, [rax+8]
mov cl, [rcx]
mov [rbp+var_E], cl
mov rcx, [rax+10h]
mov cl, [rcx]
mov [rbp+var_D], cl
mov rcx, [rax+18h]
mov cl, [rcx]
mov [rbp+var_C], cl
mov rcx, [rax+20h]
mov cl, [rcx]
mov [rbp+var_B], cl
mov cl, [rax+31h]
mov [rbp+var_A], cl
mov al, [rax+32h]
mov [rbp+var_9], al
mov rdi, [rbp+var_20]; this
lea rsi, [rbp+var_F]; unsigned __int8 *
mov edx, 7; unsigned __int64
call _ZN16Log_event_writer10write_dataEPKhm; Log_event_writer::write_data(uchar const*,ulong)
cmp eax, 0
setnz al
and al, 1
mov [rbp+var_10], al
loc_D5A611:
mov al, [rbp+var_10]
mov [rbp+var_2A], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_D5A634
mov al, [rbp+var_2A]
and al, 1
add rsp, 30h
pop rbp
retn
loc_D5A634:
call ___stack_chk_fail
| bool sql_ex_info::write_data(unsigned __int8 **this, Log_event_writer *a2)
{
bool v3; // [rsp+7h] [rbp-29h]
unsigned __int8 v5[7]; // [rsp+21h] [rbp-Fh] BYREF
unsigned long long v6; // [rsp+28h] [rbp-8h]
v6 = __readfsqword(0x28u);
if ( sql_ex_info::new_format((sql_ex_info *)this) )
{
v3 = 1;
if ( (write_str(a2, (const char *)*this, *((unsigned __int8 *)this + 44)) & 1) == 0 )
{
v3 = 1;
if ( (write_str(a2, (const char *)this[1], *((unsigned __int8 *)this + 45)) & 1) == 0 )
{
v3 = 1;
if ( (write_str(a2, (const char *)this[2], *((unsigned __int8 *)this + 46)) & 1) == 0 )
{
v3 = 1;
if ( (write_str(a2, (const char *)this[3], *((unsigned __int8 *)this + 47)) & 1) == 0 )
{
v3 = 1;
if ( (write_str(a2, (const char *)this[4], *((unsigned __int8 *)this + 48)) & 1) == 0 )
return (unsigned int)Log_event_writer::write_data(a2, (const unsigned __int8 *)this + 49, 1LL) != 0;
}
}
}
}
return v3;
}
else
{
v5[0] = **this;
v5[1] = *this[1];
v5[2] = *this[2];
v5[3] = *this[3];
v5[4] = *this[4];
v5[5] = *((_BYTE *)this + 49);
v5[6] = *((_BYTE *)this + 50);
return (unsigned int)Log_event_writer::write_data(a2, v5, 7LL) != 0;
}
}
| operator|=:
PUSH RBP
MOV RBP,RSP
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOVZX ECX,byte ptr [RBP + -0x9]
OR EAX,ECX
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
/* TEMPNAMEPLACEHOLDERVALUE(item_base_t&, item_base_t) */
byte * operator|=(byte *param_1,byte param_2)
{
*param_1 = *param_1 | param_2;
return param_1;
}
|
|
437 | sql_ex_info::write_data(Log_event_writer*) | eloqsql/sql/log_event_server.cc | bool sql_ex_info::write_data(Log_event_writer *writer)
{
if (new_format())
{
return write_str(writer, field_term, field_term_len) ||
write_str(writer, enclosed, enclosed_len) ||
write_str(writer, line_term, line_term_len) ||
write_str(writer, line_start, line_start_len) ||
write_str(writer, escaped, escaped_len) ||
writer->write_data((uchar*) &opt_flags, 1);
}
else
{
uchar old_ex[7];
old_ex[0]= *field_term;
old_ex[1]= *enclosed;
old_ex[2]= *line_term;
old_ex[3]= *line_start;
old_ex[4]= *escaped;
old_ex[5]= opt_flags;
old_ex[6]= empty_flags;
return writer->write_data(old_ex, sizeof(old_ex));
}
} | O3 | cpp | sql_ex_info::write_data(Log_event_writer*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
callq 0x9c81b0
testb %al, %al
je 0x9ccd39
movq (%r14), %rsi
movzbl 0x2c(%r14), %edx
movq %rbx, %rdi
callq 0x9d2327
movb $0x1, %r15b
testb %al, %al
jne 0x9ccd89
movq 0x8(%r14), %rsi
movzbl 0x2d(%r14), %edx
movq %rbx, %rdi
callq 0x9d2327
testb %al, %al
jne 0x9ccd89
movq 0x10(%r14), %rsi
movzbl 0x2e(%r14), %edx
movq %rbx, %rdi
callq 0x9d2327
testb %al, %al
jne 0x9ccd89
movq 0x18(%r14), %rsi
movzbl 0x2f(%r14), %edx
movq %rbx, %rdi
callq 0x9d2327
testb %al, %al
jne 0x9ccd89
movq 0x20(%r14), %rsi
movzbl 0x30(%r14), %edx
movq %rbx, %rdi
callq 0x9d2327
testb %al, %al
jne 0x9ccd89
addq $0x31, %r14
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x9ccd7e
movq (%r14), %rax
movb (%rax), %al
leaq -0x27(%rbp), %rsi
movb %al, (%rsi)
movq 0x8(%r14), %rax
movb (%rax), %al
movb %al, 0x1(%rsi)
movq 0x10(%r14), %rax
movb (%rax), %al
movb %al, 0x2(%rsi)
movq 0x18(%r14), %rax
movb (%rax), %al
movb %al, 0x3(%rsi)
movq 0x20(%r14), %rax
movb (%rax), %al
movb %al, 0x4(%rsi)
movb 0x31(%r14), %al
movb %al, 0x5(%rsi)
movb 0x32(%r14), %al
movb %al, 0x6(%rsi)
movl $0x7, %edx
movq %rbx, %rdi
callq 0x9c996a
testl %eax, %eax
setne %r15b
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x9ccda6
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x61b680
nop
| _ZN11sql_ex_info10write_dataEP16Log_event_writer:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
call _ZN11sql_ex_info10new_formatEv; sql_ex_info::new_format(void)
test al, al
jz loc_9CCD39
mov rsi, [r14]; char *
movzx edx, byte ptr [r14+2Ch]; unsigned int
mov rdi, rbx; this
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
mov r15b, 1
test al, al
jnz loc_9CCD89
mov rsi, [r14+8]; char *
movzx edx, byte ptr [r14+2Dh]; unsigned int
mov rdi, rbx; this
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
test al, al
jnz loc_9CCD89
mov rsi, [r14+10h]; char *
movzx edx, byte ptr [r14+2Eh]; unsigned int
mov rdi, rbx; this
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
test al, al
jnz loc_9CCD89
mov rsi, [r14+18h]; char *
movzx edx, byte ptr [r14+2Fh]; unsigned int
mov rdi, rbx; this
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
test al, al
jnz short loc_9CCD89
mov rsi, [r14+20h]; char *
movzx edx, byte ptr [r14+30h]; unsigned int
mov rdi, rbx; this
call _ZL9write_strP16Log_event_writerPKcj; write_str(Log_event_writer *,char const*,uint)
test al, al
jnz short loc_9CCD89
add r14, 31h ; '1'
mov edx, 1
mov rdi, rbx
mov rsi, r14
jmp short loc_9CCD7E
loc_9CCD39:
mov rax, [r14]
mov al, [rax]
lea rsi, [rbp+var_27]; unsigned __int8 *
mov [rsi], al
mov rax, [r14+8]
mov al, [rax]
mov [rsi+1], al
mov rax, [r14+10h]
mov al, [rax]
mov [rsi+2], al
mov rax, [r14+18h]
mov al, [rax]
mov [rsi+3], al
mov rax, [r14+20h]
mov al, [rax]
mov [rsi+4], al
mov al, [r14+31h]
mov [rsi+5], al
mov al, [r14+32h]
mov [rsi+6], al
mov edx, 7; unsigned __int64
mov rdi, rbx; this
loc_9CCD7E:
call _ZN16Log_event_writer10write_dataEPKhm; Log_event_writer::write_data(uchar const*,ulong)
test eax, eax
setnz r15b
loc_9CCD89:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_9CCDA6
mov eax, r15d
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9CCDA6:
call ___stack_chk_fail
| long long sql_ex_info::write_data(unsigned __int8 **this, Log_event_writer *a2)
{
unsigned int v2; // r15d
long long v5; // rdx
Log_event_writer *v6; // rdi
unsigned __int8 *v7; // rsi
unsigned __int8 v9[7]; // [rsp+9h] [rbp-27h] BYREF
unsigned long long v10; // [rsp+10h] [rbp-20h]
v10 = __readfsqword(0x28u);
if ( !sql_ex_info::new_format((sql_ex_info *)this) )
{
v7 = v9;
v9[0] = **this;
v9[1] = *this[1];
v9[2] = *this[2];
v9[3] = *this[3];
v9[4] = *this[4];
v9[5] = *((_BYTE *)this + 49);
v9[6] = *((_BYTE *)this + 50);
v5 = 7LL;
v6 = a2;
goto LABEL_9;
}
LOBYTE(v2) = 1;
if ( !(unsigned __int8)write_str(a2, (const char *)*this, *((unsigned __int8 *)this + 44))
&& !(unsigned __int8)write_str(a2, (const char *)this[1], *((unsigned __int8 *)this + 45))
&& !(unsigned __int8)write_str(a2, (const char *)this[2], *((unsigned __int8 *)this + 46))
&& !(unsigned __int8)write_str(a2, (const char *)this[3], *((unsigned __int8 *)this + 47))
&& !(unsigned __int8)write_str(a2, (const char *)this[4], *((unsigned __int8 *)this + 48)) )
{
v5 = 1LL;
v6 = a2;
v7 = (unsigned __int8 *)this + 49;
LABEL_9:
LOBYTE(v2) = (unsigned int)Log_event_writer::write_data(v6, v7, v5) != 0;
}
return v2;
}
| |||
438 | my_strntoull10rnd_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static ulonglong
my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t length,
int unsign_fl,
char **endptr, int *err)
{
char buf[256], *b= buf;
ulonglong res;
const uchar *end, *s= (const uchar*) nptr;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf)-1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be a number part */
*b++= (char) wc;
}
res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
*endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
} | O0 | c | my_strntoull10rnd_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movl %ecx, -0x12c(%rbp)
movq %r8, -0x138(%rbp)
movq %r9, -0x140(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x170(%rbp)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0x6296e
movq $0xff, -0x128(%rbp)
movq -0x160(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x170(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x160(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x168(%rbp), %rsi
callq *%rax
movl %eax, -0x174(%rbp)
cmpl $0x0, %eax
jle 0x62a08
movl -0x174(%rbp), %ecx
movq -0x160(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
cmpq $0x65, -0x168(%rbp)
ja 0x629e1
cmpq $0x0, -0x168(%rbp)
jne 0x629e3
jmp 0x62a08
movq -0x168(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0x62983
movq -0x118(%rbp), %rdi
movq -0x148(%rbp), %rdx
leaq -0x110(%rbp), %rsi
movq %rsi, -0x188(%rbp)
subq %rsi, %rdx
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %r8
movq -0x140(%rbp), %r9
callq 0x4d280
movq -0x188(%rbp), %rdi
movq %rax, -0x150(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x138(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x150(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x62aab
movq -0x180(%rbp), %rax
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
callq 0x24300
| my_strntoull10rnd_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 190h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_12C], ecx
mov [rbp+var_138], r8
mov [rbp+var_140], r9
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_160], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_170], rax
cmp [rbp+var_128], 100h
jb short loc_6296E
mov [rbp+var_128], 0FFh
loc_6296E:
mov rax, [rbp+var_160]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_62983:
mov rax, [rbp+var_170]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_160]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_168]
call rax
mov [rbp+var_174], eax
cmp eax, 0
jle short loc_62A08
mov ecx, [rbp+var_174]
mov rax, [rbp+var_160]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_160], rax
cmp [rbp+var_168], 65h ; 'e'
ja short loc_629E1
cmp [rbp+var_168], 0
jnz short loc_629E3
loc_629E1:
jmp short loc_62A08
loc_629E3:
mov rax, [rbp+var_168]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_62983
loc_62A08:
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_148]
lea rsi, [rbp+var_110]
mov [rbp+var_188], rsi
sub rdx, rsi
mov ecx, [rbp+var_12C]
mov r8, [rbp+var_138]
mov r9, [rbp+var_140]
call my_strntoull10rnd_8bit
mov rdi, [rbp+var_188]
mov [rbp+var_150], rax
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_138]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
mov rax, [rbp+var_150]
mov [rbp+var_180], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_62AAB
mov rax, [rbp+var_180]
add rsp, 190h
pop rbp
retn
loc_62AAB:
call ___stack_chk_fail
| long long my_strntoull10rnd_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
int a4,
_QWORD *a5,
int *a6)
{
_BYTE *v6; // rax
int v8; // [rsp+1Ch] [rbp-174h]
long long ( *v9)(long long, unsigned long long *, long long, long long); // [rsp+20h] [rbp-170h]
unsigned long long v10; // [rsp+28h] [rbp-168h] BYREF
long long v11; // [rsp+30h] [rbp-160h]
long long v12; // [rsp+38h] [rbp-158h]
long long v13; // [rsp+40h] [rbp-150h]
_BYTE *v14; // [rsp+48h] [rbp-148h]
int *v15; // [rsp+50h] [rbp-140h]
_QWORD *v16; // [rsp+58h] [rbp-138h]
int v17; // [rsp+64h] [rbp-12Ch]
long long v18; // [rsp+68h] [rbp-128h]
long long v19; // [rsp+70h] [rbp-120h]
long long v20; // [rsp+78h] [rbp-118h]
_BYTE v21[264]; // [rsp+80h] [rbp-110h] BYREF
unsigned long long v22; // [rsp+188h] [rbp-8h]
v22 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = v21;
v11 = a2;
v9 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( a3 >= 0x100 )
v18 = 255LL;
v12 = v18 + v11;
while ( 1 )
{
v8 = v9(v20, &v10, v11, v12);
if ( v8 <= 0 )
break;
v11 += v8;
if ( v10 > 0x65 || !v10 )
break;
v6 = v14++;
*v6 = v10;
}
v13 = my_strntoull10rnd_8bit(v20, v21, v14 - v21, v17, v16, v15);
*v16 = (*v16 - (_QWORD)v21) * *(unsigned int *)(v20 + 152) + v19;
return v13;
}
| my_strntoull10rnd_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV dword ptr [RBP + -0x12c],ECX
MOV qword ptr [RBP + -0x138],R8
MOV qword ptr [RBP + -0x140],R9
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x170],RAX
CMP qword ptr [RBP + -0x128],0x100
JC 0x0016296e
MOV qword ptr [RBP + -0x128],0xff
LAB_0016296e:
MOV RAX,qword ptr [RBP + -0x160]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_00162983:
MOV RAX,qword ptr [RBP + -0x170]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x160]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x168]
CALL RAX
MOV dword ptr [RBP + -0x174],EAX
CMP EAX,0x0
JLE 0x00162a08
MOV ECX,dword ptr [RBP + -0x174]
MOV RAX,qword ptr [RBP + -0x160]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x160],RAX
CMP qword ptr [RBP + -0x168],0x65
JA 0x001629e1
CMP qword ptr [RBP + -0x168],0x0
JNZ 0x001629e3
LAB_001629e1:
JMP 0x00162a08
LAB_001629e3:
MOV RAX,qword ptr [RBP + -0x168]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x00162983
LAB_00162a08:
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x148]
LEA RSI,[RBP + -0x110]
MOV qword ptr [RBP + -0x188],RSI
SUB RDX,RSI
MOV ECX,dword ptr [RBP + -0x12c]
MOV R8,qword ptr [RBP + -0x138]
MOV R9,qword ptr [RBP + -0x140]
CALL 0x0014d280
MOV RDI,qword ptr [RBP + -0x188]
MOV qword ptr [RBP + -0x150],RAX
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x180],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00162aab
MOV RAX,qword ptr [RBP + -0x180]
ADD RSP,0x190
POP RBP
RET
LAB_00162aab:
CALL 0x00124300
|
int8
my_strntoull10rnd_mb2_or_mb4
(long param_1,long param_2,ulong param_3,int4 param_4,long *param_5,
int8 param_6)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_170;
long local_168;
long local_160;
int8 local_158;
int1 *local_150;
int8 local_148;
long *local_140;
int4 local_134;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_168 = param_2;
local_150 = local_118;
local_148 = param_6;
local_140 = param_5;
local_134 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_170,local_168,local_160), 0 < iVar2 &&
(local_168 = local_168 + iVar2, local_170 < 0x66)) && (local_170 != 0))) {
*local_150 = (char)local_170;
local_150 = local_150 + 1;
}
local_158 = my_strntoull10rnd_8bit
(local_120,local_118,(long)local_150 - (long)local_118,local_134,local_140,
local_148);
*local_140 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_140 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_158;
}
|
|
439 | js_print | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_print(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
#ifdef _WIN32
HANDLE handle;
DWORD mode;
#endif
const char *s;
DynBuf b;
int i;
dbuf_init(&b);
for(i = 0; i < argc; i++) {
s = JS_ToCString(ctx, argv[i]);
if (s) {
dbuf_printf(&b, "%s%s", &" "[!i], s);
JS_FreeCString(ctx, s);
} else {
dbuf_printf(&b, "%s<exception>", &" "[!i]);
JS_FreeValue(ctx, JS_GetException(ctx));
}
}
dbuf_putc(&b, '\n');
#ifdef _WIN32
// use WriteConsoleA with CP_UTF8 for better Unicode handling vis-a-vis
// the mangling that happens when going through msvcrt's stdio layer,
// *except* when stdout is redirected to something that is not a console
handle = (HANDLE)_get_osfhandle(/*STDOUT_FILENO*/1); // don't CloseHandle
if (GetFileType(handle) != FILE_TYPE_CHAR)
goto fallback;
if (!GetConsoleMode(handle, &mode))
goto fallback;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
if (handle == INVALID_HANDLE_VALUE)
goto fallback;
mode = GetConsoleOutputCP();
SetConsoleOutputCP(CP_UTF8);
WriteConsoleA(handle, b.buf, b.size, NULL, NULL);
SetConsoleOutputCP(mode);
FlushFileBuffers(handle);
goto done;
fallback:
#endif
fwrite(b.buf, 1, b.size, stdout);
fflush(stdout);
goto done; // avoid unused label warning
done:
dbuf_free(&b);
return JS_UNDEFINED;
} | O0 | c | js_print:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x246c0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jge 0x17447
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x1aad0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x173d5
cmpl $0x0, 0x24(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
leaq 0xfccb3(%rip), %rdx # 0x11405c
addq %rax, %rdx
movq 0x58(%rsp), %rcx
leaq 0x28(%rsp), %rdi
leaq 0xf8535(%rip), %rsi # 0x10f8f2
movb $0x0, %al
callq 0x24a40
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x30140
jmp 0x17435
cmpl $0x0, 0x24(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
leaq 0xfcc6f(%rip), %rdx # 0x11405c
addq %rax, %rdx
leaq 0x28(%rsp), %rdi
leaq 0xf905e(%rip), %rsi # 0x11045a
movb $0x0, %al
callq 0x24a40
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
callq 0x33260
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x29f80
jmp 0x17437
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x17354
leaq 0x28(%rsp), %rdi
movl $0xa, %esi
callq 0x249c0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x125b59(%rip), %rax # 0x13cfc0
movq (%rax), %rcx
movl $0x1, %esi
callq 0xe930
movq 0x125b45(%rip), %rax # 0x13cfc0
movq (%rax), %rdi
callq 0xe6e0
leaq 0x28(%rsp), %rdi
callq 0x24c20
movl $0x0, 0x88(%rsp)
movq $0x3, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopl (%rax)
| js_print:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
lea rdi, [rsp+98h+var_70]
call dbuf_init
mov [rsp+98h+var_74], 0
loc_17354:
mov eax, [rsp+98h+var_74]
cmp eax, [rsp+98h+var_2C]
jge loc_17447
mov rdi, [rsp+98h+var_28]
mov rax, [rsp+98h+var_38]
movsxd rcx, [rsp+98h+var_74]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString_0
mov [rsp+98h+var_40], rax
cmp [rsp+98h+var_40], 0
jz short loc_173D5
cmp [rsp+98h+var_74], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
lea rdx, asc_114053+9; " "
add rdx, rax
mov rcx, [rsp+98h+var_40]
lea rdi, [rsp+98h+var_70]
lea rsi, aSS_2; "%s%s"
mov al, 0
call dbuf_printf
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
call JS_FreeCString
jmp short loc_17435
loc_173D5:
cmp [rsp+98h+var_74], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
lea rdx, asc_114053+9; " "
add rdx, rax
lea rdi, [rsp+98h+var_70]
lea rsi, aSException; "%s<exception>"
mov al, 0
call dbuf_printf
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_90], rax
mov rdi, [rsp+98h+var_28]
call JS_GetException
mov rdi, [rsp+98h+var_90]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], rdx
mov rsi, [rsp+98h+var_88]
mov rdx, [rsp+98h+var_80]
call JS_FreeValue
loc_17435:
jmp short $+2
loc_17437:
mov eax, [rsp+98h+var_74]
add eax, 1
mov [rsp+98h+var_74], eax
jmp loc_17354
loc_17447:
lea rdi, [rsp+98h+var_70]
mov esi, 0Ah
call dbuf_putc
mov rdi, [rsp+98h+var_70]
mov rdx, [rsp+98h+var_68]
mov rax, cs:stdout_ptr
mov rcx, [rax]
mov esi, 1
call _fwrite
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
lea rdi, [rsp+98h+var_70]
call dbuf_free
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 3
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
| long long js_print(long long a1, long long a2, long long a3, int a4, long long a5)
{
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // rdx
char v10; // [rsp+0h] [rbp-98h]
long long v11; // [rsp+8h] [rbp-90h]
long long Exception; // [rsp+10h] [rbp-88h]
int i; // [rsp+24h] [rbp-74h]
_QWORD v14[6]; // [rsp+28h] [rbp-70h] BYREF
long long v15; // [rsp+58h] [rbp-40h]
long long v16; // [rsp+60h] [rbp-38h]
int v17; // [rsp+6Ch] [rbp-2Ch]
long long v18; // [rsp+70h] [rbp-28h]
long long v19; // [rsp+78h] [rbp-20h]
long long v20; // [rsp+80h] [rbp-18h]
long long v21; // [rsp+88h] [rbp-10h]
v19 = a2;
v20 = a3;
v18 = a1;
v17 = a4;
v16 = a5;
dbuf_init(v14);
for ( i = 0; i < v17; ++i )
{
v15 = JS_ToCString_0(v18, *(_QWORD *)(16LL * i + v16), *(_QWORD *)(16LL * i + v16 + 8));
if ( v15 )
{
dbuf_printf((unsigned int)v14, (unsigned int)"%s%s", (unsigned int)&asc_114053[(i == 0) + 9], v15, v6, v7, v10);
JS_FreeCString(v18, v15);
}
else
{
dbuf_printf(
(unsigned int)v14,
(unsigned int)"%s<exception>",
(unsigned int)&asc_114053[(i == 0) + 9],
v5,
v6,
v7,
v10);
v11 = v18;
Exception = JS_GetException(v18);
JS_FreeValue(v11, Exception, v8);
}
}
dbuf_putc(v14, 10LL);
fwrite(v14[0], 1LL, v14[1], stdout);
fflush(stdout);
dbuf_free(v14);
LODWORD(v21) = 0;
return v21;
}
| js_print:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
LEA RDI,[RSP + 0x28]
CALL 0x001246c0
MOV dword ptr [RSP + 0x24],0x0
LAB_00117354:
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,dword ptr [RSP + 0x6c]
JGE 0x00117447
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x60]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0011aad0
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x58],0x0
JZ 0x001173d5
CMP dword ptr [RSP + 0x24],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
LEA RDX,[0x21405c]
ADD RDX,RAX
MOV RCX,qword ptr [RSP + 0x58]
LEA RDI,[RSP + 0x28]
LEA RSI,[0x20f8f2]
MOV AL,0x0
CALL 0x00124a40
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00130140
JMP 0x00117435
LAB_001173d5:
CMP dword ptr [RSP + 0x24],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
LEA RDX,[0x21405c]
ADD RDX,RAX
LEA RDI,[RSP + 0x28]
LEA RSI,[0x21045a]
MOV AL,0x0
CALL 0x00124a40
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x00133260
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x00129f80
LAB_00117435:
JMP 0x00117437
LAB_00117437:
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00117354
LAB_00117447:
LEA RDI,[RSP + 0x28]
MOV ESI,0xa
CALL 0x001249c0
MOV RDI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [0x0023cfc0]
MOV RCX,qword ptr [RAX]
MOV ESI,0x1
CALL 0x0010e930
MOV RAX,qword ptr [0x0023cfc0]
MOV RDI,qword ptr [RAX]
CALL 0x0010e6e0
LEA RDI,[RSP + 0x28]
CALL 0x00124c20
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x3
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_print(int8 param_1,int8 param_2,int8 param_3,int param_4,long param_5)
{
int8 uVar1;
int8 *puVar2;
int1 auVar3 [16];
int local_74;
void *local_70;
size_t local_68;
long local_40;
long local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
uint uStack_c;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
dbuf_init(&local_70);
for (local_74 = 0; local_74 < local_2c; local_74 = local_74 + 1) {
puVar2 = (int8 *)(local_38 + (long)local_74 * 0x10);
local_40 = JS_ToCString(local_28,*puVar2,puVar2[1]);
if (local_40 == 0) {
dbuf_printf(&local_70,"%s<exception>",&DAT_0021405c + (int)(uint)((local_74 != 0 ^ 0xffU) & 1)
);
uVar1 = local_28;
auVar3 = JS_GetException(local_28);
JS_FreeValue(uVar1,auVar3._0_8_,auVar3._8_8_);
}
else {
dbuf_printf(&local_70,&DAT_0020f8f2,&DAT_0021405c + (int)(uint)((local_74 != 0 ^ 0xffU) & 1),
local_40);
JS_FreeCString(local_28,local_40);
}
}
dbuf_putc(&local_70,10);
fwrite(local_70,1,local_68,*(FILE **)PTR_stdout_0023cfc0);
fflush(*(FILE **)PTR_stdout_0023cfc0);
dbuf_free(&local_70);
auVar3._8_8_ = 3;
auVar3._0_8_ = (ulong)uStack_c << 0x20;
return auVar3;
}
|
|
440 | js_print | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_print(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
#ifdef _WIN32
HANDLE handle;
DWORD mode;
#endif
const char *s;
DynBuf b;
int i;
dbuf_init(&b);
for(i = 0; i < argc; i++) {
s = JS_ToCString(ctx, argv[i]);
if (s) {
dbuf_printf(&b, "%s%s", &" "[!i], s);
JS_FreeCString(ctx, s);
} else {
dbuf_printf(&b, "%s<exception>", &" "[!i]);
JS_FreeValue(ctx, JS_GetException(ctx));
}
}
dbuf_putc(&b, '\n');
#ifdef _WIN32
// use WriteConsoleA with CP_UTF8 for better Unicode handling vis-a-vis
// the mangling that happens when going through msvcrt's stdio layer,
// *except* when stdout is redirected to something that is not a console
handle = (HANDLE)_get_osfhandle(/*STDOUT_FILENO*/1); // don't CloseHandle
if (GetFileType(handle) != FILE_TYPE_CHAR)
goto fallback;
if (!GetConsoleMode(handle, &mode))
goto fallback;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
if (handle == INVALID_HANDLE_VALUE)
goto fallback;
mode = GetConsoleOutputCP();
SetConsoleOutputCP(CP_UTF8);
WriteConsoleA(handle, b.buf, b.size, NULL, NULL);
SetConsoleOutputCP(mode);
FlushFileBuffers(handle);
goto done;
fallback:
#endif
fwrite(b.buf, 1, b.size, stdout);
fflush(stdout);
goto done; // avoid unused label warning
done:
dbuf_free(&b);
return JS_UNDEFINED;
} | O2 | c | js_print:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
callq 0x19774
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
shlq $0x4, %r14
leaq 0x7541e(%rip), %rbp # 0x88fc0
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x13c1d
movq (%rbx,%r12), %rsi
movq 0x8(%rbx,%r12), %rdx
movq %r15, %rdi
callq 0x1561c
cmpq $0x1, %r12
movq %rbp, %rdx
adcq $0x0, %rdx
testq %rax, %rax
je 0x13bf1
movq %rax, %r13
leaq 0x8(%rsp), %rdi
leaq 0x71d0e(%rip), %rsi # 0x858e8
movq %rax, %rcx
xorl %eax, %eax
callq 0x19920
movq %r15, %rdi
movq %r13, %rsi
callq 0x1ec07
jmp 0x13c17
leaq 0x8(%rsp), %rdi
leaq 0x72751(%rip), %rsi # 0x8634e
xorl %eax, %eax
callq 0x19920
movq %r15, %rdi
callq 0x20031
movq %r15, %rdi
movq %rax, %rsi
callq 0x1bbce
addq $0x10, %r12
jmp 0x13ba5
leaq 0x8(%rsp), %rbx
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x198e3
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
movq 0xab385(%rip), %r14 # 0xbefc0
movq (%r14), %rcx
pushq $0x1
popq %rsi
callq 0xe970
movq (%r14), %rdi
callq 0xe710
movq %rbx, %rdi
callq 0x19a39
pushq $0x3
popq %rdx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_print:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r8
mov r14d, ecx
mov r15, rdi
lea rdi, [rsp+68h+var_60]
call dbuf_init
xor eax, eax
test r14d, r14d
cmovle r14d, eax
shl r14, 4
lea rbp, asc_88FB7+9; " "
xor r12d, r12d
loc_13BA5:
cmp r14, r12
jz short loc_13C1D
mov rsi, [rbx+r12]
mov rdx, [rbx+r12+8]
mov rdi, r15
call JS_ToCString_0
cmp r12, 1
mov rdx, rbp
adc rdx, 0
test rax, rax
jz short loc_13BF1
mov r13, rax
lea rdi, [rsp+68h+var_60]
lea rsi, aSS_2; "%s%s"
mov rcx, rax
xor eax, eax
call dbuf_printf
mov rdi, r15
mov rsi, r13
call JS_FreeCString
jmp short loc_13C17
loc_13BF1:
lea rdi, [rsp+68h+var_60]
lea rsi, aSException; "%s<exception>"
xor eax, eax
call dbuf_printf
mov rdi, r15
call JS_GetException
mov rdi, r15
mov rsi, rax
call JS_FreeValue
loc_13C17:
add r12, 10h
jmp short loc_13BA5
loc_13C1D:
lea rbx, [rsp+68h+var_60]
push 0Ah
pop rsi
mov rdi, rbx
call dbuf_putc
mov rdi, [rbx]
mov rdx, [rbx+8]
mov r14, cs:stdout_ptr
mov rcx, [r14]
push 1
pop rsi
call _fwrite
mov rdi, [r14]
call _fflush
mov rdi, rbx
call dbuf_free
push 3
pop rdx
xor eax, eax
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_print(long long a1, long long a2, long long a3, unsigned int a4, long long a5)
{
long long v6; // r14
long long v7; // r14
long long i; // r12
long long v9; // rax
int v10; // ecx
int v11; // r8d
int v12; // r9d
char *v13; // rdx
long long v14; // r13
long long Exception; // rax
char v17; // [rsp+0h] [rbp-68h]
_QWORD v18[12]; // [rsp+8h] [rbp-60h] BYREF
v6 = a4;
dbuf_init(v18);
if ( (int)v6 <= 0 )
v6 = 0LL;
v7 = 16 * v6;
for ( i = 0LL; v7 != i; i += 16LL )
{
v9 = JS_ToCString_0(a1, *(_QWORD *)(a5 + i), *(_QWORD *)(a5 + i + 8));
v13 = &asc_88FB7[(i == 0) + 9];
if ( v9 )
{
v14 = v9;
dbuf_printf((unsigned int)v18, (unsigned int)"%s%s", (_DWORD)v13, v9, v11, v12, v17);
JS_FreeCString(a1, v14);
}
else
{
dbuf_printf((unsigned int)v18, (unsigned int)"%s<exception>", (_DWORD)v13, v10, v11, v12, v17);
Exception = JS_GetException(a1);
JS_FreeValue(a1, Exception);
}
}
dbuf_putc(v18, 10LL);
fwrite(v18[0], 1LL, v18[1], stdout);
fflush(stdout);
dbuf_free(v18);
return 0LL;
}
| js_print:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R8
MOV R14D,ECX
MOV R15,RDI
LEA RDI,[RSP + 0x8]
CALL 0x00119774
XOR EAX,EAX
TEST R14D,R14D
CMOVLE R14D,EAX
SHL R14,0x4
LEA RBP,[0x188fc0]
XOR R12D,R12D
LAB_00113ba5:
CMP R14,R12
JZ 0x00113c1d
MOV RSI,qword ptr [RBX + R12*0x1]
MOV RDX,qword ptr [RBX + R12*0x1 + 0x8]
MOV RDI,R15
CALL 0x0011561c
CMP R12,0x1
MOV RDX,RBP
ADC RDX,0x0
TEST RAX,RAX
JZ 0x00113bf1
MOV R13,RAX
LEA RDI,[RSP + 0x8]
LEA RSI,[0x1858e8]
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00119920
MOV RDI,R15
MOV RSI,R13
CALL 0x0011ec07
JMP 0x00113c17
LAB_00113bf1:
LEA RDI,[RSP + 0x8]
LEA RSI,[0x18634e]
XOR EAX,EAX
CALL 0x00119920
MOV RDI,R15
CALL 0x00120031
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011bbce
LAB_00113c17:
ADD R12,0x10
JMP 0x00113ba5
LAB_00113c1d:
LEA RBX,[RSP + 0x8]
PUSH 0xa
POP RSI
MOV RDI,RBX
CALL 0x001198e3
MOV RDI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV R14,qword ptr [0x001befc0]
MOV RCX,qword ptr [R14]
PUSH 0x1
POP RSI
CALL 0x0010e970
MOV RDI,qword ptr [R14]
CALL 0x0010e710
MOV RDI,RBX
CALL 0x00119a39
PUSH 0x3
POP RDX
XOR EAX,EAX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_print(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5)
{
int *puVar1;
long lVar2;
int8 uVar3;
long lVar4;
ulong uVar5;
void *local_60;
size_t local_58;
uVar5 = (ulong)param_4;
dbuf_init(&local_60);
if ((int)param_4 < 1) {
uVar5 = 0;
}
for (lVar4 = 0; uVar5 * 0x10 != lVar4; lVar4 = lVar4 + 0x10) {
lVar2 = JS_ToCString(param_1,*(int8 *)(param_5 + lVar4),
*(int8 *)(param_5 + 8 + lVar4));
if (lVar2 == 0) {
dbuf_printf(&local_60,"%s<exception>",&DAT_00188fc0 + (lVar4 == 0));
uVar3 = JS_GetException(param_1);
JS_FreeValue(param_1,uVar3);
}
else {
dbuf_printf(&local_60,&DAT_001858e8,&DAT_00188fc0 + (lVar4 == 0),lVar2);
JS_FreeCString(param_1,lVar2);
}
}
dbuf_putc(&local_60,10);
puVar1 = PTR_stdout_001befc0;
fwrite(local_60,1,local_58,*(FILE **)PTR_stdout_001befc0);
fflush(*(FILE **)puVar1);
dbuf_free(&local_60);
return ZEXT816(3) << 0x40;
}
|
|
441 | JS_WriteArrayBuffer | bluesky950520[P]quickjs/quickjs.c | static int JS_WriteArrayBuffer(BCWriterState *s, JSValue obj)
{
JSObject *p = JS_VALUE_GET_OBJ(obj);
JSArrayBuffer *abuf = p->u.array_buffer;
if (abuf->detached) {
JS_ThrowTypeErrorDetachedArrayBuffer(s->ctx);
return -1;
}
bc_put_u8(s, BC_TAG_ARRAY_BUFFER);
bc_put_leb128(s, abuf->byte_length);
bc_put_leb128(s, abuf->max_byte_length);
dbuf_put(&s->dbuf, abuf->data, abuf->byte_length);
return 0;
} | O0 | c | JS_WriteArrayBuffer:
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x78cc7
movq 0x28(%rsp), %rax
movq (%rax), %rdi
callq 0x58140
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x78d20
movq 0x28(%rsp), %rdi
movl $0xf, %esi
callq 0x77ba0
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %esi
callq 0x78730
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x78730
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rsp), %rax
movslq (%rax), %rdx
callq 0x1e550
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
| JS_WriteArrayBuffer:
sub rsp, 48h
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_10], rdx
mov [rsp+48h+var_20], rdi
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_28]
mov rax, [rax+30h]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_30]
cmp byte ptr [rax+8], 0
jz short loc_78CC7
mov rax, [rsp+48h+var_20]
mov rdi, [rax]
call JS_ThrowTypeErrorDetachedArrayBuffer
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_38], rdx
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp short loc_78D20
loc_78CC7:
mov rdi, [rsp+48h+var_20]
mov esi, 0Fh
call bc_put_u8
mov rdi, [rsp+48h+var_20]
mov rax, [rsp+48h+var_30]
mov esi, [rax]
call bc_put_leb128
mov rdi, [rsp+48h+var_20]
mov rax, [rsp+48h+var_30]
mov esi, [rax+4]
call bc_put_leb128
mov rdi, [rsp+48h+var_20]
add rdi, 8
mov rax, [rsp+48h+var_30]
mov rsi, [rax+10h]
mov rax, [rsp+48h+var_30]
movsxd rdx, dword ptr [rax]
call dbuf_put
mov [rsp+48h+var_4], 0
loc_78D20:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long JS_WriteArrayBuffer(
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)
{
int *v15; // [rsp+18h] [rbp-30h]
v15 = *(int **)(a2 + 48);
if ( *((_BYTE *)v15 + 8) )
{
JS_ThrowTypeErrorDetachedArrayBuffer(*a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6);
return (unsigned int)-1;
}
else
{
bc_put_u8((long long)a1, 15);
bc_put_leb128((long long)a1, *v15);
bc_put_leb128((long long)a1, v15[1]);
dbuf_put(a1 + 1, *((_QWORD *)v15 + 2), *v15);
return 0;
}
}
| JS_WriteArrayBuffer:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x00178cc7
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX]
CALL 0x00158140
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x00178d20
LAB_00178cc7:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0xf
CALL 0x00177ba0
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX]
CALL 0x00178730
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x00178730
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x8
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX]
CALL 0x0011e550
MOV dword ptr [RSP + 0x44],0x0
LAB_00178d20:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4 JS_WriteArrayBuffer(int8 *param_1,long param_2)
{
int *piVar1;
int4 local_4;
piVar1 = *(int **)(param_2 + 0x30);
if ((char)piVar1[2] == '\0') {
bc_put_u8(param_1,0xf);
bc_put_leb128(param_1,*piVar1);
bc_put_leb128(param_1,piVar1[1]);
dbuf_put(param_1 + 1,*(int8 *)(piVar1 + 4),(long)*piVar1);
local_4 = 0;
}
else {
JS_ThrowTypeErrorDetachedArrayBuffer(*param_1);
local_4 = 0xffffffff;
}
return local_4;
}
|
|
442 | JS_WriteArrayBuffer | bluesky950520[P]quickjs/quickjs.c | static int JS_WriteArrayBuffer(BCWriterState *s, JSValue obj)
{
JSObject *p = JS_VALUE_GET_OBJ(obj);
JSArrayBuffer *abuf = p->u.array_buffer;
if (abuf->detached) {
JS_ThrowTypeErrorDetachedArrayBuffer(s->ctx);
return -1;
}
bc_put_u8(s, BC_TAG_ARRAY_BUFFER);
bc_put_leb128(s, abuf->byte_length);
bc_put_leb128(s, abuf->max_byte_length);
dbuf_put(&s->dbuf, abuf->data, abuf->byte_length);
return 0;
} | O1 | c | JS_WriteArrayBuffer:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rsi), %r14
cmpb $0x0, 0x8(%r14)
je 0x456b6
movq (%rbx), %rdi
leaq 0x5cd51(%rip), %rsi # 0xa23f9
xorl %eax, %eax
callq 0x22567
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x456ef
addq $0x8, %rbx
movq %rbx, %rdi
movl $0xf, %esi
callq 0x1b4d0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x45854
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x45854
movq 0x10(%r14), %rsi
movslq (%r14), %rdx
movq %rbx, %rdi
callq 0x1b422
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| JS_WriteArrayBuffer:
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rsi+30h]
cmp byte ptr [r14+8], 0
jz short loc_456B6
mov rdi, [rbx]
lea rsi, aArraybufferIsD; "ArrayBuffer is detached"
xor eax, eax
call JS_ThrowTypeError
mov eax, 0FFFFFFFFh
jmp short loc_456EF
loc_456B6:
add rbx, 8
mov rdi, rbx
mov esi, 0Fh
call dbuf_putc
mov esi, [r14]
mov rdi, rbx
call dbuf_put_leb128
mov esi, [r14+4]
mov rdi, rbx
call dbuf_put_leb128
mov rsi, [r14+10h]
movsxd rdx, dword ptr [r14]
mov rdi, rbx
call dbuf_put
xor eax, eax
loc_456EF:
add rsp, 8
pop rbx
pop r14
retn
| long long JS_WriteArrayBuffer(
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)
{
char v14; // al
unsigned int *v15; // r14
v15 = *(unsigned int **)(a2 + 48);
if ( *((_BYTE *)v15 + 8) )
{
JS_ThrowTypeError(*a1, (long long)"ArrayBuffer is detached", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
return 0xFFFFFFFFLL;
}
else
{
dbuf_putc(a1 + 1, 15);
dbuf_put_leb128(a1 + 1, *v15);
dbuf_put_leb128(a1 + 1, v15[1]);
dbuf_put(a1 + 1, *((_QWORD *)v15 + 2), (int)*v15);
return 0LL;
}
}
| JS_WriteArrayBuffer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RSI + 0x30]
CMP byte ptr [R14 + 0x8],0x0
JZ 0x001456b6
MOV RDI,qword ptr [RBX]
LEA RSI,[0x1a23f9]
XOR EAX,EAX
CALL 0x00122567
MOV EAX,0xffffffff
JMP 0x001456ef
LAB_001456b6:
ADD RBX,0x8
MOV RDI,RBX
MOV ESI,0xf
CALL 0x0011b4d0
MOV ESI,dword ptr [R14]
MOV RDI,RBX
CALL 0x00145854
MOV ESI,dword ptr [R14 + 0x4]
MOV RDI,RBX
CALL 0x00145854
MOV RSI,qword ptr [R14 + 0x10]
MOVSXD RDX,dword ptr [R14]
MOV RDI,RBX
CALL 0x0011b422
XOR EAX,EAX
LAB_001456ef:
ADD RSP,0x8
POP RBX
POP R14
RET
|
int8 JS_WriteArrayBuffer(int8 *param_1,long param_2)
{
int *piVar1;
int8 uVar2;
piVar1 = *(int **)(param_2 + 0x30);
if ((char)piVar1[2] == '\0') {
param_1 = param_1 + 1;
dbuf_putc(param_1,0xf);
dbuf_put_leb128(param_1,*piVar1);
dbuf_put_leb128(param_1,piVar1[1]);
dbuf_put(param_1,*(int8 *)(piVar1 + 4),(long)*piVar1);
uVar2 = 0;
}
else {
JS_ThrowTypeError(*param_1,"ArrayBuffer is detached");
uVar2 = 0xffffffff;
}
return uVar2;
}
|
|
443 | my_mb_wc_latin1 | eloqsql/strings/ctype-latin1.c | static
int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *wc,
const uchar *str,
const uchar *end __attribute__((unused)))
{
if (str >= end)
return MY_CS_TOOSMALL;
/*
There are no unassigned characters in latin1.
Every code point in latin1 is mapped to some Unicode code point.
We can always return 1, no needs to check the value of cs_to_uni[*str].
*/
*wc= cs_to_uni[*str];
DBUG_ASSERT(wc[0] || !str[0]);
return 1;
} | O3 | c | my_mb_wc_latin1:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x399b8
movzbl (%rdx), %eax
leaq 0x16bbf4(%rip), %rcx # 0x1a55a0
movzwl (%rcx,%rax,2), %eax
movq %rax, (%rsi)
movl $0x1, %eax
popq %rbp
retq
| my_mb_wc_latin1:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_399B8
movzx eax, byte ptr [rdx]
lea rcx, cs_to_uni
movzx eax, word ptr [rcx+rax*2]
mov [rsi], rax
mov eax, 1
loc_399B8:
pop rbp
retn
| long long my_mb_wc_latin1(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
*a2 = cs_to_uni[*a3];
return 1LL;
}
return result;
}
| my_mb_wc_latin1:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001399b8
MOVZX EAX,byte ptr [RDX]
LEA RCX,[0x2a55a0]
MOVZX EAX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RAX
MOV EAX,0x1
LAB_001399b8:
POP RBP
RET
|
int8 my_mb_wc_latin1(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
int8 uVar1;
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
*param_2 = (ulong)*(ushort *)(cs_to_uni + (ulong)*param_3 * 2);
uVar1 = 1;
}
return uVar1;
}
|
|
444 | OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char*, unsigned long, OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp | void
Neighborhood::populateData(uint8_t* dest, size_t dest_size, DataDescriptor const& desc)
{
Neighborhood* n = reinterpret_cast<Neighborhood*>(dest);
assert(dest_size >= byteSize(desc.nfaceVertCounts, desc.nfaceVerts, desc.ncorners, desc.ncreases, desc.ncontrolPoints));
n->_faceCount = desc.nfaceVertCounts;
n->_faceVertsCount = desc.nfaceVerts;
n->_cornersCount = desc.ncorners;
n->_creasesCount = desc.ncreases;
n->_controlPointsCount = desc.ncontrolPoints;
auto populate = []<typename T>(T* dest, T const* src, int src_count) {
std::memcpy(dest, src, src_count * sizeof(T));
};
populate(n->faceVertCountsPtr(), desc.faceVertCounts, desc.nfaceVertCounts);
populate(n->faceVertsPtr(), desc.faceVerts, desc.nfaceVerts);
if (desc.ncorners > 0) {
populate(n->cornerVertsPtr(), desc.cornerVerts, desc.ncorners);
populate(n->cornerSharpnessPtr(), desc.cornerSharpness, desc.ncorners);
}
if (desc.ncreases) {
populate(n->creaseVertsPtr(), desc.creaseVerts, desc.ncreases * 2);
populate(n->creaseSharpnessPtr(), desc.creaseSharpness, desc.ncreases);
}
if (desc.ncontrolPoints)
populate(n->controlPointsPtr(), desc.controlPoints, desc.ncontrolPoints);
n->_hash = n->computeHashKey();
n->_startingEdge = desc.startingEdge;
} | O0 | cpp | OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char*, unsigned long, OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x18(%rax), %edi
movq -0x18(%rbp), %rax
movzwl 0x8(%rax), %esi
movq -0x18(%rbp), %rax
movzwl 0x30(%rax), %edx
movq -0x18(%rbp), %rax
movzwl 0x48(%rax), %ecx
movq -0x18(%rbp), %rax
movzwl 0x58(%rax), %r8d
callq 0xc4560
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x1c6851
jmp 0x1c6870
leaq 0x35405(%rip), %rdi # 0x1fbc5d
leaq 0x3546e(%rip), %rsi # 0x1fbccd
movl $0x88, %edx
leaq 0x354c0(%rip), %rcx # 0x1fbd2b
callq 0xc9440
movq -0x18(%rbp), %rax
movw 0x18(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x18(%rbp), %rax
movw 0x8(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x18(%rbp), %rax
movw 0x30(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x18(%rbp), %rax
movw 0x48(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, 0xe(%rax)
movq -0x18(%rbp), %rax
movw 0x58(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, 0x2(%rax)
movb 0x3575a(%rip), %al # 0x1fc020
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd4980
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movzwl 0x18(%rax), %ecx
leaq -0x21(%rbp), %rdi
callq 0x1c6ac0
movq -0x20(%rbp), %rdi
callq 0xc87b0
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movzwl 0x8(%rax), %ecx
leaq -0x21(%rbp), %rdi
callq 0x1c6ac0
movq -0x18(%rbp), %rax
movzwl 0x30(%rax), %eax
cmpl $0x0, %eax
jle 0x1c6969
movq -0x20(%rbp), %rdi
callq 0xc8d30
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x18(%rbp), %rax
movzwl 0x30(%rax), %ecx
leaq -0x21(%rbp), %rdi
callq 0x1c6ac0
movq -0x20(%rbp), %rdi
callq 0xd4740
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x18(%rbp), %rax
movzwl 0x30(%rax), %ecx
leaq -0x21(%rbp), %rdi
callq 0x1c6b00
movq -0x18(%rbp), %rax
cmpw $0x0, 0x48(%rax)
je 0x1c69c0
movq -0x20(%rbp), %rdi
callq 0xd6cd0
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdx
movq -0x18(%rbp), %rax
movzwl 0x48(%rax), %ecx
shll %ecx
leaq -0x21(%rbp), %rdi
callq 0x1c6ac0
movq -0x20(%rbp), %rdi
callq 0xc9600
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x18(%rbp), %rax
movzwl 0x48(%rax), %ecx
leaq -0x21(%rbp), %rdi
callq 0x1c6b00
movq -0x18(%rbp), %rax
cmpw $0x0, 0x58(%rax)
je 0x1c69f0
movq -0x20(%rbp), %rdi
callq 0xccf20
movq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdx
movq -0x18(%rbp), %rax
movzwl 0x58(%rax), %ecx
leaq -0x21(%rbp), %rdi
callq 0x1c6ac0
movq -0x20(%rbp), %rdi
callq 0xcee80
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movw 0x5a(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
movzx edi, word ptr [rax+18h]; this
mov rax, [rbp+var_18]
movzx esi, word ptr [rax+8]; int
mov rax, [rbp+var_18]
movzx edx, word ptr [rax+30h]; int
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+48h]; int
mov rax, [rbp+var_18]
movzx r8d, word ptr [rax+58h]; int
call __ZN10OpenSubdiv6v3_6_03Tmr12Neighborhood8byteSizeEiiiii; OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize(int,int,int,int,int)
mov ecx, eax
mov rax, [rbp+var_30]
mov ecx, ecx
cmp rax, rcx
jb short loc_1C6851
jmp short loc_1C6870
loc_1C6851:
lea rdi, aDestSizeBytesi; "dest_size >= byteSize(desc.nfaceVertCou"...
lea rsi, aWorkspaceLlm4b_43; "/workspace/llm4binary/github/2025_star3"...
mov edx, 88h
lea rcx, aStaticVoidOpen; "static void OpenSubdiv::v3_6_0::Tmr::Ne"...
call ___assert_fail
loc_1C6870:
mov rax, [rbp+var_18]
mov cx, [rax+18h]
mov rax, [rbp+var_20]
mov [rax+8], cx
mov rax, [rbp+var_18]
mov cx, [rax+8]
mov rax, [rbp+var_20]
mov [rax+0Ah], cx
mov rax, [rbp+var_18]
mov cx, [rax+30h]
mov rax, [rbp+var_20]
mov [rax+0Ch], cx
mov rax, [rbp+var_18]
mov cx, [rax+48h]
mov rax, [rbp+var_20]
mov [rax+0Eh], cx
mov rax, [rbp+var_18]
mov cx, [rax+58h]
mov rax, [rbp+var_20]
mov [rax+2], cx
mov al, cs:byte_1FC020
mov [rbp+var_21], al
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood17faceVertCountsPtrEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::faceVertCountsPtr(void)
mov rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax+10h]
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+18h]
lea rdi, [rbp+var_21]
call _ZZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorEENK3$_0clIiEEDaPT_PKS9_i
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood12faceVertsPtrEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::faceVertsPtr(void)
mov rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax]
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+8]
lea rdi, [rbp+var_21]
call _ZZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorEENK3$_0clIiEEDaPT_PKS9_i
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+30h]
cmp eax, 0
jle short loc_1C6969
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood14cornerVertsPtrEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::cornerVertsPtr(void)
mov rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax+20h]
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+30h]
lea rdi, [rbp+var_21]
call _ZZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorEENK3$_0clIiEEDaPT_PKS9_i
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood18cornerSharpnessPtrEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::cornerSharpnessPtr(void)
mov rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax+28h]
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+30h]
lea rdi, [rbp+var_21]
call _ZZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorEENK3$_0clIfEEDaPT_PKS9_i
loc_1C6969:
mov rax, [rbp+var_18]
cmp word ptr [rax+48h], 0
jz short loc_1C69C0
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood14creaseVertsPtrEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::creaseVertsPtr(void)
mov rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax+38h]
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+48h]
shl ecx, 1
lea rdi, [rbp+var_21]
call _ZZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorEENK3$_0clIiEEDaPT_PKS9_i
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood18creaseSharpnessPtrEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::creaseSharpnessPtr(void)
mov rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax+40h]
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+48h]
lea rdi, [rbp+var_21]
call _ZZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorEENK3$_0clIfEEDaPT_PKS9_i
loc_1C69C0:
mov rax, [rbp+var_18]
cmp word ptr [rax+58h], 0
jz short loc_1C69F0
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood16controlPointsPtrEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::controlPointsPtr(void)
mov rsi, rax
mov rax, [rbp+var_18]
mov rdx, [rax+50h]
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+58h]
lea rdi, [rbp+var_21]
call _ZZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorEENK3$_0clIiEEDaPT_PKS9_i
loc_1C69F0:
mov rdi, [rbp+var_20]; this
call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood14computeHashKeyEv; OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey(void)
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+4], ecx
mov rax, [rbp+var_18]
mov cx, [rax+5Ah]
mov rax, [rbp+var_20]
mov [rax], cx
add rsp, 30h
pop rbp
retn
| OpenSubdiv::v3_6_0::Tmr::Neighborhood * OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(
OpenSubdiv::v3_6_0::Tmr::Neighborhood *a1,
unsigned long long a2,
unsigned __int16 *a3,
long long a4,
long long a5,
int a6)
{
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
int v13; // eax
OpenSubdiv::v3_6_0::Tmr::Neighborhood *result; // rax
char v15; // [rsp+Fh] [rbp-21h] BYREF
OpenSubdiv::v3_6_0::Tmr::Neighborhood *v16; // [rsp+10h] [rbp-20h]
unsigned __int16 *v17; // [rsp+18h] [rbp-18h]
unsigned long long v18; // [rsp+20h] [rbp-10h]
OpenSubdiv::v3_6_0::Tmr::Neighborhood *v19; // [rsp+28h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a1;
if ( a2 < (unsigned int)OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize(
(OpenSubdiv::v3_6_0::Tmr::Neighborhood *)a3[12],
a3[4],
a3[24],
v17[36],
v17[44],
a6) )
__assert_fail(
"dest_size >= byteSize(desc.nfaceVertCounts, desc.nfaceVerts, desc.ncorners, desc.ncreases, desc.ncontrolPoints)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp",
136LL,
"static void OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(uint8_t *, size_t, const DataDescriptor &)");
*((_WORD *)v16 + 4) = v17[12];
*((_WORD *)v16 + 5) = v17[4];
*((_WORD *)v16 + 6) = v17[24];
*((_WORD *)v16 + 7) = v17[36];
*((_WORD *)v16 + 1) = v17[44];
v15 = 0;
v6 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::faceVertCountsPtr(v16);
OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char *,unsigned long,OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&)::$_0::operator()<int>(
&v15,
v6,
*((_QWORD *)v17 + 2),
v17[12]);
v7 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::faceVertsPtr(v16);
OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char *,unsigned long,OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&)::$_0::operator()<int>(
&v15,
v7,
*(_QWORD *)v17,
v17[4]);
if ( v17[24] )
{
v8 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::cornerVertsPtr(v16);
OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char *,unsigned long,OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&)::$_0::operator()<int>(
&v15,
v8,
*((_QWORD *)v17 + 4),
v17[24]);
v9 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::cornerSharpnessPtr(v16);
OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char *,unsigned long,OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&)::$_0::operator()<float>(
&v15,
v9,
*((_QWORD *)v17 + 5),
v17[24]);
}
if ( v17[36] )
{
v10 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::creaseVertsPtr(v16);
OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char *,unsigned long,OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&)::$_0::operator()<int>(
&v15,
v10,
*((_QWORD *)v17 + 7),
2 * (unsigned int)v17[36]);
v11 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::creaseSharpnessPtr(v16);
OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char *,unsigned long,OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&)::$_0::operator()<float>(
&v15,
v11,
*((_QWORD *)v17 + 8),
v17[36]);
}
if ( v17[44] )
{
v12 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::controlPointsPtr(v16);
OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char *,unsigned long,OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&)::$_0::operator()<int>(
&v15,
v12,
*((_QWORD *)v17 + 10),
v17[44]);
}
v13 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::computeHashKey(v16);
*((_DWORD *)v16 + 1) = v13;
result = v16;
*(_WORD *)v16 = v17[45];
return result;
}
| |||
445 | OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char*, unsigned long, OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp | void
Neighborhood::populateData(uint8_t* dest, size_t dest_size, DataDescriptor const& desc)
{
Neighborhood* n = reinterpret_cast<Neighborhood*>(dest);
assert(dest_size >= byteSize(desc.nfaceVertCounts, desc.nfaceVerts, desc.ncorners, desc.ncreases, desc.ncontrolPoints));
n->_faceCount = desc.nfaceVertCounts;
n->_faceVertsCount = desc.nfaceVerts;
n->_cornersCount = desc.ncorners;
n->_creasesCount = desc.ncreases;
n->_controlPointsCount = desc.ncontrolPoints;
auto populate = []<typename T>(T* dest, T const* src, int src_count) {
std::memcpy(dest, src, src_count * sizeof(T));
};
populate(n->faceVertCountsPtr(), desc.faceVertCounts, desc.nfaceVertCounts);
populate(n->faceVertsPtr(), desc.faceVerts, desc.nfaceVerts);
if (desc.ncorners > 0) {
populate(n->cornerVertsPtr(), desc.cornerVerts, desc.ncorners);
populate(n->cornerSharpnessPtr(), desc.cornerSharpness, desc.ncorners);
}
if (desc.ncreases) {
populate(n->creaseVertsPtr(), desc.creaseVerts, desc.ncreases * 2);
populate(n->creaseSharpnessPtr(), desc.creaseSharpness, desc.ncreases);
}
if (desc.ncontrolPoints)
populate(n->controlPointsPtr(), desc.controlPoints, desc.ncontrolPoints);
n->_hash = n->computeHashKey();
n->_startingEdge = desc.startingEdge;
} | O3 | cpp | OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char*, unsigned long, OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movzwl 0x18(%rdx), %r12d
movzwl 0x8(%rdx), %edx
movzwl 0x30(%rbx), %ecx
movzwl 0x48(%rbx), %eax
movzwl 0x58(%rbx), %edi
leal (%rdx,%r12), %r8d
leaq (%rax,%rax,2), %r9
shll $0x2, %r9d
addl %edi, %r8d
leaq (%r9,%rcx,8), %r9
leaq (%r9,%r8,4), %r8
addq $0x10, %r8
cmpq %rsi, %r8
ja 0xa60a4
movw %r12w, 0x8(%r14)
movw %dx, 0xa(%r14)
movw %cx, 0xc(%r14)
movw %ax, 0xe(%r14)
movw %di, 0x2(%r14)
leaq 0x10(%r14), %r15
movq 0x10(%rbx), %rsi
shll $0x2, %r12d
movq %r15, %rdi
movq %r12, %rdx
callq 0x39ab0
leaq (%r14,%r12), %rdi
addq $0x10, %rdi
movq (%rbx), %rsi
movzwl 0x8(%rbx), %edx
shll $0x2, %edx
callq 0x39ab0
movzwl 0x30(%rbx), %edx
testq %rdx, %rdx
je 0xa5f88
movzwl 0x8(%r14), %eax
leaq (%r15,%rax,4), %rax
movzwl 0xa(%r14), %ecx
leaq (%rax,%rcx,4), %rdi
movq 0x20(%rbx), %rsi
shll $0x2, %edx
callq 0x39ab0
movzwl 0x8(%r14), %eax
leaq (%r15,%rax,4), %rax
movzwl 0xa(%r14), %ecx
leaq (%rax,%rcx,4), %rax
movzwl 0xc(%r14), %ecx
leaq (%rax,%rcx,4), %rdi
movq 0x28(%rbx), %rsi
movzwl 0x30(%rbx), %edx
shll $0x2, %edx
callq 0x39ab0
movzwl 0x48(%rbx), %edx
testq %rdx, %rdx
je 0xa5ff6
movzwl 0x8(%r14), %eax
leaq (%r15,%rax,4), %rax
movzwl 0xa(%r14), %ecx
leaq (%rax,%rcx,4), %rax
movzwl 0xc(%r14), %edi
shll $0x2, %edi
addq %rdi, %rdi
addq %rax, %rdi
movq 0x38(%rbx), %rsi
shll $0x3, %edx
callq 0x39ab0
movzwl 0x8(%r14), %eax
leaq (%r15,%rax,4), %rax
movzwl 0xa(%r14), %ecx
leaq (%rax,%rcx,4), %rax
movzwl 0xc(%r14), %ecx
shll $0x2, %ecx
addq %rcx, %rcx
addq %rax, %rcx
movzwl 0xe(%r14), %eax
leaq (%rcx,%rax,8), %rdi
movq 0x40(%rbx), %rsi
movzwl 0x48(%rbx), %edx
shll $0x2, %edx
callq 0x39ab0
leaq 0x8(%r14), %r12
movzwl 0x58(%rbx), %edx
testq %rdx, %rdx
je 0xa603c
movzwl 0x8(%r14), %eax
leaq (%r15,%rax,4), %rax
movzwl 0xa(%r14), %ecx
leaq (%rax,%rcx,4), %rax
movzwl 0xc(%r14), %ecx
shll $0x2, %ecx
addq %rcx, %rcx
addq %rax, %rcx
movzwl 0xe(%r14), %eax
leaq (%rcx,%rax,8), %rcx
leaq (%rcx,%rax,4), %rdi
movq 0x50(%rbx), %rsi
shll $0x2, %edx
callq 0x39ab0
movzwl 0x8(%r14), %eax
movzwl 0xa(%r14), %ecx
addl %eax, %ecx
movzwl 0xc(%r14), %eax
movzwl 0xe(%r14), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%r14,%rax,8), %rax
leaq (%rax,%rdx,4), %rax
leaq (%rax,%rcx,4), %rax
addq $0x10, %rax
movq %rax, %rcx
subq %r12, %rcx
testq %rcx, %rcx
jle 0xa608a
xorl %ecx, %ecx
imull $0x1000193, %ecx, %edx # imm = 0x1000193
movzbl (%r12), %ecx
xorl %edx, %ecx
incq %r12
cmpq %rax, %r12
jb 0xa6073
jmp 0xa608c
xorl %ecx, %ecx
movl %ecx, 0x4(%r14)
movzwl 0x5a(%rbx), %eax
movw %ax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1fe74(%rip), %rdi # 0xc5f1f
leaq 0x1fedd(%rip), %rsi # 0xc5f8f
leaq 0x1ff34(%rip), %rcx # 0xc5fed
movl $0x88, %edx
callq 0x39540
nop
| _ZN10OpenSubdiv6v3_6_03Tmr12Neighborhood12populateDataEPhmRKNS2_14DataDescriptorE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rdi
movzx r12d, word ptr [rdx+18h]
movzx edx, word ptr [rdx+8]
movzx ecx, word ptr [rbx+30h]
movzx eax, word ptr [rbx+48h]
movzx edi, word ptr [rbx+58h]
lea r8d, [rdx+r12]
lea r9, [rax+rax*2]
shl r9d, 2
add r8d, edi
lea r9, [r9+rcx*8]
lea r8, [r9+r8*4]
add r8, 10h
cmp r8, rsi
ja loc_A60A4
mov [r14+8], r12w
mov [r14+0Ah], dx
mov [r14+0Ch], cx
mov [r14+0Eh], ax
mov [r14+2], di
lea r15, [r14+10h]
mov rsi, [rbx+10h]
shl r12d, 2
mov rdi, r15
mov rdx, r12
call _memcpy
lea rdi, [r14+r12]
add rdi, 10h
mov rsi, [rbx]
movzx edx, word ptr [rbx+8]
shl edx, 2
call _memcpy
movzx edx, word ptr [rbx+30h]
test rdx, rdx
jz short loc_A5F88
movzx eax, word ptr [r14+8]
lea rax, [r15+rax*4]
movzx ecx, word ptr [r14+0Ah]
lea rdi, [rax+rcx*4]
mov rsi, [rbx+20h]
shl edx, 2
call _memcpy
movzx eax, word ptr [r14+8]
lea rax, [r15+rax*4]
movzx ecx, word ptr [r14+0Ah]
lea rax, [rax+rcx*4]
movzx ecx, word ptr [r14+0Ch]
lea rdi, [rax+rcx*4]
mov rsi, [rbx+28h]
movzx edx, word ptr [rbx+30h]
shl edx, 2
call _memcpy
loc_A5F88:
movzx edx, word ptr [rbx+48h]
test rdx, rdx
jz short loc_A5FF6
movzx eax, word ptr [r14+8]
lea rax, [r15+rax*4]
movzx ecx, word ptr [r14+0Ah]
lea rax, [rax+rcx*4]
movzx edi, word ptr [r14+0Ch]
shl edi, 2
add rdi, rdi
add rdi, rax
mov rsi, [rbx+38h]
shl edx, 3
call _memcpy
movzx eax, word ptr [r14+8]
lea rax, [r15+rax*4]
movzx ecx, word ptr [r14+0Ah]
lea rax, [rax+rcx*4]
movzx ecx, word ptr [r14+0Ch]
shl ecx, 2
add rcx, rcx
add rcx, rax
movzx eax, word ptr [r14+0Eh]
lea rdi, [rcx+rax*8]
mov rsi, [rbx+40h]
movzx edx, word ptr [rbx+48h]
shl edx, 2
call _memcpy
loc_A5FF6:
lea r12, [r14+8]
movzx edx, word ptr [rbx+58h]
test rdx, rdx
jz short loc_A603C
movzx eax, word ptr [r14+8]
lea rax, [r15+rax*4]
movzx ecx, word ptr [r14+0Ah]
lea rax, [rax+rcx*4]
movzx ecx, word ptr [r14+0Ch]
shl ecx, 2
add rcx, rcx
add rcx, rax
movzx eax, word ptr [r14+0Eh]
lea rcx, [rcx+rax*8]
lea rdi, [rcx+rax*4]
mov rsi, [rbx+50h]
shl edx, 2
call _memcpy
loc_A603C:
movzx eax, word ptr [r14+8]
movzx ecx, word ptr [r14+0Ah]
add ecx, eax
movzx eax, word ptr [r14+0Ch]
movzx edx, word ptr [r14+0Eh]
lea rdx, [rdx+rdx*2]
lea rax, [r14+rax*8]
lea rax, [rax+rdx*4]
lea rax, [rax+rcx*4]
add rax, 10h
mov rcx, rax
sub rcx, r12
test rcx, rcx
jle short loc_A608A
xor ecx, ecx
loc_A6073:
imul edx, ecx, 1000193h
movzx ecx, byte ptr [r12]
xor ecx, edx
inc r12
cmp r12, rax
jb short loc_A6073
jmp short loc_A608C
loc_A608A:
xor ecx, ecx
loc_A608C:
mov [r14+4], ecx
movzx eax, word ptr [rbx+5Ah]
mov [r14], ax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_A60A4:
lea rdi, aDestSizeBytesi; "dest_size >= byteSize(desc.nfaceVertCou"...
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStaticVoidOpen; "static void OpenSubdiv::v3_6_0::Tmr::Ne"...
mov edx, 88h
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(long long a1, unsigned long long a2, long long a3)
{
int v5; // r12d
int v6; // edx
long long v7; // rcx
int v8; // eax
int v9; // edi
long long v10; // r9
unsigned long long v11; // r8
long long v12; // r15
unsigned int v13; // r12d
long long v14; // rcx
long long v15; // r8
long long v16; // r9
long long v17; // r8
long long v18; // r9
long long v19; // r8
long long v20; // r9
long long v21; // rcx
long long v22; // r8
long long v23; // r9
unsigned __int8 *v24; // r12
long long v25; // rax
long long v26; // rcx
int v27; // ecx
long long result; // rax
v5 = *(unsigned __int16 *)(a3 + 24);
v6 = *(unsigned __int16 *)(a3 + 8);
v7 = *(unsigned __int16 *)(a3 + 48);
v8 = *(unsigned __int16 *)(a3 + 72);
v9 = *(unsigned __int16 *)(a3 + 88);
v10 = (unsigned int)(12 * v8) + 8 * v7;
v11 = v10 + 4LL * (unsigned int)(v9 + v6 + v5) + 16;
if ( v11 > a2 )
__assert_fail(
"dest_size >= byteSize(desc.nfaceVertCounts, desc.nfaceVerts, desc.ncorners, desc.ncreases, desc.ncontrolPoints)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp",
136LL,
"static void OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(uint8_t *, size_t, const DataDescriptor &)");
*(_WORD *)(a1 + 8) = v5;
*(_WORD *)(a1 + 10) = v6;
*(_WORD *)(a1 + 12) = v7;
*(_WORD *)(a1 + 14) = v8;
*(_WORD *)(a1 + 2) = v9;
v12 = a1 + 16;
v13 = 4 * v5;
memcpy(a1 + 16, *(_QWORD *)(a3 + 16), v13, v7, v11, v10);
memcpy(a1 + v13 + 16, *(_QWORD *)a3, 4 * (unsigned int)*(unsigned __int16 *)(a3 + 8), v14, v15, v16);
if ( *(_WORD *)(a3 + 48) )
{
memcpy(
v12 + 4LL * *(unsigned __int16 *)(a1 + 8) + 4LL * *(unsigned __int16 *)(a1 + 10),
*(_QWORD *)(a3 + 32),
4 * (unsigned int)*(unsigned __int16 *)(a3 + 48),
*(unsigned __int16 *)(a1 + 10),
v17,
v18);
memcpy(
v12
+ 4LL * *(unsigned __int16 *)(a1 + 8)
+ 4LL * *(unsigned __int16 *)(a1 + 10)
+ 4LL * *(unsigned __int16 *)(a1 + 12),
*(_QWORD *)(a3 + 40),
4 * (unsigned int)*(unsigned __int16 *)(a3 + 48),
*(unsigned __int16 *)(a1 + 12),
v19,
v20);
}
if ( *(_WORD *)(a3 + 72) )
{
memcpy(
v12
+ 4LL * *(unsigned __int16 *)(a1 + 8)
+ 4LL * *(unsigned __int16 *)(a1 + 10)
+ 8LL * *(unsigned __int16 *)(a1 + 12),
*(_QWORD *)(a3 + 56),
8 * (unsigned int)*(unsigned __int16 *)(a3 + 72),
*(unsigned __int16 *)(a1 + 10),
v17,
v18);
v21 = v12
+ 4LL * *(unsigned __int16 *)(a1 + 8)
+ 4LL * *(unsigned __int16 *)(a1 + 10)
+ 8LL * *(unsigned __int16 *)(a1 + 12);
memcpy(
v21 + 8LL * *(unsigned __int16 *)(a1 + 14),
*(_QWORD *)(a3 + 64),
4 * (unsigned int)*(unsigned __int16 *)(a3 + 72),
v21,
v22,
v23);
}
v24 = (unsigned __int8 *)(a1 + 8);
if ( *(_WORD *)(a3 + 88) )
{
v25 = *(unsigned __int16 *)(a1 + 14);
v26 = v12
+ 4LL * *(unsigned __int16 *)(a1 + 8)
+ 4LL * *(unsigned __int16 *)(a1 + 10)
+ 8LL * *(unsigned __int16 *)(a1 + 12)
+ 8 * v25;
memcpy(v26 + 4 * v25, *(_QWORD *)(a3 + 80), 4 * (unsigned int)*(unsigned __int16 *)(a3 + 88), v26, v17, v18);
}
if ( 8LL * *(unsigned __int16 *)(a1 + 12)
+ 12LL * *(unsigned __int16 *)(a1 + 14)
+ 4LL * (*(unsigned __int16 *)(a1 + 8) + (unsigned int)*(unsigned __int16 *)(a1 + 10))
+ 8 <= 0 )
{
v27 = 0;
}
else
{
v27 = 0;
do
v27 = (16777619 * v27) ^ *v24++;
while ( (unsigned long long)v24 < a1
+ 8LL * *(unsigned __int16 *)(a1 + 12)
+ 12LL * *(unsigned __int16 *)(a1 + 14)
+ 4
* (unsigned long long)(*(unsigned __int16 *)(a1 + 8)
+ (unsigned int)*(unsigned __int16 *)(a1 + 10))
+ 16 );
}
*(_DWORD *)(a1 + 4) = v27;
result = *(unsigned __int16 *)(a3 + 90);
*(_WORD *)a1 = result;
return result;
}
| populateData:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
MOVZX R12D,word ptr [RDX + 0x18]
MOVZX EDX,word ptr [RDX + 0x8]
MOVZX ECX,word ptr [RBX + 0x30]
MOVZX EAX,word ptr [RBX + 0x48]
MOVZX EDI,word ptr [RBX + 0x58]
LEA R8D,[RDX + R12*0x1]
LEA R9,[RAX + RAX*0x2]
SHL R9D,0x2
ADD R8D,EDI
LEA R9,[R9 + RCX*0x8]
LEA R8,[R9 + R8*0x4]
ADD R8,0x10
CMP R8,RSI
JA 0x001a60a4
MOV word ptr [R14 + 0x8],R12W
MOV word ptr [R14 + 0xa],DX
MOV word ptr [R14 + 0xc],CX
MOV word ptr [R14 + 0xe],AX
MOV word ptr [R14 + 0x2],DI
LEA R15,[R14 + 0x10]
MOV RSI,qword ptr [RBX + 0x10]
SHL R12D,0x2
MOV RDI,R15
MOV RDX,R12
CALL 0x00139ab0
LEA RDI,[R14 + R12*0x1]
ADD RDI,0x10
MOV RSI,qword ptr [RBX]
MOVZX EDX,word ptr [RBX + 0x8]
SHL EDX,0x2
CALL 0x00139ab0
MOVZX EDX,word ptr [RBX + 0x30]
TEST RDX,RDX
JZ 0x001a5f88
MOVZX EAX,word ptr [R14 + 0x8]
LEA RAX,[R15 + RAX*0x4]
MOVZX ECX,word ptr [R14 + 0xa]
LEA RDI,[RAX + RCX*0x4]
MOV RSI,qword ptr [RBX + 0x20]
SHL EDX,0x2
CALL 0x00139ab0
MOVZX EAX,word ptr [R14 + 0x8]
LEA RAX,[R15 + RAX*0x4]
MOVZX ECX,word ptr [R14 + 0xa]
LEA RAX,[RAX + RCX*0x4]
MOVZX ECX,word ptr [R14 + 0xc]
LEA RDI,[RAX + RCX*0x4]
MOV RSI,qword ptr [RBX + 0x28]
MOVZX EDX,word ptr [RBX + 0x30]
SHL EDX,0x2
CALL 0x00139ab0
LAB_001a5f88:
MOVZX EDX,word ptr [RBX + 0x48]
TEST RDX,RDX
JZ 0x001a5ff6
MOVZX EAX,word ptr [R14 + 0x8]
LEA RAX,[R15 + RAX*0x4]
MOVZX ECX,word ptr [R14 + 0xa]
LEA RAX,[RAX + RCX*0x4]
MOVZX EDI,word ptr [R14 + 0xc]
SHL EDI,0x2
ADD RDI,RDI
ADD RDI,RAX
MOV RSI,qword ptr [RBX + 0x38]
SHL EDX,0x3
CALL 0x00139ab0
MOVZX EAX,word ptr [R14 + 0x8]
LEA RAX,[R15 + RAX*0x4]
MOVZX ECX,word ptr [R14 + 0xa]
LEA RAX,[RAX + RCX*0x4]
MOVZX ECX,word ptr [R14 + 0xc]
SHL ECX,0x2
ADD RCX,RCX
ADD RCX,RAX
MOVZX EAX,word ptr [R14 + 0xe]
LEA RDI,[RCX + RAX*0x8]
MOV RSI,qword ptr [RBX + 0x40]
MOVZX EDX,word ptr [RBX + 0x48]
SHL EDX,0x2
CALL 0x00139ab0
LAB_001a5ff6:
LEA R12,[R14 + 0x8]
MOVZX EDX,word ptr [RBX + 0x58]
TEST RDX,RDX
JZ 0x001a603c
MOVZX EAX,word ptr [R14 + 0x8]
LEA RAX,[R15 + RAX*0x4]
MOVZX ECX,word ptr [R14 + 0xa]
LEA RAX,[RAX + RCX*0x4]
MOVZX ECX,word ptr [R14 + 0xc]
SHL ECX,0x2
ADD RCX,RCX
ADD RCX,RAX
MOVZX EAX,word ptr [R14 + 0xe]
LEA RCX,[RCX + RAX*0x8]
LEA RDI,[RCX + RAX*0x4]
MOV RSI,qword ptr [RBX + 0x50]
SHL EDX,0x2
CALL 0x00139ab0
LAB_001a603c:
MOVZX EAX,word ptr [R14 + 0x8]
MOVZX ECX,word ptr [R14 + 0xa]
ADD ECX,EAX
MOVZX EAX,word ptr [R14 + 0xc]
MOVZX EDX,word ptr [R14 + 0xe]
LEA RDX,[RDX + RDX*0x2]
LEA RAX,[R14 + RAX*0x8]
LEA RAX,[RAX + RDX*0x4]
LEA RAX,[RAX + RCX*0x4]
ADD RAX,0x10
MOV RCX,RAX
SUB RCX,R12
TEST RCX,RCX
JLE 0x001a608a
XOR ECX,ECX
LAB_001a6073:
IMUL EDX,ECX,0x1000193
MOVZX ECX,byte ptr [R12]
XOR ECX,EDX
INC R12
CMP R12,RAX
JC 0x001a6073
JMP 0x001a608c
LAB_001a608a:
XOR ECX,ECX
LAB_001a608c:
MOV dword ptr [R14 + 0x4],ECX
MOVZX EAX,word ptr [RBX + 0x5a]
MOV word ptr [R14],AX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001a60a4:
LEA RDI,[0x1c5f1f]
LEA RSI,[0x1c5f8f]
LEA RCX,[0x1c5fed]
MOV EDX,0x88
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(unsigned char*, unsigned long,
OpenSubdiv::v3_6_0::Tmr::Neighborhood::DataDescriptor const&) */
void OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData
(uchar *param_1,ulong param_2,DataDescriptor *param_3)
{
uchar *__dest;
ushort uVar1;
ushort uVar2;
ushort uVar3;
ushort uVar4;
ushort uVar5;
byte *pbVar6;
uint uVar7;
byte *pbVar8;
uVar1 = *(ushort *)(param_3 + 0x18);
uVar2 = *(ushort *)(param_3 + 8);
uVar3 = *(ushort *)(param_3 + 0x30);
uVar4 = *(ushort *)(param_3 + 0x48);
uVar5 = *(ushort *)(param_3 + 0x58);
if (param_2 < (ulong)((uint)uVar4 * 0xc) + (ulong)uVar3 * 8 +
(ulong)((uint)uVar2 + (uint)uVar1 + (uint)uVar5) * 4 + 0x10) {
/* WARNING: Subroutine does not return */
__assert_fail("dest_size >= byteSize(desc.nfaceVertCounts, desc.nfaceVerts, desc.ncorners, desc.ncreases, desc.ncontrolPoints)"
,
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp"
,0x88,
"static void OpenSubdiv::v3_6_0::Tmr::Neighborhood::populateData(uint8_t *, size_t, const DataDescriptor &)"
);
}
*(ushort *)(param_1 + 8) = uVar1;
*(ushort *)(param_1 + 10) = uVar2;
*(ushort *)(param_1 + 0xc) = uVar3;
*(ushort *)(param_1 + 0xe) = uVar4;
*(ushort *)(param_1 + 2) = uVar5;
__dest = param_1 + 0x10;
memcpy(__dest,*(void **)(param_3 + 0x10),(ulong)uVar1 * 4);
memcpy(param_1 + (ulong)uVar1 * 4 + 0x10,*(void **)param_3,(ulong)*(ushort *)(param_3 + 8) << 2);
if (*(ushort *)(param_3 + 0x30) != 0) {
memcpy(__dest + (ulong)*(ushort *)(param_1 + 10) * 4 + (ulong)*(ushort *)(param_1 + 8) * 4,
*(void **)(param_3 + 0x20),(ulong)*(ushort *)(param_3 + 0x30) << 2);
memcpy(__dest + (ulong)*(ushort *)(param_1 + 0xc) * 4 +
(ulong)*(ushort *)(param_1 + 10) * 4 + (ulong)*(ushort *)(param_1 + 8) * 4,
*(void **)(param_3 + 0x28),(ulong)*(ushort *)(param_3 + 0x30) << 2);
}
if (*(ushort *)(param_3 + 0x48) != 0) {
memcpy(__dest + (ulong)*(ushort *)(param_1 + 0xc) * 8 +
(ulong)*(ushort *)(param_1 + 10) * 4 + (ulong)*(ushort *)(param_1 + 8) * 4,
*(void **)(param_3 + 0x38),(ulong)*(ushort *)(param_3 + 0x48) << 3);
memcpy(__dest + (ulong)*(ushort *)(param_1 + 0xe) * 8 +
(ulong)*(ushort *)(param_1 + 0xc) * 8 +
(ulong)*(ushort *)(param_1 + 10) * 4 + (ulong)*(ushort *)(param_1 + 8) * 4,
*(void **)(param_3 + 0x40),(ulong)*(ushort *)(param_3 + 0x48) << 2);
}
pbVar8 = param_1 + 8;
if (*(ushort *)(param_3 + 0x58) != 0) {
memcpy(__dest + (ulong)*(ushort *)(param_1 + 0xe) * 0xc +
(ulong)*(ushort *)(param_1 + 0xc) * 8 +
(ulong)*(ushort *)(param_1 + 10) * 4 + (ulong)*(ushort *)(param_1 + 8) * 4,
*(void **)(param_3 + 0x50),(ulong)*(ushort *)(param_3 + 0x58) << 2);
}
pbVar6 = param_1 + (ulong)((uint)*(ushort *)(param_1 + 10) + (uint)*(ushort *)(param_1 + 8)) * 4 +
(ulong)*(ushort *)(param_1 + 0xe) * 0xc + (ulong)*(ushort *)(param_1 + 0xc) * 8
+ 0x10;
if (pbVar6 == pbVar8 || (long)pbVar6 - (long)pbVar8 < 0) {
uVar7 = 0;
}
else {
uVar7 = 0;
do {
uVar7 = (uint)*pbVar8 ^ uVar7 * 0x1000193;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar6);
}
*(uint *)(param_1 + 4) = uVar7;
*(int2 *)param_1 = *(int2 *)(param_3 + 0x5a);
return;
}
|
|
446 | r3d_gbuffer_enable_stencil_test | r3d/src/r3d_core.c | void r3d_gbuffer_enable_stencil_test(bool passOnGeometry)
{
// Attach the depth/stencil texture of the G-Buffer
glFramebufferTexture2D(
GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
GL_TEXTURE_2D, R3D.framebuffer.gBuffer.depth, 0
);
// Setup the stencil
glEnable(GL_STENCIL_TEST);
glStencilMask(0x00); // Disable writing to the stencil buffer
glStencilFunc(GL_EQUAL, passOnGeometry, 0xFF); // Pass the test only when the value is 0 or 1 (void or geometry)
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); // Do not modify the stencil buffer
} | O3 | c | r3d_gbuffer_enable_stencil_test:
pushq %rbp
movq %rsp, %rbp
leaq 0xb1e04(%rip), %rax # 0x181fc8
leaq 0xdfa95(%rip), %rcx # 0x1afc60
movl 0x18(%rcx), %ecx
movl $0x8d40, %edi # imm = 0x8D40
movl $0x821a, %esi # imm = 0x821A
movl $0xde1, %edx # imm = 0xDE1
xorl %r8d, %r8d
callq *(%rax)
leaq 0xb1cc7(%rip), %rax # 0x181eb0
movl $0xb90, %edi # imm = 0xB90
callq *(%rax)
leaq 0xb2c71(%rip), %rax # 0x182e68
xorl %edi, %edi
callq *(%rax)
leaq 0xb2c56(%rip), %rax # 0x182e58
movl $0x202, %edi # imm = 0x202
movl $0x1, %esi
movl $0xff, %edx
callq *(%rax)
leaq 0xb2c5e(%rip), %rax # 0x182e78
movq (%rax), %rax
movl $0x1e00, %edi # imm = 0x1E00
movl $0x1e00, %esi # imm = 0x1E00
movl $0x1e00, %edx # imm = 0x1E00
popq %rbp
jmpq *%rax
| r3d_gbuffer_enable_stencil_test:
push rbp
mov rbp, rsp
lea rax, glad_glFramebufferTexture2D
lea rcx, R3D
mov ecx, [rcx+18h]
mov edi, 8D40h
mov esi, 821Ah
mov edx, 0DE1h
xor r8d, r8d
call qword ptr [rax]
lea rax, glad_glEnable
mov edi, 0B90h
call qword ptr [rax]
lea rax, glad_glStencilMask
xor edi, edi
call qword ptr [rax]
lea rax, glad_glStencilFunc
mov edi, 202h
mov esi, 1
mov edx, 0FFh
call qword ptr [rax]
lea rax, glad_glStencilOp
mov rax, [rax]
mov edi, 1E00h
mov esi, 1E00h
mov edx, 1E00h
pop rbp
jmp rax
| long long r3d_gbuffer_enable_stencil_test()
{
glad_glFramebufferTexture2D(36160LL, 33306LL, 3553LL, *(unsigned int *)&R3D[24], 0LL);
glad_glEnable(2960LL);
glad_glStencilMask(0LL);
glad_glStencilFunc(514LL, 1LL, 255LL);
return glad_glStencilOp(7680LL, 7680LL, 7680LL);
}
| r3d_gbuffer_enable_stencil_test:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x281fc8]
LEA RCX,[0x2afc60]
MOV ECX,dword ptr [RCX + 0x18]
MOV EDI,0x8d40
MOV ESI,0x821a
MOV EDX,0xde1
XOR R8D,R8D
CALL qword ptr [RAX]
LEA RAX,[0x281eb0]
MOV EDI,0xb90
CALL qword ptr [RAX]
LEA RAX,[0x282e68]
XOR EDI,EDI
CALL qword ptr [RAX]
LEA RAX,[0x282e58]
MOV EDI,0x202
MOV ESI,0x1
MOV EDX,0xff
CALL qword ptr [RAX]
LEA RAX,[0x282e78]
MOV RAX,qword ptr [RAX]
MOV EDI,0x1e00
MOV ESI,0x1e00
MOV EDX,0x1e00
POP RBP
JMP RAX
|
void r3d_gbuffer_enable_stencil_test(void)
{
(*glad_glFramebufferTexture2D)(0x8d40,0x821a,0xde1,DAT_002afc78,0);
(*glad_glEnable)(0xb90);
(*glad_glStencilMask)(0);
(*glad_glStencilFunc)(0x202,1,0xff);
/* WARNING: Could not recover jumptable at 0x001d022d. Too many branches */
/* WARNING: Treating indirect jump as call */
(*glad_glStencilOp)(0x1e00,0x1e00,0x1e00);
return;
}
|
|
447 | my_strxfrm_flag_normalize | eloqsql/strings/ctype-simple.c | uint my_strxfrm_flag_normalize(uint flags, uint maximum)
{
DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS);
/* If levels are omitted, then 1-maximum is assumed*/
if (!(flags & MY_STRXFRM_LEVEL_ALL))
{
static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F };
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
flags= def_level_flags[maximum] | flag_pad;
}
else
{
uint i;
uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL;
uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
/*
If any level number is greater than the maximum,
it is treated as the maximum.
*/
for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++)
{
uint src_bit= 1 << i;
if (flag_lev & src_bit)
{
uint dst_bit= 1 << MY_MIN(i, maximum);
flags|= dst_bit;
flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT;
flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT;
}
}
flags|= flag_pad;
}
return flags;
} | O3 | c | my_strxfrm_flag_normalize:
movl %edi, %eax
movl %edi, %edx
andl $0x3f, %edx
je 0xb5e8c
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
decl %esi
movl %eax, %r8d
andl $0x3f00, %r8d # imm = 0x3F00
movl %eax, %r9d
andl $0x3f0000, %r9d # imm = 0x3F0000
xorl %edi, %edi
xorl %r10d, %r10d
btl %r10d, %edx
jae 0xb5e77
cmpl %esi, %r10d
movl %esi, %ecx
cmovbl %r10d, %ecx
movl $0x1, %r11d
shll %cl, %r11d
movl $0x100, %ebx # imm = 0x100
shll %cl, %ebx
andl %r8d, %ebx
movl $0x10000, %r14d # imm = 0x10000
shll %cl, %r14d
addl %r11d, %ebx
andl %r9d, %r14d
addl %ebx, %r14d
orl %r14d, %edi
incl %r10d
cmpl $0x6, %r10d
jne 0xb5e40
andl $0xc0, %eax
orl %edi, %eax
popq %rbx
popq %r14
popq %rbp
retq
andl $0xc0, %eax
movl %esi, %ecx
leaq 0x16ec96(%rip), %rdx # 0x224b30
orl (%rdx,%rcx,4), %eax
retq
| my_strxfrm_flag_normalize:
mov eax, edi
mov edx, edi
and edx, 3Fh
jz short loc_B5E8C
push rbp
mov rbp, rsp
push r14
push rbx
dec esi
mov r8d, eax
and r8d, 3F00h
mov r9d, eax
and r9d, 3F0000h
xor edi, edi
xor r10d, r10d
loc_B5E40:
bt edx, r10d
jnb short loc_B5E77
cmp r10d, esi
mov ecx, esi
cmovb ecx, r10d
mov r11d, 1
shl r11d, cl
mov ebx, 100h
shl ebx, cl
and ebx, r8d
mov r14d, 10000h
shl r14d, cl
add ebx, r11d
and r14d, r9d
add r14d, ebx
or edi, r14d
loc_B5E77:
inc r10d
cmp r10d, 6
jnz short loc_B5E40
and eax, 0C0h
or eax, edi
pop rbx
pop r14
pop rbp
retn
loc_B5E8C:
and eax, 0C0h
mov ecx, esi
lea rdx, my_strxfrm_flag_normalize_def_level_flags
or eax, [rdx+rcx*4]
retn
| long long my_strxfrm_flag_normalize(int a1, int a2)
{
int v3; // edx
unsigned int v4; // esi
int v5; // r8d
int v6; // edi
unsigned int i; // r10d
char v8; // cl
v3 = a1 & 0x3F;
if ( (a1 & 0x3F) == 0 )
return my_strxfrm_flag_normalize_def_level_flags[a2] | a1 & 0xC0u;
v4 = a2 - 1;
v5 = a1 & 0x3F00;
v6 = 0;
for ( i = 0; i != 6; ++i )
{
if ( _bittest(&v3, i) )
{
v8 = v4;
if ( i < v4 )
v8 = i;
v6 |= (1 << v8) + (v5 & (256 << v8)) + (a1 & 0x3F0000 & (0x10000 << v8));
}
}
return v6 | a1 & 0xC0u;
}
| my_strxfrm_flag_normalize:
MOV EAX,EDI
MOV EDX,EDI
AND EDX,0x3f
JZ 0x001b5e8c
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
DEC ESI
MOV R8D,EAX
AND R8D,0x3f00
MOV R9D,EAX
AND R9D,0x3f0000
XOR EDI,EDI
XOR R10D,R10D
LAB_001b5e40:
BT EDX,R10D
JNC 0x001b5e77
CMP R10D,ESI
MOV ECX,ESI
CMOVC ECX,R10D
MOV R11D,0x1
SHL R11D,CL
MOV EBX,0x100
SHL EBX,CL
AND EBX,R8D
MOV R14D,0x10000
SHL R14D,CL
ADD EBX,R11D
AND R14D,R9D
ADD R14D,EBX
OR EDI,R14D
LAB_001b5e77:
INC R10D
CMP R10D,0x6
JNZ 0x001b5e40
AND EAX,0xc0
OR EAX,EDI
POP RBX
POP R14
POP RBP
RET
LAB_001b5e8c:
AND EAX,0xc0
MOV ECX,ESI
LEA RDX,[0x324b30]
OR EAX,dword ptr [RDX + RCX*0x4]
RET
|
uint my_strxfrm_flag_normalize(uint param_1,uint param_2)
{
uint uVar1;
byte bVar2;
uint uVar3;
uint uVar4;
if ((param_1 & 0x3f) != 0) {
uVar3 = 0;
uVar4 = 0;
do {
if (((param_1 & 0x3f) >> (uVar4 & 0x1f) & 1) != 0) {
uVar1 = param_2 - 1;
if (uVar4 < param_2 - 1) {
uVar1 = uVar4;
}
bVar2 = (byte)uVar1;
uVar3 = uVar3 | (0x10000 << (bVar2 & 0x1f) & param_1 & 0x3f0000) +
(0x100 << (bVar2 & 0x1f) & param_1 & 0x3f00) + (1 << (bVar2 & 0x1f));
}
uVar4 = uVar4 + 1;
} while (uVar4 != 6);
return param_1 & 0xc0 | uVar3;
}
return param_1 & 0xc0 | *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4);
}
|
|
448 | fill_uchar | eloqsql/strings/ctype.c | static int fill_uchar(uchar *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
{
for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ;
b=s;
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
a[i]= (uchar) strtoul(b,NULL,16);
}
return 0;
} | O0 | c | fill_uchar:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x76956
jmp 0x76882
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0x768ae
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x104f0(%rip), %rdi # 0x86d8f
callq 0x25110
cmpq $0x0, %rax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x768b7
jmp 0x768c7
jmp 0x768b9
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x76882
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0x768fd
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x104a3(%rip), %rdi # 0x86d8f
callq 0x25110
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x76906
jmp 0x76916
jmp 0x76908
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x768cf
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x76928
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x7692a
jmp 0x76956
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x25400
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x76872
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nop
| fill_uchar:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_76872:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jnb loc_76956
jmp short $+2
loc_76882:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jnb short loc_768AE
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_86D8F; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
mov [rbp+var_41], al
loc_768AE:
mov al, [rbp+var_41]
test al, 1
jnz short loc_768B7
jmp short loc_768C7
loc_768B7:
jmp short $+2
loc_768B9:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_76882
loc_768C7:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_768CF:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_42], al
jnb short loc_768FD
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_86D8F; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
xor al, 0FFh
mov [rbp+var_42], al
loc_768FD:
mov al, [rbp+var_42]
test al, 1
jnz short loc_76906
jmp short loc_76916
loc_76906:
jmp short $+2
loc_76908:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_768CF
loc_76916:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_76928
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jbe short loc_7692A
loc_76928:
jmp short loc_76956
loc_7692A:
mov rdi, [rbp+var_38]
xor eax, eax
mov esi, eax
mov edx, 10h
call ___isoc23_strtoul
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_24]
mov [rax+rcx], dl
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_76872
loc_76956:
xor eax, eax
add rsp, 50h
pop rbp
retn
| long long fill_uchar(long long a1, unsigned int a2, char *a3, long long a4)
{
char v5; // [rsp+Eh] [rbp-42h]
bool v6; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
char *v8; // [rsp+18h] [rbp-38h]
char *v9; // [rsp+20h] [rbp-30h]
unsigned int v10; // [rsp+2Ch] [rbp-24h]
v10 = 0;
v7 = (unsigned long long)&a3[a4];
v9 = a3;
while ( (unsigned long long)v9 < v7 )
{
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v9 < v7 )
v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0;
if ( !v6 )
break;
++v9;
}
v8 = v9;
while ( 1 )
{
v5 = 0;
if ( (unsigned long long)v9 < v7 )
v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0);
if ( (v5 & 1) == 0 )
break;
++v9;
}
if ( v9 == v8 || v10 > a2 )
break;
*(_BYTE *)(a1 + v10++) = __isoc23_strtoul(v8, 0LL, 16LL);
}
return 0LL;
}
| fill_uchar:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_00176872:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00176956
JMP 0x00176882
LAB_00176882:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JNC 0x001768ae
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x186d8f]
CALL 0x00125110
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001768ae:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001768b7
JMP 0x001768c7
LAB_001768b7:
JMP 0x001768b9
LAB_001768b9:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00176882
LAB_001768c7:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_001768cf:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x42],AL
JNC 0x001768fd
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x186d8f]
CALL 0x00125110
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x42],AL
LAB_001768fd:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x00176906
JMP 0x00176916
LAB_00176906:
JMP 0x00176908
LAB_00176908:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001768cf
LAB_00176916:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x00176928
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x0017692a
LAB_00176928:
JMP 0x00176956
LAB_0017692a:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0x10
CALL 0x00125400
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x24]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00176872
LAB_00176956:
XOR EAX,EAX
ADD RSP,0x50
POP RBP
RET
|
int8 fill_uchar(long param_1,uint param_2,char *param_3,long param_4)
{
char *pcVar1;
int1 uVar2;
char *pcVar3;
char *pcVar4;
bool bVar5;
char *local_38;
uint local_2c;
local_2c = 0;
pcVar3 = param_3 + param_4;
local_38 = param_3;
while( true ) {
if (pcVar3 <= local_38) {
return 0;
}
while( true ) {
pcVar1 = local_38;
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 != (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
while( true ) {
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 == (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
if (local_38 == pcVar1) break;
if (param_2 < local_2c) {
return 0;
}
uVar2 = __isoc23_strtoul(pcVar1,0,0x10);
*(int1 *)(param_1 + (ulong)local_2c) = uVar2;
local_2c = local_2c + 1;
}
return 0;
}
|
|
449 | inverse_fp12 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/fp12_tower.c | static void inverse_fp12(vec384fp12 ret, const vec384fp12 a)
{
vec384fp6 t0, t1;
sqr_fp6(t0, a[0]);
sqr_fp6(t1, a[1]);
#ifdef mul_by_v_fp6
mul_by_v_fp6(t1, t1);
sub_fp6(t0, t0, t1);
#else
mul_by_u_plus_1_fp2(t1[2], t1[2]);
sub_fp2(t0[0], t0[0], t1[2]);
sub_fp2(t0[1], t0[1], t1[0]);
sub_fp2(t0[2], t0[2], t1[1]);
#endif
inverse_fp6(t1, t0);
mul_fp6(ret[0], a[0], t1);
mul_fp6(ret[1], a[1], t1);
neg_fp6(ret[1], ret[1]);
} | O0 | c | inverse_fp12:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x130(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x38b50
leaq -0x250(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
callq 0x38b50
leaq -0x250(%rbp), %rdi
addq $0xc0, %rdi
leaq -0x250(%rbp), %rsi
addq $0xc0, %rsi
callq 0x38180
leaq -0x130(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0x250(%rbp), %rdx
addq $0xc0, %rdx
callq 0x31070
leaq -0x130(%rbp), %rdi
addq $0x60, %rdi
leaq -0x130(%rbp), %rsi
addq $0x60, %rsi
leaq -0x250(%rbp), %rdx
callq 0x31070
leaq -0x130(%rbp), %rdi
addq $0xc0, %rdi
leaq -0x130(%rbp), %rsi
addq $0xc0, %rsi
leaq -0x250(%rbp), %rdx
addq $0x60, %rdx
callq 0x31070
leaq -0x250(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x38d60
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x250(%rbp), %rdx
callq 0x381b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
movq -0x10(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
leaq -0x250(%rbp), %rdx
callq 0x381b0
movq -0x8(%rbp), %rdi
addq $0x120, %rdi # imm = 0x120
movq -0x8(%rbp), %rsi
addq $0x120, %rsi # imm = 0x120
callq 0x38ae0
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
nopw (%rax,%rax)
| inverse_fp12:
push rbp
mov rbp, rsp
sub rsp, 250h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_130]
mov rsi, [rbp+var_10]
call sqr_fp6
lea rdi, [rbp+var_250]
mov rsi, [rbp+var_10]
add rsi, 120h
call sqr_fp6
lea rdi, [rbp+var_250]
add rdi, 0C0h
lea rsi, [rbp+var_250]
add rsi, 0C0h
call mul_by_u_plus_1_fp2
lea rdi, [rbp+var_130]
lea rsi, [rbp+var_130]
lea rdx, [rbp+var_250]
add rdx, 0C0h
call _sub_fp2
lea rdi, [rbp+var_130]
add rdi, 60h ; '`'
lea rsi, [rbp+var_130]
add rsi, 60h ; '`'
lea rdx, [rbp+var_250]
call _sub_fp2
lea rdi, [rbp+var_130]
add rdi, 0C0h
lea rsi, [rbp+var_130]
add rsi, 0C0h
lea rdx, [rbp+var_250]
add rdx, 60h ; '`'
call _sub_fp2
lea rdi, [rbp+var_250]
lea rsi, [rbp+var_130]
call inverse_fp6
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_250]
call mul_fp6
mov rdi, [rbp+var_8]
add rdi, 120h
mov rsi, [rbp+var_10]
add rsi, 120h
lea rdx, [rbp+var_250]
call mul_fp6
mov rdi, [rbp+var_8]
add rdi, 120h
mov rsi, [rbp+var_8]
add rsi, 120h
call neg_fp6
add rsp, 250h
pop rbp
retn
| long long inverse_fp12(long long a1, long long a2)
{
_BYTE v3[96]; // [rsp+0h] [rbp-250h] BYREF
long long v4; // [rsp+60h] [rbp-1F0h] BYREF
_BYTE v5[96]; // [rsp+C0h] [rbp-190h] BYREF
_BYTE v6[96]; // [rsp+120h] [rbp-130h] BYREF
_BYTE v7[96]; // [rsp+180h] [rbp-D0h] BYREF
_BYTE v8[96]; // [rsp+1E0h] [rbp-70h] BYREF
long long v9; // [rsp+240h] [rbp-10h]
long long v10; // [rsp+248h] [rbp-8h]
v10 = a1;
v9 = a2;
sqr_fp6(v6, a2);
sqr_fp6(v3, v9 + 288);
mul_by_u_plus_1_fp2(v5, v5);
sub_fp2(v6, v6, v5);
sub_fp2(v7, v7, v3);
sub_fp2(v8, v8, &v4);
inverse_fp6(v3, v6);
mul_fp6(v10, v9, v3);
mul_fp6(v10 + 288, v9 + 288, v3);
return neg_fp6(v10 + 288, v10 + 288);
}
| inverse_fp12:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x130]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00138b50
LEA RDI,[RBP + -0x250]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x120
CALL 0x00138b50
LEA RDI,[RBP + -0x250]
ADD RDI,0xc0
LEA RSI,[RBP + -0x250]
ADD RSI,0xc0
CALL 0x00138180
LEA RDI,[RBP + -0x130]
LEA RSI,[RBP + -0x130]
LEA RDX,[RBP + -0x250]
ADD RDX,0xc0
CALL 0x00131070
LEA RDI,[RBP + -0x130]
ADD RDI,0x60
LEA RSI,[RBP + -0x130]
ADD RSI,0x60
LEA RDX,[RBP + -0x250]
CALL 0x00131070
LEA RDI,[RBP + -0x130]
ADD RDI,0xc0
LEA RSI,[RBP + -0x130]
ADD RSI,0xc0
LEA RDX,[RBP + -0x250]
ADD RDX,0x60
CALL 0x00131070
LEA RDI,[RBP + -0x250]
LEA RSI,[RBP + -0x130]
CALL 0x00138d60
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x250]
CALL 0x001381b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x120
LEA RDX,[RBP + -0x250]
CALL 0x001381b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x120
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x120
CALL 0x00138ae0
ADD RSP,0x250
POP RBP
RET
|
void inverse_fp12(long param_1,long param_2)
{
int1 local_258 [96];
int1 auStack_1f8 [96];
int1 auStack_198 [96];
int1 local_138 [96];
int1 auStack_d8 [96];
int1 auStack_78 [96];
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
sqr_fp6(local_138,param_2);
sqr_fp6(local_258,local_18 + 0x120);
mul_by_u_plus_1_fp2(auStack_198,auStack_198);
sub_fp2(local_138,local_138,auStack_198);
sub_fp2(auStack_d8,auStack_d8,local_258);
sub_fp2(auStack_78,auStack_78,auStack_1f8);
inverse_fp6(local_258,local_138);
mul_fp6(local_10,local_18,local_258);
mul_fp6(local_10 + 0x120,local_18 + 0x120,local_258);
neg_fp6(local_10 + 0x120,local_10 + 0x120);
return;
}
|
|
450 | init_state_maps | eloqsql/mysys/charset.c | static my_bool init_state_maps(struct charset_info_st *cs)
{
uint i;
uchar *state_map;
uchar *ident_map;
if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME))))
return 1;
cs->ident_map= ident_map= state_map + 256;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
if (my_isalpha(cs,i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isdigit(cs,i))
state_map[i]=(uchar) MY_LEX_NUMBER_IDENT;
else if (is_multi_byte_ident(cs, i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;
}
state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT;
state_map[(uchar)'\'']=(uchar) MY_LEX_STRING;
state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT;
state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP;
state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP;
state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL;
state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT;
state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON;
state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR;
state_map[0]=(uchar) MY_LEX_EOL;
state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE;
state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT;
state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT;
state_map[(uchar)'@']= (uchar) MY_LEX_USER_END;
state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER;
state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER;
state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT;
state_map[(uchar)',']= (uchar) MY_LEX_COMMA;
state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER;
/*
Create a second map to make it faster to find identifiers
*/
for (i=0; i < 256 ; i++)
{
ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT ||
state_map[i] == MY_LEX_NUMBER_IDENT);
}
/* Special handling of hex and binary strings */
state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN;
state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
return 0;
} | O3 | c | init_state_maps:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x200, %edi # imm = 0x200
movl $0x10, %esi
callq 0x5d444
movq %rax, 0x80(%r14)
testq %rax, %rax
je 0x51622
movq %rax, %rbx
movq %rax, %r13
addq $0x100, %r13 # imm = 0x100
movq %r13, 0x88(%r14)
xorl %r15d, %r15d
leaq -0x29(%rbp), %r12
movq 0x40(%r14), %rax
movzbl 0x1(%rax,%r15), %eax
testb $0x3, %al
je 0x5152e
movb $0x2, (%rbx,%r15)
jmp 0x5156d
testb $0x4, %al
jne 0x51568
movb %r15b, -0x29(%rbp)
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r12, %rsi
leaq -0x28(%rbp), %rdx
callq *0xc0(%rax)
addl $0x64, %eax
cmpl $-0x6, %eax
jae 0x51527
movq 0x40(%r14), %rax
testb $0x8, 0x1(%rax,%r15)
jne 0x5157b
movb $0x1, (%rbx,%r15)
jmp 0x5156d
movb $0xe, (%rbx,%r15)
incq %r15
cmpq $0x100, %r15 # imm = 0x100
jne 0x51519
jmp 0x51582
movb $0x1a, (%rbx,%r15)
jmp 0x5156d
movw $0x1b02, 0x5f(%rbx) # imm = 0x1B02
movb $0x8, 0x3e(%rbx)
movb $0x11, 0x7c(%rbx)
movw $0xa11, 0x26(%rbx) # imm = 0xA11
movl $0x8091617, 0x3a(%rbx) # imm = 0x8091617
movb $0x12, (%rbx)
movb $0x13, 0x5c(%rbx)
movb $0x15, 0x2a(%rbx)
movl $0x20b2108, 0x21(%rbx) # imm = 0x20B2108
movl $0x14102224, 0x2c(%rbx) # imm = 0x14102224
movw $0x1823, 0x3f(%rbx) # imm = 0x1823
movq $-0x100, %rax
movdqa 0x42c05(%rip), %xmm0 # 0x941d0
movdqa 0x42c0d(%rip), %xmm1 # 0x941e0
movdqa 0x42c15(%rip), %xmm2 # 0x941f0
movdqu (%r13,%rax), %xmm3
movdqa %xmm3, %xmm4
pcmpeqb %xmm0, %xmm4
pcmpeqb %xmm1, %xmm3
por %xmm4, %xmm3
pand %xmm2, %xmm3
movdqu %xmm3, 0x100(%r13,%rax)
addq $0x10, %rax
jne 0x515db
movb $0x1e, %al
movb %al, 0x58(%rbx)
movb %al, 0x78(%rbx)
movb $0x1f, %al
movb %al, 0x42(%rbx)
movb %al, 0x62(%rbx)
movb $0x20, %al
movb %al, 0x4e(%rbx)
movb %al, 0x6e(%rbx)
xorl %eax, %eax
jmp 0x51624
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| init_state_maps:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov edi, 200h
mov esi, 10h
call my_once_alloc
mov [r14+80h], rax
test rax, rax
jz loc_51622
mov rbx, rax
mov r13, rax
add r13, 100h
mov [r14+88h], r13
xor r15d, r15d
lea r12, [rbp+var_29]
loc_51519:
mov rax, [r14+40h]
movzx eax, byte ptr [rax+r15+1]
test al, 3
jz short loc_5152E
loc_51527:
mov byte ptr [rbx+r15], 2
jmp short loc_5156D
loc_5152E:
test al, 4
jnz short loc_51568
mov [rbp+var_29], r15b
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r12
lea rdx, [rbp+var_28]
call qword ptr [rax+0C0h]
add eax, 64h ; 'd'
cmp eax, 0FFFFFFFAh
jnb short loc_51527
mov rax, [r14+40h]
test byte ptr [rax+r15+1], 8
jnz short loc_5157B
mov byte ptr [rbx+r15], 1
jmp short loc_5156D
loc_51568:
mov byte ptr [rbx+r15], 0Eh
loc_5156D:
inc r15
cmp r15, 100h
jnz short loc_51519
jmp short loc_51582
loc_5157B:
mov byte ptr [rbx+r15], 1Ah
jmp short loc_5156D
loc_51582:
mov word ptr [rbx+5Fh], 1B02h
mov byte ptr [rbx+3Eh], 8
mov byte ptr [rbx+7Ch], 11h
mov word ptr [rbx+26h], 0A11h
mov dword ptr [rbx+3Ah], 8091617h
mov byte ptr [rbx], 12h
mov byte ptr [rbx+5Ch], 13h
mov byte ptr [rbx+2Ah], 15h
mov dword ptr [rbx+21h], 20B2108h
mov dword ptr [rbx+2Ch], 14102224h
mov word ptr [rbx+3Fh], 1823h
mov rax, 0FFFFFFFFFFFFFF00h
movdqa xmm0, cs:xmmword_941D0
movdqa xmm1, cs:xmmword_941E0
movdqa xmm2, cs:xmmword_941F0
loc_515DB:
movdqu xmm3, xmmword ptr [r13+rax+0]
movdqa xmm4, xmm3
pcmpeqb xmm4, xmm0
pcmpeqb xmm3, xmm1
por xmm3, xmm4
pand xmm3, xmm2
movdqu xmmword ptr [r13+rax+100h], xmm3
add rax, 10h
jnz short loc_515DB
mov al, 1Eh
mov [rbx+58h], al
mov [rbx+78h], al
mov al, 1Fh
mov [rbx+42h], al
mov [rbx+62h], al
mov al, 20h ; ' '
mov [rbx+4Eh], al
mov [rbx+6Eh], al
xor eax, eax
jmp short loc_51624
loc_51622:
mov al, 1
loc_51624:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long init_state_maps(_QWORD *a1)
{
long long v1; // rax
long long v2; // rax
long long v3; // rbx
long long v4; // r13
long long i; // r15
char v6; // al
long long v7; // rax
__m128i si128; // xmm0
__m128i v9; // xmm1
__m128i v10; // xmm2
__m128i v11; // xmm3
char v13; // [rsp+1h] [rbp-29h] BYREF
_BYTE v14[40]; // [rsp+2h] [rbp-28h] BYREF
v13 = HIBYTE(v1);
v2 = my_once_alloc(512LL, 16LL);
a1[16] = v2;
if ( !v2 )
return 1LL;
v3 = v2;
v4 = v2 + 256;
a1[17] = v2 + 256;
for ( i = 0LL; i != 256; ++i )
{
v6 = *(_BYTE *)(a1[8] + i + 1);
if ( (v6 & 3) != 0 )
{
LABEL_4:
*(_BYTE *)(v3 + i) = 2;
continue;
}
if ( (v6 & 4) != 0 )
{
*(_BYTE *)(v3 + i) = 14;
}
else
{
v13 = i;
if ( (*(unsigned int ( **)(_QWORD *, char *, _BYTE *))(a1[23] + 192LL))(a1, &v13, v14) + 100 >= 0xFFFFFFFA )
goto LABEL_4;
if ( (*(_BYTE *)(a1[8] + i + 1) & 8) != 0 )
*(_BYTE *)(v3 + i) = 26;
else
*(_BYTE *)(v3 + i) = 1;
}
}
*(_WORD *)(v3 + 95) = 6914;
*(_BYTE *)(v3 + 62) = 8;
*(_BYTE *)(v3 + 124) = 17;
*(_WORD *)(v3 + 38) = 2577;
*(_DWORD *)(v3 + 58) = 134813207;
*(_BYTE *)v3 = 18;
*(_BYTE *)(v3 + 92) = 19;
*(_BYTE *)(v3 + 42) = 21;
*(_DWORD *)(v3 + 33) = 34283784;
*(_DWORD *)(v3 + 44) = 336601636;
*(_WORD *)(v3 + 63) = 6179;
v7 = -256LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_941D0);
v9 = _mm_load_si128((const __m128i *)&xmmword_941E0);
v10 = _mm_load_si128((const __m128i *)&xmmword_941F0);
do
{
v11 = _mm_loadu_si128((const __m128i *)(v4 + v7));
*(__m128i *)(v4 + v7 + 256) = _mm_and_si128(_mm_or_si128(_mm_cmpeq_epi8(v11, v9), _mm_cmpeq_epi8(v11, si128)), v10);
v7 += 16LL;
}
while ( v7 );
*(_BYTE *)(v3 + 88) = 30;
*(_BYTE *)(v3 + 120) = 30;
*(_BYTE *)(v3 + 66) = 31;
*(_BYTE *)(v3 + 98) = 31;
*(_BYTE *)(v3 + 78) = 32;
*(_BYTE *)(v3 + 110) = 32;
return 0LL;
}
| init_state_maps:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV EDI,0x200
MOV ESI,0x10
CALL 0x0015d444
MOV qword ptr [R14 + 0x80],RAX
TEST RAX,RAX
JZ 0x00151622
MOV RBX,RAX
MOV R13,RAX
ADD R13,0x100
MOV qword ptr [R14 + 0x88],R13
XOR R15D,R15D
LEA R12,[RBP + -0x29]
LAB_00151519:
MOV RAX,qword ptr [R14 + 0x40]
MOVZX EAX,byte ptr [RAX + R15*0x1 + 0x1]
TEST AL,0x3
JZ 0x0015152e
LAB_00151527:
MOV byte ptr [RBX + R15*0x1],0x2
JMP 0x0015156d
LAB_0015152e:
TEST AL,0x4
JNZ 0x00151568
MOV byte ptr [RBP + -0x29],R15B
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R12
LEA RDX,[RBP + -0x28]
CALL qword ptr [RAX + 0xc0]
ADD EAX,0x64
CMP EAX,-0x6
JNC 0x00151527
MOV RAX,qword ptr [R14 + 0x40]
TEST byte ptr [RAX + R15*0x1 + 0x1],0x8
JNZ 0x0015157b
MOV byte ptr [RBX + R15*0x1],0x1
JMP 0x0015156d
LAB_00151568:
MOV byte ptr [RBX + R15*0x1],0xe
LAB_0015156d:
INC R15
CMP R15,0x100
JNZ 0x00151519
JMP 0x00151582
LAB_0015157b:
MOV byte ptr [RBX + R15*0x1],0x1a
JMP 0x0015156d
LAB_00151582:
MOV word ptr [RBX + 0x5f],0x1b02
MOV byte ptr [RBX + 0x3e],0x8
MOV byte ptr [RBX + 0x7c],0x11
MOV word ptr [RBX + 0x26],0xa11
MOV dword ptr [RBX + 0x3a],0x8091617
MOV byte ptr [RBX],0x12
MOV byte ptr [RBX + 0x5c],0x13
MOV byte ptr [RBX + 0x2a],0x15
MOV dword ptr [RBX + 0x21],0x20b2108
MOV dword ptr [RBX + 0x2c],0x14102224
MOV word ptr [RBX + 0x3f],0x1823
MOV RAX,-0x100
MOVDQA XMM0,xmmword ptr [0x001941d0]
MOVDQA XMM1,xmmword ptr [0x001941e0]
MOVDQA XMM2,xmmword ptr [0x001941f0]
LAB_001515db:
MOVDQU XMM3,xmmword ptr [R13 + RAX*0x1]
MOVDQA XMM4,XMM3
PCMPEQB XMM4,XMM0
PCMPEQB XMM3,XMM1
POR XMM3,XMM4
PAND XMM3,XMM2
MOVDQU xmmword ptr [R13 + RAX*0x1 + 0x100],XMM3
ADD RAX,0x10
JNZ 0x001515db
MOV AL,0x1e
MOV byte ptr [RBX + 0x58],AL
MOV byte ptr [RBX + 0x78],AL
MOV AL,0x1f
MOV byte ptr [RBX + 0x42],AL
MOV byte ptr [RBX + 0x62],AL
MOV AL,0x20
MOV byte ptr [RBX + 0x4e],AL
MOV byte ptr [RBX + 0x6e],AL
XOR EAX,EAX
JMP 0x00151624
LAB_00151622:
MOV AL,0x1
LAB_00151624:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 init_state_maps(long param_1)
{
char *pcVar1;
byte *pbVar2;
byte bVar3;
char cVar4;
char cVar5;
char cVar6;
char cVar7;
char cVar8;
char cVar9;
char cVar10;
char cVar11;
char cVar12;
char cVar13;
char cVar14;
char cVar15;
char cVar16;
char cVar17;
char cVar18;
char cVar19;
char cVar20;
char cVar21;
char cVar22;
char cVar23;
char cVar24;
char cVar25;
char cVar26;
char cVar27;
char cVar28;
char cVar29;
char cVar30;
char cVar31;
char cVar32;
char cVar33;
char cVar34;
char cVar35;
char cVar36;
char cVar37;
char cVar38;
char cVar39;
char cVar40;
char cVar41;
char cVar42;
char cVar43;
char cVar44;
char cVar45;
char cVar46;
char cVar47;
char cVar48;
char cVar49;
char cVar50;
byte bVar51;
byte bVar52;
byte bVar53;
byte bVar54;
byte bVar55;
byte bVar56;
byte bVar57;
byte bVar58;
byte bVar59;
byte bVar60;
byte bVar61;
byte bVar62;
byte bVar63;
byte bVar64;
byte bVar65;
int iVar66;
int8 in_RAX;
int1 *puVar67;
int8 uVar68;
long lVar69;
int8 uStack_38;
uStack_38 = in_RAX;
puVar67 = (int1 *)my_once_alloc(0x200,0x10);
*(int1 **)(param_1 + 0x80) = puVar67;
if (puVar67 == (int1 *)0x0) {
uVar68 = 1;
}
else {
*(int1 **)(param_1 + 0x88) = puVar67 + 0x100;
lVar69 = 0;
do {
bVar3 = *(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69);
if ((bVar3 & 3) == 0) {
if ((bVar3 & 4) == 0) {
uStack_38 = CONCAT17((char)lVar69,(int7)uStack_38);
iVar66 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,(long)&uStack_38 + 7,&stack0xffffffffffffffd0);
if (0xfffffff9 < iVar66 + 100U) goto LAB_00151527;
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69) & 8) == 0) {
puVar67[lVar69] = 1;
}
else {
puVar67[lVar69] = 0x1a;
}
}
else {
puVar67[lVar69] = 0xe;
}
}
else {
LAB_00151527:
puVar67[lVar69] = 2;
}
lVar69 = lVar69 + 1;
} while (lVar69 != 0x100);
*(int2 *)(puVar67 + 0x5f) = 0x1b02;
puVar67[0x3e] = 8;
puVar67[0x7c] = 0x11;
*(int2 *)(puVar67 + 0x26) = 0xa11;
*(int4 *)(puVar67 + 0x3a) = 0x8091617;
*puVar67 = 0x12;
puVar67[0x5c] = 0x13;
puVar67[0x2a] = 0x15;
*(int4 *)(puVar67 + 0x21) = 0x20b2108;
*(int4 *)(puVar67 + 0x2c) = 0x14102224;
*(int2 *)(puVar67 + 0x3f) = 0x1823;
bVar65 = UNK_001941ff;
bVar64 = UNK_001941fe;
bVar63 = UNK_001941fd;
bVar62 = UNK_001941fc;
bVar61 = UNK_001941fb;
bVar60 = UNK_001941fa;
bVar59 = UNK_001941f9;
bVar58 = UNK_001941f8;
bVar57 = UNK_001941f7;
bVar56 = UNK_001941f6;
bVar55 = UNK_001941f5;
bVar54 = UNK_001941f4;
bVar53 = UNK_001941f3;
bVar52 = UNK_001941f2;
bVar51 = UNK_001941f1;
bVar3 = DAT_001941f0;
cVar50 = UNK_001941ef;
cVar49 = UNK_001941ee;
cVar48 = UNK_001941ed;
cVar47 = UNK_001941ec;
cVar46 = UNK_001941eb;
cVar45 = UNK_001941ea;
cVar44 = UNK_001941e9;
cVar43 = UNK_001941e8;
cVar42 = UNK_001941e7;
cVar41 = UNK_001941e6;
cVar40 = UNK_001941e5;
cVar39 = UNK_001941e4;
cVar38 = UNK_001941e3;
cVar37 = UNK_001941e2;
cVar36 = UNK_001941e1;
cVar35 = DAT_001941e0;
cVar34 = UNK_001941df;
cVar33 = UNK_001941de;
cVar32 = UNK_001941dd;
cVar31 = UNK_001941dc;
cVar30 = UNK_001941db;
cVar29 = UNK_001941da;
cVar28 = UNK_001941d9;
cVar27 = UNK_001941d8;
cVar26 = UNK_001941d7;
cVar25 = UNK_001941d6;
cVar24 = UNK_001941d5;
cVar23 = UNK_001941d4;
cVar22 = UNK_001941d3;
cVar21 = UNK_001941d2;
cVar20 = UNK_001941d1;
cVar19 = DAT_001941d0;
lVar69 = -0x100;
do {
pcVar1 = puVar67 + 0x100 + lVar69;
cVar4 = pcVar1[1];
cVar5 = pcVar1[2];
cVar6 = pcVar1[3];
cVar7 = pcVar1[4];
cVar8 = pcVar1[5];
cVar9 = pcVar1[6];
cVar10 = pcVar1[7];
cVar11 = pcVar1[8];
cVar12 = pcVar1[9];
cVar13 = pcVar1[10];
cVar14 = pcVar1[0xb];
cVar15 = pcVar1[0xc];
cVar16 = pcVar1[0xd];
cVar17 = pcVar1[0xe];
cVar18 = pcVar1[0xf];
pbVar2 = puVar67 + lVar69 + 0x200;
*pbVar2 = (-(*pcVar1 == cVar35) | -(*pcVar1 == cVar19)) & bVar3;
pbVar2[1] = (-(cVar4 == cVar36) | -(cVar4 == cVar20)) & bVar51;
pbVar2[2] = (-(cVar5 == cVar37) | -(cVar5 == cVar21)) & bVar52;
pbVar2[3] = (-(cVar6 == cVar38) | -(cVar6 == cVar22)) & bVar53;
pbVar2[4] = (-(cVar7 == cVar39) | -(cVar7 == cVar23)) & bVar54;
pbVar2[5] = (-(cVar8 == cVar40) | -(cVar8 == cVar24)) & bVar55;
pbVar2[6] = (-(cVar9 == cVar41) | -(cVar9 == cVar25)) & bVar56;
pbVar2[7] = (-(cVar10 == cVar42) | -(cVar10 == cVar26)) & bVar57;
pbVar2[8] = (-(cVar11 == cVar43) | -(cVar11 == cVar27)) & bVar58;
pbVar2[9] = (-(cVar12 == cVar44) | -(cVar12 == cVar28)) & bVar59;
pbVar2[10] = (-(cVar13 == cVar45) | -(cVar13 == cVar29)) & bVar60;
pbVar2[0xb] = (-(cVar14 == cVar46) | -(cVar14 == cVar30)) & bVar61;
pbVar2[0xc] = (-(cVar15 == cVar47) | -(cVar15 == cVar31)) & bVar62;
pbVar2[0xd] = (-(cVar16 == cVar48) | -(cVar16 == cVar32)) & bVar63;
pbVar2[0xe] = (-(cVar17 == cVar49) | -(cVar17 == cVar33)) & bVar64;
pbVar2[0xf] = (-(cVar18 == cVar50) | -(cVar18 == cVar34)) & bVar65;
lVar69 = lVar69 + 0x10;
} while (lVar69 != 0);
puVar67[0x58] = 0x1e;
puVar67[0x78] = 0x1e;
puVar67[0x42] = 0x1f;
puVar67[0x62] = 0x1f;
puVar67[0x4e] = 0x20;
puVar67[0x6e] = 0x20;
uVar68 = 0;
}
return uVar68;
}
|
|
451 | mysql_derived_merge_for_insert(THD*, LEX*, TABLE_LIST*) | eloqsql/sql/sql_derived.cc | static
bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived)
{
DBUG_ENTER("mysql_derived_merge_for_insert");
DBUG_PRINT("enter", ("Alias: '%s' Unit: %p",
(derived->alias.str ? derived->alias.str : "<NULL>"),
derived->get_unit()));
DBUG_PRINT("info", ("merged_for_insert: %d is_materialized_derived: %d "
"is_multitable: %d single_table_updatable: %d "
"merge_underlying_list: %d",
derived->merged_for_insert,
derived->is_materialized_derived(),
derived->is_multitable(),
derived->single_table_updatable(),
derived->merge_underlying_list != 0));
if (derived->merged_for_insert)
DBUG_RETURN(FALSE);
if (derived->init_derived(thd, FALSE))
DBUG_RETURN(TRUE);
if (derived->is_materialized_derived())
DBUG_RETURN(mysql_derived_prepare(thd, lex, derived));
if ((thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
thd->lex->sql_command == SQLCOM_DELETE_MULTI))
DBUG_RETURN(FALSE);
if (!derived->is_multitable())
{
if (!derived->single_table_updatable())
DBUG_RETURN(derived->create_field_translation(thd));
if (derived->merge_underlying_list)
{
derived->table= derived->merge_underlying_list->table;
derived->schema_table= derived->merge_underlying_list->schema_table;
derived->merged_for_insert= TRUE;
DBUG_ASSERT(derived->table);
}
}
DBUG_RETURN(FALSE);
} | O0 | cpp | mysql_derived_merge_for_insert(THD*, LEX*, TABLE_LIST*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x568be6
jmp 0x568be8
jmp 0x568bea
movq -0x20(%rbp), %rax
testb $0x1, 0x3c8(%rax)
je 0x568c02
jmp 0x568bf9
movb $0x0, -0x1(%rbp)
jmp 0x568d04
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x6dd8a0
testb $0x1, %al
jne 0x568c17
jmp 0x568c22
jmp 0x568c19
movb $0x1, -0x1(%rbp)
jmp 0x568d04
movq -0x20(%rbp), %rdi
callq 0x56a990
testb $0x1, %al
jne 0x568c31
jmp 0x568c4e
jmp 0x568c33
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x566ce0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x568d04
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x48, 0x8(%rax)
je 0x568c6a
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x47, 0x8(%rax)
jne 0x568c75
jmp 0x568c6c
movb $0x0, -0x1(%rbp)
jmp 0x568d04
movq -0x20(%rbp), %rdi
callq 0x530bf0
testb $0x1, %al
jne 0x568cfe
movq -0x20(%rbp), %rdi
callq 0x6d7210
testb $0x1, %al
jne 0x568ca5
jmp 0x568c91
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6d68c0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x568d04
movq -0x20(%rbp), %rax
cmpq $0x0, 0x1b8(%rax)
je 0x568cfc
movq -0x20(%rbp), %rax
movq 0x1b8(%rax), %rax
movq 0x100(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x100(%rax)
movq -0x20(%rbp), %rax
movq 0x1b8(%rax), %rax
movq 0x170(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x170(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x3c8(%rax)
jmp 0x568cfa
jmp 0x568cfc
jmp 0x568cfe
jmp 0x568d00
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZL30mysql_derived_merge_for_insertP3THDP3LEXP10TABLE_LIST:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_568BE6:
jmp short $+2
loc_568BE8:
jmp short $+2
loc_568BEA:
mov rax, [rbp+var_20]
test byte ptr [rax+3C8h], 1
jz short loc_568C02
jmp short $+2
loc_568BF9:
mov [rbp+var_1], 0
jmp loc_568D04
loc_568C02:
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_10]; THD *
xor edx, edx; bool
call _ZN10TABLE_LIST12init_derivedEP3THDb; TABLE_LIST::init_derived(THD *,bool)
test al, 1
jnz short loc_568C17
jmp short loc_568C22
loc_568C17:
jmp short $+2
loc_568C19:
mov [rbp+var_1], 1
jmp loc_568D04
loc_568C22:
mov rdi, [rbp+var_20]; this
call _ZNK10TABLE_LIST23is_materialized_derivedEv; TABLE_LIST::is_materialized_derived(void)
test al, 1
jnz short loc_568C31
jmp short loc_568C4E
loc_568C31:
jmp short $+2
loc_568C33:
mov rdi, [rbp+var_10]; THD *
mov rsi, [rbp+var_18]; LEX *
mov rdx, [rbp+var_20]; TABLE_LIST *
call _ZL21mysql_derived_prepareP3THDP3LEXP10TABLE_LIST; mysql_derived_prepare(THD *,LEX *,TABLE_LIST *)
and al, 1
mov [rbp+var_1], al
jmp loc_568D04
loc_568C4E:
mov rax, [rbp+var_10]
mov rax, [rax+58h]
cmp dword ptr [rax+8], 48h ; 'H'
jz short loc_568C6A
mov rax, [rbp+var_10]
mov rax, [rax+58h]
cmp dword ptr [rax+8], 47h ; 'G'
jnz short loc_568C75
loc_568C6A:
jmp short $+2
loc_568C6C:
mov [rbp+var_1], 0
jmp loc_568D04
loc_568C75:
mov rdi, [rbp+var_20]; this
call _ZNK10TABLE_LIST13is_multitableEv; TABLE_LIST::is_multitable(void)
test al, 1
jnz short loc_568CFE
mov rdi, [rbp+var_20]; this
call _ZN10TABLE_LIST22single_table_updatableEv; TABLE_LIST::single_table_updatable(void)
test al, 1
jnz short loc_568CA5
jmp short $+2
loc_568C91:
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_10]; THD *
call _ZN10TABLE_LIST24create_field_translationEP3THD; TABLE_LIST::create_field_translation(THD *)
and al, 1
mov [rbp+var_1], al
jmp short loc_568D04
loc_568CA5:
mov rax, [rbp+var_20]
cmp qword ptr [rax+1B8h], 0
jz short loc_568CFC
mov rax, [rbp+var_20]
mov rax, [rax+1B8h]
mov rcx, [rax+100h]
mov rax, [rbp+var_20]
mov [rax+100h], rcx
mov rax, [rbp+var_20]
mov rax, [rax+1B8h]
mov rcx, [rax+170h]
mov rax, [rbp+var_20]
mov [rax+170h], rcx
mov rax, [rbp+var_20]
mov byte ptr [rax+3C8h], 1
jmp short $+2
loc_568CFA:
jmp short $+2
loc_568CFC:
jmp short $+2
loc_568CFE:
jmp short $+2
loc_568D00:
mov [rbp+var_1], 0
loc_568D04:
mov al, [rbp+var_1]
and al, 1
add rsp, 20h
pop rbp
retn
| char mysql_derived_merge_for_insert(THD *a1, LEX *a2, TABLE_LIST *a3)
{
if ( (*((_BYTE *)a3 + 968) & 1) != 0 )
return 0;
if ( (TABLE_LIST::init_derived(a3, a1, 0) & 1) != 0 )
return 1;
if ( (TABLE_LIST::is_materialized_derived(a3) & 1) != 0 )
return mysql_derived_prepare(a1, a2, a3) & 1;
if ( *(_DWORD *)(*((_QWORD *)a1 + 11) + 8LL) != 72 && *(_DWORD *)(*((_QWORD *)a1 + 11) + 8LL) != 71 )
{
if ( !TABLE_LIST::is_multitable(a3) )
{
if ( (TABLE_LIST::single_table_updatable(a3) & 1) == 0 )
return TABLE_LIST::create_field_translation(a3, a1) & 1;
if ( *((_QWORD *)a3 + 55) )
{
*((_QWORD *)a3 + 32) = *(_QWORD *)(*((_QWORD *)a3 + 55) + 256LL);
*((_QWORD *)a3 + 46) = *(_QWORD *)(*((_QWORD *)a3 + 55) + 368LL);
*((_BYTE *)a3 + 968) = 1;
}
}
return 0;
}
return 0;
}
| __cxx_global_var_init.1483:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
LEA RDI,[RBP + -0x8]
MOV ESI,0x2
XOR EDX,EDX
CALL 0x00835b10
MOV R10,qword ptr [RBP + -0x8]
LEA RDI,[0x16eea78]
LEA RSI,[0xea4605]
LEA RDX,[0xea4616]
MOV ECX,0x1
MOV R8D,0x278
MOV R9D,0x8
LEA RAX,[0x14eff10]
XOR R11D,R11D
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x10],0x2
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x0
CALL 0x00836e30
LEA RDI,[0x836f00]
LEA RSI,[0x16eea78]
LEA RDX,[0x14cf008]
CALL 0x005346c0
ADD RSP,0x50
POP RBP
RET
|
void __cxx_global_var_init_1483(void)
{
int8 local_10;
CMD_LINE::CMD_LINE((CMD_LINE *)&local_10,2,0);
Sys_var_on_access<Sys_var_enum,(privilege_t)68719509504,(privilege_t)68719509504>::Sys_var_enum
((Sys_var_on_access<Sys_var_enum,(privilege_t)68719509504,(privilege_t)68719509504> *)
Sys_binlog_row_image,"binlog_row_image",
"Controls whether rows should be logged in \'FULL\', \'NOBLOB\' or \'MINIMAL\' formats. \'FULL\', means that all columns in the before and after image are logged. \'NOBLOB\', means that mysqld avoids logging blob columns whenever possible (eg, blob column was not changed or is not part of primary key). \'MINIMAL\', means that a PK equivalent (PK columns or full row if there is no PK in the table) is logged in the before image, and only changed columns are logged in the after image. (Default: FULL)."
,1,0x278,8,local_10,binlog_row_image_names,2,0,0,0,0,0);
__cxa_atexit(Sys_var_on_access<Sys_var_enum,(privilege_t)68719509504,(privilege_t)68719509504>::
~Sys_var_on_access,Sys_binlog_row_image,&__dso_handle);
return;
}
|
|
452 | blst_pairing_raw_aggregate | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/aggregate.c | void blst_pairing_raw_aggregate(PAIRING *ctx, const POINTonE2_affine *q,
const POINTonE1_affine *p)
{
unsigned int n;
if (vec_is_zero(q, sizeof(*q)) & vec_is_zero(p, sizeof(*p)))
return;
n = ctx->nelems;
vec_copy(ctx->Q + n, q, sizeof(*q));
vec_copy(ctx->P + n, p, sizeof(*p));
if (++n == N_MAX) {
if (ctx->ctrl & AGGR_GT_SET) {
vec384fp12 GT;
miller_loop_n(GT, ctx->Q, ctx->P, n);
mul_fp12(ctx->GT, ctx->GT, GT);
} else {
miller_loop_n(ctx->GT, ctx->Q, ctx->P, n);
ctx->ctrl |= AGGR_GT_SET;
}
n = 0;
}
ctx->nelems = n;
} | O3 | c | blst_pairing_raw_aggregate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp # imm = 0x248
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0xc0, %esi
movq %r15, %rdi
callq 0x2ff40
movq %rax, %r12
movl $0x60, %esi
movq %r14, %rdi
callq 0x2ff40
testq %r12, %rax
jne 0x215ea
movl 0x4(%rbx), %r12d
leaq (%r12,%r12,2), %r13
movq %r13, %rax
shlq $0x6, %rax
leaq (%rbx,%rax), %rdi
addq $0x378, %rdi # imm = 0x378
movl $0xc0, %edx
movq %r15, %rsi
callq 0x5060
shlq $0x5, %r13
leaq (%rbx,%r13), %rdi
addq $0x978, %rdi # imm = 0x978
movl $0xc, %ecx
movq %r14, %rsi
rep movsq (%rsi), %es:(%rdi)
leal 0x1(%r12), %eax
cmpl $0x8, %eax
jne 0x215e7
leaq 0x378(%rbx), %rsi
leaq 0x978(%rbx), %rdx
testb $0x20, (%rbx)
jne 0x215c2
leaq 0x18(%rbx), %rdi
movl $0x8, %ecx
callq 0x1fbe1
orb $0x20, (%rbx)
jmp 0x215e5
leaq -0x270(%rbp), %r14
movl $0x8, %ecx
movq %r14, %rdi
callq 0x1fbe1
leaq 0x18(%rbx), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x1ee00
xorl %eax, %eax
movl %eax, 0x4(%rbx)
addq $0x248, %rsp # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_pairing_raw_aggregate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 248h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, 0C0h
mov rdi, r15
call vec_is_zero_16x
mov r12, rax
mov esi, 60h ; '`'
mov rdi, r14
call vec_is_zero_16x
test rax, r12
jnz loc_215EA
mov r12d, [rbx+4]
lea r13, [r12+r12*2]
mov rax, r13
shl rax, 6
lea rdi, [rbx+rax]
add rdi, 378h
mov edx, 0C0h
mov rsi, r15
call _memcpy
shl r13, 5
lea rdi, [rbx+r13]
add rdi, 978h
mov ecx, 0Ch
mov rsi, r14
rep movsq
lea eax, [r12+1]
cmp eax, 8
jnz short loc_215E7
lea rsi, [rbx+378h]
lea rdx, [rbx+978h]
test byte ptr [rbx], 20h
jnz short loc_215C2
lea rdi, [rbx+18h]
mov ecx, 8
call miller_loop_n
or byte ptr [rbx], 20h
jmp short loc_215E5
loc_215C2:
lea r14, [rbp+var_270]
mov ecx, 8
mov rdi, r14
call miller_loop_n
lea rdi, [rbx+18h]
mov rsi, rdi
mov rdx, r14
call mul_fp12
loc_215E5:
xor eax, eax
loc_215E7:
mov [rbx+4], eax
loc_215EA:
add rsp, 248h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_pairing_raw_aggregate(long long a1, long long a2, const void *a3)
{
long long is_zero_16x; // r12
long long result; // rax
long long v6; // r12
long long v7; // rsi
long long v8; // rdx
_BYTE v9[624]; // [rsp+0h] [rbp-270h] BYREF
is_zero_16x = vec_is_zero_16x(a2, 192LL);
result = vec_is_zero_16x(a3, 96LL);
if ( (is_zero_16x & result) == 0 )
{
v6 = *(unsigned int *)(a1 + 4);
memcpy(a1 + 192 * v6 + 888, a2, 192LL);
qmemcpy((void *)(a1 + 96 * v6 + 2424), a3, 0x60uLL);
result = (unsigned int)(v6 + 1);
if ( (_DWORD)v6 == 7 )
{
v7 = a1 + 888;
v8 = a1 + 2424;
if ( (*(_BYTE *)a1 & 0x20) != 0 )
{
miller_loop_n((long long)v9, v7, v8, 8LL);
mul_fp12(a1 + 24, a1 + 24, (long long)v9);
}
else
{
miller_loop_n(a1 + 24, v7, v8, 8LL);
*(_BYTE *)a1 |= 0x20u;
}
result = 0LL;
}
*(_DWORD *)(a1 + 4) = result;
}
return result;
}
| blst_pairing_raw_aggregate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x248
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,0xc0
MOV RDI,R15
CALL 0x0012ff40
MOV R12,RAX
MOV ESI,0x60
MOV RDI,R14
CALL 0x0012ff40
TEST RAX,R12
JNZ 0x001215ea
MOV R12D,dword ptr [RBX + 0x4]
LEA R13,[R12 + R12*0x2]
MOV RAX,R13
SHL RAX,0x6
LEA RDI,[RBX + RAX*0x1]
ADD RDI,0x378
MOV EDX,0xc0
MOV RSI,R15
CALL 0x00105060
SHL R13,0x5
LEA RDI,[RBX + R13*0x1]
ADD RDI,0x978
MOV ECX,0xc
MOV RSI,R14
MOVSQ.REP RDI,RSI
LEA EAX,[R12 + 0x1]
CMP EAX,0x8
JNZ 0x001215e7
LEA RSI,[RBX + 0x378]
LEA RDX,[RBX + 0x978]
TEST byte ptr [RBX],0x20
JNZ 0x001215c2
LEA RDI,[RBX + 0x18]
MOV ECX,0x8
CALL 0x0011fbe1
OR byte ptr [RBX],0x20
JMP 0x001215e5
LAB_001215c2:
LEA R14,[RBP + -0x270]
MOV ECX,0x8
MOV RDI,R14
CALL 0x0011fbe1
LEA RDI,[RBX + 0x18]
MOV RSI,RDI
MOV RDX,R14
CALL 0x0011ee00
LAB_001215e5:
XOR EAX,EAX
LAB_001215e7:
MOV dword ptr [RBX + 0x4],EAX
LAB_001215ea:
ADD RSP,0x248
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void blst_pairing_raw_aggregate(byte *param_1,void *param_2,int8 *param_3)
{
uint uVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
byte *pbVar6;
byte bVar7;
int1 local_278 [584];
bVar7 = 0;
uVar3 = vec_is_zero_16x(param_2,0xc0);
uVar4 = vec_is_zero_16x(param_3,0x60);
if ((uVar4 & uVar3) == 0) {
uVar1 = *(uint *)(param_1 + 4);
memcpy(param_1 + (ulong)uVar1 * 0xc0 + 0x378,param_2,0xc0);
pbVar6 = param_1 + (ulong)uVar1 * 0x60 + 0x978;
for (lVar5 = 0xc; lVar5 != 0; lVar5 = lVar5 + -1) {
*(int8 *)pbVar6 = *param_3;
param_3 = param_3 + (ulong)bVar7 * -2 + 1;
pbVar6 = pbVar6 + (ulong)bVar7 * -0x10 + 8;
}
iVar2 = uVar1 + 1;
if (iVar2 == 8) {
if ((*param_1 & 0x20) == 0) {
miller_loop_n(param_1 + 0x18,param_1 + 0x378,param_1 + 0x978,8);
*param_1 = *param_1 | 0x20;
}
else {
miller_loop_n(local_278,param_1 + 0x378,param_1 + 0x978,8);
mul_fp12(param_1 + 0x18,param_1 + 0x18,local_278);
}
iVar2 = 0;
}
*(int *)(param_1 + 4) = iVar2;
}
return;
}
|
|
453 | MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&, MNN::IfParamT const*, std::__1::function<unsigned long (void*)> const*) | mnn-tts/MNN/schema/current/MNN_generated.h | inline flatbuffers::Offset<IfParam> CreateIfParam(flatbuffers::FlatBufferBuilder &_fbb, const IfParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
(void)_rehasher;
(void)_o;
struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const IfParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
auto _then_graph = _o->then_graph.empty() ? 0 : _fbb.CreateString(_o->then_graph);
auto _else_graph = _o->else_graph.empty() ? 0 : _fbb.CreateString(_o->else_graph);
auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector<flatbuffers::Offset<StringVec>> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0;
auto _aliases_outputs = _o->aliases_outputs.size() ? _fbb.CreateVector<flatbuffers::Offset<StringVec>> (_o->aliases_outputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_outputs[i].get(), __va->__rehasher); }, &_va ) : 0;
return MNN::CreateIfParam(
_fbb,
_then_graph,
_else_graph,
_aliases_inputs,
_aliases_outputs);
} | O0 | c | MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&, MNN::IfParamT const*, std::__1::function<unsigned long (void*)> const*):
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rdi
callq 0x36110
testb $0x1, %al
jne 0x47291
jmp 0x4729f
leaq 0x3c(%rsp), %rdi
xorl %esi, %esi
callq 0x39500
jmp 0x472b2
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x39520
movl %eax, 0x3c(%rsp)
movq 0x60(%rsp), %rdi
addq $0x18, %rdi
callq 0x36110
testb $0x1, %al
jne 0x472c6
jmp 0x472d4
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x39500
jmp 0x472eb
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq $0x18, %rsi
callq 0x39520
movl %eax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
addq $0x30, %rdi
callq 0x28f10
cmpq $0x0, %rax
je 0x4732f
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
addq $0x30, %rdi
callq 0x28f10
movq 0x10(%rsp), %rdi
movq %rax, %rsi
leaq 0x40(%rsp), %rdx
callq 0x57a00
movl %eax, 0x34(%rsp)
jmp 0x4733b
leaq 0x34(%rsp), %rdi
xorl %esi, %esi
callq 0x56ae0
movq 0x60(%rsp), %rdi
addq $0x48, %rdi
callq 0x28f10
cmpq $0x0, %rax
je 0x4737f
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
addq $0x48, %rdi
callq 0x28f10
movq 0x8(%rsp), %rdi
movq %rax, %rsi
leaq 0x40(%rsp), %rdx
callq 0x57ab0
movl %eax, 0x2c(%rsp)
jmp 0x4738b
leaq 0x2c(%rsp), %rdi
xorl %esi, %esi
callq 0x56ae0
movq 0x68(%rsp), %rdi
movl 0x3c(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x38(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
movl 0x1c(%rsp), %ecx
movl 0x18(%rsp), %r8d
callq 0x57b60
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN3MNN13CreateIfParamERN11flatbuffers17FlatBufferBuilderEPKNS_8IfParamTEPKNSt3__18functionIFmPvEEE:
sub rsp, 78h
mov [rsp+78h+var_10], rdi
mov [rsp+78h+var_18], rsi
mov [rsp+78h+var_20], rdx
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_38], rax
mov rax, [rsp+78h+var_18]
mov [rsp+78h+var_30], rax
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_28], rax
mov rdi, [rsp+78h+var_18]
call _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5emptyB8nn200100Ev; std::string::empty(void)
test al, 1
jnz short loc_47291
jmp short loc_4729F
loc_47291:
lea rdi, [rsp+78h+var_3C]
xor esi, esi
call _ZN11flatbuffers6OffsetINS_6StringEEC2Ej; flatbuffers::Offset<flatbuffers::String>::Offset(uint)
jmp short loc_472B2
loc_4729F:
mov rdi, [rsp+78h+var_10]
mov rsi, [rsp+78h+var_18]
call _ZN11flatbuffers17FlatBufferBuilder12CreateStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE; flatbuffers::FlatBufferBuilder::CreateString(std::string const&)
mov [rsp+78h+var_3C], eax
loc_472B2:
mov rdi, [rsp+78h+var_18]
add rdi, 18h
call _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5emptyB8nn200100Ev; std::string::empty(void)
test al, 1
jnz short loc_472C6
jmp short loc_472D4
loc_472C6:
lea rdi, [rsp+78h+var_40]
xor esi, esi
call _ZN11flatbuffers6OffsetINS_6StringEEC2Ej; flatbuffers::Offset<flatbuffers::String>::Offset(uint)
jmp short loc_472EB
loc_472D4:
mov rdi, [rsp+78h+var_10]
mov rsi, [rsp+78h+var_18]
add rsi, 18h
call _ZN11flatbuffers17FlatBufferBuilder12CreateStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE; flatbuffers::FlatBufferBuilder::CreateString(std::string const&)
mov [rsp+78h+var_40], eax
loc_472EB:
mov rdi, [rsp+78h+var_18]
add rdi, 30h ; '0'
call _ZNKSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE4sizeB8nn200100Ev; std::vector<std::unique_ptr<MNN::StringVecT>>::size(void)
cmp rax, 0
jz short loc_4732F
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_68], rax
mov rdi, [rsp+78h+var_18]
add rdi, 30h ; '0'
call _ZNKSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE4sizeB8nn200100Ev; std::vector<std::unique_ptr<MNN::StringVecT>>::size(void)
mov rdi, [rsp+78h+var_68]
mov rsi, rax
lea rdx, [rsp+78h+var_38]
call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorINS_6OffsetIN3MNN9StringVecEEEZNS3_13CreateIfParamERS0_PKNS3_8IfParamTEPKNSt3__18functionIFmPvEEEEUlmPZNS3_13CreateIfParamES6_S9_SG_E11_VectorArgsE_SH_EENS2_INS_6VectorIT_EEEEmT0_PT1_; flatbuffers::FlatBufferBuilder::CreateVector<flatbuffers::Offset<MNN::StringVec>,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::{lambda(ulong,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)#1},MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs>(ulong,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::{lambda(ulong,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)#1},MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)
mov [rsp+78h+var_44], eax
jmp short loc_4733B
loc_4732F:
lea rdi, [rsp+78h+var_44]
xor esi, esi
call _ZN11flatbuffers6OffsetINS_6VectorINS0_IN3MNN9StringVecEEEEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>::Offset(uint)
loc_4733B:
mov rdi, [rsp+78h+var_18]
add rdi, 48h ; 'H'
call _ZNKSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE4sizeB8nn200100Ev; std::vector<std::unique_ptr<MNN::StringVecT>>::size(void)
cmp rax, 0
jz short loc_4737F
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_70], rax
mov rdi, [rsp+78h+var_18]
add rdi, 48h ; 'H'
call _ZNKSt3__16vectorINS_10unique_ptrIN3MNN10StringVecTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE4sizeB8nn200100Ev; std::vector<std::unique_ptr<MNN::StringVecT>>::size(void)
mov rdi, [rsp+78h+var_70]
mov rsi, rax
lea rdx, [rsp+78h+var_38]
call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorINS_6OffsetIN3MNN9StringVecEEEZNS3_13CreateIfParamERS0_PKNS3_8IfParamTEPKNSt3__18functionIFmPvEEEEUlmPZNS3_13CreateIfParamES6_S9_SG_E11_VectorArgsE0_SH_EENS2_INS_6VectorIT_EEEEmT0_PT1_; flatbuffers::FlatBufferBuilder::CreateVector<flatbuffers::Offset<MNN::StringVec>,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::{lambda(ulong,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)#2},MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs>(ulong,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::{lambda(ulong,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)#2},MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)
mov [rsp+78h+var_4C], eax
jmp short loc_4738B
loc_4737F:
lea rdi, [rsp+78h+var_4C]
xor esi, esi
call _ZN11flatbuffers6OffsetINS_6VectorINS0_IN3MNN9StringVecEEEEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>::Offset(uint)
loc_4738B:
mov rdi, [rsp+78h+var_10]
mov eax, [rsp+78h+var_3C]
mov [rsp+78h+var_54], eax
mov eax, [rsp+78h+var_40]
mov [rsp+78h+var_58], eax
mov eax, [rsp+78h+var_44]
mov [rsp+78h+var_5C], eax
mov eax, [rsp+78h+var_4C]
mov [rsp+78h+var_60], eax
mov esi, [rsp+78h+var_54]
mov edx, [rsp+78h+var_58]
mov ecx, [rsp+78h+var_5C]
mov r8d, [rsp+78h+var_60]
call _ZN3MNN13CreateIfParamERN11flatbuffers17FlatBufferBuilderENS0_6OffsetINS0_6StringEEES5_NS3_INS0_6VectorINS3_INS_9StringVecEEEEEEESA_; MNN::CreateIfParam(flatbuffers::FlatBufferBuilder &,flatbuffers::Offset<flatbuffers::String>,flatbuffers::Offset<flatbuffers::String>,flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>,flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>)
mov [rsp+78h+var_4], eax
mov eax, [rsp+78h+var_4]
add rsp, 78h
retn
| long long MNN::CreateIfParam(flatbuffers::FlatBufferBuilder *a1, _BYTE *a2, long long a3)
{
long long v3; // rsi
long long v4; // rax
long long v5; // rax
flatbuffers::FlatBufferBuilder *v7; // [rsp+8h] [rbp-70h]
flatbuffers::FlatBufferBuilder *v8; // [rsp+10h] [rbp-68h]
unsigned int v9; // [rsp+2Ch] [rbp-4Ch] BYREF
unsigned int v10; // [rsp+34h] [rbp-44h] BYREF
unsigned int v11; // [rsp+38h] [rbp-40h] BYREF
unsigned int String; // [rsp+3Ch] [rbp-3Ch] BYREF
_QWORD v13[4]; // [rsp+40h] [rbp-38h] BYREF
_BYTE *v14; // [rsp+60h] [rbp-18h]
flatbuffers::FlatBufferBuilder *v15; // [rsp+68h] [rbp-10h]
v15 = a1;
v14 = a2;
v13[3] = a3;
v13[0] = a1;
v13[1] = a2;
v13[2] = a3;
if ( std::string::empty[abi:nn200100](a2, (long long)a2) )
{
v3 = 0LL;
flatbuffers::Offset<flatbuffers::String>::Offset(&String, 0);
}
else
{
v3 = (long long)v14;
String = flatbuffers::FlatBufferBuilder::CreateString(v15, (long long)v14);
}
if ( std::string::empty[abi:nn200100](v14 + 24, v3) )
flatbuffers::Offset<flatbuffers::String>::Offset(&v11, 0);
else
v11 = flatbuffers::FlatBufferBuilder::CreateString(v15, (long long)(v14 + 24));
if ( std::vector<std::unique_ptr<MNN::StringVecT>>::size[abi:nn200100]((_QWORD *)v14 + 6) )
{
v8 = v15;
v4 = std::vector<std::unique_ptr<MNN::StringVecT>>::size[abi:nn200100]((_QWORD *)v14 + 6);
v10 = flatbuffers::FlatBufferBuilder::CreateVector<flatbuffers::Offset<MNN::StringVec>,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<unsigned long ()(void *)> const*)::{lambda(unsigned long,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<unsigned long ()(void *)> const*)::_VectorArgs *)#1},MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<unsigned long ()(void *)> const*)::_VectorArgs>(
v8,
v4,
v13);
}
else
{
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>::Offset(&v10, 0LL);
}
if ( std::vector<std::unique_ptr<MNN::StringVecT>>::size[abi:nn200100]((_QWORD *)v14 + 9) )
{
v7 = v15;
v5 = std::vector<std::unique_ptr<MNN::StringVecT>>::size[abi:nn200100]((_QWORD *)v14 + 9);
v9 = flatbuffers::FlatBufferBuilder::CreateVector<flatbuffers::Offset<MNN::StringVec>,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<unsigned long ()(void *)> const*)::{lambda(unsigned long,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<unsigned long ()(void *)> const*)::_VectorArgs *)#2},MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT const*,std::function<unsigned long ()(void *)> const*)::_VectorArgs>(
v7,
v5,
v13);
}
else
{
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>::Offset(&v9, 0LL);
}
return (unsigned int)MNN::CreateIfParam(v15, String, v11, v10, v9);
}
| CreateIfParam:
SUB RSP,0x78
MOV qword ptr [RSP + 0x68],RDI
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00136110
TEST AL,0x1
JNZ 0x00147291
JMP 0x0014729f
LAB_00147291:
LEA RDI,[RSP + 0x3c]
XOR ESI,ESI
CALL 0x00139500
JMP 0x001472b2
LAB_0014729f:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x00139520
MOV dword ptr [RSP + 0x3c],EAX
LAB_001472b2:
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x18
CALL 0x00136110
TEST AL,0x1
JNZ 0x001472c6
JMP 0x001472d4
LAB_001472c6:
LEA RDI,[RSP + 0x38]
XOR ESI,ESI
CALL 0x00139500
JMP 0x001472eb
LAB_001472d4:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x60]
ADD RSI,0x18
CALL 0x00139520
MOV dword ptr [RSP + 0x38],EAX
LAB_001472eb:
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x30
CALL 0x00128f10
CMP RAX,0x0
JZ 0x0014732f
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x30
CALL 0x00128f10
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
LEA RDX,[RSP + 0x40]
CALL 0x00157a00
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0014733b
LAB_0014732f:
LEA RDI,[RSP + 0x34]
XOR ESI,ESI
CALL 0x00156ae0
LAB_0014733b:
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x48
CALL 0x00128f10
CMP RAX,0x0
JZ 0x0014737f
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x48
CALL 0x00128f10
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
LEA RDX,[RSP + 0x40]
CALL 0x00157ab0
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x0014738b
LAB_0014737f:
LEA RDI,[RSP + 0x2c]
XOR ESI,ESI
CALL 0x00156ae0
LAB_0014738b:
MOV RDI,qword ptr [RSP + 0x68]
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RSP + 0x24],EAX
MOV EAX,dword ptr [RSP + 0x38]
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x18],EAX
MOV ESI,dword ptr [RSP + 0x24]
MOV EDX,dword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x1c]
MOV R8D,dword ptr [RSP + 0x18]
CALL 0x00157b60
MOV dword ptr [RSP + 0x74],EAX
MOV EAX,dword ptr [RSP + 0x74]
ADD RSP,0x78
RET
|
/* MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&, MNN::IfParamT const*, std::function<unsigned
long (void*)> const*) */
int4 MNN::CreateIfParam(FlatBufferBuilder *param_1,IfParamT *param_2,function *param_3)
{
FlatBufferBuilder *pFVar1;
int4 uVar2;
ulong uVar3;
long lVar4;
int8 uVar5;
int4 local_4c [2];
int4 local_44;
int4 local_40;
int4 local_3c;
FlatBufferBuilder *local_38;
IfParamT *local_30;
function *local_28;
function *local_20;
string *local_18;
FlatBufferBuilder *local_10;
local_38 = param_1;
local_30 = param_2;
local_28 = param_3;
local_20 = param_3;
local_18 = (string *)param_2;
local_10 = param_1;
uVar3 = std::string::empty_abi_nn200100_((string *)param_2);
if ((uVar3 & 1) == 0) {
local_3c = flatbuffers::FlatBufferBuilder::CreateString(local_10,local_18);
}
else {
flatbuffers::Offset<flatbuffers::String>::Offset((Offset<flatbuffers::String> *)&local_3c,0);
}
uVar3 = std::string::empty_abi_nn200100_(local_18 + 0x18);
if ((uVar3 & 1) == 0) {
local_40 = flatbuffers::FlatBufferBuilder::CreateString(local_10,local_18 + 0x18);
}
else {
flatbuffers::Offset<flatbuffers::String>::Offset((Offset<flatbuffers::String> *)&local_40,0);
}
lVar4 = std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::size_abi_nn200100_
((vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_18 + 0x30));
pFVar1 = local_10;
if (lVar4 == 0) {
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>::Offset
((Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>> *)&local_44,0);
}
else {
uVar5 = std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::size_abi_nn200100_
((vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_18 + 0x30));
local_44 = flatbuffers::FlatBufferBuilder::
CreateVector<flatbuffers::Offset<MNN::StringVec>,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT_const*,std::function<unsigned_long(void*)>const*)::_lambda(unsigned_long,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT_const*,std::function<unsigned_long(void*)>const*)::_VectorArgs*)_1_,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT_const*,std::function<unsigned_long(void*)>const*)::_VectorArgs>
(pFVar1,uVar5,&local_38);
}
lVar4 = std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::size_abi_nn200100_
((vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_18 + 0x48));
pFVar1 = local_10;
if (lVar4 == 0) {
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>>::Offset
((Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::StringVec>>> *)local_4c,0);
}
else {
uVar5 = std::
vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
::size_abi_nn200100_
((vector<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>,std::allocator<std::unique_ptr<MNN::StringVecT,std::default_delete<MNN::StringVecT>>>>
*)(local_18 + 0x48));
local_4c[0] = flatbuffers::FlatBufferBuilder::
CreateVector<flatbuffers::Offset<MNN::StringVec>,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT_const*,std::function<unsigned_long(void*)>const*)::_lambda(unsigned_long,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT_const*,std::function<unsigned_long(void*)>const*)::_VectorArgs*)_2_,MNN::CreateIfParam(flatbuffers::FlatBufferBuilder&,MNN::IfParamT_const*,std::function<unsigned_long(void*)>const*)::_VectorArgs>
(pFVar1,uVar5,&local_38);
}
uVar2 = CreateIfParam(local_10,local_3c,local_40,local_44,local_4c[0]);
return uVar2;
}
|
|
454 | spell_image_of_drakuru_reagent_check::EffectHandlerFunction::~EffectHandlerFunction() | SylCore-WoTLK/src/server/scripts/Spells/spell_quest.cpp | void HandleDummyEffect(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (!caster || !caster->ToPlayer())
return;
Player* player = caster->ToPlayer();
float dist = player->GetDistance(3385, -1807, 114);
if (dist < 40.0f)
{
caster->ToPlayer()->GroupEventHappens(QUEST_SUBJECT_TO_INTERPRETATION, caster);
caster->CastSpell(caster, 47118, false);
return;
}
dist = player->GetDistance(4244, -2025, 238);
if (dist < 40.0f)
{
caster->CastSpell(caster, 47150, false);
return;
}
dist = player->GetDistance(4524, -3472, 228);
if (dist < 40.0f)
{
caster->ToPlayer()->GroupEventHappens(QUEST_MY_HEART_IS_IN_YOUR_HANDS, caster);
caster->CastSpell(caster, 47317, false);
return;
}
dist = player->GetDistance(4599, -4877, 48);
if (dist < 40.0f)
{
caster->CastSpell(caster, 47406, false);
return;
}
dist = player->GetDistance(-236, -614, 116);
if (dist < 40.0f)
{
caster->CastSpell(caster, 50440, false);
return;
}
} | O3 | cpp | spell_image_of_drakuru_reagent_check::EffectHandlerFunction::~EffectHandlerFunction():
movl $0x20, %esi
jmp 0x10a22f0
| _ZN36spell_image_of_drakuru_reagent_check21EffectHandlerFunctionD0Ev:
mov esi, 20h ; ' '; unsigned __int64
jmp _ZdlPvm; operator delete(void *,ulong)
| void spell_image_of_drakuru_reagent_check::EffectHandlerFunction::~EffectHandlerFunction(
spell_image_of_drakuru_reagent_check::EffectHandlerFunction *this)
{
operator delete(this, 0x20uLL);
}
| HandleDebugItemExpireCommand:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00ae1c7c
MOV ECX,EBP
BTS RCX,0x3e
XOR ESI,ESI
TEST EBP,EBP
CMOVNZ RSI,RCX
MOV RDI,RAX
CALL 0x00c113dc
MOV R14,RAX
TEST RAX,RAX
JZ 0x008e179a
MOV RDI,RBX
CALL 0x00ae1c7c
MOV R15,RAX
MOV RDI,R14
CALL 0x00b8e010
MOVZX EDX,byte ptr [R14 + 0x220]
MOVZX ESI,AL
MOV RDI,R15
MOV ECX,0x1
CALL 0x00c17dd4
CALL 0x00e60f66
MOV R15,RAX
MOV RDI,RBX
CALL 0x00ae1c7c
MOV RBX,RAX
MOV RDI,R14
CALL 0x00b8d53c
MOV RDI,R15
MOV RSI,RBX
MOV RDX,RAX
CALL 0x00e7e5c0
LAB_008e179a:
TEST R14,R14
SETNZ AL
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* debug_commandscript::HandleDebugItemExpireCommand(ChatHandler*, unsigned int) */
bool debug_commandscript::HandleDebugItemExpireCommand(ChatHandler *param_1,uint param_2)
{
Player *pPVar1;
ItemTemplate *pIVar2;
uchar uVar3;
Item *this;
ulong uVar4;
pPVar1 = (Player *)ChatHandler::GetPlayer(param_1);
uVar4 = 0;
if (param_2 != 0) {
uVar4 = (ulong)param_2 | 0x4000000000000000;
}
this = (Item *)Player::GetItemByGuid(pPVar1,uVar4);
if (this != (Item *)0x0) {
pPVar1 = (Player *)ChatHandler::GetPlayer(param_1);
uVar3 = Item::GetBagSlot(this);
Player::DestroyItem(pPVar1,uVar3,(uchar)this[0x220],true);
pPVar1 = (Player *)ScriptMgr::instance();
pIVar2 = (ItemTemplate *)ChatHandler::GetPlayer(param_1);
Item::GetTemplate(this);
ScriptMgr::OnItemExpire(pPVar1,pIVar2);
}
return this != (Item *)0x0;
}
|
|
455 | my_numcells_cp932 | eloqsql/strings/ctype-cp932.c | static
size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen= 0;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b >= 0xA1 && *b <= 0xDF)
{
clen++;
b++;
}
else if (*b > 0x7F)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_cp932:
cmpq %rdx, %rsi
jae 0xacb0f
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x1, %ecx
movb (%rsi), %dil
leal 0x5f(%rdi), %r8d
shrb $0x7, %dil
movzbl %dil, %edi
incq %rdi
cmpb $0x3f, %r8b
cmovbq %rcx, %rdi
addq %rdi, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0xacae8
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_cp932:
cmp rsi, rdx
jnb short loc_ACB0F
push rbp
mov rbp, rsp
xor eax, eax
mov ecx, 1
loc_ACAE8:
mov dil, [rsi]
lea r8d, [rdi+5Fh]
shr dil, 7
movzx edi, dil
inc rdi
cmp r8b, 3Fh ; '?'
cmovb rdi, rcx
add rax, rdi
add rsi, rdi
cmp rsi, rdx
jb short loc_ACAE8
pop rbp
retn
loc_ACB0F:
xor eax, eax
retn
| long long my_numcells_cp932(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // rdi
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = (*a2 >> 7) + 1LL;
if ( (unsigned __int8)(*a2 + 95) < 0x3Fu )
v4 = 1LL;
result += v4;
a2 += v4;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_cp932:
CMP RSI,RDX
JNC 0x001acb0f
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
MOV ECX,0x1
LAB_001acae8:
MOV DIL,byte ptr [RSI]
LEA R8D,[RDI + 0x5f]
SHR DIL,0x7
MOVZX EDI,DIL
INC RDI
CMP R8B,0x3f
CMOVC RDI,RCX
ADD RAX,RDI
ADD RSI,RDI
CMP RSI,RDX
JC 0x001acae8
POP RBP
RET
LAB_001acb0f:
XOR EAX,EAX
RET
|
long my_numcells_cp932(int8 param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
if (param_2 < param_3) {
lVar1 = 0;
do {
lVar2 = (ulong)(*param_2 >> 7) + 1;
if ((byte)(*param_2 + 0x5f) < 0x3f) {
lVar2 = 1;
}
lVar1 = lVar1 + lVar2;
param_2 = param_2 + lVar2;
} while (param_2 < param_3);
return lVar1;
}
return 0;
}
|
|
456 | js_setlike_get_has | bluesky950520[P]quickjs/quickjs.c | static int js_setlike_get_has(JSContext *ctx, JSValue setlike, JSValue *pout)
{
JSValue v;
v = JS_GetProperty(ctx, setlike, JS_ATOM_has);
if (JS_IsException(v))
return -1;
if (JS_IsUndefined(v)) {
JS_ThrowTypeError(ctx, ".has is undefined");
return -1;
}
if (!JS_IsFunction(ctx, v)) {
JS_ThrowTypeError(ctx, ".has is not a function");
JS_FreeValue(ctx, v);
return -1;
}
*pout = v;
return 0;
} | O0 | c | js_setlike_get_has:
subq $0x68, %rsp
movq %rsi, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq %rdi, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movl $0x64, %ecx
callq 0x30070
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x96950
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x969fc
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x34550
cmpl $0x0, %eax
je 0x9698b
movq 0x48(%rsp), %rdi
leaq 0x7eb31(%rip), %rsi # 0x1154a1
movb $0x0, %al
callq 0x335f0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x969fc
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x34800
cmpl $0x0, %eax
jne 0x969de
movq 0x48(%rsp), %rdi
leaq 0x7eb03(%rip), %rsi # 0x1154b3
movb $0x0, %al
callq 0x335f0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x29f80
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x969fc
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
movq 0x38(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| js_setlike_get_has:
sub rsp, 68h
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_10], rdx
mov [rsp+68h+var_20], rdi
mov [rsp+68h+var_28], rcx
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
mov ecx, 64h ; 'd'
call JS_GetProperty
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_40], rdx
mov rax, [rsp+68h+var_48]
mov [rsp+68h+var_38], rax
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_30], rax
mov rdi, [rsp+68h+var_38]
mov rsi, [rsp+68h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_96950
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_969FC
loc_96950:
mov rdi, [rsp+68h+var_38]
mov rsi, [rsp+68h+var_30]
call JS_IsUndefined_1
cmp eax, 0
jz short loc_9698B
mov rdi, [rsp+68h+var_20]
lea rsi, aHasIsUndefined; ".has is undefined"
mov al, 0
call JS_ThrowTypeError
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_969FC
loc_9698B:
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_38]
mov rdx, [rsp+68h+var_30]
call JS_IsFunction
cmp eax, 0
jnz short loc_969DE
mov rdi, [rsp+68h+var_20]
lea rsi, aHasIsNotAFunct; ".has is not a function"
mov al, 0
call JS_ThrowTypeError
mov [rsp+68h+var_68], rax
mov [rsp+68h+var_60], rdx
mov rdi, [rsp+68h+var_20]
mov rsi, [rsp+68h+var_38]
mov rdx, [rsp+68h+var_30]
call JS_FreeValue
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_969FC
loc_969DE:
mov rax, [rsp+68h+var_28]
mov rcx, [rsp+68h+var_38]
mov [rax], rcx
mov rcx, [rsp+68h+var_30]
mov [rax+8], rcx
mov [rsp+68h+var_4], 0
loc_969FC:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long js_setlike_get_has(
long long a1,
int a2,
int a3,
long long *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
char v26; // [rsp+0h] [rbp-68h]
long long Property; // [rsp+20h] [rbp-48h]
long long v28; // [rsp+38h] [rbp-30h]
Property = JS_GetProperty(a1, a2, a3, 100);
v28 = v12;
if ( JS_IsException_1(Property, v12) )
{
return (unsigned int)-1;
}
else if ( JS_IsUndefined_1(Property, v28) )
{
JS_ThrowTypeError(a1, (long long)".has is undefined", v13, v14, v15, v16, a5, a6, a7, a8, v17, v18, a11, a12, v26);
return (unsigned int)-1;
}
else if ( (unsigned int)JS_IsFunction(a1, Property, v28) )
{
*a4 = Property;
a4[1] = v28;
return 0;
}
else
{
JS_ThrowTypeError(
a1,
(long long)".has is not a function",
v19,
v20,
v21,
v22,
a5,
a6,
a7,
a8,
v23,
v24,
a11,
a12,
v26);
JS_FreeValue(a1, Property, v28);
return (unsigned int)-1;
}
}
| js_setlike_get_has:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RCX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV ECX,0x64
CALL 0x00130070
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00196950
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001969fc
LAB_00196950:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00134550
CMP EAX,0x0
JZ 0x0019698b
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x2154a1]
MOV AL,0x0
CALL 0x001335f0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001969fc
LAB_0019698b:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00134800
CMP EAX,0x0
JNZ 0x001969de
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x2154b3]
MOV AL,0x0
CALL 0x001335f0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00129f80
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001969fc
LAB_001969de:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RSP + 0x64],0x0
LAB_001969fc:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4
js_setlike_get_has(int8 param_1,int8 param_2,int8 param_3,
int1 (*param_4) [16])
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
int4 local_4;
auVar4 = JS_GetProperty(param_1,param_2,param_3,100);
uVar3 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsException(uVar2,uVar3);
if (iVar1 == 0) {
iVar1 = JS_IsUndefined(uVar2,uVar3);
if (iVar1 == 0) {
iVar1 = JS_IsFunction(param_1,uVar2,uVar3);
if (iVar1 == 0) {
JS_ThrowTypeError(param_1,".has is not a function");
JS_FreeValue(param_1,uVar2,uVar3);
local_4 = 0xffffffff;
}
else {
*param_4 = auVar4;
local_4 = 0;
}
}
else {
JS_ThrowTypeError(param_1,".has is int");
local_4 = 0xffffffff;
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
|
|
457 | js_thisBooleanValue | bluesky950520[P]quickjs/quickjs.c | static JSValue js_thisBooleanValue(JSContext *ctx, JSValue this_val)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_BOOL)
return js_dup(this_val);
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_BOOLEAN) {
if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_BOOL)
return p->u.object_data;
}
}
return JS_ThrowTypeError(ctx, "not a boolean");
} | O0 | c | js_thisBooleanValue:
subq $0x38, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x1, %eax
jne 0xd88e8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x279c0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
jmp 0xd8952
movq 0x20(%rsp), %rax
cmpl $-0x1, %eax
jne 0xd8935
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x6, %eax
jne 0xd8933
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
cmpl $0x1, %eax
jne 0xd8931
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x28(%rsp)
movq 0x38(%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0xd8952
jmp 0xd8933
jmp 0xd8935
movq 0x10(%rsp), %rdi
leaq 0x3e93a(%rip), %rsi # 0x11727b
movb $0x0, %al
callq 0x335f0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| js_thisBooleanValue:
sub rsp, 38h
mov [rsp+38h+var_20], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_28], rdi
mov rax, [rsp+38h+var_18]
cmp eax, 1
jnz short loc_D88E8
mov rdi, [rsp+38h+var_20]
mov rsi, [rsp+38h+var_18]
call js_dup
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
jmp short loc_D8952
loc_D88E8:
mov rax, [rsp+38h+var_18]
cmp eax, 0FFFFFFFFh
jnz short loc_D8935
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
movzx eax, word ptr [rax+6]
cmp eax, 6
jnz short loc_D8933
mov rax, [rsp+38h+var_30]
mov rax, [rax+38h]
cmp eax, 1
jnz short loc_D8931
mov rax, [rsp+38h+var_30]
mov rcx, [rax+30h]
mov [rsp+38h+var_10], rcx
mov rax, [rax+38h]
mov [rsp+38h+var_8], rax
jmp short loc_D8952
loc_D8931:
jmp short $+2
loc_D8933:
jmp short $+2
loc_D8935:
mov rdi, [rsp+38h+var_28]
lea rsi, aNotABoolean; "not a boolean"
mov al, 0
call JS_ThrowTypeError
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
loc_D8952:
mov rax, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_8]
add rsp, 38h
retn
| _DWORD * js_thisBooleanValue(
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)
{
char v15; // [rsp+0h] [rbp-38h]
if ( (_DWORD)a3 == 1 )
return js_dup((_DWORD *)a2, 1u);
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 6 && (unsigned int)*(_QWORD *)(a2 + 56) == 1 )
return *(_DWORD **)(a2 + 48);
return (_DWORD *)JS_ThrowTypeError(
a1,
(long long)"not a boolean",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v15);
}
| js_thisBooleanValue:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,0x1
JNZ 0x001d88e8
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001279c0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
JMP 0x001d8952
LAB_001d88e8:
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x1
JNZ 0x001d8935
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x6
JNZ 0x001d8933
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x38]
CMP EAX,0x1
JNZ 0x001d8931
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x28],RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001d8952
LAB_001d8931:
JMP 0x001d8933
LAB_001d8933:
JMP 0x001d8935
LAB_001d8935:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x21727b]
MOV AL,0x0
CALL 0x001335f0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
LAB_001d8952:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int1 [16] js_thisBooleanValue(int8 param_1,long param_2,int8 param_3)
{
int1 auVar1 [16];
if ((int)param_3 == 1) {
auVar1 = js_dup(param_2,param_3);
}
else if ((((int)param_3 == -1) && (*(short *)(param_2 + 6) == 6)) &&
((int)*(int8 *)(param_2 + 0x38) == 1)) {
auVar1 = *(int1 (*) [16])(param_2 + 0x30);
}
else {
auVar1 = JS_ThrowTypeError(param_1,"not a boolean");
}
return auVar1;
}
|
|
458 | map_to_g1 | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/map_to_g1.c | static void map_to_g1(POINTonE1 *out, const vec384 u, const vec384 v)
{
POINTonE1 p;
map_to_isogenous_E1(&p, u);
if (v != NULL) {
map_to_isogenous_E1(out, v); /* borrow |out| */
POINTonE1_dadd(&p, &p, out, Aprime_E1);
}
isogeny_map_to_E1(&p, &p); /* sprinkle isogenous powder */
/* clear the cofactor by multiplying |p| by 1-z, 0xd201000000010001 */
POINTonE1_times_minus_z(out, &p);
POINTonE1_dadd(out, out, &p, NULL);
} | O1 | c | map_to_g1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6f8, %rsp # imm = 0x6F8
movq %rdx, %rbx
movq %rdi, %r14
leaq -0xc0(%rbp), %rdi
callq 0x68fa5
testq %rbx, %rbx
je 0x5e124
movq %r14, %rdi
movq %rbx, %rsi
callq 0x68fa5
leaq 0x30b4e(%rip), %rcx # 0x8ec60
leaq -0xc0(%rbp), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x5c73e
movq %r14, -0x30(%rbp)
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
leaq -0x480(%rbp), %r13
leaq -0x60(%rbp), %rsi
leaq 0x3076c(%rip), %rbx # 0x8e8b0
movq %r13, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x76b20
movq $-0xe, %r15
movq %r13, %rsi
leaq -0x30(%rsi), %r14
movq %r14, %rdi
movq %r13, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
movq %r14, %rsi
incq %r15
jne 0x5e15c
leaq -0x480(%rbp), %rbx
leaq 0x30c29(%rip), %r15 # 0x8edb0
movl $0x1e0, %r12d # imm = 0x1E0
addq %r12, %r15
leaq -0x450(%rbp), %r13
addq %r13, %r12
movq $-0xb, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
leaq 0x306ff(%rip), %rcx # 0x8e8b0
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x772a0
addq $-0x30, %rbx
addq $-0x30, %r15
addq $-0x30, %r12
incq %r14
jne 0x5e1a1
leaq 0x30de8(%rip), %rdx # 0x8efc0
leaq 0x306d1(%rip), %rbx # 0x8e8b0
leaq -0x150(%rbp), %r14
leaq -0xc0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x772a0
leaq -0x270(%rbp), %rdx
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x71a40
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x693f7
leaq -0x480(%rbp), %r15
leaq 0x30db5(%rip), %r12 # 0x8eff0
movl $0x1b0, %eax # imm = 0x1B0
addq %rax, %r12
addq %rax, %r13
movq $-0xa, %r14
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x772a0
addq $-0x30, %r15
addq $-0x30, %r12
addq $-0x30, %r13
incq %r14
jne 0x5e24d
leaq -0x2a0(%rbp), %rdx
leaq 0x30629(%rip), %rbx # 0x8e8b0
leaq -0xf0(%rbp), %r14
leaq -0xc0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x71a40
leaq -0x450(%rbp), %rdx
movl $0x9, %ecx
movq %r14, %rdi
movq %r15, %rsi
callq 0x693f7
movq %r14, %rdi
movq %r14, %rsi
leaq -0x480(%rbp), %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %r12, %r8
callq 0x772a0
movl $0x2a0, %r14d # imm = 0x2A0
leaq 0x30ee7(%rip), %r15 # 0x8f1d0
leaq (%r14,%rbp), %rdi
addq $-0x450, %rdi # imm = 0xFBB0
leaq (%r15,%r14), %rsi
leaq (%r14,%rbp), %rdx
addq $-0x720, %rdx # imm = 0xF8E0
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
addq $-0x30, %r14
cmpq $-0x30, %r14
jne 0x5e2e9
leaq 0x31181(%rip), %rdx # 0x8f4a0
leaq 0x3058a(%rip), %rbx # 0x8e8b0
leaq -0x120(%rbp), %r14
leaq -0xc0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
leaq -0x1b0(%rbp), %rdx
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x71a40
leaq -0x450(%rbp), %rdx
movl $0xe, %ecx
movq %r14, %rdi
movq %r15, %rsi
callq 0x693f7
leaq -0x90(%rbp), %rdx
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
movl $0x2a0, %r14d # imm = 0x2A0
leaq 0x3113a(%rip), %r15 # 0x8f4d0
leaq (%r14,%rbp), %rdi
addq $-0x450, %rdi # imm = 0xFBB0
leaq (%r15,%r14), %rsi
leaq (%r14,%rbp), %rdx
addq $-0x720, %rdx # imm = 0xF8E0
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
addq $-0x30, %r14
cmpq $-0x30, %r14
jne 0x5e396
leaq 0x304e4(%rip), %rbx # 0x8e8b0
leaq -0x180(%rbp), %r13
leaq -0xc0(%rbp), %r14
movq %r13, %rdi
movq %r14, %rsi
leaq -0x1b0(%rbp), %rdx
movq %rbx, %rcx
callq 0x71a40
leaq -0x450(%rbp), %rdx
movl $0xe, %ecx
movq %r13, %rdi
movq %r14, %rsi
callq 0x693f7
leaq -0x480(%rbp), %r14
movq %r14, %rdi
movq %r14, %rsi
leaq -0x60(%rbp), %r15
movq %r15, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
movq %r13, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
movq %r12, %r14
leaq -0xf0(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x772a0
leaq -0x150(%rbp), %rsi
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x772a0
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x772a0
leaq -0x90(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x76b20
movq %r13, %rdi
movq %r13, %rsi
leaq -0xf0(%rbp), %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x772a0
leaq -0x120(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
movq %rbx, %rcx
movq %r14, %r8
callq 0x772a0
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x692ec
movq %rbx, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x5c73e
addq $0x6f8, %rsp # imm = 0x6F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| map_to_g1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 6F8h
mov rbx, rdx
mov r14, rdi
lea rdi, [rbp+var_C0]
call map_to_isogenous_E1
test rbx, rbx
jz short loc_5E124
mov rdi, r14
mov rsi, rbx
call map_to_isogenous_E1
lea rcx, Aprime_E1
lea rdi, [rbp+var_C0]
mov rsi, rdi
mov rdx, r14
call POINTonE1_dadd
loc_5E124:
mov [rbp+var_30], r14
mov r12, 89F3FFFCFFFCFFFDh
lea r13, [rbp+var_480]
lea rsi, [rbp+var_60]
lea rbx, BLS12_381_P
mov rdi, r13
mov rdx, rbx
mov rcx, r12
call sqr_mont_384
mov r15, 0FFFFFFFFFFFFFFF2h
mov rsi, r13
loc_5E15C:
lea r14, [rsi-30h]
mov rdi, r14
mov rdx, r13
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov rsi, r14
inc r15
jnz short loc_5E15C
lea rbx, [rbp+var_480]
lea r15, isogeny_map_to_E1_isogeny_map_x_num
mov r12d, 1E0h
add r15, r12
lea r13, [rbp+var_450]
add r12, r13
mov r14, 0FFFFFFFFFFFFFFF5h
loc_5E1A1:
mov rdi, r12
mov rsi, r15
mov rdx, rbx
lea rcx, BLS12_381_P
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
add rbx, 0FFFFFFFFFFFFFFD0h
add r15, 0FFFFFFFFFFFFFFD0h
add r12, 0FFFFFFFFFFFFFFD0h
inc r14
jnz short loc_5E1A1
lea rdx, unk_8EFC0
lea rbx, BLS12_381_P
lea r14, [rbp+var_150]
lea r15, [rbp+var_C0]
mov rdi, r14
mov rsi, r15
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
lea rdx, [rbp+var_270]
mov rdi, r14
mov rsi, r14
mov rcx, rbx
call add_mod_384
mov ecx, 0Ah
mov rdi, r14
mov rsi, r15
mov rdx, r13
call map_fp
lea r15, [rbp+var_480]
lea r12, isogeny_map_to_E1_isogeny_map_x_den
mov eax, 1B0h
add r12, rax
add r13, rax
mov r14, 0FFFFFFFFFFFFFFF6h
loc_5E24D:
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
add r15, 0FFFFFFFFFFFFFFD0h
add r12, 0FFFFFFFFFFFFFFD0h
add r13, 0FFFFFFFFFFFFFFD0h
inc r14
jnz short loc_5E24D
lea rdx, [rbp+var_2A0]
lea rbx, BLS12_381_P
lea r14, [rbp+var_F0]
lea r15, [rbp+var_C0]
mov rdi, r14
mov rsi, r15
mov rcx, rbx
call add_mod_384
lea rdx, [rbp+var_450]
mov ecx, 9
mov rdi, r14
mov rsi, r15
call map_fp
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_480]
mov rcx, rbx
mov r12, 89F3FFFCFFFCFFFDh
mov r8, r12
call mul_mont_384
mov r14d, 2A0h
lea r15, isogeny_map_to_E1_isogeny_map_y_num
loc_5E2E9:
lea rdi, [r14+rbp]
add rdi, 0FFFFFFFFFFFFFBB0h
lea rsi, [r15+r14]
lea rdx, [r14+rbp]
add rdx, 0FFFFFFFFFFFFF8E0h
mov rcx, rbx
mov r8, r12
call mul_mont_384
add r14, 0FFFFFFFFFFFFFFD0h
cmp r14, 0FFFFFFFFFFFFFFD0h
jnz short loc_5E2E9
lea rdx, unk_8F4A0
lea rbx, BLS12_381_P
lea r14, [rbp+var_120]
lea r15, [rbp+var_C0]
mov rdi, r14
mov rsi, r15
mov rcx, rbx
mov r8, r12
call mul_mont_384
lea rdx, [rbp+var_1B0]
mov rdi, r14
mov rsi, r14
mov rcx, rbx
call add_mod_384
lea rdx, [rbp+var_450]
mov ecx, 0Eh
mov rdi, r14
mov rsi, r15
call map_fp
lea rdx, [rbp+var_90]
mov rdi, r14
mov rsi, r14
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov r14d, 2A0h
lea r15, isogeny_map_to_E1_isogeny_map_y_den
loc_5E396:
lea rdi, [r14+rbp]
add rdi, 0FFFFFFFFFFFFFBB0h
lea rsi, [r15+r14]
lea rdx, [r14+rbp]
add rdx, 0FFFFFFFFFFFFF8E0h
mov rcx, rbx
mov r8, r12
call mul_mont_384
add r14, 0FFFFFFFFFFFFFFD0h
cmp r14, 0FFFFFFFFFFFFFFD0h
jnz short loc_5E396
lea rbx, BLS12_381_P
lea r13, [rbp+var_180]
lea r14, [rbp+var_C0]
mov rdi, r13
mov rsi, r14
lea rdx, [rbp+var_1B0]
mov rcx, rbx
call add_mod_384
lea rdx, [rbp+var_450]
mov ecx, 0Eh
mov rdi, r13
mov rsi, r14
call map_fp
lea r14, [rbp+var_480]
mov rdi, r14
mov rsi, r14
lea r15, [rbp+var_60]
mov rdx, r15
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov rdi, r13
mov rsi, r13
mov rdx, r14
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov r14, r12
lea rsi, [rbp+var_F0]
mov rdi, r15
mov rdx, r13
mov rcx, rbx
mov r8, r12
call mul_mont_384
lea rsi, [rbp+var_150]
lea r12, [rbp+var_C0]
mov rdi, r12
mov rdx, r13
mov rcx, rbx
mov r8, r14
call mul_mont_384
mov rdi, r12
mov rsi, r12
mov rdx, r15
mov rcx, rbx
mov r8, r14
call mul_mont_384
lea r13, [rbp+var_90]
mov rdi, r13
mov rsi, r15
mov rdx, rbx
mov rcx, r14
call sqr_mont_384
mov rdi, r13
mov rsi, r13
lea rdx, [rbp+var_F0]
mov rcx, rbx
mov r8, r14
call mul_mont_384
lea rdx, [rbp+var_120]
mov rdi, r13
mov rsi, r13
mov rcx, rbx
mov r8, r14
call mul_mont_384
mov rbx, [rbp+var_30]
mov rdi, rbx
mov rsi, r12
call POINTonE1_times_minus_z
mov rdi, rbx
mov rsi, rbx
mov rdx, r12
xor ecx, ecx
call POINTonE1_dadd
add rsp, 6F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long map_to_g1(long long a1, long long a2, long long a3)
{
long long v4; // r15
_BYTE *v5; // rsi
_BYTE *v6; // rbx
char *v7; // r15
_BYTE *v8; // r12
long long v9; // r14
_BYTE *v10; // r15
char *v11; // r12
_BYTE *v12; // r13
long long v13; // r14
long long i; // r14
long long j; // r14
long long v16; // rbx
_BYTE v18[672]; // [rsp+0h] [rbp-720h] BYREF
_BYTE v19[48]; // [rsp+2A0h] [rbp-480h] BYREF
_BYTE v20[432]; // [rsp+2D0h] [rbp-450h] BYREF
_BYTE v21[48]; // [rsp+480h] [rbp-2A0h] BYREF
_BYTE v22[192]; // [rsp+4B0h] [rbp-270h] BYREF
_BYTE v23[48]; // [rsp+570h] [rbp-1B0h] BYREF
_BYTE v24[48]; // [rsp+5A0h] [rbp-180h] BYREF
_BYTE v25[48]; // [rsp+5D0h] [rbp-150h] BYREF
_BYTE v26[48]; // [rsp+600h] [rbp-120h] BYREF
_BYTE v27[48]; // [rsp+630h] [rbp-F0h] BYREF
_BYTE v28[48]; // [rsp+660h] [rbp-C0h] BYREF
_BYTE v29[48]; // [rsp+690h] [rbp-90h] BYREF
_BYTE v30[48]; // [rsp+6C0h] [rbp-60h] BYREF
long long v31; // [rsp+6F0h] [rbp-30h]
map_to_isogenous_E1(v28);
if ( a3 )
{
map_to_isogenous_E1(a1);
POINTonE1_dadd((long long)v28, (long long)v28, a1, (long long)&Aprime_E1);
}
v31 = a1;
sqr_mont_384(v19, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v4 = -14LL;
v5 = v19;
do
{
mul_mont_384(v5 - 48, v5, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v5 -= 48;
++v4;
}
while ( v4 );
v6 = v19;
v7 = (char *)&isogeny_map_to_E1_isogeny_map_x_num + 480;
v8 = v22;
v9 = -11LL;
do
{
mul_mont_384(v8, v7, v6, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v6 -= 48;
v7 -= 48;
v8 -= 48;
++v9;
}
while ( v9 );
mul_mont_384(v25, v28, &unk_8EFC0, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384(v25, v25, v22, &BLS12_381_P);
map_fp(v25, v28, v20, 10LL);
v10 = v19;
v11 = (char *)&isogeny_map_to_E1_isogeny_map_x_den + 432;
v12 = v21;
v13 = -10LL;
do
{
mul_mont_384(v12, v11, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v10 -= 48;
v11 -= 48;
v12 -= 48;
++v13;
}
while ( v13 );
add_mod_384(v27, v28, v21, &BLS12_381_P);
map_fp(v27, v28, v20, 9LL);
mul_mont_384(v27, v27, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
for ( i = 672LL; i != -48; i -= 48LL )
mul_mont_384(&v20[i], (char *)&isogeny_map_to_E1_isogeny_map_y_num + i, &v18[i], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v26, v28, &unk_8F4A0, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384(v26, v26, v23, &BLS12_381_P);
map_fp(v26, v28, v20, 14LL);
mul_mont_384(v26, v26, v29, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
for ( j = 672LL; j != -48; j -= 48LL )
mul_mont_384(&v20[j], (char *)&isogeny_map_to_E1_isogeny_map_y_den + j, &v18[j], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384(v24, v28, v23, &BLS12_381_P);
map_fp(v24, v28, v20, 14LL);
mul_mont_384(v19, v19, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v24, v24, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v30, v27, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v28, v25, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v28, v28, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384(v29, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v29, v29, v27, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v29, v29, v26, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v16 = v31;
POINTonE1_times_minus_z(v31, v28);
return POINTonE1_dadd(v16, v16, (long long)v28, 0LL);
}
| map_to_g1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x6f8
MOV RBX,RDX
MOV R14,RDI
LEA RDI,[RBP + -0xc0]
CALL 0x00168fa5
TEST RBX,RBX
JZ 0x0015e124
MOV RDI,R14
MOV RSI,RBX
CALL 0x00168fa5
LEA RCX,[0x18ec60]
LEA RDI,[RBP + -0xc0]
MOV RSI,RDI
MOV RDX,R14
CALL 0x0015c73e
LAB_0015e124:
MOV qword ptr [RBP + -0x30],R14
MOV R12,-0x760c000300030003
LEA R13,[RBP + -0x480]
LEA RSI,[RBP + -0x60]
LEA RBX,[0x18e8b0]
MOV RDI,R13
MOV RDX,RBX
MOV RCX,R12
CALL 0x00176b20
MOV R15,-0xe
MOV RSI,R13
LAB_0015e15c:
LEA R14,[RSI + -0x30]
MOV RDI,R14
MOV RDX,R13
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
MOV RSI,R14
INC R15
JNZ 0x0015e15c
LEA RBX,[RBP + -0x480]
LEA R15,[0x18edb0]
MOV R12D,0x1e0
ADD R15,R12
LEA R13,[RBP + -0x450]
ADD R12,R13
MOV R14,-0xb
LAB_0015e1a1:
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
LEA RCX,[0x18e8b0]
MOV R8,-0x760c000300030003
CALL 0x001772a0
ADD RBX,-0x30
ADD R15,-0x30
ADD R12,-0x30
INC R14
JNZ 0x0015e1a1
LEA RDX,[0x18efc0]
LEA RBX,[0x18e8b0]
LEA R14,[RBP + -0x150]
LEA R15,[RBP + -0xc0]
MOV RDI,R14
MOV RSI,R15
MOV RCX,RBX
MOV R8,-0x760c000300030003
CALL 0x001772a0
LEA RDX,[RBP + -0x270]
MOV RDI,R14
MOV RSI,R14
MOV RCX,RBX
CALL 0x00171a40
MOV ECX,0xa
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
CALL 0x001693f7
LEA R15,[RBP + -0x480]
LEA R12,[0x18eff0]
MOV EAX,0x1b0
ADD R12,RAX
ADD R13,RAX
MOV R14,-0xa
LAB_0015e24d:
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,RBX
MOV R8,-0x760c000300030003
CALL 0x001772a0
ADD R15,-0x30
ADD R12,-0x30
ADD R13,-0x30
INC R14
JNZ 0x0015e24d
LEA RDX,[RBP + -0x2a0]
LEA RBX,[0x18e8b0]
LEA R14,[RBP + -0xf0]
LEA R15,[RBP + -0xc0]
MOV RDI,R14
MOV RSI,R15
MOV RCX,RBX
CALL 0x00171a40
LEA RDX,[RBP + -0x450]
MOV ECX,0x9
MOV RDI,R14
MOV RSI,R15
CALL 0x001693f7
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x480]
MOV RCX,RBX
MOV R12,-0x760c000300030003
MOV R8,R12
CALL 0x001772a0
MOV R14D,0x2a0
LEA R15,[0x18f1d0]
LAB_0015e2e9:
LEA RDI,[R14 + RBP*0x1]
ADD RDI,-0x450
LEA RSI,[R15 + R14*0x1]
LEA RDX,[R14 + RBP*0x1]
ADD RDX,-0x720
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
ADD R14,-0x30
CMP R14,-0x30
JNZ 0x0015e2e9
LEA RDX,[0x18f4a0]
LEA RBX,[0x18e8b0]
LEA R14,[RBP + -0x120]
LEA R15,[RBP + -0xc0]
MOV RDI,R14
MOV RSI,R15
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
LEA RDX,[RBP + -0x1b0]
MOV RDI,R14
MOV RSI,R14
MOV RCX,RBX
CALL 0x00171a40
LEA RDX,[RBP + -0x450]
MOV ECX,0xe
MOV RDI,R14
MOV RSI,R15
CALL 0x001693f7
LEA RDX,[RBP + -0x90]
MOV RDI,R14
MOV RSI,R14
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
MOV R14D,0x2a0
LEA R15,[0x18f4d0]
LAB_0015e396:
LEA RDI,[R14 + RBP*0x1]
ADD RDI,-0x450
LEA RSI,[R15 + R14*0x1]
LEA RDX,[R14 + RBP*0x1]
ADD RDX,-0x720
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
ADD R14,-0x30
CMP R14,-0x30
JNZ 0x0015e396
LEA RBX,[0x18e8b0]
LEA R13,[RBP + -0x180]
LEA R14,[RBP + -0xc0]
MOV RDI,R13
MOV RSI,R14
LEA RDX,[RBP + -0x1b0]
MOV RCX,RBX
CALL 0x00171a40
LEA RDX,[RBP + -0x450]
MOV ECX,0xe
MOV RDI,R13
MOV RSI,R14
CALL 0x001693f7
LEA R14,[RBP + -0x480]
MOV RDI,R14
MOV RSI,R14
LEA R15,[RBP + -0x60]
MOV RDX,R15
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
MOV RDI,R13
MOV RSI,R13
MOV RDX,R14
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
MOV R14,R12
LEA RSI,[RBP + -0xf0]
MOV RDI,R15
MOV RDX,R13
MOV RCX,RBX
MOV R8,R12
CALL 0x001772a0
LEA RSI,[RBP + -0x150]
LEA R12,[RBP + -0xc0]
MOV RDI,R12
MOV RDX,R13
MOV RCX,RBX
MOV R8,R14
CALL 0x001772a0
MOV RDI,R12
MOV RSI,R12
MOV RDX,R15
MOV RCX,RBX
MOV R8,R14
CALL 0x001772a0
LEA R13,[RBP + -0x90]
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
MOV RCX,R14
CALL 0x00176b20
MOV RDI,R13
MOV RSI,R13
LEA RDX,[RBP + -0xf0]
MOV RCX,RBX
MOV R8,R14
CALL 0x001772a0
LEA RDX,[RBP + -0x120]
MOV RDI,R13
MOV RSI,R13
MOV RCX,RBX
MOV R8,R14
CALL 0x001772a0
MOV RBX,qword ptr [RBP + -0x30]
MOV RDI,RBX
MOV RSI,R12
CALL 0x001692ec
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R12
XOR ECX,ECX
CALL 0x0015c73e
ADD RSP,0x6f8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void map_to_g1(int8 param_1,int8 param_2,long param_3)
{
int8 uVar1;
int1 *puVar2;
int1 *puVar3;
long lVar4;
long lVar5;
int1 auStack_728 [672];
int1 local_488 [48];
int1 local_458 [432];
int1 local_2a8 [48];
int1 local_278 [192];
int1 local_1b8 [48];
int1 local_188 [48];
int1 local_158 [48];
int1 local_128 [48];
int1 local_f8 [48];
int1 local_c8 [48];
int1 local_98 [48];
int1 local_68 [48];
int8 local_38;
map_to_isogenous_E1(local_c8);
if (param_3 != 0) {
map_to_isogenous_E1(param_1,param_3);
POINTonE1_dadd(local_c8,local_c8,param_1,Aprime_E1);
}
local_38 = param_1;
sqr_mont_384(local_488,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = -0xe;
puVar2 = local_488;
do {
mul_mont_384(puVar2 + -0x30,puVar2,local_488,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = lVar4 + 1;
puVar2 = puVar2 + -0x30;
} while (lVar4 != 0);
puVar2 = local_488;
lVar5 = 0x18ef90;
puVar3 = local_278;
lVar4 = -0xb;
do {
mul_mont_384(puVar3,lVar5,puVar2,BLS12_381_P,0x89f3fffcfffcfffd);
puVar2 = puVar2 + -0x30;
lVar5 = lVar5 + -0x30;
puVar3 = puVar3 + -0x30;
lVar4 = lVar4 + 1;
} while (lVar4 != 0);
mul_mont_384(local_158,local_c8,0x18efc0,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384(local_158,local_158,local_278,BLS12_381_P);
map_fp(local_158,local_c8,local_458,10);
puVar2 = local_488;
lVar4 = 0x18f1a0;
puVar3 = local_2a8;
lVar5 = -10;
do {
mul_mont_384(puVar3,lVar4,puVar2,BLS12_381_P,0x89f3fffcfffcfffd);
puVar2 = puVar2 + -0x30;
lVar4 = lVar4 + -0x30;
puVar3 = puVar3 + -0x30;
lVar5 = lVar5 + 1;
} while (lVar5 != 0);
add_mod_384(local_f8,local_c8,local_2a8,BLS12_381_P);
map_fp(local_f8,local_c8,local_458,9);
mul_mont_384(local_f8,local_f8,local_488,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = 0x2a0;
do {
mul_mont_384(local_458 + lVar4,isogeny_map_to_E1_isogeny_map_y_num + lVar4,auStack_728 + lVar4,
BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = lVar4 + -0x30;
} while (lVar4 != -0x30);
mul_mont_384(local_128,local_c8,0x18f4a0,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384(local_128,local_128,local_1b8,BLS12_381_P);
map_fp(local_128,local_c8,local_458,0xe);
mul_mont_384(local_128,local_128,local_98,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = 0x2a0;
do {
mul_mont_384(local_458 + lVar4,isogeny_map_to_E1_isogeny_map_y_den + lVar4,auStack_728 + lVar4,
BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = lVar4 + -0x30;
} while (lVar4 != -0x30);
add_mod_384(local_188,local_c8,local_1b8,BLS12_381_P);
map_fp(local_188,local_c8,local_458,0xe);
mul_mont_384(local_488,local_488,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_188,local_188,local_488,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_68,local_f8,local_188,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_c8,local_158,local_188,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_c8,local_c8,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384(local_98,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_98,local_98,local_f8,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_98,local_98,local_128,BLS12_381_P,0x89f3fffcfffcfffd);
uVar1 = local_38;
POINTonE1_times_minus_z(local_38,local_c8);
POINTonE1_dadd(uVar1,uVar1,local_c8,0);
return;
}
|
|
459 | my_strnncoll_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
uchar buf[80] ;
uchar *tc1, *tc2;
int i;
if (s2_is_prefix && len1 > len2)
len1= len2;
tc1= buf;
if ((len1 + len2 +2) > (int) sizeof(buf))
tc1= (uchar*) my_malloc(PSI_INSTRUMENT_ME, len1+len2+2, MYF(MY_FAE));
tc2= tc1 + len1+1;
memcpy((char*) tc1, (char*) s1, len1);
tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */
memcpy((char *)tc2, (char *)s2, len2);
tc2[len2]= 0; /* put end of string */
thai2sortable(tc1, len1);
thai2sortable(tc2, len2);
i= strcmp((char*)tc1, (char*)tc2);
if (tc1 != buf)
my_free(tc1);
return i;
} | O3 | c | my_strnncoll_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbx
movq %rcx, -0x88(%rbp)
movq %rsi, %rcx
movq %fs:0x28, %rax
cmpq %r8, %rdx
movq %r8, %r15
cmovbq %rdx, %r15
movq %rax, -0x30(%rbp)
testb %r9b, %r9b
cmoveq %rdx, %r15
leaq (%r8,%r15), %rsi
addq $0x2, %rsi
leaq -0x80(%rbp), %r14
cmpq $0x51, %rsi
jb 0x3f7e6
movl $0x8, %edx
xorl %edi, %edi
movq %rcx, %r14
callq 0x2bb51
movq %r14, %rcx
movq %rax, %r14
leaq (%r14,%r15), %r13
leaq (%r14,%r15), %r12
incq %r12
movq %r14, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x24230
xorl %eax, %eax
movb %al, -0x1(%r12)
movq %r12, %rdi
movq -0x88(%rbp), %rsi
movq %rbx, %rdx
callq 0x24230
xorl %eax, %eax
movb %al, 0x1(%rbx,%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3fa73
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3fa73
movq %r14, %rdi
movq %r12, %rsi
callq 0x24460
movl %eax, %ebx
leaq -0x80(%rbp), %rax
cmpq %rax, %r14
je 0x3f853
movq %r14, %rdi
callq 0x2bd7e
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3f873
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24360
| my_strnncoll_tis620:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, r8
mov [rbp+var_88], rcx
mov rcx, rsi
mov rax, fs:28h
cmp rdx, r8
mov r15, r8
cmovb r15, rdx
mov [rbp+var_30], rax
test r9b, r9b
cmovz r15, rdx
lea rsi, [r8+r15]
add rsi, 2
lea r14, [rbp+var_80]
cmp rsi, 51h ; 'Q'
jb short loc_3F7E6
mov edx, 8
xor edi, edi
mov r14, rcx
call my_malloc
mov rcx, r14
mov r14, rax
loc_3F7E6:
lea r13, [r14+r15]
lea r12, [r14+r15]
inc r12
mov rdi, r14
mov rsi, rcx
mov rdx, r15
call _memcpy
xor eax, eax
mov [r12-1], al
mov rdi, r12
mov rsi, [rbp+var_88]
mov rdx, rbx
call _memcpy
xor eax, eax
mov [rbx+r13+1], al
mov rdi, r14
mov rsi, r15
call thai2sortable
mov rdi, r12
mov rsi, rbx
call thai2sortable
mov rdi, r14
mov rsi, r12
call _strcmp
mov ebx, eax
lea rax, [rbp+var_80]
cmp r14, rax
jz short loc_3F853
mov rdi, r14
call my_free
loc_3F853:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3F873
mov eax, ebx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3F873:
call ___stack_chk_fail
| long long my_strnncoll_tis620(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v8; // rax
unsigned long long v9; // r15
unsigned long long v10; // rsi
_BYTE *v11; // r14
long long v12; // r14
long long v13; // rax
unsigned int v14; // ebx
_BYTE v17[80]; // [rsp+10h] [rbp-80h] BYREF
unsigned long long v18; // [rsp+60h] [rbp-30h]
v8 = __readfsqword(0x28u);
v9 = a5;
if ( a3 < a5 )
v9 = a3;
v18 = v8;
if ( !a6 )
v9 = a3;
v10 = a5 + v9 + 2;
v11 = v17;
if ( v10 >= 0x51 )
{
v12 = a2;
v13 = my_malloc(0, v10, 8);
a2 = v12;
v11 = (_BYTE *)v13;
}
memcpy(v11, a2, v9);
v11[v9] = 0;
memcpy(&v11[v9 + 1], a4, a5);
v11[v9 + 1 + a5] = 0;
thai2sortable(v11, v9);
thai2sortable(&v11[v9 + 1], a5);
v14 = strcmp(v11, &v11[v9 + 1]);
if ( v11 != v17 )
my_free((long long)v11);
return v14;
}
| my_strnncoll_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,R8
MOV qword ptr [RBP + -0x88],RCX
MOV RCX,RSI
MOV RAX,qword ptr FS:[0x28]
CMP RDX,R8
MOV R15,R8
CMOVC R15,RDX
MOV qword ptr [RBP + -0x30],RAX
TEST R9B,R9B
CMOVZ R15,RDX
LEA RSI,[R8 + R15*0x1]
ADD RSI,0x2
LEA R14,[RBP + -0x80]
CMP RSI,0x51
JC 0x0013f7e6
MOV EDX,0x8
XOR EDI,EDI
MOV R14,RCX
CALL 0x0012bb51
MOV RCX,R14
MOV R14,RAX
LAB_0013f7e6:
LEA R13,[R14 + R15*0x1]
LEA R12,[R14 + R15*0x1]
INC R12
MOV RDI,R14
MOV RSI,RCX
MOV RDX,R15
CALL 0x00124230
XOR EAX,EAX
MOV byte ptr [R12 + -0x1],AL
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,RBX
CALL 0x00124230
XOR EAX,EAX
MOV byte ptr [RBX + R13*0x1 + 0x1],AL
MOV RDI,R14
MOV RSI,R15
CALL 0x0013fa73
MOV RDI,R12
MOV RSI,RBX
CALL 0x0013fa73
MOV RDI,R14
MOV RSI,R12
CALL 0x00124460
MOV EBX,EAX
LEA RAX,[RBP + -0x80]
CMP R14,RAX
JZ 0x0013f853
MOV RDI,R14
CALL 0x0012bd7e
LAB_0013f853:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013f873
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013f873:
CALL 0x00124360
|
int my_strnncoll_tis620(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
int iVar1;
char *__s1;
ulong uVar2;
char *__s2;
ulong __n;
long in_FS_OFFSET;
char local_88 [80];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
__n = param_5;
if (param_3 < param_5) {
__n = param_3;
}
if (param_6 == '\0') {
__n = param_3;
}
uVar2 = param_5 + __n + 2;
__s1 = local_88;
if (0x50 < uVar2) {
__s1 = (char *)my_malloc(0,uVar2,8);
}
__s2 = __s1 + __n + 1;
memcpy(__s1,param_2,__n);
__s1[__n] = '\0';
memcpy(__s2,param_4,param_5);
__s1[param_5 + 1 + __n] = '\0';
thai2sortable(__s1,__n);
thai2sortable(__s2,param_5);
iVar1 = strcmp(__s1,__s2);
if (__s1 != local_88) {
my_free(__s1);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
460 | my_strntoull10rnd_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static ulonglong
my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t length,
int unsign_fl,
char **endptr, int *err)
{
char buf[256], *b= buf;
ulonglong res;
const uchar *end, *s= (const uchar*) nptr;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf)-1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be a number part */
*b++= (char) wc;
}
res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
*endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
} | O3 | c | my_strntoull10rnd_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %r9, -0x150(%rbp)
movq %r8, -0x158(%rbp)
movl %ecx, -0x134(%rbp)
movq %rsi, %rcx
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rbx
movl $0xff, %r13d
cmpq %r13, %rdx
cmovbq %rdx, %r13
addq %rsi, %r13
leaq -0x148(%rbp), %rsi
movq %rcx, -0x140(%rbp)
movq %rcx, %rdx
movq %r13, %rcx
callq *%rbx
leaq -0x130(%rbp), %r15
testl %eax, %eax
jle 0xc5447
movq -0x140(%rbp), %r14
movq -0x148(%rbp), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x64, %rdx
ja 0xc5447
movl %eax, %eax
addq %rax, %r14
movb %cl, (%r15)
incq %r15
movq %r12, %rdi
leaq -0x148(%rbp), %rsi
movq %r14, %rdx
movq %r13, %rcx
callq *%rbx
testl %eax, %eax
jg 0xc5415
leaq -0x130(%rbp), %r14
subq %r14, %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl -0x134(%rbp), %ecx
movq -0x158(%rbp), %rbx
movq %rbx, %r8
movq -0x150(%rbp), %r9
callq 0xb7090
movl 0x98(%r12), %ecx
movq (%rbx), %rdx
subq %r14, %rdx
imulq %rcx, %rdx
movq -0x140(%rbp), %rcx
addq %rdx, %rcx
movq %rcx, (%rbx)
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0xc54b6
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| my_strntoull10rnd_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov [rbp+var_150], r9
mov [rbp+var_158], r8
mov [rbp+var_134], ecx
mov rcx, rsi
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
mov rbx, [rax+28h]
mov r13d, 0FFh
cmp rdx, r13
cmovb r13, rdx
add r13, rsi
lea rsi, [rbp+var_148]
mov [rbp+var_140], rcx
mov rdx, rcx
mov rcx, r13
call rbx
lea r15, [rbp+var_130]
test eax, eax
jle short loc_C5447
mov r14, [rbp+var_140]
loc_C5415:
mov rcx, [rbp+var_148]
lea rdx, [rcx-1]
cmp rdx, 64h ; 'd'
ja short loc_C5447
mov eax, eax
add r14, rax
mov [r15], cl
inc r15
mov rdi, r12
lea rsi, [rbp+var_148]
mov rdx, r14
mov rcx, r13
call rbx
test eax, eax
jg short loc_C5415
loc_C5447:
lea r14, [rbp+var_130]
sub r15, r14
mov rdi, r12
mov rsi, r14
mov rdx, r15
mov ecx, [rbp+var_134]
mov rbx, [rbp+var_158]
mov r8, rbx
mov r9, [rbp+var_150]
call my_strntoull10rnd_8bit
mov ecx, [r12+98h]
mov rdx, [rbx]
sub rdx, r14
imul rdx, rcx
mov rcx, [rbp+var_140]
add rcx, rdx
mov [rbx], rcx
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_C54B6
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C54B6:
call ___stack_chk_fail
| long long my_strntoull10rnd_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
int a4,
unsigned __int8 **a5,
int *a6)
{
long long ( *v6)(long long, long long *, long long, long long); // rbx
long long v7; // r13
long long v8; // r13
int v9; // eax
unsigned __int8 *v10; // r15
long long v11; // r14
long long result; // rax
long long v15; // [rsp+18h] [rbp-148h] BYREF
long long v16; // [rsp+20h] [rbp-140h]
int v17; // [rsp+2Ch] [rbp-134h]
unsigned __int8 v18[256]; // [rsp+30h] [rbp-130h] BYREF
unsigned long long v19; // [rsp+130h] [rbp-30h]
v17 = a4;
v19 = __readfsqword(0x28u);
v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v7 = 255LL;
if ( a3 < 0xFF )
v7 = a3;
v8 = a2 + v7;
v16 = a2;
v9 = v6(a1, &v15, a2, v8);
v10 = v18;
if ( v9 > 0 )
{
v11 = v16;
do
{
if ( (unsigned long long)(v15 - 1) > 0x64 )
break;
v11 += (unsigned int)v9;
*v10++ = v15;
v9 = v6(a1, &v15, v11, v8);
}
while ( v9 > 0 );
}
result = my_strntoull10rnd_8bit(a1, v18, v10 - v18, v17, a5, a6);
*a5 = (unsigned __int8 *)(*(unsigned int *)(a1 + 152) * (*a5 - v18) + v16);
return result;
}
| my_strntoull10rnd_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV qword ptr [RBP + -0x150],R9
MOV qword ptr [RBP + -0x158],R8
MOV dword ptr [RBP + -0x134],ECX
MOV RCX,RSI
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RBX,qword ptr [RAX + 0x28]
MOV R13D,0xff
CMP RDX,R13
CMOVC R13,RDX
ADD R13,RSI
LEA RSI,[RBP + -0x148]
MOV qword ptr [RBP + -0x140],RCX
MOV RDX,RCX
MOV RCX,R13
CALL RBX
LEA R15,[RBP + -0x130]
TEST EAX,EAX
JLE 0x001c5447
MOV R14,qword ptr [RBP + -0x140]
LAB_001c5415:
MOV RCX,qword ptr [RBP + -0x148]
LEA RDX,[RCX + -0x1]
CMP RDX,0x64
JA 0x001c5447
MOV EAX,EAX
ADD R14,RAX
MOV byte ptr [R15],CL
INC R15
MOV RDI,R12
LEA RSI,[RBP + -0x148]
MOV RDX,R14
MOV RCX,R13
CALL RBX
TEST EAX,EAX
JG 0x001c5415
LAB_001c5447:
LEA R14,[RBP + -0x130]
SUB R15,R14
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
MOV ECX,dword ptr [RBP + -0x134]
MOV RBX,qword ptr [RBP + -0x158]
MOV R8,RBX
MOV R9,qword ptr [RBP + -0x150]
CALL 0x001b7090
MOV ECX,dword ptr [R12 + 0x98]
MOV RDX,qword ptr [RBX]
SUB RDX,R14
IMUL RDX,RCX
MOV RCX,qword ptr [RBP + -0x140]
ADD RCX,RDX
MOV qword ptr [RBX],RCX
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001c54b6
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c54b6:
CALL 0x00129270
|
void my_strntoull10rnd_mb2_or_mb4
(long param_1,long param_2,ulong param_3,int4 param_4,long *param_5,
int8 param_6)
{
code *pcVar1;
uint uVar2;
ulong uVar3;
long lVar4;
int1 *puVar5;
long in_FS_OFFSET;
long local_150;
long local_148;
int4 local_13c;
int1 local_138 [256];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar3 = 0xff;
if (param_3 < 0xff) {
uVar3 = param_3;
}
local_148 = param_2;
local_13c = param_4;
uVar2 = (*pcVar1)(param_1,&local_150,param_2,uVar3 + param_2);
puVar5 = local_138;
lVar4 = local_148;
while ((0 < (int)uVar2 && (local_150 - 1U < 0x65))) {
lVar4 = lVar4 + (ulong)uVar2;
*puVar5 = (char)local_150;
puVar5 = puVar5 + 1;
uVar2 = (*pcVar1)(param_1,&local_150,lVar4,uVar3 + param_2);
}
my_strntoull10rnd_8bit(param_1,local_138,(long)puVar5 - (long)local_138,local_13c,param_5,param_6)
;
*param_5 = local_148 + (*param_5 - (long)local_138) * (ulong)*(uint *)(param_1 + 0x98);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
461 | mjCFlex::mjCFlex(mjCModel*) | aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_mesh.cc | mjCFlex::mjCFlex(mjCModel* _model) {
mjs_defaultFlex(&spec);
elemtype = mjOBJ_FLEX;
// set model
model = _model;
// clear internal variables
nvert = 0;
nedge = 0;
nelem = 0;
matid = -1;
rigid = false;
centered = false;
PointToLocal();
CopyFromSpec();
} | O0 | cpp | mjCFlex::mjCFlex(mjCModel*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x367510
movq (%rsp), %rdi
leaq 0x2900d1(%rip), %rax # 0x5f7548
movq %rax, (%rdi)
addq $0x460, %rdi # imm = 0x460
callq 0x4c900
jmp 0x367488
movq (%rsp), %rdi
movl $0x9, 0x8(%rdi)
movq 0x18(%rsp), %rax
movq %rax, 0xc0(%rdi)
movl $0x0, 0xc8(%rdi)
movl $0x0, 0xcc(%rdi)
movl $0x0, 0xd0(%rdi)
movl $0xffffffff, 0xd4(%rdi) # imm = 0xFFFFFFFF
movb $0x0, 0xd8(%rdi)
movb $0x0, 0xd9(%rdi)
callq 0x3676f0
jmp 0x3674dc
movq (%rsp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x3674ea
addq $0x28, %rsp
retq
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
callq 0x3334d0
movq 0x10(%rsp), %rdi
callq 0x4a070
| _ZN7mjCFlexC2EP8mjCModel:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rdi, [rsp+28h+var_8]; this
mov [rsp+28h+var_28], rdi
call _ZN8mjCFlex_C2Ev; mjCFlex_::mjCFlex_(void)
mov rdi, [rsp+28h+var_28]
lea rax, off_5F7548
mov [rdi], rax
add rdi, 460h
call _mjs_defaultFlex
jmp short $+2
loc_367488:
mov rdi, [rsp+28h+var_28]; this
mov dword ptr [rdi+8], 9
mov rax, [rsp+28h+var_10]
mov [rdi+0C0h], rax
mov dword ptr [rdi+0C8h], 0
mov dword ptr [rdi+0CCh], 0
mov dword ptr [rdi+0D0h], 0
mov dword ptr [rdi+0D4h], 0FFFFFFFFh
mov byte ptr [rdi+0D8h], 0
mov byte ptr [rdi+0D9h], 0
call _ZN7mjCFlex12PointToLocalEv; mjCFlex::PointToLocal(void)
jmp short $+2
loc_3674DC:
mov rdi, [rsp+28h+var_28]
mov rax, [rdi]
mov rax, [rax]
call rax
jmp short $+2
loc_3674EA:
add rsp, 28h
retn
mov rdi, [rsp+0]; this
mov rcx, rax
mov eax, edx
mov [rsp+arg_8], rcx
mov [rsp+arg_4], eax
call _ZN8mjCFlex_D2Ev; mjCFlex_::~mjCFlex_()
mov rdi, [rsp+arg_8]
call __Unwind_Resume
| void mjCFlex::mjCFlex(mjCFlex *this, mjCModel *a2)
{
mjCFlex_::mjCFlex_(this);
*(_QWORD *)this = &off_5F7548;
mjs_defaultFlex((long long)this + 1120);
*((_DWORD *)this + 2) = 9;
*((_QWORD *)this + 24) = a2;
*((_DWORD *)this + 50) = 0;
*((_DWORD *)this + 51) = 0;
*((_DWORD *)this + 52) = 0;
*((_DWORD *)this + 53) = -1;
*((_BYTE *)this + 216) = 0;
*((_BYTE *)this + 217) = 0;
mjCFlex::PointToLocal(this);
(**(void ( ***)(mjCFlex *))this)(this);
}
| |||
462 | mjCFlex::mjCFlex(mjCModel*) | aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_mesh.cc | mjCFlex::mjCFlex(mjCModel* _model) {
mjs_defaultFlex(&spec);
elemtype = mjOBJ_FLEX;
// set model
model = _model;
// clear internal variables
nvert = 0;
nedge = 0;
nelem = 0;
matid = -1;
rigid = false;
centered = false;
PointToLocal();
CopyFromSpec();
} | O3 | cpp | mjCFlex::mjCFlex(mjCModel*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xe3d06
leaq 0x18b9fe(%rip), %rax # 0x26f638
movq %rax, (%rbx)
leaq 0x460(%rbx), %rdi
callq 0x2f110
leaq 0x8(%rbx), %rax
movl $0x9, 0x8(%rbx)
movq %r14, 0xc0(%rbx)
vmovaps 0xd96ed(%rip), %xmm0 # 0x1bd350
vmovups %xmm0, 0xc8(%rbx)
movw $0x0, 0xd8(%rbx)
movq %rax, 0x460(%rbx)
leaq 0x10(%rbx), %rax
movq %rax, 0x468(%rbx)
leaq 0x30(%rbx), %rax
movq %rax, 0x470(%rbx)
leaq 0x2e0(%rbx), %rax
movq %rax, 0x530(%rbx)
leaq 0x300(%rbx), %rax
movq %rax, 0x538(%rbx)
leaq 0x318(%rbx), %rax
movq %rax, 0x540(%rbx)
leaq 0x348(%rbx), %rax
movq %rax, 0x550(%rbx)
leaq 0x330(%rbx), %rax
movq %rax, 0x548(%rbx)
leaq 0x50(%rbx), %rax
movq %rax, 0x558(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xc7e46
movq %r14, %rdi
callq 0x2dee0
nop
| _ZN7mjCFlexC2EP8mjCModel:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN8mjCFlex_C2Ev; mjCFlex_::mjCFlex_(void)
lea rax, off_26F638
mov [rbx], rax
lea rdi, [rbx+460h]
call _mjs_defaultFlex
lea rax, [rbx+8]
mov dword ptr [rbx+8], 9
mov [rbx+0C0h], r14
vmovaps xmm0, cs:xmmword_1BD350
vmovups xmmword ptr [rbx+0C8h], xmm0
mov word ptr [rbx+0D8h], 0
mov [rbx+460h], rax
lea rax, [rbx+10h]
mov [rbx+468h], rax
lea rax, [rbx+30h]
mov [rbx+470h], rax
lea rax, [rbx+2E0h]
mov [rbx+530h], rax
lea rax, [rbx+300h]
mov [rbx+538h], rax
lea rax, [rbx+318h]
mov [rbx+540h], rax
lea rax, [rbx+348h]
mov [rbx+550h], rax
lea rax, [rbx+330h]
mov [rbx+548h], rax
lea rax, [rbx+50h]
mov [rbx+558h], rax
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx; this
call _ZN8mjCFlex_D2Ev; mjCFlex_::~mjCFlex_()
mov rdi, r14
call __Unwind_Resume
| void mjCFlex::mjCFlex(mjCFlex *this, mjCModel *a2, __m128 a3)
{
_RBX = this;
mjCFlex_::mjCFlex_(this);
*(_QWORD *)this = &off_26F638;
mjs_defaultFlex((long long)this + 1120, a3);
*((_DWORD *)this + 2) = 9;
*((_QWORD *)this + 24) = a2;
__asm
{
vmovaps xmm0, cs:xmmword_1BD350
vmovups xmmword ptr [rbx+0C8h], xmm0
}
*((_WORD *)this + 108) = 0;
*((_QWORD *)this + 140) = (char *)this + 8;
*((_QWORD *)this + 141) = (char *)this + 16;
*((_QWORD *)this + 142) = (char *)this + 48;
*((_QWORD *)this + 166) = (char *)this + 736;
*((_QWORD *)this + 167) = (char *)this + 768;
*((_QWORD *)this + 168) = (char *)this + 792;
*((_QWORD *)this + 170) = (char *)this + 840;
*((_QWORD *)this + 169) = (char *)this + 816;
*((_QWORD *)this + 171) = (char *)this + 80;
(**(void ( ***)(mjCFlex *))_RBX)(_RBX);
}
| mjCFlex:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x001e3d06
LEA RAX,[0x36f638]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x460]
LAB_001e3c44:
CALL 0x0012f110
LEA RAX,[RBX + 0x8]
MOV dword ptr [RBX + 0x8],0x9
MOV qword ptr [RBX + 0xc0],R14
VMOVAPS XMM0,xmmword ptr [0x002bd350]
VMOVUPS xmmword ptr [RBX + 0xc8],XMM0
MOV word ptr [RBX + 0xd8],0x0
MOV qword ptr [RBX + 0x460],RAX
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX + 0x468],RAX
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x470],RAX
LEA RAX,[RBX + 0x2e0]
MOV qword ptr [RBX + 0x530],RAX
LEA RAX,[RBX + 0x300]
MOV qword ptr [RBX + 0x538],RAX
LEA RAX,[RBX + 0x318]
MOV qword ptr [RBX + 0x540],RAX
LEA RAX,[RBX + 0x348]
MOV qword ptr [RBX + 0x550],RAX
LEA RAX,[RBX + 0x330]
MOV qword ptr [RBX + 0x548],RAX
LEA RAX,[RBX + 0x50]
MOV qword ptr [RBX + 0x558],RAX
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
LAB_001e3cea:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* mjCFlex::mjCFlex(mjCModel*) */
void __thiscall mjCFlex::mjCFlex(mjCFlex *this,mjCModel *param_1)
{
int8 uVar1;
mjCFlex_::mjCFlex_((mjCFlex_ *)this);
*(int ***)this = &PTR_CopyFromSpec_0036f638;
/* try { // try from 001e3c44 to 001e3ce9 has its CatchHandler @ 001e3cf2 */
mjs_defaultFlex(this + 0x460);
*(int4 *)(this + 8) = 9;
*(mjCModel **)(this + 0xc0) = param_1;
uVar1 = _UNK_002bd358;
*(int8 *)(this + 200) = _DAT_002bd350;
*(int8 *)(this + 0xd0) = uVar1;
*(int2 *)(this + 0xd8) = 0;
*(mjCFlex **)(this + 0x460) = this + 8;
*(mjCFlex **)(this + 0x468) = this + 0x10;
*(mjCFlex **)(this + 0x470) = this + 0x30;
*(mjCFlex **)(this + 0x530) = this + 0x2e0;
*(mjCFlex **)(this + 0x538) = this + 0x300;
*(mjCFlex **)(this + 0x540) = this + 0x318;
*(mjCFlex **)(this + 0x550) = this + 0x348;
*(mjCFlex **)(this + 0x548) = this + 0x330;
*(mjCFlex **)(this + 0x558) = this + 0x50;
(*(code *)**(int8 **)this)(this);
return;
}
|
|
463 | addrstream_init | xtate/src/generate-modules/addr-stream-gen.c | bool addrstream_init(const XConf *xconf, uint64_t *count_targets,
uint64_t *count_endpoints, bool *init_ipv4,
bool *init_ipv6) {
if (xconf->tx_thread_count != 1) {
LOG(LEVEL_ERROR, "(stream generator) supports only 1 tx thread.\n");
return false;
}
if (addrstream_conf.splitter[0] == '\0') {
LOG(LEVEL_HINT,
"(stream generator) use space as splitter for no specified.\n");
addrstream_conf.splitter[0] = ' ';
addrstream_conf.splitter_len = 1;
}
if (!addrstream_conf.fp) {
addrstream_conf.fp = stdin;
}
if (addrstream_conf.rounds <= 0) {
addrstream_conf.rounds = XCONF_DFT_BLACKROCK_ROUNDS;
}
/*init all adapter in default*/
*init_ipv4 = true;
*init_ipv6 = true;
addrstream_conf.seed = xconf->seed;
return true;
} | O3 | c | addrstream_init:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x658(%rdi), %ebp
cmpl $0x1, %ebp
jne 0x1f682
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r14
cmpb $0x0, 0x1839be(%rip) # 0x1a2fd4
jne 0x1f63d
leaq 0x41631(%rip), %rsi # 0x60c50
movl $0xfffffffe, %edi # imm = 0xFFFFFFFE
xorl %eax, %eax
callq 0x536da
movb $0x20, 0x1839a2(%rip) # 0x1a2fd4
movq $0x1, 0x1839a3(%rip) # 0x1a2fe0
cmpq $0x0, 0x183893(%rip) # 0x1a2ed8
jne 0x1f658
movq 0x7599a(%rip), %rax # 0x94fe8
movq (%rax), %rax
movq %rax, 0x183880(%rip) # 0x1a2ed8
cmpl $0x0, 0x183971(%rip) # 0x1a2fd0
jne 0x1f66b
movl $0xe, 0x183965(%rip) # 0x1a2fd0
movb $0x1, %al
movb %al, (%r15)
movb %al, (%rbx)
movq 0x6b8(%r14), %rax
movq %rax, 0x183860(%rip) # 0x1a2ee0
jmp 0x1f695
leaq 0x41598(%rip), %rsi # 0x60c21
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x536da
cmpl $0x1, %ebp
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| addrstream_init:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, [rdi+658h]
cmp ebp, 1
jnz short loc_1F682
mov rbx, r8
mov r15, rcx
mov r14, rdi
cmp cs:byte_1A2FD4, 0
jnz short loc_1F63D
lea rsi, aStreamGenerato; "(stream generator) use space as splitte"...
mov edi, 0FFFFFFFEh
xor eax, eax
call LOG
mov cs:byte_1A2FD4, 20h ; ' '
mov cs:qword_1A2FE0, 1
loc_1F63D:
cmp cs:addrstream_conf, 0
jnz short loc_1F658
mov rax, cs:stdin_ptr
mov rax, [rax]
mov cs:addrstream_conf, rax
loc_1F658:
cmp cs:dword_1A2FD0, 0
jnz short loc_1F66B
mov cs:dword_1A2FD0, 0Eh
loc_1F66B:
mov al, 1
mov [r15], al
mov [rbx], al
mov rax, [r14+6B8h]
mov cs:qword_1A2EE0, rax
jmp short loc_1F695
loc_1F682:
lea rsi, aStreamGenerato_0; "(stream generator) supports only 1 tx t"...
mov edi, 0FFFFFFFFh
xor eax, eax
call LOG
loc_1F695:
cmp ebp, 1
setz al
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| bool addrstream_init(long long a1, long long a2, int a3, _BYTE *a4, _BYTE *a5, int a6)
{
int v6; // ebp
v6 = *(_DWORD *)(a1 + 1624);
if ( v6 == 1 )
{
if ( !byte_1A2FD4 )
{
LOG(
-2,
(unsigned int)"(stream generator) use space as splitter for no specified.\n",
a3,
(_DWORD)a4,
(_DWORD)a5,
a6);
byte_1A2FD4 = 32;
qword_1A2FE0 = 1LL;
}
if ( !addrstream_conf )
addrstream_conf = stdin;
if ( !dword_1A2FD0 )
dword_1A2FD0 = 14;
*a4 = 1;
*a5 = 1;
qword_1A2EE0 = *(_QWORD *)(a1 + 1720);
}
else
{
LOG(-1, (unsigned int)"(stream generator) supports only 1 tx thread.\n", a3, (_DWORD)a4, (_DWORD)a5, a6);
}
return v6 == 1;
}
| addrstream_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,dword ptr [RDI + 0x658]
CMP EBP,0x1
JNZ 0x0011f682
MOV RBX,R8
MOV R15,RCX
MOV R14,RDI
CMP byte ptr [0x002a2fd4],0x0
JNZ 0x0011f63d
LEA RSI,[0x160c50]
MOV EDI,0xfffffffe
XOR EAX,EAX
CALL 0x001536da
MOV byte ptr [0x002a2fd4],0x20
MOV qword ptr [0x002a2fe0],0x1
LAB_0011f63d:
CMP qword ptr [0x002a2ed8],0x0
JNZ 0x0011f658
MOV RAX,qword ptr [0x00194fe8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x002a2ed8],RAX
LAB_0011f658:
CMP dword ptr [0x002a2fd0],0x0
JNZ 0x0011f66b
MOV dword ptr [0x002a2fd0],0xe
LAB_0011f66b:
MOV AL,0x1
MOV byte ptr [R15],AL
MOV byte ptr [RBX],AL
MOV RAX,qword ptr [R14 + 0x6b8]
MOV qword ptr [0x002a2ee0],RAX
JMP 0x0011f695
LAB_0011f682:
LEA RSI,[0x160c21]
MOV EDI,0xffffffff
XOR EAX,EAX
CALL 0x001536da
LAB_0011f695:
CMP EBP,0x1
SETZ AL
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
bool addrstream_init(long param_1,int8 param_2,int8 param_3,int1 *param_4,
int1 *param_5)
{
int iVar1;
iVar1 = *(int *)(param_1 + 0x658);
if (iVar1 == 1) {
if (DAT_002a2fd4 == '\0') {
LOG(0xfffffffe,"(stream generator) use space as splitter for no specified.\n");
DAT_002a2fd4 = ' ';
DAT_002a2fe0 = 1;
}
if (addrstream_conf == 0) {
addrstream_conf = *(long *)PTR_stdin_00194fe8;
}
if (DAT_002a2fd0 == 0) {
DAT_002a2fd0 = 0xe;
}
*param_4 = 1;
*param_5 = 1;
DAT_002a2ee0 = *(int8 *)(param_1 + 0x6b8);
}
else {
LOG(0xffffffff,"(stream generator) supports only 1 tx thread.\n");
}
return iVar1 == 1;
}
|
|
464 | init_available_charsets | eloqsql/mysys/charset.c | static void init_available_charsets(void)
{
char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
struct charset_info_st **cs;
MY_CHARSET_LOADER loader;
DBUG_ENTER("init_available_charsets");
bzero((char*) &all_charsets,sizeof(all_charsets));
bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics));
my_hash_init2(key_memory_charsets, &charset_name_hash, 16,
&my_charset_latin1, 64, 0, 0, get_charset_key,
0, 0, HASH_UNIQUE);
init_compiled_charsets(MYF(0));
/* Copy compiled charsets */
for (cs= (struct charset_info_st**) all_charsets;
cs < (struct charset_info_st**) all_charsets +
array_elements(all_charsets)-1 ;
cs++)
{
if (*cs)
{
DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN);
if (cs[0]->m_ctype)
if (init_state_maps(*cs))
*cs= NULL;
}
}
my_charset_loader_init_mysys(&loader);
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
my_read_charset_file(&loader, fname, MYF(0));
DBUG_VOID_RETURN;
} | O0 | c | init_available_charsets:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq 0x35eb01(%rip), %rdi # 0x391e10
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x251d0
leaq 0x362b5e(%rip), %rdi # 0x395e80
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x251d0
leaq 0x35e7b7(%rip), %rax # 0x391aec
movl (%rax), %edi
leaq 0x362ad2(%rip), %rsi # 0x395e10
movl $0x10, %edx
leaq 0x24cae6(%rip), %rcx # 0x27fe30
movl $0x40, %r8d
xorl %eax, %eax
movl %eax, %r9d
leaq 0x1ab4(%rip), %rax # 0x34e10
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x1, 0x20(%rsp)
callq 0x37d00
xorl %eax, %eax
movl %eax, %edi
callq 0x3cac0
leaq 0x35ea78(%rip), %rax # 0x391e10
movq %rax, -0x2d8(%rbp)
leaq 0x35ea6a(%rip), %rax # 0x391e10
addq $0x4000, %rax # imm = 0x4000
addq $-0x8, %rax
cmpq %rax, -0x2d8(%rbp)
jae 0x33416
movq -0x2d8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x33400
jmp 0x333c8
jmp 0x333ca
movq -0x2d8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x40(%rax)
je 0x333fe
movq -0x2d8(%rbp), %rax
movq (%rax), %rdi
callq 0x34970
cmpb $0x0, %al
je 0x333fc
movq -0x2d8(%rbp), %rax
movq $0x0, (%rax)
jmp 0x333fe
jmp 0x33400
jmp 0x33402
movq -0x2d8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x2d8(%rbp)
jmp 0x3339f
leaq -0x2d0(%rbp), %rdi
callq 0x32910
leaq -0x220(%rbp), %rdi
callq 0x32fb0
movq %rax, %rdi
leaq 0x504c4(%rip), %rsi # 0x838fc
callq 0x25330
leaq -0x220(%rbp), %rsi
leaq -0x2d0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x34e50
jmp 0x33456
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x33471
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x25390
nopw %cs:(%rax,%rax)
| init_available_charsets:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, all_charsets
xor esi, esi
mov edx, 4000h
call _memset
lea rdi, my_collation_statistics
xor esi, esi
mov edx, 4000h
call _memset
lea rax, key_memory_charsets
mov edi, [rax]
lea rsi, charset_name_hash
mov edx, 10h
lea rcx, my_charset_latin1
mov r8d, 40h ; '@'
xor eax, eax
mov r9d, eax
lea rax, get_charset_key
mov [rsp+300h+var_300], 0
mov [rsp+300h+var_2F8], rax
mov [rsp+300h+var_2F0], 0
mov [rsp+300h+var_2E8], 0
mov [rsp+300h+var_2E0], 1
call my_hash_init2
xor eax, eax
mov edi, eax
call init_compiled_charsets
lea rax, all_charsets
mov [rbp+var_2D8], rax
loc_3339F:
lea rax, all_charsets
add rax, 4000h
add rax, 0FFFFFFFFFFFFFFF8h
cmp [rbp+var_2D8], rax
jnb short loc_33416
mov rax, [rbp+var_2D8]
cmp qword ptr [rax], 0
jz short loc_33400
jmp short $+2
loc_333C8:
jmp short $+2
loc_333CA:
mov rax, [rbp+var_2D8]
mov rax, [rax]
cmp qword ptr [rax+40h], 0
jz short loc_333FE
mov rax, [rbp+var_2D8]
mov rdi, [rax]
call init_state_maps
cmp al, 0
jz short loc_333FC
mov rax, [rbp+var_2D8]
mov qword ptr [rax], 0
loc_333FC:
jmp short $+2
loc_333FE:
jmp short $+2
loc_33400:
jmp short $+2
loc_33402:
mov rax, [rbp+var_2D8]
add rax, 8
mov [rbp+var_2D8], rax
jmp short loc_3339F
loc_33416:
lea rdi, [rbp+var_2D0]
call my_charset_loader_init_mysys
lea rdi, [rbp+var_220]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
lea rsi, [rbp+var_220]
lea rdi, [rbp+var_2D0]
xor eax, eax
mov edx, eax
call my_read_charset_file
jmp short $+2
loc_33456:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_33471
add rsp, 300h
pop rbp
retn
loc_33471:
call ___stack_chk_fail
| unsigned long long init_available_charsets()
{
long long charsets_dir; // rax
_QWORD *i; // [rsp+28h] [rbp-2D8h]
_BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF
_BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF
unsigned long long v5; // [rsp+2F8h] [rbp-8h]
v5 = __readfsqword(0x28u);
memset(all_charsets, 0LL, sizeof(all_charsets));
memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics));
my_hash_init2(
key_memory_charsets,
(unsigned int)&charset_name_hash,
16,
(unsigned int)&my_charset_latin1,
64,
0,
0LL,
(long long)get_charset_key,
0LL,
0LL,
1);
init_compiled_charsets(0LL);
for ( i = all_charsets; i < &all_charsets[2047]; ++i )
{
if ( *i && *(_QWORD *)(*i + 64LL) )
{
if ( (unsigned __int8)init_state_maps(*i) )
*i = 0LL;
}
}
my_charset_loader_init_mysys((long long)v3);
charsets_dir = get_charsets_dir((long long)v4);
stpcpy(charsets_dir, "Index.xml");
my_read_charset_file(v3, v4, 0LL);
return __readfsqword(0x28u);
}
| init_available_charsets:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0x491e10]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x001251d0
LEA RDI,[0x495e80]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x001251d0
LEA RAX,[0x491aec]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x495e10]
MOV EDX,0x10
LEA RCX,[0x37fe30]
MOV R8D,0x40
XOR EAX,EAX
MOV R9D,EAX
LEA RAX,[0x134e10]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x20],0x1
CALL 0x00137d00
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013cac0
LEA RAX,[0x491e10]
MOV qword ptr [RBP + -0x2d8],RAX
LAB_0013339f:
LEA RAX,[0x491e10]
ADD RAX,0x4000
ADD RAX,-0x8
CMP qword ptr [RBP + -0x2d8],RAX
JNC 0x00133416
MOV RAX,qword ptr [RBP + -0x2d8]
CMP qword ptr [RAX],0x0
JZ 0x00133400
JMP 0x001333c8
LAB_001333c8:
JMP 0x001333ca
LAB_001333ca:
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001333fe
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RDI,qword ptr [RAX]
CALL 0x00134970
CMP AL,0x0
JZ 0x001333fc
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX],0x0
LAB_001333fc:
JMP 0x001333fe
LAB_001333fe:
JMP 0x00133400
LAB_00133400:
JMP 0x00133402
LAB_00133402:
MOV RAX,qword ptr [RBP + -0x2d8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x2d8],RAX
JMP 0x0013339f
LAB_00133416:
LEA RDI,[RBP + -0x2d0]
CALL 0x00132910
LEA RDI,[RBP + -0x220]
CALL 0x00132fb0
MOV RDI,RAX
LEA RSI,[0x1838fc]
CALL 0x00125330
LEA RSI,[RBP + -0x220]
LEA RDI,[RBP + -0x2d0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00134e50
JMP 0x00133456
LAB_00133456:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00133471
ADD RSP,0x300
POP RBP
RET
LAB_00133471:
CALL 0x00125390
|
void init_available_charsets(void)
{
char cVar1;
char *__dest;
long in_FS_OFFSET;
long *local_2e0;
int1 local_2d8 [176];
int1 local_228 [536];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(&all_charsets,0,0x4000);
memset(my_collation_statistics,0,0x4000);
my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0,
get_charset_key,0,0,1);
init_compiled_charsets(0);
for (local_2e0 = &all_charsets; local_2e0 < (long *)0x495e08; local_2e0 = local_2e0 + 1) {
if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) &&
(cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) {
*local_2e0 = 0;
}
}
my_charset_loader_init_mysys(local_2d8);
__dest = (char *)get_charsets_dir(local_228);
stpcpy(__dest,"Index.xml");
my_read_charset_file(local_2d8,local_228,0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
465 | Binary_string::qs_append(double) | eloqsql/sql/sql_string.cc | void Binary_string::qs_append(double d)
{
char *buff = Ptr + str_length;
size_t length= my_gcvt(d, MY_GCVT_ARG_DOUBLE, FLOATING_POINT_BUFFER - 1,
buff, NULL);
ASSERT_LENGTH(length);
str_length+= (uint32) length;
} | O0 | cpp | Binary_string::qs_append(double):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq (%rcx), %rax
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
movq -0x18(%rbp), %rdx
movl $0x1, %edi
movl $0x15d, %esi # imm = 0x15D
xorl %eax, %eax
movl %eax, %ecx
callq 0x105620
movq %rax, -0x20(%rbp)
jmp 0x5faa8
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN13Binary_string9qs_appendEd:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
movsd [rbp+var_10], xmm0
mov rcx, [rbp+var_8]
mov [rbp+var_28], rcx
mov rax, [rcx]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_18], rax
movsd xmm0, [rbp+var_10]
mov rdx, [rbp+var_18]
mov edi, 1
mov esi, 15Dh
xor eax, eax
mov ecx, eax
call my_gcvt
mov [rbp+var_20], rax
jmp short $+2
loc_5FAA8:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
add ecx, [rax+8]
mov [rax+8], ecx
add rsp, 30h
pop rbp
retn
| Binary_string * Binary_string::qs_append(Binary_string *this, double a2)
{
Binary_string *result; // rax
int v3; // [rsp+10h] [rbp-20h]
v3 = my_gcvt(1LL, 349LL, *((unsigned int *)this + 2) + *(_QWORD *)this, 0LL, a2);
result = this;
*((_DWORD *)this + 2) += v3;
return result;
}
| qs_append:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOVSD qword ptr [RBP + -0x10],XMM0
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSD XMM0,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV EDI,0x1
MOV ESI,0x15d
XOR EAX,EAX
MOV ECX,EAX
CALL 0x00205620
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015faa8
LAB_0015faa8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
ADD ECX,dword ptr [RAX + 0x8]
MOV dword ptr [RAX + 0x8],ECX
ADD RSP,0x30
POP RBP
RET
|
/* Binary_string::qs_append(double) */
void __thiscall Binary_string::qs_append(Binary_string *this,double param_1)
{
int iVar1;
iVar1 = my_gcvt(param_1,1,0x15d,*(long *)this + (ulong)*(uint *)(this + 8),0);
*(int *)(this + 8) = iVar1 + *(int *)(this + 8);
return;
}
|
|
466 | maria_status | eloqsql/storage/maria/ma_info.c | int maria_status(MARIA_HA *info, register MARIA_INFO *x, uint flag)
{
MY_STAT state;
MARIA_SHARE *share= info->s;
DBUG_ENTER("maria_status");
DBUG_PRINT("info", ("records: %lld", info->state->records));
x->recpos= info->cur_row.lastpos;
if (flag == HA_STATUS_POS)
DBUG_RETURN(0); /* Compatible with ISAM */
if (!(flag & HA_STATUS_NO_LOCK))
{
mysql_mutex_lock(&share->intern_lock);
_ma_readinfo(info,F_RDLCK,0);
fast_ma_writeinfo(info);
mysql_mutex_unlock(&share->intern_lock);
}
if (flag & HA_STATUS_VARIABLE)
{
/* If table is locked, give versioned number otherwise last commited */
if (info->lock_type == F_UNLCK)
x->records = share->state.state.records;
else
x->records = info->state->records;
x->deleted = share->state.state.del;
x->delete_length = share->state.state.empty;
x->data_file_length = share->state.state.data_file_length;
x->index_file_length= share->state.state.key_file_length;
x->keys = share->state.header.keys;
x->check_time = share->state.check_time;
x->mean_reclength = x->records ?
(ulong) ((x->data_file_length - x->delete_length) /x->records) :
(ulong) share->min_pack_length;
}
if (flag & HA_STATUS_ERRKEY)
{
x->errkey= info->errkey;
x->dup_key_pos= info->dup_key_pos;
}
if (flag & HA_STATUS_CONST)
{
x->reclength = share->base.reclength;
x->max_data_file_length=share->base.max_data_file_length;
x->max_index_file_length=info->s->base.max_key_file_length;
x->filenr = info->dfile.file;
x->options = share->options;
x->create_time=share->state.create_time;
x->reflength= maria_get_pointer_length(share->base.max_data_file_length,
maria_data_pointer_size);
x->record_offset= (info->s->data_file_type == STATIC_RECORD ?
share->base.pack_reclength: 0);
x->sortkey= -1; /* No clustering */
x->rec_per_key = share->state.rec_per_key_part;
x->key_map = share->state.key_map;
x->data_file_name = share->data_file_name.str;
x->index_file_name = share->index_file_name.str;
x->data_file_type = share->data_file_type;
}
if ((flag & HA_STATUS_TIME) && !my_fstat(info->dfile.file, &state, MYF(0)))
x->update_time=state.st_mtime;
else
x->update_time=0;
if (flag & HA_STATUS_AUTO)
{
x->auto_increment= share->state.auto_increment+1;
if (!x->auto_increment) /* This shouldn't happen */
x->auto_increment= ~(ulonglong) 0;
}
DBUG_RETURN(0);
} | O0 | c | maria_status:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
jmp 0x375f6
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpl $0x1, -0x1c(%rbp)
jne 0x3761d
jmp 0x37611
movl $0x0, -0x4(%rbp)
jmp 0x379d5
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x37682
movq -0xb8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x122fcb(%rip), %rsi # 0x15a608
movl $0x34, %edx
callq 0x379f0
movq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x43f70
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x3766f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x43f90
movq -0xb8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x37a60
movl -0x1c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3778e
movq -0x10(%rbp), %rax
cmpl $0x2, 0x664(%rax)
jne 0x376b2
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x376c4
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0xb8(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0xb8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0xb8(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0xb8(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0xb8(%rbp), %rax
movzbl 0x12(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xac(%rax)
movq -0xb8(%rbp), %rax
movq 0x160(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x37767
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
subq 0x48(%rcx), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rax, -0xc0(%rbp)
jmp 0x3777c
movq -0xb8(%rbp), %rax
movq 0x728(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x90(%rax)
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x377c0
movq -0x10(%rbp), %rax
movl 0x660(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xb8(%rax)
movq -0x10(%rbp), %rax
movq 0x428(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x3794a
movq -0xb8(%rbp), %rax
movq 0x398(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0xb8(%rbp), %rax
movq 0x368(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x370(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movl 0x480(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc0(%rax)
movq -0xb8(%rbp), %rax
movq 0x720(%rax), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xb0(%rax)
movq -0xb8(%rbp), %rax
movq 0x150(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0xb8(%rbp), %rax
movq 0x368(%rax), %rdi
leaq 0x290c6b(%rip), %rax # 0x2c84d8
movq (%rax), %rax
movl %eax, %esi
callq 0x71340
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xb4(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7d0(%rax)
jne 0x378aa
movq -0xb8(%rbp), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0xc8(%rbp)
jmp 0x378b5
xorl %eax, %eax
movq %rax, -0xc8(%rbp)
jmp 0x378b5
movq -0xc8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0xbc(%rax) # imm = 0xFFFFFFFF
movq -0xb8(%rbp), %rax
movq 0x100(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0xb8(%rbp), %rax
movq 0x140(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0xb8(%rbp), %rax
movq 0x5c0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0xb8(%rbp), %rax
movq 0x5d0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0xb8(%rbp), %rax
movl 0x7d0(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xa8(%rax)
movl -0x1c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x37982
movq -0x10(%rbp), %rax
movl 0x480(%rax), %edi
leaq -0xb0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf9c90
cmpl $0x0, %eax
jne 0x37982
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
jmp 0x3798e
movq -0x18(%rbp), %rax
movq $0x0, 0x70(%rax)
movl -0x1c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x379cc
movq -0xb8(%rbp), %rax
movq 0xd8(%rax), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x379ca
movq -0x18(%rbp), %rax
movq $-0x1, 0x50(%rax)
jmp 0x379cc
jmp 0x379ce
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| maria_status:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_B8], rax
jmp short $+2
loc_375F6:
mov rax, [rbp+var_10]
mov rcx, [rax+98h]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
cmp [rbp+var_1C], 1
jnz short loc_3761D
jmp short $+2
loc_37611:
mov [rbp+var_4], 0
jmp loc_379D5
loc_3761D:
mov eax, [rbp+var_1C]
and eax, 2
cmp eax, 0
jnz short loc_37682
mov rdi, [rbp+var_B8]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 34h ; '4'
call inline_mysql_mutex_lock_1
mov rdi, [rbp+var_10]
xor edx, edx
mov esi, edx
call _ma_readinfo
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_3766F
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_3766F:
mov rdi, [rbp+var_B8]
add rdi, 8F0h
call inline_mysql_mutex_unlock_1
loc_37682:
mov eax, [rbp+var_1C]
and eax, 10h
cmp eax, 0
jz loc_3778E
mov rax, [rbp+var_10]
cmp dword ptr [rax+664h], 2
jnz short loc_376B2
mov rax, [rbp+var_B8]
mov rcx, [rax+18h]
mov rax, [rbp+var_18]
mov [rax], rcx
jmp short loc_376C4
loc_376B2:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax], rcx
loc_376C4:
mov rax, [rbp+var_B8]
mov rcx, [rax+20h]
mov rax, [rbp+var_18]
mov [rax+8], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+28h]
mov rax, [rbp+var_18]
mov [rax+48h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+40h]
mov rax, [rbp+var_18]
mov [rax+28h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+38h]
mov rax, [rbp+var_18]
mov [rax+38h], rcx
mov rax, [rbp+var_B8]
movzx ecx, byte ptr [rax+12h]
mov rax, [rbp+var_18]
mov [rax+0ACh], ecx
mov rax, [rbp+var_B8]
mov rcx, [rax+160h]
mov rax, [rbp+var_18]
mov [rax+68h], rcx
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_37767
mov rax, [rbp+var_18]
mov rax, [rax+28h]
mov rcx, [rbp+var_18]
sub rax, [rcx+48h]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx]
mov [rbp+var_C0], rax
jmp short loc_3777C
loc_37767:
mov rax, [rbp+var_B8]
mov rax, [rax+728h]
mov [rbp+var_C0], rax
loc_3777C:
mov rcx, [rbp+var_C0]
mov rax, [rbp+var_18]
mov [rax+90h], rcx
loc_3778E:
mov eax, [rbp+var_1C]
and eax, 20h
cmp eax, 0
jz short loc_377C0
mov rax, [rbp+var_10]
mov ecx, [rax+660h]
mov rax, [rbp+var_18]
mov [rax+0B8h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+428h]
mov rax, [rbp+var_18]
mov [rax+20h], rcx
loc_377C0:
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz loc_3794A
mov rax, [rbp+var_B8]
mov rcx, [rax+398h]
mov rax, [rbp+var_18]
mov [rax+88h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+368h]
mov rax, [rbp+var_18]
mov [rax+30h], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rax+370h]
mov rax, [rbp+var_18]
mov [rax+40h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+480h]
mov rax, [rbp+var_18]
mov [rax+0C0h], ecx
mov rax, [rbp+var_B8]
mov rax, [rax+720h]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+0B0h], ecx
mov rax, [rbp+var_B8]
mov rcx, [rax+150h]
mov rax, [rbp+var_18]
mov [rax+60h], rcx
mov rax, [rbp+var_B8]
mov rdi, [rax+368h]
lea rax, maria_data_pointer_size
mov rax, [rax]
mov esi, eax
call maria_get_pointer_length
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+0B4h], ecx
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7D0h], 0
jnz short loc_378AA
mov rax, [rbp+var_B8]
mov rax, [rax+3A0h]
mov [rbp+var_C8], rax
jmp short loc_378B5
loc_378AA:
xor eax, eax
mov [rbp+var_C8], rax
jmp short $+2
loc_378B5:
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_18]
mov [rax+78h], rcx
mov rax, [rbp+var_18]
mov dword ptr [rax+0BCh], 0FFFFFFFFh
mov rax, [rbp+var_B8]
mov rcx, [rax+100h]
mov rax, [rbp+var_18]
mov [rax+80h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+140h]
mov rax, [rbp+var_18]
mov [rax+58h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+5C0h]
mov rax, [rbp+var_18]
mov [rax+98h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+5D0h]
mov rax, [rbp+var_18]
mov [rax+0A0h], rcx
mov rax, [rbp+var_B8]
mov ecx, [rax+7D0h]
mov rax, [rbp+var_18]
mov [rax+0A8h], ecx
loc_3794A:
mov eax, [rbp+var_1C]
and eax, 4
cmp eax, 0
jz short loc_37982
mov rax, [rbp+var_10]
mov edi, [rax+480h]
lea rsi, [rbp+var_B0]
xor eax, eax
mov edx, eax
call my_fstat
cmp eax, 0
jnz short loc_37982
mov rcx, [rbp+var_58]
mov rax, [rbp+var_18]
mov [rax+70h], rcx
jmp short loc_3798E
loc_37982:
mov rax, [rbp+var_18]
mov qword ptr [rax+70h], 0
loc_3798E:
mov eax, [rbp+var_1C]
and eax, 40h
cmp eax, 0
jz short loc_379CC
mov rax, [rbp+var_B8]
mov rcx, [rax+0D8h]
add rcx, 1
mov rax, [rbp+var_18]
mov [rax+50h], rcx
mov rax, [rbp+var_18]
cmp qword ptr [rax+50h], 0
jnz short loc_379CA
mov rax, [rbp+var_18]
mov qword ptr [rax+50h], 0FFFFFFFFFFFFFFFFh
loc_379CA:
jmp short $+2
loc_379CC:
jmp short $+2
loc_379CE:
mov [rbp+var_4], 0
loc_379D5:
mov eax, [rbp+var_4]
add rsp, 0D0h
pop rbp
retn
| long long maria_status(_QWORD *a1, long long a2, int a3)
{
long long v3; // rcx
long long v5; // [rsp+8h] [rbp-C8h]
long long v6; // [rsp+10h] [rbp-C0h]
long long v7; // [rsp+18h] [rbp-B8h]
_BYTE v8[88]; // [rsp+20h] [rbp-B0h] BYREF
long long v9; // [rsp+78h] [rbp-58h]
int v10; // [rsp+B4h] [rbp-1Ch]
long long v11; // [rsp+B8h] [rbp-18h]
_DWORD *v12; // [rsp+C0h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v7 = *a1;
*(_QWORD *)(a2 + 16) = a1[19];
if ( v10 == 1 )
{
return 0;
}
else
{
if ( (v10 & 2) == 0 )
{
inline_mysql_mutex_lock_1(v7 + 2288, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_info.c", 52LL);
ma_readinfo(v12, 0LL);
if ( !*(_DWORD *)(*(_QWORD *)v12 + 1976LL) )
ma_writeinfo(v12, 0LL);
inline_mysql_mutex_unlock_1(v7 + 2288);
}
if ( (v10 & 0x10) != 0 )
{
if ( v12[409] == 2 )
v3 = *(_QWORD *)(v7 + 24);
else
v3 = **((_QWORD **)v12 + 4);
*(_QWORD *)v11 = v3;
*(_QWORD *)(v11 + 8) = *(_QWORD *)(v7 + 32);
*(_QWORD *)(v11 + 72) = *(_QWORD *)(v7 + 40);
*(_QWORD *)(v11 + 40) = *(_QWORD *)(v7 + 64);
*(_QWORD *)(v11 + 56) = *(_QWORD *)(v7 + 56);
*(_DWORD *)(v11 + 172) = *(unsigned __int8 *)(v7 + 18);
*(_QWORD *)(v11 + 104) = *(_QWORD *)(v7 + 352);
if ( *(_QWORD *)v11 )
v6 = (*(_QWORD *)(v11 + 40) - *(_QWORD *)(v11 + 72)) / *(_QWORD *)v11;
else
v6 = *(_QWORD *)(v7 + 1832);
*(_QWORD *)(v11 + 144) = v6;
}
if ( (v10 & 0x20) != 0 )
{
*(_DWORD *)(v11 + 184) = v12[408];
*(_QWORD *)(v11 + 32) = *((_QWORD *)v12 + 133);
}
if ( (v10 & 8) != 0 )
{
*(_QWORD *)(v11 + 136) = *(_QWORD *)(v7 + 920);
*(_QWORD *)(v11 + 48) = *(_QWORD *)(v7 + 872);
*(_QWORD *)(v11 + 64) = *(_QWORD *)(*(_QWORD *)v12 + 880LL);
*(_DWORD *)(v11 + 192) = v12[288];
*(_DWORD *)(v11 + 176) = *(_QWORD *)(v7 + 1824);
*(_QWORD *)(v11 + 96) = *(_QWORD *)(v7 + 336);
*(_DWORD *)(v11 + 180) = maria_get_pointer_length(*(_QWORD *)(v7 + 872), (unsigned int)maria_data_pointer_size);
if ( *(_DWORD *)(*(_QWORD *)v12 + 2000LL) )
v5 = 0LL;
else
v5 = *(_QWORD *)(v7 + 928);
*(_QWORD *)(v11 + 120) = v5;
*(_DWORD *)(v11 + 188) = -1;
*(_QWORD *)(v11 + 128) = *(_QWORD *)(v7 + 256);
*(_QWORD *)(v11 + 88) = *(_QWORD *)(v7 + 320);
*(_QWORD *)(v11 + 152) = *(_QWORD *)(v7 + 1472);
*(_QWORD *)(v11 + 160) = *(_QWORD *)(v7 + 1488);
*(_DWORD *)(v11 + 168) = *(_DWORD *)(v7 + 2000);
}
if ( (v10 & 4) == 0 || (unsigned int)my_fstat((unsigned int)v12[288], v8, 0LL) )
*(_QWORD *)(v11 + 112) = 0LL;
else
*(_QWORD *)(v11 + 112) = v9;
if ( (v10 & 0x40) != 0 )
{
*(_QWORD *)(v11 + 80) = *(_QWORD *)(v7 + 216) + 1LL;
if ( !*(_QWORD *)(v11 + 80) )
*(_QWORD *)(v11 + 80) = -1LL;
}
return 0;
}
}
| maria_status:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x001375f6
LAB_001375f6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x98]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
CMP dword ptr [RBP + -0x1c],0x1
JNZ 0x0013761d
JMP 0x00137611
LAB_00137611:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001379d5
LAB_0013761d:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x00137682
MOV RDI,qword ptr [RBP + -0xb8]
ADD RDI,0x8f0
LEA RSI,[0x25a608]
MOV EDX,0x34
CALL 0x001379f0
MOV RDI,qword ptr [RBP + -0x10]
XOR EDX,EDX
MOV ESI,EDX
CALL 0x00143f70
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x0013766f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00143f90
LAB_0013766f:
MOV RDI,qword ptr [RBP + -0xb8]
ADD RDI,0x8f0
CALL 0x00137a60
LAB_00137682:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x0013778e
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x664],0x2
JNZ 0x001376b2
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
JMP 0x001376c4
LAB_001376b2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_001376c4:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOVZX ECX,byte ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xac],ECX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x160]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x68],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x00137767
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x48]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV qword ptr [RCX]
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x0013777c
LAB_00137767:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x728]
MOV qword ptr [RBP + -0xc0],RAX
LAB_0013777c:
MOV RCX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x90],RCX
LAB_0013778e:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001377c0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x660]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xb8],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x428]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001377c0:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0013794a
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x398]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x88],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x368]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x370]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x480]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xc0],ECX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x720]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xb0],ECX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x150]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RDI,qword ptr [RAX + 0x368]
LEA RAX,[0x3c84d8]
MOV RAX,qword ptr [RAX]
MOV ESI,EAX
CALL 0x00171340
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xb4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7d0],0x0
JNZ 0x001378aa
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x001378b5
LAB_001378aa:
XOR EAX,EAX
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x001378b5
LAB_001378b5:
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x78],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xbc],0xffffffff
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x100]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x140]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x5c0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x5d0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV ECX,dword ptr [RAX + 0x7d0]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xa8],ECX
LAB_0013794a:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00137982
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x480]
LEA RSI,[RBP + -0xb0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f9c90
CMP EAX,0x0
JNZ 0x00137982
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x70],RCX
JMP 0x0013798e
LAB_00137982:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x70],0x0
LAB_0013798e:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x40
CMP EAX,0x0
JZ 0x001379cc
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0xd8]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x50],0x0
JNZ 0x001379ca
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x50],-0x1
LAB_001379ca:
JMP 0x001379cc
LAB_001379cc:
JMP 0x001379ce
LAB_001379ce:
MOV dword ptr [RBP + -0x4],0x0
LAB_001379d5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xd0
POP RBP
RET
|
int4 maria_status(long *param_1,ulong *param_2,ulong param_3)
{
long lVar1;
int4 uVar2;
int iVar3;
ulong extraout_RDX;
ulong local_d0;
ulong local_c8;
int1 local_b8 [88];
ulong local_60;
uint local_24;
ulong *local_20;
long *local_18;
local_24 = (uint)param_3;
lVar1 = *param_1;
param_2[2] = param_1[0x13];
if (local_24 != 1) {
local_20 = param_2;
local_18 = param_1;
if ((param_3 & 2) == 0) {
inline_mysql_mutex_lock
(lVar1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_info.c",
0x34);
_ma_readinfo(local_18,0);
if (*(int *)(*local_18 + 0x7b8) == 0) {
_ma_writeinfo(local_18,0);
}
inline_mysql_mutex_unlock(lVar1 + 0x8f0);
param_3 = extraout_RDX;
}
if ((local_24 & 0x10) != 0) {
if (*(int *)((long)local_18 + 0x664) == 2) {
*local_20 = *(ulong *)(lVar1 + 0x18);
}
else {
*local_20 = *(ulong *)local_18[4];
}
local_20[1] = *(ulong *)(lVar1 + 0x20);
local_20[9] = *(ulong *)(lVar1 + 0x28);
local_20[5] = *(ulong *)(lVar1 + 0x40);
local_20[7] = *(ulong *)(lVar1 + 0x38);
*(uint *)((long)local_20 + 0xac) = (uint)*(byte *)(lVar1 + 0x12);
local_20[0xd] = *(ulong *)(lVar1 + 0x160);
if (*local_20 == 0) {
local_c8 = *(ulong *)(lVar1 + 0x728);
}
else {
local_c8 = (local_20[5] - local_20[9]) / *local_20;
param_3 = (local_20[5] - local_20[9]) % *local_20;
}
local_20[0x12] = local_c8;
}
if ((local_24 & 0x20) != 0) {
*(int *)(local_20 + 0x17) = (int)local_18[0xcc];
local_20[4] = local_18[0x85];
}
if ((local_24 & 8) != 0) {
local_20[0x11] = *(ulong *)(lVar1 + 0x398);
local_20[6] = *(ulong *)(lVar1 + 0x368);
local_20[8] = *(ulong *)(*local_18 + 0x370);
*(int *)(local_20 + 0x18) = (int)local_18[0x90];
*(int *)(local_20 + 0x16) = (int)*(int8 *)(lVar1 + 0x720);
local_20[0xc] = *(ulong *)(lVar1 + 0x150);
uVar2 = maria_get_pointer_length
(*(int8 *)(lVar1 + 0x368),maria_data_pointer_size & 0xffffffff,param_3
);
*(int4 *)((long)local_20 + 0xb4) = uVar2;
if (*(int *)(*local_18 + 2000) == 0) {
local_d0 = *(ulong *)(lVar1 + 0x3a0);
}
else {
local_d0 = 0;
}
local_20[0xf] = local_d0;
*(int4 *)((long)local_20 + 0xbc) = 0xffffffff;
local_20[0x10] = *(ulong *)(lVar1 + 0x100);
local_20[0xb] = *(ulong *)(lVar1 + 0x140);
local_20[0x13] = *(ulong *)(lVar1 + 0x5c0);
local_20[0x14] = *(ulong *)(lVar1 + 0x5d0);
*(int4 *)(local_20 + 0x15) = *(int4 *)(lVar1 + 2000);
}
if (((local_24 & 4) == 0) || (iVar3 = my_fstat((int)local_18[0x90],local_b8,0), iVar3 != 0)) {
local_20[0xe] = 0;
}
else {
local_20[0xe] = local_60;
}
if (((local_24 & 0x40) != 0) && (local_20[10] = *(long *)(lVar1 + 0xd8) + 1, local_20[10] == 0))
{
local_20[10] = 0xffffffffffffffff;
}
}
return 0;
}
|
|
467 | minja::ArgumentsValue::expectArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&) | monkey531[P]llama/common/minja.hpp | void expectArgs(const std::string & method_name, const std::pair<size_t, size_t> & pos_count, const std::pair<size_t, size_t> & kw_count) {
if (args.size() < pos_count.first || args.size() > pos_count.second || kwargs.size() < kw_count.first || kwargs.size() > kw_count.second) {
std::ostringstream out;
out << method_name << " must have between " << pos_count.first << " and " << pos_count.second << " positional arguments and between " << kw_count.first << " and " << kw_count.second << " keyword arguments";
throw std::runtime_error(out.str());
}
} | O3 | cpp | minja::ArgumentsValue::expectArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x8(%rdi), %rcx
subq (%rdi), %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rax # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rax
cmpq (%rdx), %rax
jb 0x93159
cmpq 0x8(%r14), %rax
ja 0x93159
movq 0x20(%rdi), %rcx
subq 0x18(%rdi), %rcx
sarq $0x4, %rcx
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq (%rbx), %rax
jb 0x93159
cmpq 0x8(%rbx), %rax
ja 0x93159
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x1bb80
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x1b9d0
movq %rax, %r15
leaq 0x5f403(%rip), %rsi # 0xf2582
movl $0x13, %edx
movq %rax, %rdi
callq 0x1b9d0
movq (%r14), %rsi
movq %r15, %rdi
callq 0x1b5e0
movq %rax, %r15
leaq 0x5f3f5(%rip), %rsi # 0xf2596
movl $0x5, %edx
movq %rax, %rdi
callq 0x1b9d0
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x1b5e0
movq %rax, %r14
leaq 0x5f3d8(%rip), %rsi # 0xf259c
movl $0x22, %edx
movq %rax, %rdi
callq 0x1b9d0
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x1b5e0
movq %rax, %r14
leaq 0x5f3b0(%rip), %rsi # 0xf2596
movl $0x5, %edx
movq %rax, %rdi
callq 0x1b9d0
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x1b5e0
leaq 0x5f3b9(%rip), %rsi # 0xf25bf
movl $0x12, %edx
movq %rax, %rdi
callq 0x1b9d0
movl $0x10, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1bda0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be10
xorl %ebp, %ebp
movq 0x9ada0(%rip), %rsi # 0x12dfe8
movq 0x9ad01(%rip), %rdx # 0x12df50
movq %rbx, %rdi
callq 0x1bf00
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93275
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8c0
testb %bpl, %bpl
jne 0x9327f
jmp 0x9328c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b660
jmp 0x9328c
movq %rax, %r14
movq 0x9acd5(%rip), %rsi # 0x12df68
leaq 0x28(%rsp), %rdi
callq 0x1b490
leaq 0x98(%rsp), %rdi
callq 0x1b2b0
movq %r14, %rdi
callq 0x1bf90
| _ZN5minja14ArgumentsValue10expectArgsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt4pairImmESC_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 1A0h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov rcx, [rdi+8]
sub rcx, [rdi]
sar rcx, 4
mov rax, 0CCCCCCCCCCCCCCCDh
imul rax, rcx
cmp rax, [rdx]
jb short loc_93159
cmp rax, [r14+8]
ja short loc_93159
mov rcx, [rdi+20h]
sub rcx, [rdi+18h]
sar rcx, 4
mov rax, 6DB6DB6DB6DB6DB7h
imul rax, rcx
cmp rax, [rbx]
jb short loc_93159
cmp rax, [rbx+8]
ja short loc_93159
add rsp, 1A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_93159:
lea r12, [rsp+1C8h+var_1A0]
mov rdi, r12
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aMustHaveBetwee; " must have between "
mov edx, 13h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdi, r15
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r15, rax
lea rsi, aAnd; " and "
mov edx, 5
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14+8]
mov rdi, r15
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, aPositionalArgu; " positional arguments and between "
mov edx, 22h ; '"'
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rbx]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, aAnd; " and "
mov edx, 5
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rbx+8]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aKeywordArgumen; " keyword arguments"
mov edx, 12h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, [rsp+1C8h+var_198]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
lea rsi, [rsp+1C8h+var_1C0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+1C8h+var_1B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93275
mov rsi, [rsp+1C8h+var_1B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93275:
test bpl, bpl
jnz short loc_9327F
jmp short loc_9328C
mov r14, rax
loc_9327F:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_9328C
mov r14, rax
loc_9328C:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1C8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::ArgumentsValue::expectArgs(
_QWORD *a1,
_QWORD *a2,
unsigned long long *a3,
unsigned long long *a4)
{
unsigned long long v6; // rax
unsigned long long result; // rax
long long v8; // r15
long long v9; // r15
long long v10; // r14
long long v11; // r14
long long v12; // rax
void *exception; // rbx
_BYTE v14[16]; // [rsp+8h] [rbp-1C0h] BYREF
_BYTE v15[8]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v16[104]; // [rsp+30h] [rbp-198h] BYREF
v6 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(a1[1] - *a1) >> 4);
if ( v6 < *a3
|| v6 > a3[1]
|| (result = 0x6DB6DB6DB6DB6DB7LL * ((long long)(a1[4] - a1[3]) >> 4), result < *a4)
|| result > a4[1] )
{
std::ostringstream::basic_ostringstream(v15);
v8 = std::__ostream_insert<char,std::char_traits<char>>(v15, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v8, " must have between ", 19LL);
v9 = std::ostream::_M_insert<unsigned long>(v8, *a3);
std::__ostream_insert<char,std::char_traits<char>>(v9, " and ", 5LL);
v10 = std::ostream::_M_insert<unsigned long>(v9, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v10, " positional arguments and between ", 34LL);
v11 = std::ostream::_M_insert<unsigned long>(v10, *a4);
std::__ostream_insert<char,std::char_traits<char>>(v11, " and ", 5LL);
v12 = std::ostream::_M_insert<unsigned long>(v11, a4[1]);
std::__ostream_insert<char,std::char_traits<char>>(v12, " keyword arguments", 18LL);
exception = __cxa_allocate_exception(0x10uLL);
std::stringbuf::str(v14, v16);
std::runtime_error::runtime_error(exception, v14);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
| expectArgs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1a0
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,qword ptr [RDI]
SAR RCX,0x4
MOV RAX,-0x3333333333333333
IMUL RAX,RCX
CMP RAX,qword ptr [RDX]
JC 0x00193159
CMP RAX,qword ptr [R14 + 0x8]
JA 0x00193159
MOV RCX,qword ptr [RDI + 0x20]
SUB RCX,qword ptr [RDI + 0x18]
SAR RCX,0x4
MOV RAX,0x6db6db6db6db6db7
IMUL RAX,RCX
CMP RAX,qword ptr [RBX]
JC 0x00193159
CMP RAX,qword ptr [RBX + 0x8]
JA 0x00193159
ADD RSP,0x1a0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00193159:
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x0011bb80
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_0019316d:
MOV RDI,R12
CALL 0x0011b9d0
MOV R15,RAX
LEA RSI,[0x1f2582]
MOV EDX,0x13
MOV RDI,RAX
CALL 0x0011b9d0
MOV RSI,qword ptr [R14]
MOV RDI,R15
CALL 0x0011b5e0
MOV R15,RAX
LEA RSI,[0x1f2596]
MOV EDX,0x5
MOV RDI,RAX
CALL 0x0011b9d0
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x0011b5e0
MOV R14,RAX
LEA RSI,[0x1f259c]
MOV EDX,0x22
MOV RDI,RAX
CALL 0x0011b9d0
MOV RSI,qword ptr [RBX]
MOV RDI,R14
CALL 0x0011b5e0
MOV R14,RAX
LEA RSI,[0x1f2596]
MOV EDX,0x5
MOV RDI,RAX
CALL 0x0011b9d0
MOV RSI,qword ptr [RBX + 0x8]
MOV RDI,R14
CALL 0x0011b5e0
LEA RSI,[0x1f25bf]
MOV EDX,0x12
MOV RDI,RAX
CALL 0x0011b9d0
LAB_00193213:
MOV EDI,0x10
CALL 0x0011b440
MOV RBX,RAX
LEA RSI,[RSP + 0x30]
LAB_00193225:
LEA RDI,[RSP + 0x8]
CALL 0x0011bda0
MOV BPL,0x1
LAB_00193232:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011be10
XOR EBP,EBP
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,RBX
CALL 0x0011bf00
|
/* minja::ArgumentsValue::expectArgs(std::__cxx11::string const&, std::pair<unsigned long, unsigned
long> const&, std::pair<unsigned long, unsigned long> const&) */
void __thiscall
minja::ArgumentsValue::expectArgs(ArgumentsValue *this,string *param_1,pair *param_2,pair *param_3)
{
ulong uVar1;
ostream *poVar2;
runtime_error *this_00;
string local_1c0 [32];
ostringstream local_1a0 [376];
uVar1 = (*(long *)(this + 8) - *(long *)this >> 4) * -0x3333333333333333;
if ((((*(ulong *)param_2 <= uVar1) &&
(uVar1 < *(ulong *)(param_2 + 8) || uVar1 - *(ulong *)(param_2 + 8) == 0)) &&
(uVar1 = (*(long *)(this + 0x20) - *(long *)(this + 0x18) >> 4) * 0x6db6db6db6db6db7,
*(ulong *)param_3 <= uVar1)) &&
(uVar1 < *(ulong *)(param_3 + 8) || uVar1 - *(ulong *)(param_3 + 8) == 0)) {
return;
}
std::__cxx11::ostringstream::ostringstream(local_1a0);
/* try { // try from 0019316d to 00193212 has its CatchHandler @ 00193289 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a0,*(char **)param_1,*(long *)(param_1 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2," must have between ",0x13);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," and ",5);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>
(poVar2," positional arguments and between ",0x22);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," and ",5);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," keyword arguments",0x12);
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00193225 to 0019322e has its CatchHandler @ 0019327c */
std::__cxx11::stringbuf::str();
/* try { // try from 00193232 to 00193256 has its CatchHandler @ 00193257 */
std::runtime_error::runtime_error(this_00,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
|
|
468 | 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>>>::find(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 | iterator find(const key_type& key)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O2 | 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>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x6afbb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x67e78
testb %al, %al
jne 0x6afb8
addq $0x60, %r14
jmp 0x6af9a
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_6AF9A:
mov rax, [r15+8]
cmp r14, rax
jz short loc_6AFBB
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_6AFB8
add r14, 60h ; '`'
jmp short loc_6AF9A
loc_6AFB8:
mov rax, r14
loc_6AFBB:
pop rbx
pop r14
pop r15
retn
| unsigned __int8 * 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>>>::find(
unsigned __int8 **a1,
unsigned __int8 *a2,
__m128d a3)
{
unsigned __int8 *i; // r14
unsigned __int8 *result; // rax
for ( i = *a1; ; i += 96 )
{
result = a1[1];
if ( i == result )
break;
if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a3) )
return i;
}
return result;
}
| find:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_0016af9a:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x0016afbb
MOV RDI,R14
MOV RSI,RBX
CALL 0x00167e78
TEST AL,AL
JNZ 0x0016afb8
ADD R14,0x60
JMP 0x0016af9a
LAB_0016afb8:
MOV RAX,R14
LAB_0016afbb:
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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&) */
basic_json * __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>>>
::find(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
char cVar1;
basic_json *pbVar2;
basic_json *pbVar3;
pbVar3 = *(basic_json **)this;
while ((pbVar2 = *(basic_json **)(this + 8), pbVar3 != *(basic_json **)(this + 8) &&
(cVar1 = json_abi_v3_11_3::operator==(pbVar3,param_1), pbVar2 = pbVar3, cVar1 == '\0'))) {
pbVar3 = pbVar3 + 0x60;
}
return pbVar2;
}
|
|
469 | 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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) | llama.cpp/common/./json.hpp | void destroy(value_t t)
{
if (
(t == value_t::object && object == nullptr) ||
(t == value_t::array && array == nullptr) ||
(t == value_t::string && string == nullptr) ||
(t == value_t::binary && binary == nullptr)
)
{
//not initialized (e.g. due to exception in the ctor)
return;
}
if (t == value_t::array || t == value_t::object)
{
// flatten the current json_value to a heap-allocated stack
std::vector<basic_json> stack;
// move the top-level items to stack
if (t == value_t::array)
{
stack.reserve(array->size());
std::move(array->begin(), array->end(), std::back_inserter(stack));
}
else
{
stack.reserve(object->size());
for (auto&& it : *object)
{
stack.push_back(std::move(it.second));
}
}
while (!stack.empty())
{
// move the last item to local variable to be processed
basic_json current_item(std::move(stack.back()));
stack.pop_back();
// if current_item is array/object, move
// its children to the stack to be processed later
if (current_item.is_array())
{
std::move(current_item.m_data.m_value.array->begin(), current_item.m_data.m_value.array->end(), std::back_inserter(stack));
current_item.m_data.m_value.array->clear();
}
else if (current_item.is_object())
{
for (auto&& it : *current_item.m_data.m_value.object)
{
stack.push_back(std::move(it.second));
}
current_item.m_data.m_value.object->clear();
}
// it's now safe that current_item get destructed
// since it doesn't have any children
}
}
switch (t)
{
case value_t::object:
{
AllocatorType<object_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, object);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1);
break;
}
case value_t::array:
{
AllocatorType<array_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, array);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1);
break;
}
case value_t::string:
{
AllocatorType<string_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, string);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1);
break;
}
case value_t::binary:
{
AllocatorType<binary_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, binary);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1);
break;
}
case value_t::null:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::discarded:
default:
{
break;
}
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x1, %esi
sete %cl
movq (%rdi), %rax
testq %rax, %rax
sete %dl
testb %dl, %cl
jne 0x30824
movl %esi, %r14d
testq %rax, %rax
sete %cl
movl %r14d, %edx
andb $-0x2, %dl
cmpb $0x2, %dl
sete %dl
cmpb $0x8, %r14b
sete %sil
orb %dl, %sil
testb %cl, %sil
jne 0x30824
movq %rdi, %r13
leal -0x1(%r14), %ecx
cmpb $0x1, %cl
ja 0x30794
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x4, %rsi
cmpb $0x2, %r14b
jne 0x30644
movq %rsp, %rdi
callq 0x3085c
movq (%r13), %rax
movq (%rax), %r15
movq 0x8(%rax), %rbx
subq %r15, %rbx
sarq $0x4, %rbx
testq %rbx, %rbx
jle 0x30685
incq %rbx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f928
addq $0x10, %r15
decq %rbx
cmpq $0x1, %rbx
ja 0x3062a
jmp 0x30685
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rax
movq %rsp, %rdi
movq %rax, %rsi
callq 0x3085c
movq (%r13), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r12
cmpq %r12, %rbx
je 0x30685
movq %rsp, %r15
leaq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x2f928
addq $0x30, %rbx
cmpq %r12, %rbx
jne 0x30670
movq %r13, 0x30(%rsp)
movq 0x8(%rsp), %rax
cmpq %rax, (%rsp)
je 0x30787
movq %rsp, %r15
movups -0x10(%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movb $0x0, -0x10(%rax)
movq $0x0, -0x8(%rax)
movq 0x8(%rsp), %rdi
addq $-0x10, %rdi
movq %rdi, 0x8(%rsp)
callq 0x300e0
movzbl 0x20(%rsp), %eax
cmpl $0x1, %eax
je 0x30738
cmpl $0x2, %eax
jne 0x3076e
movq 0x28(%rsp), %rbx
movq (%rbx), %r13
movq 0x8(%rbx), %r12
movq %r12, %rbp
subq %r13, %rbp
sarq $0x4, %rbp
testq %rbp, %rbp
jle 0x30719
incq %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0x2f928
addq $0x10, %r13
decq %rbp
cmpq $0x1, %rbp
jg 0x306f5
movq 0x28(%rsp), %rbx
movq (%rbx), %r13
movq 0x8(%rbx), %r12
cmpq %r13, %r12
je 0x3076e
movq %r13, %rbp
movq %rbp, %rdi
callq 0x300e0
addq $0x10, %rbp
cmpq %r12, %rbp
jne 0x30721
movq %r13, 0x8(%rbx)
jmp 0x3076e
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq 0x8(%rdi), %rbx
cmpq %rbx, %r13
je 0x30766
leaq 0x20(%r13), %rsi
movq %r15, %rdi
callq 0x2f928
addq $0x30, %r13
cmpq %rbx, %r13
jne 0x30749
movq 0x28(%rsp), %rdi
movq (%rdi), %r13
movq %r13, %rsi
callq 0x30992
leaq 0x20(%rsp), %rdi
callq 0x300e0
movq 0x8(%rsp), %rax
cmpq %rax, (%rsp)
jne 0x3069c
movq %rsp, %rdi
callq 0x3094a
movq 0x30(%rsp), %r13
movzbl %r14b, %eax
decl %eax
cmpl $0x7, %eax
ja 0x30824
leaq 0x94df6(%rip), %rcx # 0xc55a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r13), %rdi
callq 0x30a36
jmp 0x307dc
movq (%r13), %rdi
movq (%rdi), %rax
leaq 0x10(%rdi), %rcx
cmpq %rcx, %rax
je 0x307e0
movq (%rcx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x1c110
movq (%r13), %rdi
movl $0x20, %esi
jmp 0x3081f
movq (%r13), %rdi
callq 0x3094a
movq (%r13), %rdi
movl $0x18, %esi
jmp 0x3081f
movq (%r13), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x3081a
movq 0x10(%rdi), %rsi
subq %rax, %rsi
movq %rax, %rdi
callq 0x1c110
movq (%r13), %rdi
movl $0x28, %esi
callq 0x1c110
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30837
jmp 0x30837
movq %rax, %rbx
jmp 0x3084b
jmp 0x3083e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x300e0
movq %rsp, %rdi
callq 0x3094a
movq %rbx, %rdi
callq 0x1c7d0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
cmp esi, 1
setz cl
mov rax, [rdi]
test rax, rax
setz dl
test cl, dl
jnz def_307B1; jumptable 00000000000307B1 default case, cases 4-7
mov r14d, esi
test rax, rax
setz cl
mov edx, r14d
and dl, 0FEh
cmp dl, 2
setz dl
cmp r14b, 8
setz sil
or sil, dl
test sil, cl
jnz def_307B1; jumptable 00000000000307B1 default case, cases 4-7
mov r13, rdi
lea ecx, [r14-1]
cmp cl, 1
ja loc_30794
xorps xmm0, xmm0
movaps [rsp+68h+var_68], xmm0
mov [rsp+68h+var_58], 0
mov rsi, [rax+8]
sub rsi, [rax]
sar rsi, 4
cmp r14b, 2
jnz short loc_30644
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; 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>>::reserve(ulong)
mov rax, [r13+0]
mov r15, [rax]
mov rbx, [rax+8]
sub rbx, r15
sar rbx, 4
test rbx, rbx
jle short loc_30685
inc rbx
mov r12, rsp
loc_3062A:
mov rdi, r12
mov rsi, r15
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
add r15, 10h
dec rbx
cmp rbx, 1
ja short loc_3062A
jmp short loc_30685
loc_30644:
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rsi
mov rdi, rsp
mov rsi, rax
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; 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>>::reserve(ulong)
mov rax, [r13+0]
mov rbx, [rax]
mov r12, [rax+8]
cmp rbx, r12
jz short loc_30685
mov r15, rsp
loc_30670:
lea rsi, [rbx+20h]
mov rdi, r15
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
add rbx, 30h ; '0'
cmp rbx, r12
jnz short loc_30670
loc_30685:
mov [rsp+68h+var_38], r13
mov rax, qword ptr [rsp+68h+var_68+8]
cmp qword ptr [rsp+68h+var_68], rax
jz loc_30787
mov r15, rsp
loc_3069C:
movups xmm0, xmmword ptr [rax-10h]
movaps [rsp+68h+var_48], xmm0
mov byte ptr [rax-10h], 0
mov qword ptr [rax-8], 0
mov rdi, qword ptr [rsp+68h+var_68+8]
add rdi, 0FFFFFFFFFFFFFFF0h
mov qword ptr [rsp+68h+var_68+8], rdi
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()
movzx eax, byte ptr [rsp+68h+var_48]
cmp eax, 1
jz short loc_30738
cmp eax, 2
jnz loc_3076E
mov rbx, qword ptr [rsp+68h+var_48+8]
mov r13, [rbx]
mov r12, [rbx+8]
mov rbp, r12
sub rbp, r13
sar rbp, 4
test rbp, rbp
jle short loc_30719
inc rbp
loc_306F5:
mov rdi, r15
mov rsi, r13
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
add r13, 10h
dec rbp
cmp rbp, 1
jg short loc_306F5
mov rbx, qword ptr [rsp+68h+var_48+8]
mov r13, [rbx]
mov r12, [rbx+8]
loc_30719:
cmp r12, r13
jz short loc_3076E
mov rbp, r13
loc_30721:
mov rdi, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rbp, 10h
cmp rbp, r12
jnz short loc_30721
mov [rbx+8], r13
jmp short loc_3076E
loc_30738:
mov rdi, qword ptr [rsp+68h+var_48+8]
mov r13, [rdi]
mov rbx, [rdi+8]
cmp r13, rbx
jz short loc_30766
loc_30749:
lea rsi, [r13+20h]
mov rdi, r15
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
add r13, 30h ; '0'
cmp r13, rbx
jnz short loc_30749
mov rdi, qword ptr [rsp+68h+var_48+8]
mov r13, [rdi]
loc_30766:
mov rsi, r13
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE15_M_erase_at_endEPSG_; 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>>>::_M_erase_at_end(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>>*)
loc_3076E:
lea rdi, [rsp+68h+var_48]
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, qword ptr [rsp+68h+var_68+8]
cmp qword ptr [rsp+68h+var_68], rax
jnz loc_3069C
loc_30787:
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector()
mov r13, [rsp+68h+var_38]
loc_30794:
movzx eax, r14b
dec eax; switch 8 cases
cmp eax, 7
ja def_307B1; jumptable 00000000000307B1 default case, cases 4-7
lea rcx, jpt_307B1
movsxd rax, ds:(jpt_307B1 - 0C55A0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_307B3:
mov rdi, [r13+0]; jumptable 00000000000307B1 case 1
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EED2Ev; 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>>>::~vector()
jmp short loc_307DC
loc_307BE:
mov rdi, [r13+0]; jumptable 00000000000307B1 case 3
mov rax, [rdi]
lea rcx, [rdi+10h]
cmp rax, rcx
jz short loc_307E0
mov rsi, [rcx]
inc rsi; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_307DC:
mov rdi, [r13+0]
loc_307E0:
mov esi, 20h ; ' '
jmp short loc_3081F
loc_307E7:
mov rdi, [r13+0]; jumptable 00000000000307B1 case 2
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector()
mov rdi, [r13+0]
mov esi, 18h
jmp short loc_3081F
loc_307FB:
mov rdi, [r13+0]; jumptable 00000000000307B1 case 8
mov rax, [rdi]
test rax, rax
jz short loc_3081A
mov rsi, [rdi+10h]
sub rsi, rax; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [r13+0]; void *
loc_3081A:
mov esi, 28h ; '('; unsigned __int64
loc_3081F:
call __ZdlPvm; operator delete(void *,ulong)
def_307B1:
add rsp, 38h; jumptable 00000000000307B1 default case, cases 4-7
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_30837
jmp short $+2
loc_30837:
mov rbx, rax
jmp short loc_3084B
jmp short $+2
loc_3083E:
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_3084B:
mov rdi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector()
mov rdi, rbx
call __Unwind_Resume
| void nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy(
long long **a1,
int a2)
{
long long *v2; // rax
char v3; // r14
void ***v4; // r13
long long v5; // rsi
long long v6; // r15
long long v7; // rbx
long long v8; // rbx
bool v9; // cf
long long v10; // rbx
long long i; // r12
long long j; // rax
long long v13; // rbx
long long v14; // r13
long long v15; // r12
long long v16; // rbp
long long v17; // rbp
long long v18; // rbp
long long v19; // rdi
long long v20; // r13
long long v21; // rbx
void **v22; // rdi
_QWORD *v23; // rcx
unsigned long long v24; // rsi
_BYTE *v25; // rax
__int128 v26; // [rsp+0h] [rbp-68h] BYREF
long long v27; // [rsp+10h] [rbp-58h]
__int128 v28; // [rsp+20h] [rbp-48h] BYREF
long long **v29; // [rsp+30h] [rbp-38h]
v2 = *a1;
if ( *a1 != 0LL || a2 != 1 )
{
v3 = a2;
if ( v2 != 0LL || (a2 & 0xFE) != 2 && (_BYTE)a2 != 8 )
{
v4 = (void ***)a1;
if ( (unsigned __int8)(a2 - 1) <= 1u )
{
v26 = 0LL;
v27 = 0LL;
v5 = (v2[1] - *v2) >> 4;
if ( v3 == 2 )
{
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>>::reserve(
&v26,
v5);
v6 = **a1;
v7 = ((*a1)[1] - v6) >> 4;
if ( v7 > 0 )
{
v8 = v7 + 1;
do
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v26,
v6);
v6 += 16LL;
v9 = v8-- == 1;
}
while ( !v9 && v8 != 1 );
}
}
else
{
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>>::reserve(
&v26,
0xAAAAAAAAAAAAAAABLL * v5);
v10 = **a1;
for ( i = (*a1)[1]; v10 != i; v10 += 48LL )
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v26,
v10 + 32);
}
v29 = a1;
for ( j = *((_QWORD *)&v26 + 1); (_QWORD)v26 != *((_QWORD *)&v26 + 1); j = *((_QWORD *)&v26 + 1) )
{
v28 = *(_OWORD *)(j - 16);
*(_BYTE *)(j - 16) = 0;
*(_QWORD *)(j - 8) = 0LL;
*((_QWORD *)&v26 + 1) -= 16LL;
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(*((_QWORD *)&v26 + 1));
if ( (unsigned __int8)v28 == 1 )
{
v19 = *((_QWORD *)&v28 + 1);
v20 = **((_QWORD **)&v28 + 1);
v21 = *(_QWORD *)(*((_QWORD *)&v28 + 1) + 8LL);
if ( **((_QWORD **)&v28 + 1) != v21 )
{
do
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v26,
v20 + 32);
v20 += 48LL;
}
while ( v20 != v21 );
v19 = *((_QWORD *)&v28 + 1);
v20 = **((_QWORD **)&v28 + 1);
}
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>>>::_M_erase_at_end(
v19,
v20);
}
else if ( (unsigned __int8)v28 == 2 )
{
v13 = *((_QWORD *)&v28 + 1);
v14 = **((_QWORD **)&v28 + 1);
v15 = *(_QWORD *)(*((_QWORD *)&v28 + 1) + 8LL);
v16 = (v15 - **((_QWORD **)&v28 + 1)) >> 4;
if ( v16 > 0 )
{
v17 = v16 + 1;
do
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(long long)&v26,
v14);
v14 += 16LL;
--v17;
}
while ( v17 > 1 );
v13 = *((_QWORD *)&v28 + 1);
v14 = **((_QWORD **)&v28 + 1);
v15 = *(_QWORD *)(*((_QWORD *)&v28 + 1) + 8LL);
}
if ( v15 != v14 )
{
v18 = v14;
do
{
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(v18);
v18 += 16LL;
}
while ( v18 != v15 );
*(_QWORD *)(v13 + 8) = v14;
}
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v28);
}
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector(&v26);
v4 = (void ***)v29;
}
switch ( v3 )
{
case 1:
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>>>::~vector(*v4);
goto LABEL_32;
case 2:
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector(*v4);
v22 = *v4;
v24 = 24LL;
goto LABEL_38;
case 3:
v22 = *v4;
v23 = *v4 + 2;
if ( **v4 != v23 )
{
operator delete(**v4, *v23 + 1LL);
LABEL_32:
v22 = *v4;
}
v24 = 32LL;
goto LABEL_38;
case 8:
v22 = *v4;
v25 = **v4;
if ( v25 )
{
operator delete(**v4, (_BYTE *)v22[2] - v25);
v22 = *v4;
}
v24 = 40LL;
LABEL_38:
operator delete(v22, v24);
break;
default:
return;
}
}
}
}
| destroy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
CMP ESI,0x1
SETZ CL
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
SETZ DL
TEST CL,DL
JNZ 0x00130824
MOV R14D,ESI
TEST RAX,RAX
SETZ CL
MOV EDX,R14D
AND DL,0xfe
CMP DL,0x2
SETZ DL
CMP R14B,0x8
SETZ SIL
OR SIL,DL
TEST SIL,CL
JNZ 0x00130824
MOV R13,RDI
LEA ECX,[R14 + -0x1]
CMP CL,0x1
JA 0x00130794
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV RSI,qword ptr [RAX + 0x8]
SUB RSI,qword ptr [RAX]
SAR RSI,0x4
CMP R14B,0x2
JNZ 0x00130644
LAB_00130605:
MOV RDI,RSP
CALL 0x0013085c
MOV RAX,qword ptr [R13]
MOV R15,qword ptr [RAX]
MOV RBX,qword ptr [RAX + 0x8]
SUB RBX,R15
SAR RBX,0x4
TEST RBX,RBX
JLE 0x00130685
INC RBX
MOV R12,RSP
LAB_0013062a:
MOV RDI,R12
MOV RSI,R15
CALL 0x0012f928
ADD R15,0x10
DEC RBX
CMP RBX,0x1
JA 0x0013062a
JMP 0x00130685
LAB_00130644:
MOV RAX,-0x5555555555555555
IMUL RAX,RSI
LAB_00130652:
MOV RDI,RSP
MOV RSI,RAX
CALL 0x0013085c
MOV RAX,qword ptr [R13]
MOV RBX,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
CMP RBX,R12
JZ 0x00130685
MOV R15,RSP
LAB_00130670:
LEA RSI,[RBX + 0x20]
LAB_00130674:
MOV RDI,R15
CALL 0x0012f928
ADD RBX,0x30
CMP RBX,R12
JNZ 0x00130670
LAB_00130685:
MOV qword ptr [RSP + 0x30],R13
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RSP],RAX
JZ 0x00130787
MOV R15,RSP
LAB_0013069c:
MOVUPS XMM0,xmmword ptr [RAX + -0x10]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV byte ptr [RAX + -0x10],0x0
MOV qword ptr [RAX + -0x8],0x0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,-0x10
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001300e0
MOVZX EAX,byte ptr [RSP + 0x20]
CMP EAX,0x1
JZ 0x00130738
CMP EAX,0x2
JNZ 0x0013076e
MOV RBX,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RBX]
MOV R12,qword ptr [RBX + 0x8]
MOV RBP,R12
SUB RBP,R13
SAR RBP,0x4
TEST RBP,RBP
JLE 0x00130719
INC RBP
LAB_001306f5:
MOV RDI,R15
MOV RSI,R13
CALL 0x0012f928
ADD R13,0x10
DEC RBP
CMP RBP,0x1
JG 0x001306f5
MOV RBX,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RBX]
MOV R12,qword ptr [RBX + 0x8]
LAB_00130719:
CMP R12,R13
JZ 0x0013076e
MOV RBP,R13
LAB_00130721:
MOV RDI,RBP
CALL 0x001300e0
ADD RBP,0x10
CMP RBP,R12
JNZ 0x00130721
MOV qword ptr [RBX + 0x8],R13
JMP 0x0013076e
LAB_00130738:
MOV RDI,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RDI]
MOV RBX,qword ptr [RDI + 0x8]
CMP R13,RBX
JZ 0x00130766
LAB_00130749:
LEA RSI,[R13 + 0x20]
LAB_0013074d:
MOV RDI,R15
CALL 0x0012f928
LAB_00130755:
ADD R13,0x30
CMP R13,RBX
JNZ 0x00130749
MOV RDI,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RDI]
LAB_00130766:
MOV RSI,R13
CALL 0x00130992
LAB_0013076e:
LEA RDI,[RSP + 0x20]
CALL 0x001300e0
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RSP],RAX
JNZ 0x0013069c
LAB_00130787:
MOV RDI,RSP
CALL 0x0013094a
MOV R13,qword ptr [RSP + 0x30]
LAB_00130794:
MOVZX EAX,R14B
DEC EAX
CMP EAX,0x7
JA 0x00130824
LEA RCX,[0x1c55a0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [R13]
CALL 0x00130a36
JMP 0x001307dc
caseD_3:
MOV RDI,qword ptr [R13]
MOV RAX,qword ptr [RDI]
LEA RCX,[RDI + 0x10]
CMP RAX,RCX
JZ 0x001307e0
MOV RSI,qword ptr [RCX]
INC RSI
MOV RDI,RAX
CALL 0x0011c110
LAB_001307dc:
MOV RDI,qword ptr [R13]
LAB_001307e0:
MOV ESI,0x20
JMP 0x0013081f
caseD_2:
MOV RDI,qword ptr [R13]
CALL 0x0013094a
MOV RDI,qword ptr [R13]
MOV ESI,0x18
JMP 0x0013081f
caseD_8:
MOV RDI,qword ptr [R13]
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0013081a
MOV RSI,qword ptr [RDI + 0x10]
SUB RSI,RAX
MOV RDI,RAX
CALL 0x0011c110
MOV RDI,qword ptr [R13]
LAB_0013081a:
MOV ESI,0x28
LAB_0013081f:
CALL 0x0011c110
caseD_4:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) */
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>
::json_value::destroy(json_value *this,uint param_2)
{
long *plVar1;
long lVar2;
pair *ppVar3;
void *pvVar4;
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>>>>
*pvVar5;
byte bVar6;
long lVar7;
data *this_00;
ulong uVar8;
int8 *puVar9;
data *pdVar10;
data *pdVar11;
pair *ppVar12;
basic_json *pbVar13;
data *local_68;
data *pdStack_60;
int8 local_58;
int8 local_48;
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>>>>
*pvStack_40;
json_value *local_38;
plVar1 = *(long **)this;
if (param_2 == 1 && plVar1 == (long *)0x0) {
return;
}
bVar6 = (byte)param_2;
if ((bVar6 == 8 || (bVar6 & 0xfe) == 2) && plVar1 == (long *)0x0) {
return;
}
if ((byte)(bVar6 - 1) < 2) {
local_68 = (data *)0x0;
pdStack_60 = (data *)0x0;
local_58 = 0;
uVar8 = plVar1[1] - *plVar1 >> 4;
if (bVar6 == 2) {
/* try { // try from 00130605 to 0013060c has its CatchHandler @ 00130833 */
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>>>
::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,uVar8);
pbVar13 = (basic_json *)**(long **)this;
lVar7 = (*(long **)this)[1] - (long)pbVar13 >> 4;
if (0 < lVar7) {
uVar8 = lVar7 + 1;
do {
/* try { // try from 0013062a to 00130634 has its CatchHandler @ 00130837 */
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,pbVar13);
pbVar13 = pbVar13 + 0x10;
uVar8 = uVar8 - 1;
} while (1 < uVar8);
}
}
else {
/* try { // try from 00130652 to 0013065c has its CatchHandler @ 00130833 */
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>>>
::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,uVar8 * -0x5555555555555555);
lVar2 = (*(long **)this)[1];
for (lVar7 = **(long **)this; lVar7 != lVar2; lVar7 = lVar7 + 0x30) {
/* try { // try from 00130674 to 0013067b has its CatchHandler @ 00130835 */
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,(basic_json *)(lVar7 + 0x20));
}
}
local_38 = this;
if (local_68 != pdStack_60) {
do {
local_48 = *(int8 *)(pdStack_60 + -0x10);
pvStack_40 = *(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>>>>
**)(pdStack_60 + -8);
pdStack_60[-0x10] = (data)0x0;
*(int8 *)(pdStack_60 + -8) = 0;
pdStack_60 = pdStack_60 + -0x10;
data::~data(pdStack_60);
if (local_48._0_1_ == (data)0x1) {
ppVar12 = *(pair **)pvStack_40;
ppVar3 = *(pair **)(pvStack_40 + 8);
if (ppVar12 != ppVar3) {
do {
/* try { // try from 0013074d to 00130754 has its CatchHandler @ 0013083e */
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,(basic_json *)(ppVar12 + 0x20));
ppVar12 = ppVar12 + 0x30;
} while (ppVar12 != ppVar3);
ppVar12 = *(pair **)pvStack_40;
}
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>>>>
::_M_erase_at_end(pvStack_40,ppVar12);
}
else if (local_48._0_1_ == (data)0x2) {
pdVar11 = *(data **)pvStack_40;
pdVar10 = *(data **)(pvStack_40 + 8);
lVar7 = (long)pdVar10 - (long)pdVar11 >> 4;
if (0 < lVar7) {
lVar7 = lVar7 + 1;
do {
/* try { // try from 001306f5 to 001306ff has its CatchHandler @ 0013083c */
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68,(basic_json *)pdVar11);
pdVar11 = (data *)((basic_json *)pdVar11 + 0x10);
lVar7 = lVar7 + -1;
} while (1 < lVar7);
pdVar11 = *(data **)pvStack_40;
pdVar10 = *(data **)(pvStack_40 + 8);
}
pvVar5 = pvStack_40;
this_00 = pdVar11;
if (pdVar10 != pdVar11) {
do {
data::~data(this_00);
this_00 = this_00 + 0x10;
} while (this_00 != pdVar10);
*(data **)(pvVar5 + 8) = pdVar11;
}
}
data::~data((data *)&local_48);
} while (local_68 != pdStack_60);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::~vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_68);
this = local_38;
}
switch(param_2 & 0xff) {
case 1:
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>>>>
::~vector(*(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>>>>
**)this);
LAB_001307dc:
puVar9 = *(int8 **)this;
goto LAB_001307e0;
case 2:
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::~vector(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)this);
puVar9 = *(int8 **)this;
uVar8 = 0x18;
break;
case 3:
puVar9 = *(int8 **)this;
if ((long *)*puVar9 != puVar9 + 2) {
operator_delete((long *)*puVar9,puVar9[2] + 1);
goto LAB_001307dc;
}
LAB_001307e0:
uVar8 = 0x20;
break;
default:
goto switchD_001307b1_caseD_4;
case 8:
puVar9 = *(int8 **)this;
pvVar4 = (void *)*puVar9;
if (pvVar4 != (void *)0x0) {
operator_delete(pvVar4,puVar9[2] - (long)pvVar4);
puVar9 = *(int8 **)this;
}
uVar8 = 0x28;
}
operator_delete(puVar9,uVar8);
switchD_001307b1_caseD_4:
return;
}
|
|
470 | stbi__gif_load(stbi__context*, int*, int*, int*, int, stbi__result_info*) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri)
{
stbi_uc *u = 0;
stbi__gif g;
memset(&g, 0, sizeof(g));
STBI_NOTUSED(ri);
u = stbi__gif_load_next(s, &g, comp, req_comp, 0);
if (u == (stbi_uc *) s) u = 0; // end of animated gif marker
if (u) {
*x = g.w;
*y = g.h;
// moved conversion to after successful load so that the same
// can be done for multiple frames.
if (req_comp && req_comp != 4)
u = stbi__convert_format(u, 4, req_comp, g.w, g.h);
} else if (g.out) {
// if there was an error and we allocated an image buffer, free it!
STBI_FREE(g.out);
}
// free buffers needed for multiple frame loading;
STBI_FREE(g.history);
STBI_FREE(g.background);
return u;
} | O0 | c | stbi__gif_load(stbi__context*, int*, int*, int*, int, stbi__result_info*):
subq $0x88a8, %rsp # imm = 0x88A8
movq %rdi, 0x88a0(%rsp)
movq %rsi, 0x8898(%rsp)
movq %rdx, 0x8890(%rsp)
movq %rcx, 0x8888(%rsp)
movl %r8d, 0x8884(%rsp)
movq %r9, 0x8878(%rsp)
movq $0x0, 0x8870(%rsp)
movq %rsp, %rdi
xorl %esi, %esi
movl $0x8870, %edx # imm = 0x8870
callq 0xb390
movq 0x88a0(%rsp), %rdi
movq 0x8888(%rsp), %rdx
movl 0x8884(%rsp), %ecx
movq %rsp, %rsi
xorl %eax, %eax
movl %eax, %r8d
callq 0x1d300
movq %rax, 0x8870(%rsp)
movq 0x8870(%rsp), %rax
cmpq 0x88a0(%rsp), %rax
jne 0x155cc
movq $0x0, 0x8870(%rsp)
cmpq $0x0, 0x8870(%rsp)
je 0x15631
movl (%rsp), %ecx
movq 0x8898(%rsp), %rax
movl %ecx, (%rax)
movl 0x4(%rsp), %ecx
movq 0x8890(%rsp), %rax
movl %ecx, (%rax)
cmpl $0x0, 0x8884(%rsp)
je 0x1562f
cmpl $0x4, 0x8884(%rsp)
je 0x1562f
movq 0x8870(%rsp), %rdi
movl 0x8884(%rsp), %edx
movl (%rsp), %ecx
movl 0x4(%rsp), %r8d
movl $0x4, %esi
callq 0x190e0
movq %rax, 0x8870(%rsp)
jmp 0x15645
cmpq $0x0, 0x8(%rsp)
je 0x15643
movq 0x8(%rsp), %rdi
callq 0xb900
jmp 0x15645
movq 0x18(%rsp), %rdi
callq 0xb900
movq 0x10(%rsp), %rdi
callq 0xb900
movq 0x8870(%rsp), %rax
addq $0x88a8, %rsp # imm = 0x88A8
retq
nopl (%rax)
| _ZL14stbi__gif_loadP13stbi__contextPiS1_S1_iP17stbi__result_info:
sub rsp, 88A8h
mov [rsp+88A8h+var_8], rdi
mov [rsp+88A8h+var_10], rsi
mov [rsp+88A8h+var_18], rdx
mov [rsp+88A8h+var_20], rcx
mov [rsp+88A8h+var_24], r8d
mov [rsp+88A8h+var_30], r9
mov [rsp+88A8h+var_38], 0
mov rdi, rsp
xor esi, esi
mov edx, 8870h
call _memset
mov rdi, [rsp+88A8h+var_8]
mov rdx, [rsp+88A8h+var_20]
mov ecx, [rsp+88A8h+var_24]
mov rsi, rsp
xor eax, eax
mov r8d, eax
call _ZL19stbi__gif_load_nextP13stbi__contextP9stbi__gifPiiPh; stbi__gif_load_next(stbi__context *,stbi__gif *,int *,int,uchar *)
mov [rsp+88A8h+var_38], rax
mov rax, [rsp+88A8h+var_38]
cmp rax, [rsp+88A8h+var_8]
jnz short loc_155CC
mov [rsp+88A8h+var_38], 0
loc_155CC:
cmp [rsp+88A8h+var_38], 0
jz short loc_15631
mov ecx, [rsp+88A8h+var_88A8]
mov rax, [rsp+88A8h+var_10]
mov [rax], ecx
mov ecx, [rsp+88A8h+var_88A4]
mov rax, [rsp+88A8h+var_18]
mov [rax], ecx
cmp [rsp+88A8h+var_24], 0
jz short loc_1562F
cmp [rsp+88A8h+var_24], 4
jz short loc_1562F
mov rdi, [rsp+88A8h+var_38]; unsigned __int8 *
mov edx, [rsp+88A8h+var_24]; int
mov ecx, [rsp+88A8h+var_88A8]; unsigned int
mov r8d, [rsp+88A8h+var_88A4]; unsigned int
mov esi, 4; int
call _ZL20stbi__convert_formatPhiijj; stbi__convert_format(uchar *,int,int,uint,uint)
mov [rsp+88A8h+var_38], rax
loc_1562F:
jmp short loc_15645
loc_15631:
cmp [rsp+88A8h+var_88A0], 0
jz short loc_15643
mov rdi, [rsp+88A8h+var_88A0]
call _free
loc_15643:
jmp short $+2
loc_15645:
mov rdi, [rsp+88A8h+var_8890]
call _free
mov rdi, [rsp+88A8h+var_8898]
call _free
mov rax, [rsp+88A8h+var_38]
add rsp, 88A8h
retn
| unsigned __int8 * stbi__gif_load(
unsigned __int8 *a1,
unsigned int *a2,
unsigned int *a3,
long long a4,
int a5,
long long a6)
{
unsigned int v7; // [rsp+0h] [rbp-88A8h] BYREF
unsigned int v8; // [rsp+4h] [rbp-88A4h]
long long v9; // [rsp+8h] [rbp-88A0h]
long long v10; // [rsp+10h] [rbp-8898h]
long long v11; // [rsp+18h] [rbp-8890h]
unsigned __int8 *v12; // [rsp+8870h] [rbp-38h]
long long v13; // [rsp+8878h] [rbp-30h]
int v14; // [rsp+8884h] [rbp-24h]
long long v15; // [rsp+8888h] [rbp-20h]
unsigned int *v16; // [rsp+8890h] [rbp-18h]
unsigned int *v17; // [rsp+8898h] [rbp-10h]
unsigned __int8 *v18; // [rsp+88A0h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
v12 = 0LL;
memset(&v7, 0LL, 34928LL);
v12 = (unsigned __int8 *)stbi__gif_load_next(v18, &v7, v15, (unsigned int)v14, 0LL);
if ( v12 == v18 )
v12 = 0LL;
if ( v12 )
{
*v17 = v7;
*v16 = v8;
if ( v14 && v14 != 4 )
v12 = (unsigned __int8 *)stbi__convert_format(v12, 4, v14, v7, v8);
}
else if ( v9 )
{
free(v9);
}
free(v11);
free(v10);
return v12;
}
| stbi__gif_load:
SUB RSP,0x88a8
MOV qword ptr [RSP + 0x88a0],RDI
MOV qword ptr [RSP + 0x8898],RSI
MOV qword ptr [RSP + 0x8890],RDX
MOV qword ptr [RSP + 0x8888],RCX
MOV dword ptr [RSP + 0x8884],R8D
MOV qword ptr [RSP + 0x8878],R9
MOV qword ptr [RSP + 0x8870],0x0
MOV RDI,RSP
XOR ESI,ESI
MOV EDX,0x8870
CALL 0x0010b390
MOV RDI,qword ptr [RSP + 0x88a0]
MOV RDX,qword ptr [RSP + 0x8888]
MOV ECX,dword ptr [RSP + 0x8884]
MOV RSI,RSP
XOR EAX,EAX
MOV R8D,EAX
CALL 0x0011d300
MOV qword ptr [RSP + 0x8870],RAX
MOV RAX,qword ptr [RSP + 0x8870]
CMP RAX,qword ptr [RSP + 0x88a0]
JNZ 0x001155cc
MOV qword ptr [RSP + 0x8870],0x0
LAB_001155cc:
CMP qword ptr [RSP + 0x8870],0x0
JZ 0x00115631
MOV ECX,dword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8898]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RSP + 0x4]
MOV RAX,qword ptr [RSP + 0x8890]
MOV dword ptr [RAX],ECX
CMP dword ptr [RSP + 0x8884],0x0
JZ 0x0011562f
CMP dword ptr [RSP + 0x8884],0x4
JZ 0x0011562f
MOV RDI,qword ptr [RSP + 0x8870]
MOV EDX,dword ptr [RSP + 0x8884]
MOV ECX,dword ptr [RSP]
MOV R8D,dword ptr [RSP + 0x4]
MOV ESI,0x4
CALL 0x001190e0
MOV qword ptr [RSP + 0x8870],RAX
LAB_0011562f:
JMP 0x00115645
LAB_00115631:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00115643
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010b900
LAB_00115643:
JMP 0x00115645
LAB_00115645:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0010b900
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0010b900
MOV RAX,qword ptr [RSP + 0x8870]
ADD RSP,0x88a8
RET
|
/* stbi__gif_load(stbi__context*, int*, int*, int*, int, stbi__result_info*) */
stbi__context *
stbi__gif_load(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5,
stbi__result_info *param_6)
{
uint local_88a8;
uint local_88a4;
void *local_88a0;
void *local_8898;
void *local_8890;
stbi__context *local_38;
stbi__result_info *local_30;
int local_24;
int *local_20;
uint *local_18;
uint *local_10;
stbi__context *local_8;
local_38 = (stbi__context *)0x0;
local_30 = param_6;
local_24 = param_5;
local_20 = param_4;
local_18 = (uint *)param_3;
local_10 = (uint *)param_2;
local_8 = param_1;
memset(&local_88a8,0,0x8870);
local_38 = (stbi__context *)
stbi__gif_load_next(local_8,(stbi__gif *)&local_88a8,local_20,local_24,(uchar *)0x0);
if (local_38 == local_8) {
local_38 = (stbi__context *)0x0;
}
if (local_38 == (stbi__context *)0x0) {
if (local_88a0 != (void *)0x0) {
free(local_88a0);
}
}
else {
*local_10 = local_88a8;
*local_18 = local_88a4;
if ((local_24 != 0) && (local_24 != 4)) {
local_38 = (stbi__context *)
stbi__convert_format((uchar *)local_38,4,local_24,local_88a8,local_88a4);
}
}
free(local_8890);
free(local_8898);
return local_38;
}
|
|
471 | my_b_cache_read | eloqsql/mysys/mf_iocache.c | int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t length= 0, diff_length, left_length= 0, max_length;
my_off_t pos_in_file;
DBUG_ENTER("_my_b_cache_read");
/* pos_in_file always point on where info->buffer was read */
pos_in_file=info->pos_in_file+ (size_t) (info->read_end - info->buffer);
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (info->seek_not_done)
{
if ((mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0))
!= MY_FILEPOS_ERROR))
{
/* No error, reset seek_not_done flag. */
info->seek_not_done= 0;
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
}
else
{
/*
If the seek failed and the error number is ESPIPE, it is because
info->file is a pipe or socket or FIFO. We never should have tried
to seek on that. See Bugs#25807 and #22828 for more info.
*/
DBUG_ASSERT(my_errno != ESPIPE);
info->error= -1;
DBUG_RETURN(1);
}
}
/*
Calculate, how much we are within a IO_SIZE block. Ideally this
should be zero.
*/
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
/*
If more than a block plus the rest of the current block is wanted,
we do read directly, without filling the buffer.
*/
if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length)))
{ /* Fill first intern buffer */
size_t read_length;
if (info->end_of_file <= pos_in_file)
{
/* End of file. Return, what we did copy from the buffer. */
info->error= (int) left_length;
info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
Crop the wanted count to a multiple of IO_SIZE and subtract,
what we did already read from a block. That way, the read will
end aligned with a block.
*/
length= IO_ROUND_DN(Count) - diff_length;
if ((read_length= mysql_file_read(info->file,Buffer, length, info->myflags))
!= length)
{
/*
If we didn't get, what we wanted, we either return -1 for a read
error, or (it's end of file), how much we got in total.
*/
info->error= (read_length == (size_t) -1 ? -1 :
(int) (read_length+left_length));
info->seek_not_done=1;
DBUG_RETURN(1);
}
Count-=length;
Buffer+=length;
pos_in_file+=length;
left_length+=length;
diff_length=0;
}
/*
At this point, we want less than one and a partial block.
We will read a full cache, minus the number of bytes, we are
within a block already. So we will reach new alignment.
*/
max_length= info->read_length-diff_length;
/* We will not read past end of file. */
if (info->type != READ_FIFO &&
max_length > (info->end_of_file - pos_in_file))
max_length= (size_t) (info->end_of_file - pos_in_file);
/*
If there is nothing left to read,
we either are done, or we failed to fulfill the request.
Otherwise, we read max_length into the cache.
*/
if (!max_length)
{
if (Count)
{
/* We couldn't fulfil the request. Return, how much we got. */
info->error= (int) left_length;
DBUG_RETURN(1);
}
else
{
info->error= 0;
if (length == 0) /* nothing was read */
DBUG_RETURN(0); /* EOF */
length= 0; /* non-zero size read was done */
}
}
else
{
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
if ((length= mysql_file_read(info->file,info->buffer, max_length,
info->myflags)) < Count ||
length == (size_t) -1)
{
/*
We got an read error, or less than requested (end of file).
If not a read error, copy, what we got.
*/
if (length != (size_t) -1)
memcpy(Buffer, info->buffer, length);
info->pos_in_file= pos_in_file;
/* For a read error, return -1, otherwise, what we got in total. */
info->error= length == (size_t) -1 ? -1 : (int) (length+left_length);
info->read_pos=info->read_end=info->buffer;
info->seek_not_done=1;
DBUG_RETURN(1);
}
}
/*
Count is the remaining number of bytes requested.
length is the amount of data in the cache.
Read Count bytes from the cache.
*/
info->read_pos=info->buffer+Count;
info->read_end=info->buffer+length;
info->pos_in_file=pos_in_file;
if (Count)
memcpy(Buffer, info->buffer, Count);
DBUG_RETURN(0);
} | O0 | c | my_b_cache_read:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq 0x20(%rdx), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xe0(%rax)
je 0xe27cb
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x48(%rbp), %rcx
leaq 0x71a6a(%rip), %rdi # 0x1541a5
movl $0x273, %esi # imm = 0x273
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0xe0230
cmpq $-0x1, %rax
je 0xe27ab
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xd8(%rax)
je 0xe27a9
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0xe27a7
movq -0x50(%rbp), %rax
movl $0x1, 0xe0(%rax)
movq -0x50(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0xe277e
jmp 0xe27a9
jmp 0xe27c9
jmp 0xe27ad
jmp 0xe27af
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0x1, -0x4(%rbp)
jmp 0xe2afd
jmp 0xe27cb
movq -0x48(%rbp), %rax
andq $0xfff, %rax # imm = 0xFFF
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl $0x1000, %ecx # imm = 0x1000
subq -0x30(%rbp), %rcx
addq $0x1000, %rcx # imm = 0x1000
cmpq %rcx, %rax
jb 0xe28fa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x48(%rbp), %rax
ja 0xe282e
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xe0(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe2afd
movabsq $0xfffff000, %rax # imm = 0xFFFFF000
andq -0x20(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
leaq 0x7193d(%rip), %rdi # 0x1541a5
movl $0x2ab, %esi # imm = 0x2AB
callq 0xe2c40
movq %rax, -0x58(%rbp)
cmpq -0x28(%rbp), %rax
je 0xe28bf
cmpq $-0x1, -0x58(%rbp)
jne 0xe288d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x64(%rbp)
jmp 0xe2898
movq -0x58(%rbp), %rax
addq -0x38(%rbp), %rax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xe0(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe2afd
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4, 0xb0(%rax)
je 0xe293f
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq -0x48(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xe293f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xe2999
cmpq $0x0, -0x20(%rbp)
je 0xe2969
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe2afd
movq -0x10(%rbp), %rax
movl $0x0, 0xe4(%rax)
cmpq $0x0, -0x28(%rbp)
jne 0xe298c
jmp 0xe2980
movl $0x0, -0x4(%rbp)
jmp 0xe2afd
movq $0x0, -0x28(%rbp)
jmp 0xe2aa5
movq -0x10(%rbp), %rax
cmpq $0x0, 0xd8(%rax)
je 0xe29e1
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0xe29df
movq -0x60(%rbp), %rax
movl $0x1, 0xe0(%rax)
movq -0x60(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0xe29b6
jmp 0xe29e1
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x40(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
leaq 0x7179c(%rip), %rdi # 0x1541a5
movl $0x2eb, %esi # imm = 0x2EB
callq 0xe2c40
movq %rax, -0x28(%rbp)
cmpq -0x20(%rbp), %rax
jb 0xe2a24
cmpq $-0x1, -0x28(%rbp)
jne 0xe2aa3
cmpq $-0x1, -0x28(%rbp)
je 0xe2a40
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x2a090
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpq $-0x1, -0x28(%rbp)
jne 0xe2a5c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x68(%rbp)
jmp 0xe2a67
movq -0x28(%rbp), %rax
addq -0x38(%rbp), %rax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xe0(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe2afd
jmp 0xe2aa5
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0xe2af4
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a090
jmp 0xe2af6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _my_b_cache_read:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0
mov [rbp+var_38], 0
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
mov rdx, [rbp+var_10]
mov rdx, [rdx+20h]
sub rcx, rdx
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+0E0h], 0
jz loc_E27CB
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_48]
lea rdi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 273h
xor r8d, r8d
xor eax, eax
mov r9d, eax
call inline_mysql_file_seek_6
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_E27AB
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+0D8h], 0
jz short loc_E27A9
mov rax, [rbp+var_10]
mov rax, [rax+0D8h]
mov [rbp+var_50], rax
loc_E277E:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_10]
jz short loc_E27A7
mov rax, [rbp+var_50]
mov dword ptr [rax+0E0h], 1
mov rax, [rbp+var_50]
mov rax, [rax+0D8h]
mov [rbp+var_50], rax
jmp short loc_E277E
loc_E27A7:
jmp short $+2
loc_E27A9:
jmp short loc_E27C9
loc_E27AB:
jmp short $+2
loc_E27AD:
jmp short $+2
loc_E27AF:
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 1
jmp loc_E2AFD
loc_E27C9:
jmp short $+2
loc_E27CB:
mov rax, [rbp+var_48]
and rax, 0FFFh
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov ecx, 1000h
sub rcx, [rbp+var_30]
add rcx, 1000h
cmp rax, rcx
jb loc_E28FA
mov rax, [rbp+var_10]
mov rax, [rax+8]
cmp rax, [rbp+var_48]
ja short loc_E282E
mov rax, [rbp+var_38]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 1
mov [rbp+var_4], 1
jmp loc_E2AFD
loc_E282E:
mov rax, 0FFFFF000h
and rax, [rbp+var_20]
sub rax, [rbp+var_30]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_28]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
lea rdi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2ABh
call inline_mysql_file_read_5
mov [rbp+var_58], rax
cmp rax, [rbp+var_28]
jz short loc_E28BF
cmp [rbp+var_58], 0FFFFFFFFFFFFFFFFh
jnz short loc_E288D
mov eax, 0FFFFFFFFh
mov [rbp+var_64], eax
jmp short loc_E2898
loc_E288D:
mov rax, [rbp+var_58]
add rax, [rbp+var_38]
mov [rbp+var_64], eax
loc_E2898:
mov ecx, [rbp+var_64]
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 1
mov [rbp+var_4], 1
jmp loc_E2AFD
loc_E28BF:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_38]
mov [rbp+var_38], rax
mov [rbp+var_30], 0
loc_E28FA:
mov rax, [rbp+var_10]
mov rax, [rax+0F0h]
sub rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+0B0h], 4
jz short loc_E293F
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rcx, [rbp+var_48]
cmp rax, rcx
jbe short loc_E293F
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rax, [rbp+var_48]
mov [rbp+var_40], rax
loc_E293F:
cmp [rbp+var_40], 0
jnz short loc_E2999
cmp [rbp+var_20], 0
jz short loc_E2969
mov rax, [rbp+var_38]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov [rbp+var_4], 1
jmp loc_E2AFD
loc_E2969:
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0
cmp [rbp+var_28], 0
jnz short loc_E298C
jmp short $+2
loc_E2980:
mov [rbp+var_4], 0
jmp loc_E2AFD
loc_E298C:
mov [rbp+var_28], 0
jmp loc_E2AA5
loc_E2999:
mov rax, [rbp+var_10]
cmp qword ptr [rax+0D8h], 0
jz short loc_E29E1
mov rax, [rbp+var_10]
mov rax, [rax+0D8h]
mov [rbp+var_60], rax
loc_E29B6:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_10]
jz short loc_E29DF
mov rax, [rbp+var_60]
mov dword ptr [rax+0E0h], 1
mov rax, [rbp+var_60]
mov rax, [rax+0D8h]
mov [rbp+var_60], rax
jmp short loc_E29B6
loc_E29DF:
jmp short $+2
loc_E29E1:
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov r8, [rbp+var_40]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
lea rdi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 2EBh
call inline_mysql_file_read_5
mov [rbp+var_28], rax
cmp rax, [rbp+var_20]
jb short loc_E2A24
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jnz short loc_E2AA3
loc_E2A24:
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jz short loc_E2A40
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
mov rdx, [rbp+var_28]
call _memcpy
loc_E2A40:
mov rcx, [rbp+var_48]
mov rax, [rbp+var_10]
mov [rax], rcx
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jnz short loc_E2A5C
mov eax, 0FFFFFFFFh
mov [rbp+var_68], eax
jmp short loc_E2A67
loc_E2A5C:
mov rax, [rbp+var_28]
add rax, [rbp+var_38]
mov [rbp+var_68], eax
loc_E2A67:
mov ecx, [rbp+var_68]
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 1
mov [rbp+var_4], 1
jmp short loc_E2AFD
loc_E2AA3:
jmp short $+2
loc_E2AA5:
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
add rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rcx, [rbp+var_48]
mov rax, [rbp+var_10]
mov [rax], rcx
cmp [rbp+var_20], 0
jz short loc_E2AF4
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
mov rdx, [rbp+var_20]
call _memcpy
loc_E2AF4:
jmp short $+2
loc_E2AF6:
mov [rbp+var_4], 0
loc_E2AFD:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long my_b_cache_read(long long a1, long long a2, unsigned long long a3)
{
long long v3; // rcx
int v5; // [rsp+8h] [rbp-68h]
int v6; // [rsp+Ch] [rbp-64h]
long long j; // [rsp+10h] [rbp-60h]
long long v8; // [rsp+18h] [rbp-58h]
long long i; // [rsp+20h] [rbp-50h]
unsigned long long v10; // [rsp+28h] [rbp-48h]
unsigned long long v11; // [rsp+30h] [rbp-40h]
int v12; // [rsp+38h] [rbp-38h]
unsigned long long v13; // [rsp+40h] [rbp-30h]
unsigned long long v14; // [rsp+48h] [rbp-28h]
unsigned long long v15; // [rsp+48h] [rbp-28h]
long long v17; // [rsp+58h] [rbp-18h]
v17 = a2;
v14 = 0LL;
v12 = 0;
v10 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32) + *(_QWORD *)a1;
if ( *(_DWORD *)(a1 + 224) )
{
if ( inline_mysql_file_seek_6(
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x273u,
*(_DWORD *)(a1 + 212),
v10,
0,
0LL) == -1 )
{
*(_DWORD *)(a1 + 228) = -1;
return 1;
}
*(_DWORD *)(a1 + 224) = 0;
if ( *(_QWORD *)(a1 + 216) )
{
for ( i = *(_QWORD *)(a1 + 216); i != a1; i = *(_QWORD *)(i + 216) )
*(_DWORD *)(i + 224) = 1;
}
}
v13 = v10 & 0xFFF;
if ( a3 >= 4096 - v13 + 4096 )
{
if ( *(_QWORD *)(a1 + 8) <= v10 )
{
*(_DWORD *)(a1 + 228) = 0;
*(_DWORD *)(a1 + 224) = 1;
return 1;
}
v14 = ((unsigned int)a3 & 0xFFFFF000) - v13;
v8 = inline_mysql_file_read_5(
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
683LL,
*(unsigned int *)(a1 + 212),
a2,
v14,
*(_QWORD *)(a1 + 248));
if ( v8 != v14 )
{
if ( v8 == -1 )
v6 = -1;
else
v6 = v8;
*(_DWORD *)(a1 + 228) = v6;
*(_DWORD *)(a1 + 224) = 1;
return 1;
}
a3 -= v14;
v17 = a2 + v14;
v10 += v14;
v12 = v14;
v13 = 0LL;
}
v11 = *(_QWORD *)(a1 + 240) - v13;
if ( *(_DWORD *)(a1 + 176) != 4 && v11 > *(_QWORD *)(a1 + 8) - v10 )
v11 = *(_QWORD *)(a1 + 8) - v10;
if ( !v11 )
{
if ( a3 )
{
*(_DWORD *)(a1 + 228) = v12;
return 1;
}
*(_DWORD *)(a1 + 228) = 0;
if ( !v14 )
return 0;
v15 = 0LL;
goto LABEL_39;
}
if ( *(_QWORD *)(a1 + 216) )
{
for ( j = *(_QWORD *)(a1 + 216); j != a1; j = *(_QWORD *)(j + 216) )
*(_DWORD *)(j + 224) = 1;
}
v15 = inline_mysql_file_read_5(
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
747LL,
*(unsigned int *)(a1 + 212),
*(_QWORD *)(a1 + 32),
v11,
*(_QWORD *)(a1 + 248));
if ( v15 >= a3 && v15 != -1LL )
{
LABEL_39:
*(_QWORD *)(a1 + 16) = a3 + *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 24) = v15 + *(_QWORD *)(a1 + 32);
*(_QWORD *)a1 = v10;
if ( a3 )
memcpy(v17, *(_QWORD *)(a1 + 32), a3);
return 0;
}
if ( v15 != -1LL )
memcpy(v17, *(_QWORD *)(a1 + 32), v15);
*(_QWORD *)a1 = v10;
if ( v15 == -1LL )
v5 = -1;
else
v5 = v12 + v15;
*(_DWORD *)(a1 + 228) = v5;
v3 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 24) = v3;
*(_QWORD *)(a1 + 16) = v3;
*(_DWORD *)(a1 + 224) = 1;
return 1;
}
| _my_b_cache_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],0x0
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x20]
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xe0],0x0
JZ 0x001e27cb
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x48]
LEA RDI,[0x2541a5]
MOV ESI,0x273
XOR R8D,R8D
XOR EAX,EAX
MOV R9D,EAX
CALL 0x001e0230
CMP RAX,-0x1
JZ 0x001e27ab
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0xd8],0x0
JZ 0x001e27a9
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x50],RAX
LAB_001e277e:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x001e27a7
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001e277e
LAB_001e27a7:
JMP 0x001e27a9
LAB_001e27a9:
JMP 0x001e27c9
LAB_001e27ab:
JMP 0x001e27ad
LAB_001e27ad:
JMP 0x001e27af
LAB_001e27af:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2afd
LAB_001e27c9:
JMP 0x001e27cb
LAB_001e27cb:
MOV RAX,qword ptr [RBP + -0x48]
AND RAX,0xfff
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x1000
SUB RCX,qword ptr [RBP + -0x30]
ADD RCX,0x1000
CMP RAX,RCX
JC 0x001e28fa
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x48]
JA 0x001e282e
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2afd
LAB_001e282e:
MOV RAX,0xfffff000
AND RAX,qword ptr [RBP + -0x20]
SUB RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
LEA RDI,[0x2541a5]
MOV ESI,0x2ab
CALL 0x001e2c40
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x001e28bf
CMP qword ptr [RBP + -0x58],-0x1
JNZ 0x001e288d
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x64],EAX
JMP 0x001e2898
LAB_001e288d:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x64],EAX
LAB_001e2898:
MOV ECX,dword ptr [RBP + -0x64]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2afd
LAB_001e28bf:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x30],0x0
LAB_001e28fa:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf0]
SUB RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xb0],0x4
JZ 0x001e293f
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,qword ptr [RBP + -0x48]
CMP RAX,RCX
JBE 0x001e293f
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
LAB_001e293f:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x001e2999
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001e2969
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2afd
LAB_001e2969:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0x0
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001e298c
JMP 0x001e2980
LAB_001e2980:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001e2afd
LAB_001e298c:
MOV qword ptr [RBP + -0x28],0x0
JMP 0x001e2aa5
LAB_001e2999:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0xd8],0x0
JZ 0x001e29e1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x60],RAX
LAB_001e29b6:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x001e29df
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001e29b6
LAB_001e29df:
JMP 0x001e29e1
LAB_001e29e1:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
MOV R8,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
LEA RDI,[0x2541a5]
MOV ESI,0x2eb
CALL 0x001e2c40
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,qword ptr [RBP + -0x20]
JC 0x001e2a24
CMP qword ptr [RBP + -0x28],-0x1
JNZ 0x001e2aa3
LAB_001e2a24:
CMP qword ptr [RBP + -0x28],-0x1
JZ 0x001e2a40
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0012a090
LAB_001e2a40:
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
CMP qword ptr [RBP + -0x28],-0x1
JNZ 0x001e2a5c
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x68],EAX
JMP 0x001e2a67
LAB_001e2a5c:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x68],EAX
LAB_001e2a67:
MOV ECX,dword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2afd
LAB_001e2aa3:
JMP 0x001e2aa5
LAB_001e2aa5:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
ADD RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001e2af4
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a090
LAB_001e2af4:
JMP 0x001e2af6
LAB_001e2af6:
MOV dword ptr [RBP + -0x4],0x0
LAB_001e2afd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int4 _my_b_cache_read(ulong *param_1,void *param_2,ulong param_3)
{
long lVar1;
int local_70;
int4 local_6c;
ulong *local_68;
ulong *local_58;
ulong local_50;
ulong local_48;
ulong local_38;
ulong local_30;
ulong local_28;
void *local_20;
local_30 = 0;
local_50 = *param_1 + (param_1[3] - param_1[4]);
if ((int)param_1[0x1c] != 0) {
lVar1 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x273,
*(int4 *)((long)param_1 + 0xd4),local_50,0,0);
if (lVar1 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 1;
}
*(int4 *)(param_1 + 0x1c) = 0;
if (param_1[0x1b] != 0) {
for (local_58 = (ulong *)param_1[0x1b]; local_58 != param_1;
local_58 = (ulong *)local_58[0x1b]) {
*(int4 *)(local_58 + 0x1c) = 1;
}
}
}
local_38 = local_50 & 0xfff;
local_28 = param_3;
local_20 = param_2;
if (0x2000 - local_38 <= param_3) {
if (param_1[1] <= local_50) {
*(int4 *)((long)param_1 + 0xe4) = 0;
*(int4 *)(param_1 + 0x1c) = 1;
return 1;
}
local_30 = (param_3 & 0xfffff000) - local_38;
lVar1 = inline_mysql_file_read
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2ab,
*(int4 *)((long)param_1 + 0xd4),param_2,local_30,param_1[0x1f]);
if (lVar1 != local_30) {
if (lVar1 == -1) {
local_6c = 0xffffffff;
}
else {
local_6c = (int4)lVar1;
}
*(int4 *)((long)param_1 + 0xe4) = local_6c;
*(int4 *)(param_1 + 0x1c) = 1;
return 1;
}
local_28 = param_3 - local_30;
local_20 = (void *)(local_30 + (long)param_2);
local_50 = local_30 + local_50;
local_38 = 0;
}
local_48 = param_1[0x1e] - local_38;
if (((int)param_1[0x16] != 4) && (param_1[1] - local_50 < local_48)) {
local_48 = param_1[1] - local_50;
}
local_70 = (int)local_30;
if (local_48 == 0) {
if (local_28 != 0) {
*(int *)((long)param_1 + 0xe4) = local_70;
return 1;
}
*(int4 *)((long)param_1 + 0xe4) = 0;
if (local_30 == 0) {
return 0;
}
local_30 = 0;
}
else {
if (param_1[0x1b] != 0) {
for (local_68 = (ulong *)param_1[0x1b]; local_68 != param_1;
local_68 = (ulong *)local_68[0x1b]) {
*(int4 *)(local_68 + 0x1c) = 1;
}
}
local_30 = inline_mysql_file_read
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2eb,
*(int4 *)((long)param_1 + 0xd4),param_1[4],local_48,param_1[0x1f]);
if ((local_30 < local_28) || (local_30 == 0xffffffffffffffff)) {
if (local_30 != 0xffffffffffffffff) {
memcpy(local_20,(void *)param_1[4],local_30);
}
*param_1 = local_50;
if (local_30 == 0xffffffffffffffff) {
local_70 = -1;
}
else {
local_70 = (int)local_30 + local_70;
}
*(int *)((long)param_1 + 0xe4) = local_70;
param_1[3] = param_1[4];
param_1[2] = param_1[4];
*(int4 *)(param_1 + 0x1c) = 1;
return 1;
}
}
param_1[2] = param_1[4] + local_28;
param_1[3] = param_1[4] + local_30;
*param_1 = local_50;
if (local_28 != 0) {
memcpy(local_20,(void *)param_1[4],local_28);
}
return 0;
}
|
|
472 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | monkey531[P]llama/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const char * value_hint_2,
const std::string & help,
void (*handler)(common_params & params, const std::string &, const std::string &)
) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {} | O2 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14(%rsp), %rsi
andl $0x0, (%rsi)
pushq $0x1
popq %rdx
leaq 0x7(%rsp), %rcx
leaq 0x6(%rsp), %r8
callq 0x400b8
leaq 0x38(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
leaq 0x60(%rbx), %rbp
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x5(%rsp), %rcx
movq %rbp, %rdi
callq 0x400fe
movq %r13, 0x78(%rbx)
movq %r12, 0x80(%rbx)
andq $0x0, 0x88(%rbx)
leaq 0x90(%rbx), %rdi
movq %r15, %rsi
callq 0x24e40
movb $0x0, 0xb0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0xc8(%rbx)
andq $0x0, 0xd0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbp, %rdi
callq 0x4043a
jmp 0x3d35b
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x40182
movq %rbx, %rdi
callq 0x40182
movq %r14, %rdi
callq 0x25250
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_SD_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], r9
mov r15, r8
mov r12, rcx
mov r13, rdx
mov r14, rsi
mov rbx, rdi
lea rsi, [rsp+48h+var_34]
and dword ptr [rsi], 0
push 1
pop rdx
lea rcx, [rsp+48h+var_41]
lea r8, [rsp+48h+var_42]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
and qword ptr [rbx+40h], 0
mov [rbx+48h], rax
mov [rbx+50h], rax
and qword ptr [rbx+58h], 0
lea rbp, [rbx+60h]
mov rsi, [r14]
mov rdx, [r14+8]
lea rcx, [rsp+48h+var_43]
mov rdi, rbp
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r13
mov [rbx+80h], r12
and qword ptr [rbx+88h], 0
lea rdi, [rbx+90h]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov byte ptr [rbx+0B0h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+0B8h], xmm0
mov rax, [rsp+48h+var_40]
mov [rbx+0C8h], rax
and qword ptr [rbx+0D0h], 0
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, rbp
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
jmp short loc_3D35B
mov r14, rax
loc_3D35B:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, long long a6)
{
long long result; // rax
char v10; // [rsp+5h] [rbp-43h] BYREF
char v11; // [rsp+6h] [rbp-42h] BYREF
char v12; // [rsp+7h] [rbp-41h] BYREF
long long v13; // [rsp+8h] [rbp-40h]
_DWORD v14[13]; // [rsp+14h] [rbp-34h] BYREF
v13 = a6;
v14[0] = 0;
std::set<llama_example>::set(a1, v14, 1LL, &v12, &v11);
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v10);
*(_QWORD *)(a1 + 120) = a3;
*(_QWORD *)(a1 + 128) = a4;
*(_QWORD *)(a1 + 136) = 0LL;
std::string::basic_string(a1 + 144, a5);
*(_BYTE *)(a1 + 176) = 0;
*(_OWORD *)(a1 + 184) = 0LL;
result = v13;
*(_QWORD *)(a1 + 200) = v13;
*(_QWORD *)(a1 + 208) = 0LL;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],R9
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x14]
AND dword ptr [RSI],0x0
PUSH 0x1
POP RDX
LEA RCX,[RSP + 0x7]
LEA R8,[RSP + 0x6]
CALL 0x001400b8
LEA RAX,[RBX + 0x38]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
AND qword ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
AND qword ptr [RBX + 0x58],0x0
LEA RBP,[RBX + 0x60]
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_0013d2e8:
LEA RCX,[RSP + 0x5]
MOV RDI,RBP
CALL 0x001400fe
MOV qword ptr [RBX + 0x78],R13
MOV qword ptr [RBX + 0x80],R12
AND qword ptr [RBX + 0x88],0x0
LEA RDI,[RBX + 0x90]
LAB_0013d30f:
MOV RSI,R15
CALL 0x00124e40
LAB_0013d317:
MOV byte ptr [RBX + 0xb0],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xb8],XMM0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0xc8],RAX
AND qword ptr [RBX + 0xd0],0x0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&,
std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,char *param_3,string *param_4,
_func_void_common_params_ptr_string_ptr_string_ptr *param_5)
{
int1 local_43;
int1 local_42;
int1 local_41;
_func_void_common_params_ptr_string_ptr_string_ptr *local_40;
int4 local_34;
local_34 = 0;
local_40 = param_5;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&local_34,1,&local_41,&local_42);
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 0013d2e8 to 0013d2f4 has its CatchHandler @ 0013d358 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&local_43);
*(char **)(this + 0x78) = param_2;
*(char **)(this + 0x80) = param_3;
*(int8 *)(this + 0x88) = 0;
/* try { // try from 0013d30f to 0013d316 has its CatchHandler @ 0013d34b */
std::__cxx11::string::string((string *)(this + 0x90),param_4);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(_func_void_common_params_ptr_string_ptr_string_ptr **)(this + 200) = local_40;
*(int8 *)(this + 0xd0) = 0;
return;
}
|
|
473 | Catch::Totals::operator-(Catch::Totals const&) const | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | Totals Totals::operator - ( Totals const& other ) const {
Totals diff;
diff.assertions = assertions - other.assertions;
diff.testCases = testCases - other.testCases;
return diff;
} | O3 | cpp | Catch::Totals::operator-(Catch::Totals const&) const:
movq %rdi, %rax
movdqu (%rsi), %xmm0
movdqu (%rdx), %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, (%rdi)
movdqu 0x10(%rsi), %xmm0
movdqu 0x10(%rdx), %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x10(%rdi)
movdqu 0x20(%rsi), %xmm0
movdqu 0x20(%rdx), %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x20(%rdi)
movdqu 0x30(%rsi), %xmm0
movdqu 0x30(%rdx), %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x30(%rdi)
retq
nop
| _ZNK5Catch6TotalsmiERKS0_:
mov rax, rdi
movdqu xmm0, xmmword ptr [rsi]
movdqu xmm1, xmmword ptr [rdx]
psubq xmm0, xmm1
movdqu xmmword ptr [rdi], xmm0
movdqu xmm0, xmmword ptr [rsi+10h]
movdqu xmm1, xmmword ptr [rdx+10h]
psubq xmm0, xmm1
movdqu xmmword ptr [rdi+10h], xmm0
movdqu xmm0, xmmword ptr [rsi+20h]
movdqu xmm1, xmmword ptr [rdx+20h]
psubq xmm0, xmm1
movdqu xmmword ptr [rdi+20h], xmm0
movdqu xmm0, xmmword ptr [rsi+30h]
movdqu xmm1, xmmword ptr [rdx+30h]
psubq xmm0, xmm1
movdqu xmmword ptr [rdi+30h], xmm0
retn
| __m128i * Catch::Totals::operator-(__m128i *a1, const __m128i *a2, const __m128i *a3)
{
__m128i *result; // rax
result = a1;
*a1 = _mm_sub_epi64(_mm_loadu_si128(a2), _mm_loadu_si128(a3));
a1[1] = _mm_sub_epi64(_mm_loadu_si128(a2 + 1), _mm_loadu_si128(a3 + 1));
a1[2] = _mm_sub_epi64(_mm_loadu_si128(a2 + 2), _mm_loadu_si128(a3 + 2));
a1[3] = _mm_sub_epi64(_mm_loadu_si128(a2 + 3), _mm_loadu_si128(a3 + 3));
return result;
}
| operator-:
MOV RAX,RDI
MOVDQU XMM0,xmmword ptr [RSI]
MOVDQU XMM1,xmmword ptr [RDX]
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [RDI],XMM0
MOVDQU XMM0,xmmword ptr [RSI + 0x10]
MOVDQU XMM1,xmmword ptr [RDX + 0x10]
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [RDI + 0x10],XMM0
MOVDQU XMM0,xmmword ptr [RSI + 0x20]
MOVDQU XMM1,xmmword ptr [RDX + 0x20]
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [RDI + 0x20],XMM0
MOVDQU XMM0,xmmword ptr [RSI + 0x30]
MOVDQU XMM1,xmmword ptr [RDX + 0x30]
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [RDI + 0x30],XMM0
RET
|
/* Catch::Totals::TEMPNAMEPLACEHOLDERVALUE(Catch::Totals const&) const */
Totals * __thiscall Catch::Totals::operator-(Totals *this,Totals *param_1)
{
long lVar1;
long lVar2;
long *in_RDX;
lVar1 = *(long *)(param_1 + 8);
lVar2 = in_RDX[1];
*(long *)this = *(long *)param_1 - *in_RDX;
*(long *)(this + 8) = lVar1 - lVar2;
lVar1 = *(long *)(param_1 + 0x18);
lVar2 = in_RDX[3];
*(long *)(this + 0x10) = *(long *)(param_1 + 0x10) - in_RDX[2];
*(long *)(this + 0x18) = lVar1 - lVar2;
lVar1 = *(long *)(param_1 + 0x28);
lVar2 = in_RDX[5];
*(long *)(this + 0x20) = *(long *)(param_1 + 0x20) - in_RDX[4];
*(long *)(this + 0x28) = lVar1 - lVar2;
lVar1 = *(long *)(param_1 + 0x38);
lVar2 = in_RDX[7];
*(long *)(this + 0x30) = *(long *)(param_1 + 0x30) - in_RDX[6];
*(long *)(this + 0x38) = lVar1 - lVar2;
return this;
}
|
|
474 | ggml_compute_forward_add1 | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_add1(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
const struct ggml_tensor * src1 = dst->src[1];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_add1_f32(params, dst);
} break;
case GGML_TYPE_F16:
{
if (src1->type == GGML_TYPE_F16) {
ggml_compute_forward_add1_f16_f16(params, dst);
}
else if (src1->type == GGML_TYPE_F32) {
ggml_compute_forward_add1_f16_f32(params, dst);
}
else {
GGML_ABORT("fatal error");
}
} break;
case GGML_TYPE_BF16:
{
if (src1->type == GGML_TYPE_BF16) {
ggml_compute_forward_add1_bf16_bf16(params, dst);
}
else if (src1->type == GGML_TYPE_F32) {
ggml_compute_forward_add1_bf16_f32(params, dst);
}
else {
GGML_ABORT("fatal error");
}
} break;
case GGML_TYPE_Q4_0:
case GGML_TYPE_Q4_1:
case GGML_TYPE_Q5_0:
case GGML_TYPE_Q5_1:
case GGML_TYPE_Q8_0:
case GGML_TYPE_Q8_1:
case GGML_TYPE_Q2_K:
case GGML_TYPE_Q3_K:
case GGML_TYPE_Q4_K:
case GGML_TYPE_Q5_K:
case GGML_TYPE_Q6_K:
case GGML_TYPE_TQ1_0:
case GGML_TYPE_TQ2_0:
case GGML_TYPE_IQ2_XXS:
case GGML_TYPE_IQ2_XS:
case GGML_TYPE_IQ3_XXS:
case GGML_TYPE_IQ1_S:
case GGML_TYPE_IQ1_M:
case GGML_TYPE_IQ4_NL:
case GGML_TYPE_IQ4_XS:
case GGML_TYPE_IQ3_S:
case GGML_TYPE_IQ2_S:
{
ggml_compute_forward_add1_q_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | c | ggml_compute_forward_add1:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x28(%rbp)
subq $0x23, %rax
ja 0x14303
movq -0x28(%rbp), %rax
leaq 0x5f727(%rip), %rcx # 0x73964
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x21800
jmp 0x1431d
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x14270
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x21b80
jmp 0x142a4
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x14288
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x22020
jmp 0x142a2
leaq 0x5f8d3(%rip), %rdi # 0x73b62
movl $0x12ca, %esi # imm = 0x12CA
leaq 0x5fb22(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
jmp 0x142a4
jmp 0x1431d
movq -0x20(%rbp), %rax
cmpl $0x1e, (%rax)
jne 0x142be
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x224c0
jmp 0x142f2
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x142d6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x22950
jmp 0x142f0
leaq 0x5f885(%rip), %rdi # 0x73b62
movl $0x12d6, %esi # imm = 0x12D6
leaq 0x5fad4(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
jmp 0x142f2
jmp 0x1431d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x22de0
jmp 0x1431d
leaq 0x5f858(%rip), %rdi # 0x73b62
movl $0x12f4, %esi # imm = 0x12F4
leaq 0x5faa7(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_compute_forward_add1:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax+0A0h]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_28], rax
sub rax, 23h; switch 36 cases
ja def_14244; jumptable 0000000000014244 default case, cases 4,5,15,24-28,31-33
mov rax, [rbp+var_28]
lea rcx, jpt_14244
movsxd rax, ds:(jpt_14244 - 73964h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_14246:
mov rdi, [rbp+var_8]; jumptable 0000000000014244 case 0
mov rsi, [rbp+var_10]
call ggml_compute_forward_add1_f32
jmp loc_1431D
loc_14258:
mov rax, [rbp+var_20]; jumptable 0000000000014244 case 1
cmp dword ptr [rax], 1
jnz short loc_14270
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_add1_f16_f16
jmp short loc_142A4
loc_14270:
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
jnz short loc_14288
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_add1_f16_f32
jmp short loc_142A2
loc_14288:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 12CAh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_142A2:
jmp short $+2
loc_142A4:
jmp short loc_1431D
loc_142A6:
mov rax, [rbp+var_20]; jumptable 0000000000014244 case 30
cmp dword ptr [rax], 1Eh
jnz short loc_142BE
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_add1_bf16_bf16
jmp short loc_142F2
loc_142BE:
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
jnz short loc_142D6
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_add1_bf16_f32
jmp short loc_142F0
loc_142D6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 12D6h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_142F0:
jmp short $+2
loc_142F2:
jmp short loc_1431D
loc_142F4:
mov rdi, [rbp+var_8]; jumptable 0000000000014244 cases 2,3,6-14,16-23,29,34,35
mov rsi, [rbp+var_10]
call ggml_compute_forward_add1_q_f32
jmp short loc_1431D
def_14244:
lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000014244 default case, cases 4,5,15,24-28,31-33
mov esi, 12F4h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_1431D:
add rsp, 30h
pop rbp
retn
| double ggml_compute_forward_add1(long long a1, long long a2)
{
double result; // xmm0_8
_DWORD *v3; // [rsp+10h] [rbp-20h]
v3 = *(_DWORD **)(a2 + 160);
switch ( **(_DWORD **)(a2 + 152) )
{
case 0:
ggml_compute_forward_add1_f32(a1, a2);
break;
case 1:
if ( *v3 == 1 )
{
ggml_compute_forward_add1_f16_f16(a1, a2);
}
else if ( *v3 )
{
result = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4810LL,
"fatal error");
}
else
{
ggml_compute_forward_add1_f16_f32(a1, a2);
}
break;
case 2:
case 3:
case 6:
case 7:
case 8:
case 9:
case 0xA:
case 0xB:
case 0xC:
case 0xD:
case 0xE:
case 0x10:
case 0x11:
case 0x12:
case 0x13:
case 0x14:
case 0x15:
case 0x16:
case 0x17:
case 0x1D:
case 0x22:
case 0x23:
ggml_compute_forward_add1_q_f32(a1, a2);
break;
case 0x1E:
if ( *v3 == 30 )
{
ggml_compute_forward_add1_bf16_bf16(a1, a2);
}
else if ( *v3 )
{
result = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4822LL,
"fatal error");
}
else
{
ggml_compute_forward_add1_bf16_f32(a1, a2);
}
break;
default:
result = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4852LL,
"fatal error");
break;
}
return result;
}
| ggml_compute_forward_add1:
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]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
SUB RAX,0x23
JA 0x00114303
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x173964]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00121800
JMP 0x0011431d
caseD_1:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x1
JNZ 0x00114270
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00121b80
JMP 0x001142a4
LAB_00114270:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
JNZ 0x00114288
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00122020
JMP 0x001142a2
LAB_00114288:
LEA RDI,[0x173b62]
MOV ESI,0x12ca
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_001142a2:
JMP 0x001142a4
LAB_001142a4:
JMP 0x0011431d
caseD_1e:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x1e
JNZ 0x001142be
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001224c0
JMP 0x001142f2
LAB_001142be:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
JNZ 0x001142d6
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00122950
JMP 0x001142f0
LAB_001142d6:
LEA RDI,[0x173b62]
MOV ESI,0x12d6
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_001142f0:
JMP 0x001142f2
LAB_001142f2:
JMP 0x0011431d
caseD_2:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00122de0
JMP 0x0011431d
caseD_4:
LEA RDI,[0x173b62]
MOV ESI,0x12f4
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_0011431d:
ADD RSP,0x30
POP RBP
RET
|
void ggml_compute_forward_add1(int8 param_1,long param_2)
{
int *piVar1;
piVar1 = *(int **)(param_2 + 0xa0);
switch(**(int4 **)(param_2 + 0x98)) {
case 0:
ggml_compute_forward_add1_f32(param_1,param_2);
break;
case 1:
if (*piVar1 == 1) {
ggml_compute_forward_add1_f16_f16(param_1,param_2);
}
else if (*piVar1 == 0) {
ggml_compute_forward_add1_f16_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x12ca,"fatal error");
}
break;
case 2:
case 3:
case 6:
case 7:
case 8:
case 9:
case 10:
case 0xb:
case 0xc:
case 0xd:
case 0xe:
case 0x10:
case 0x11:
case 0x12:
case 0x13:
case 0x14:
case 0x15:
case 0x16:
case 0x17:
case 0x1d:
case 0x22:
case 0x23:
ggml_compute_forward_add1_q_f32(param_1,param_2);
break;
default:
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x12f4,"fatal error");
break;
case 0x1e:
if (*piVar1 == 0x1e) {
ggml_compute_forward_add1_bf16_bf16(param_1,param_2);
}
else if (*piVar1 == 0) {
ggml_compute_forward_add1_bf16_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x12d6,"fatal error");
}
}
return;
}
|
|
475 | nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*) | ng-log[P]ng-log/src/symbolize.cc | static ATTRIBUTE_NOINLINE bool GetSectionHeaderByType(const int fd,
ElfW(Half) sh_num,
const size_t sh_offset,
ElfW(Word) type,
ElfW(Shdr) * out) {
// Read at most 16 section headers at a time to save read calls.
ElfW(Shdr) buf[16];
for (size_t i = 0; i < sh_num;) {
const size_t num_bytes_left = (sh_num - i) * sizeof(buf[0]);
const size_t num_bytes_to_read =
(sizeof(buf) > num_bytes_left) ? num_bytes_left : sizeof(buf);
const ssize_t len = ReadFromOffset(fd, buf, num_bytes_to_read,
sh_offset + i * sizeof(buf[0]));
if (len == -1) {
return false;
}
NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0);
const size_t num_headers_in_buf = static_cast<size_t>(len) / sizeof(buf[0]);
NGLOG_SAFE_ASSERT(num_headers_in_buf <= sizeof(buf) / sizeof(buf[0]));
for (size_t j = 0; j < num_headers_in_buf; ++j) {
if (buf[j].sh_type == type) {
*out = buf[j];
return true;
}
}
i += num_headers_in_buf;
}
return false;
} | O0 | cpp | nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*):
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp # imm = 0x470
movw %si, %ax
movl %edi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x438(%rbp)
movq -0x438(%rbp), %rax
movzwl -0xa(%rbp), %ecx
cmpq %rcx, %rax
jae 0x4bfdd
movzwl -0xa(%rbp), %eax
subq -0x438(%rbp), %rax
shlq $0x6, %rax
movq %rax, -0x440(%rbp)
movl $0x400, %eax # imm = 0x400
cmpq -0x440(%rbp), %rax
jbe 0x4beb3
movq -0x440(%rbp), %rax
movq %rax, -0x468(%rbp)
jmp 0x4bec1
movl $0x400, %eax # imm = 0x400
movq %rax, -0x468(%rbp)
jmp 0x4bec1
movq -0x468(%rbp), %rax
movq %rax, -0x448(%rbp)
movl -0x8(%rbp), %edi
leaq -0x430(%rbp), %rsi
movq -0x448(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x438(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rcx
callq 0x4a940
movq %rax, -0x450(%rbp)
cmpq $-0x1, -0x450(%rbp)
jne 0x4bf11
movb $0x0, -0x1(%rbp)
jmp 0x4bfe1
movq -0x450(%rbp), %rax
andq $0x3f, %rax
cmpq $0x0, %rax
jne 0x4bf24
jmp 0x4bf29
callq 0x93b0
movq -0x450(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x458(%rbp)
cmpq $0x10, -0x458(%rbp)
ja 0x4bf47
jmp 0x4bf4c
callq 0x93b0
movq $0x0, -0x460(%rbp)
movq -0x460(%rbp), %rax
cmpq -0x458(%rbp), %rax
jae 0x4bfc3
movq -0x460(%rbp), %rcx
leaq -0x430(%rbp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x4bfad
movq -0x460(%rbp), %rax
leaq -0x430(%rbp), %rsi
shlq $0x6, %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdi
movl $0x40, %edx
callq 0x95b0
movb $0x1, -0x1(%rbp)
jmp 0x4bfe1
jmp 0x4bfaf
movq -0x460(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x460(%rbp)
jmp 0x4bf57
movq -0x458(%rbp), %rax
addq -0x438(%rbp), %rax
movq %rax, -0x438(%rbp)
jmp 0x4be6b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x470, %rsp # imm = 0x470
popq %rbp
retq
nop
| _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr:
push rbp
mov rbp, rsp
sub rsp, 470h
mov ax, si
mov dword ptr [rbp+var_8], edi
mov [rbp+var_A], ax
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_438], 0
loc_4BE6B:
mov rax, [rbp+var_438]
movzx ecx, [rbp+var_A]
cmp rax, rcx
jnb loc_4BFDD
movzx eax, [rbp+var_A]
sub rax, [rbp+var_438]
shl rax, 6
mov [rbp+var_440], rax
mov eax, 400h
cmp rax, [rbp+var_440]
jbe short loc_4BEB3
mov rax, [rbp+var_440]
mov [rbp+var_468], rax
jmp short loc_4BEC1
loc_4BEB3:
mov eax, 400h
mov [rbp+var_468], rax
jmp short $+2
loc_4BEC1:
mov rax, [rbp+var_468]
mov [rbp+var_448], rax
mov edi, dword ptr [rbp+var_8]; this
lea rsi, [rbp+var_430]; int
mov rdx, [rbp+var_448]; void *
mov rcx, [rbp+var_18]
mov rax, [rbp+var_438]
shl rax, 6
add rcx, rax; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
mov [rbp+var_450], rax
cmp [rbp+var_450], 0FFFFFFFFFFFFFFFFh
jnz short loc_4BF11
mov byte ptr [rbp+var_8+7], 0
jmp loc_4BFE1
loc_4BF11:
mov rax, [rbp+var_450]
and rax, 3Fh
cmp rax, 0
jnz short loc_4BF24
jmp short loc_4BF29
loc_4BF24:
call _abort
loc_4BF29:
mov rax, [rbp+var_450]
shr rax, 6
mov [rbp+var_458], rax
cmp [rbp+var_458], 10h
ja short loc_4BF47
jmp short loc_4BF4C
loc_4BF47:
call _abort
loc_4BF4C:
mov [rbp+var_460], 0
loc_4BF57:
mov rax, [rbp+var_460]
cmp rax, [rbp+var_458]
jnb short loc_4BFC3
mov rcx, [rbp+var_460]
lea rax, [rbp+var_430]
shl rcx, 6
add rax, rcx
mov eax, [rax+4]
cmp eax, [rbp+var_1C]
jnz short loc_4BFAD
mov rax, [rbp+var_460]
lea rsi, [rbp+var_430]
shl rax, 6
add rsi, rax
mov rdi, [rbp+var_28]
mov edx, 40h ; '@'
call _memcpy
mov byte ptr [rbp+var_8+7], 1
jmp short loc_4BFE1
loc_4BFAD:
jmp short $+2
loc_4BFAF:
mov rax, [rbp+var_460]
add rax, 1
mov [rbp+var_460], rax
jmp short loc_4BF57
loc_4BFC3:
mov rax, [rbp+var_458]
add rax, [rbp+var_438]
mov [rbp+var_438], rax
jmp loc_4BE6B
loc_4BFDD:
mov byte ptr [rbp+var_8+7], 0
loc_4BFE1:
mov al, byte ptr [rbp+var_8+7]
and al, 1
add rsp, 470h
pop rbp
retn
| char nglog::tools::GetSectionHeaderByType(
unsigned int a1,
unsigned __int16 a2,
long long a3,
int a4,
long long a5)
{
long long v5; // rdi
char *v7; // [rsp+8h] [rbp-468h]
unsigned long long j; // [rsp+10h] [rbp-460h]
unsigned long long v9; // [rsp+18h] [rbp-458h]
unsigned long long v10; // [rsp+20h] [rbp-450h]
unsigned long long i; // [rsp+38h] [rbp-438h]
int v12[258]; // [rsp+40h] [rbp-430h] BYREF
long long v13; // [rsp+448h] [rbp-28h]
int v14; // [rsp+454h] [rbp-1Ch]
long long v15; // [rsp+458h] [rbp-18h]
unsigned __int16 v16; // [rsp+466h] [rbp-Ah]
unsigned int v17; // [rsp+468h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
for ( i = 0LL; i < v16; i += v9 )
{
if ( (v16 - i) << 6 >= 0x400 )
v7 = (_BYTE *)(&stru_3F0 + 16);
else
v7 = (char *)((v16 - i) << 6);
v5 = v17;
v10 = nglog::tools::ReadFromOffset((nglog::tools *)v17, (long long)v12, v7, (i << 6) + v15);
if ( v10 == -1LL )
return 0;
if ( (v10 & 0x3F) != 0 )
abort(v5, v12);
v9 = v10 >> 6;
if ( v10 >> 6 > 0x10 )
abort(v5, v12);
for ( j = 0LL; j < v9; ++j )
{
if ( v12[16 * j + 1] == v14 )
{
memcpy(v13, &v12[16 * j], 64LL);
return 1;
}
}
}
return 0;
}
| GetSectionHeaderByType:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x470
MOV AX,SI
MOV dword ptr [RBP + -0x8],EDI
MOV word ptr [RBP + -0xa],AX
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x438],0x0
LAB_0014be6b:
MOV RAX,qword ptr [RBP + -0x438]
MOVZX ECX,word ptr [RBP + -0xa]
CMP RAX,RCX
JNC 0x0014bfdd
MOVZX EAX,word ptr [RBP + -0xa]
SUB RAX,qword ptr [RBP + -0x438]
SHL RAX,0x6
MOV qword ptr [RBP + -0x440],RAX
MOV EAX,0x400
CMP RAX,qword ptr [RBP + -0x440]
JBE 0x0014beb3
MOV RAX,qword ptr [RBP + -0x440]
MOV qword ptr [RBP + -0x468],RAX
JMP 0x0014bec1
LAB_0014beb3:
MOV EAX,0x400
MOV qword ptr [RBP + -0x468],RAX
JMP 0x0014bec1
LAB_0014bec1:
MOV RAX,qword ptr [RBP + -0x468]
MOV qword ptr [RBP + -0x448],RAX
MOV EDI,dword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x430]
MOV RDX,qword ptr [RBP + -0x448]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x438]
SHL RAX,0x6
ADD RCX,RAX
CALL 0x0014a940
MOV qword ptr [RBP + -0x450],RAX
CMP qword ptr [RBP + -0x450],-0x1
JNZ 0x0014bf11
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014bfe1
LAB_0014bf11:
MOV RAX,qword ptr [RBP + -0x450]
AND RAX,0x3f
CMP RAX,0x0
JNZ 0x0014bf24
JMP 0x0014bf29
LAB_0014bf24:
CALL 0x001093b0
LAB_0014bf29:
MOV RAX,qword ptr [RBP + -0x450]
SHR RAX,0x6
MOV qword ptr [RBP + -0x458],RAX
CMP qword ptr [RBP + -0x458],0x10
JA 0x0014bf47
JMP 0x0014bf4c
LAB_0014bf47:
CALL 0x001093b0
LAB_0014bf4c:
MOV qword ptr [RBP + -0x460],0x0
LAB_0014bf57:
MOV RAX,qword ptr [RBP + -0x460]
CMP RAX,qword ptr [RBP + -0x458]
JNC 0x0014bfc3
MOV RCX,qword ptr [RBP + -0x460]
LEA RAX,[RBP + -0x430]
SHL RCX,0x6
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RBP + -0x1c]
JNZ 0x0014bfad
MOV RAX,qword ptr [RBP + -0x460]
LEA RSI,[RBP + -0x430]
SHL RAX,0x6
ADD RSI,RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV EDX,0x40
CALL 0x001095b0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014bfe1
LAB_0014bfad:
JMP 0x0014bfaf
LAB_0014bfaf:
MOV RAX,qword ptr [RBP + -0x460]
ADD RAX,0x1
MOV qword ptr [RBP + -0x460],RAX
JMP 0x0014bf57
LAB_0014bfc3:
MOV RAX,qword ptr [RBP + -0x458]
ADD RAX,qword ptr [RBP + -0x438]
MOV qword ptr [RBP + -0x438],RAX
JMP 0x0014be6b
LAB_0014bfdd:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014bfe1:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x470
POP RBP
RET
|
/* nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int,
Elf64_Shdr*) */
int1
nglog::tools::GetSectionHeaderByType
(int param_1,ushort param_2,ulong param_3,uint param_4,Elf64_Shdr *param_5)
{
ulong uVar1;
ulong local_470;
ulong local_468;
ulong local_440;
int1 local_438 [4];
uint auStack_434 [257];
Elf64_Shdr *local_30;
uint local_24;
ulong local_20;
ushort local_12;
int local_10;
local_440 = 0;
local_30 = param_5;
local_24 = param_4;
local_20 = param_3;
local_12 = param_2;
local_10 = param_1;
while( true ) {
if (local_12 <= local_440) {
return 0;
}
local_470 = (local_12 - local_440) * 0x40;
if (0x3ff < local_470) {
local_470 = 0x400;
}
uVar1 = ReadFromOffset(local_10,local_438,local_470,local_20 + local_440 * 0x40);
if (uVar1 == 0xffffffffffffffff) {
return 0;
}
if ((uVar1 & 0x3f) != 0) {
/* WARNING: Subroutine does not return */
abort();
}
uVar1 = uVar1 >> 6;
if (0x10 < uVar1) break;
for (local_468 = 0; local_468 < uVar1; local_468 = local_468 + 1) {
if (auStack_434[local_468 * 0x10] == local_24) {
memcpy(local_30,local_438 + local_468 * 0x40,0x40);
return 1;
}
}
local_440 = uVar1 + local_440;
}
/* WARNING: Subroutine does not return */
abort();
}
|
|
476 | nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*) | ng-log[P]ng-log/src/symbolize.cc | static ATTRIBUTE_NOINLINE bool GetSectionHeaderByType(const int fd,
ElfW(Half) sh_num,
const size_t sh_offset,
ElfW(Word) type,
ElfW(Shdr) * out) {
// Read at most 16 section headers at a time to save read calls.
ElfW(Shdr) buf[16];
for (size_t i = 0; i < sh_num;) {
const size_t num_bytes_left = (sh_num - i) * sizeof(buf[0]);
const size_t num_bytes_to_read =
(sizeof(buf) > num_bytes_left) ? num_bytes_left : sizeof(buf);
const ssize_t len = ReadFromOffset(fd, buf, num_bytes_to_read,
sh_offset + i * sizeof(buf[0]));
if (len == -1) {
return false;
}
NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0);
const size_t num_headers_in_buf = static_cast<size_t>(len) / sizeof(buf[0]);
NGLOG_SAFE_ASSERT(num_headers_in_buf <= sizeof(buf) / sizeof(buf[0]));
for (size_t j = 0; j < num_headers_in_buf; ++j) {
if (buf[j].sh_type == type) {
*out = buf[j];
return true;
}
}
i += num_headers_in_buf;
}
return false;
} | O3 | cpp | nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %rdx, 0x8(%rsp)
testl %esi, %esi
je 0x2187e
movq %r8, %rbx
movl %ecx, %ebp
movl %edi, %r15d
movl %esi, %r13d
xorl %r12d, %r12d
movl $0x400, %ecx # imm = 0x400
leaq 0x10(%rsp), %rsi
movq %r13, %rdx
subq %r12, %rdx
shlq $0x6, %rdx
cmpq %rcx, %rdx
cmovaeq %rcx, %rdx
movq %r12, %rcx
shlq $0x6, %rcx
addq 0x8(%rsp), %rcx
movl %r15d, %edi
movq %rsi, %r14
callq 0x20e19
movq %rax, %rcx
cmpq $-0x1, %rax
sete %al
je 0x21894
testb $0x3f, %cl
jne 0x2189a
cmpq $0x43f, %rcx # imm = 0x43F
ja 0x2189a
movq %rcx, %rdx
shrq $0x6, %rdx
leaq 0x14(%rsp), %rsi
movq %rdx, %rdi
testq %rcx, %rcx
je 0x21845
cmpl %ebp, (%rsi)
je 0x21859
addq $0x40, %rsi
decq %rdi
jne 0x21838
addq %rdx, %r12
cmpq %r13, %r12
movl $0x400, %ecx # imm = 0x400
movq %r14, %rsi
jb 0x217e2
xorl %ecx, %ecx
jmp 0x21880
movups -0x4(%rsi), %xmm0
movups 0xc(%rsi), %xmm1
movups 0x1c(%rsi), %xmm2
movups 0x2c(%rsi), %xmm3
movups %xmm3, 0x30(%rbx)
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movb $0x1, %al
movb $0x1, %cl
jmp 0x21880
xorl %eax, %eax
andb %cl, %al
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
movb $0x1, %al
jmp 0x21880
callq 0x72c0
| _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 418h
mov [rsp+448h+var_440], rdx
test esi, esi
jz loc_2187E
mov rbx, r8
mov ebp, ecx
mov r15d, edi
mov r13d, esi
xor r12d, r12d
mov ecx, offset stru_400
lea rsi, [rsp+448h+var_438]; int
loc_217E2:
mov rdx, r13
sub rdx, r12
shl rdx, 6
cmp rdx, rcx
cmovnb rdx, rcx; void *
mov rcx, r12
shl rcx, 6
add rcx, [rsp+448h+var_440]; unsigned __int64
mov edi, r15d; this
mov r14, rsi
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
mov rcx, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
setz al
jz short loc_21894
test cl, 3Fh
jnz short loc_2189A
cmp rcx, 43Fh
ja short loc_2189A
mov rdx, rcx
shr rdx, 6
lea rsi, [rsp+448h+var_434]
mov rdi, rdx
test rcx, rcx
jz short loc_21845
loc_21838:
cmp [rsi], ebp
jz short loc_21859
add rsi, 40h ; '@'
dec rdi
jnz short loc_21838
loc_21845:
add r12, rdx
cmp r12, r13
mov ecx, 400h
mov rsi, r14
jb short loc_217E2
xor ecx, ecx
jmp short loc_21880
loc_21859:
movups xmm0, xmmword ptr [rsi-4]
movups xmm1, xmmword ptr [rsi+0Ch]
movups xmm2, xmmword ptr [rsi+1Ch]
movups xmm3, xmmword ptr [rsi+2Ch]
movups xmmword ptr [rbx+30h], xmm3
movups xmmword ptr [rbx+20h], xmm2
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
mov al, 1
mov cl, 1
jmp short loc_21880
loc_2187E:
xor eax, eax
loc_21880:
and al, cl
add rsp, 418h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_21894:
xor ecx, ecx
mov al, 1
jmp short loc_21880
loc_2189A:
call _abort
| char nglog::tools::GetSectionHeaderByType(
nglog::tools *this,
unsigned int a2,
long long a3,
int a4,
_OWORD *a5)
{
int v6; // ebp
unsigned int v7; // r15d
unsigned long long v8; // r13
unsigned long long v9; // r12
Elf64_Sym *v10; // rcx
int *v11; // rsi
char *v12; // rdx
int *v13; // r14
unsigned long long v14; // rcx
bool v15; // al
char *v16; // rsi
unsigned long long v17; // rdi
__int128 v18; // xmm0
__int128 v19; // xmm1
__int128 v20; // xmm2
int v23; // [rsp+10h] [rbp-438h] BYREF
char v24; // [rsp+14h] [rbp-434h] BYREF
if ( a2 )
{
v6 = a4;
v7 = (unsigned int)this;
v8 = a2;
v9 = 0LL;
v10 = &stru_400;
v11 = &v23;
while ( 1 )
{
v12 = (char *)((v8 - v9) << 6);
if ( v12 >= (char *)v10 )
v12 = (char *)v10;
v13 = v11;
v14 = nglog::tools::ReadFromOffset(v7, (long long)v11, v12, a3 + (v9 << 6));
v15 = v14 == -1LL;
if ( v14 == -1LL )
{
LOBYTE(a4) = 0;
v15 = 1;
return a4 & v15;
}
if ( (v14 & 0x3F) != 0 || v14 > 0x43F )
abort(v7);
v16 = &v24;
v17 = v14 >> 6;
if ( v14 )
break;
LABEL_11:
v9 += v14 >> 6;
v10 = &stru_400;
v11 = v13;
if ( v9 >= v8 )
{
LOBYTE(a4) = 0;
return a4 & v15;
}
}
while ( *(_DWORD *)v16 != v6 )
{
v16 += 64;
if ( !--v17 )
goto LABEL_11;
}
v18 = *(_OWORD *)(v16 - 4);
v19 = *(_OWORD *)(v16 + 12);
v20 = *(_OWORD *)(v16 + 28);
a5[3] = *(_OWORD *)(v16 + 44);
a5[2] = v20;
a5[1] = v19;
*a5 = v18;
v15 = 1;
LOBYTE(a4) = 1;
}
else
{
v15 = 0;
}
return a4 & v15;
}
| GetSectionHeaderByType:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV qword ptr [RSP + 0x8],RDX
TEST ESI,ESI
JZ 0x0012187e
MOV RBX,R8
MOV EBP,ECX
MOV R15D,EDI
MOV R13D,ESI
XOR R12D,R12D
MOV ECX,0x400
LEA RSI,[RSP + 0x10]
LAB_001217e2:
MOV RDX,R13
SUB RDX,R12
SHL RDX,0x6
CMP RDX,RCX
CMOVNC RDX,RCX
MOV RCX,R12
SHL RCX,0x6
ADD RCX,qword ptr [RSP + 0x8]
MOV EDI,R15D
MOV R14,RSI
CALL 0x00120e19
MOV RCX,RAX
CMP RAX,-0x1
SETZ AL
JZ 0x00121894
TEST CL,0x3f
JNZ 0x0012189a
CMP RCX,0x43f
JA 0x0012189a
MOV RDX,RCX
SHR RDX,0x6
LEA RSI,[RSP + 0x14]
MOV RDI,RDX
TEST RCX,RCX
JZ 0x00121845
LAB_00121838:
CMP dword ptr [RSI],EBP
JZ 0x00121859
ADD RSI,0x40
DEC RDI
JNZ 0x00121838
LAB_00121845:
ADD R12,RDX
CMP R12,R13
MOV ECX,0x400
MOV RSI,R14
JC 0x001217e2
XOR ECX,ECX
JMP 0x00121880
LAB_00121859:
MOVUPS XMM0,xmmword ptr [RSI + -0x4]
MOVUPS XMM1,xmmword ptr [RSI + 0xc]
MOVUPS XMM2,xmmword ptr [RSI + 0x1c]
MOVUPS XMM3,xmmword ptr [RSI + 0x2c]
MOVUPS xmmword ptr [RBX + 0x30],XMM3
MOVUPS xmmword ptr [RBX + 0x20],XMM2
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
MOV AL,0x1
MOV CL,0x1
JMP 0x00121880
LAB_0012187e:
XOR EAX,EAX
LAB_00121880:
AND AL,CL
ADD RSP,0x418
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00121894:
XOR ECX,ECX
MOV AL,0x1
JMP 0x00121880
LAB_0012189a:
CALL 0x001072c0
|
/* nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int,
Elf64_Shdr*) */
int8
nglog::tools::GetSectionHeaderByType
(int param_1,ushort param_2,ulong param_3,uint param_4,Elf64_Shdr *param_5)
{
qword qVar1;
qword qVar2;
qword qVar3;
qword qVar4;
qword qVar5;
ulong uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
int7 uVar11;
ulong uVar12;
int6 in_register_00000032;
uint *puVar13;
ulong uVar14;
ulong uVar15;
ulong uVar16;
bool bVar17;
int1 local_438 [4];
uint auStack_434 [257];
if ((int)CONCAT62(in_register_00000032,param_2) == 0) {
bVar17 = false;
uVar11 = 0;
}
else {
uVar16 = CONCAT62(in_register_00000032,param_2) & 0xffffffff;
uVar15 = 0;
do {
uVar12 = (uVar16 - uVar15) * 0x40;
if (0x3ff < uVar12) {
uVar12 = 0x400;
}
uVar12 = ReadFromOffset(param_1,local_438,uVar12,uVar15 * 0x40 + param_3);
bVar17 = uVar12 == 0xffffffffffffffff;
uVar11 = (int7)(uVar12 >> 8);
if (bVar17) {
param_4 = 0;
bVar17 = true;
goto LAB_00121880;
}
if (((uVar12 & 0x3f) != 0) || (0x43f < uVar12)) {
/* WARNING: Subroutine does not return */
abort();
}
puVar13 = auStack_434;
uVar14 = uVar12 >> 6;
uVar6 = uVar12;
while (uVar6 != 0) {
if (*puVar13 == param_4) {
uVar9 = puVar13[-1];
uVar10 = puVar13[0];
qVar1 = *(qword *)(puVar13 + 1);
qVar2 = *(qword *)(puVar13 + 3);
qVar3 = *(qword *)(puVar13 + 5);
qVar4 = *(qword *)(puVar13 + 7);
uVar7 = puVar13[9];
uVar8 = puVar13[10];
qVar5 = *(qword *)(puVar13 + 0xd);
param_5->sh_addralign = *(qword *)(puVar13 + 0xb);
param_5->sh_entsize = qVar5;
param_5->sh_size = qVar4;
param_5->sh_link = uVar7;
param_5->sh_info = uVar8;
param_5->sh_addr = qVar2;
param_5->sh_offset = qVar3;
param_5->sh_name = uVar9;
param_5->sh_type = uVar10;
param_5->sh_flags = qVar1;
bVar17 = true;
param_4 = 1;
goto LAB_00121880;
}
puVar13 = puVar13 + 0x10;
uVar14 = uVar14 - 1;
uVar6 = uVar14;
}
uVar15 = uVar15 + (uVar12 >> 6);
} while (uVar15 < uVar16);
param_4 = 0;
}
LAB_00121880:
return CONCAT71(uVar11,bVar17 & (byte)param_4);
}
|
|
477 | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string string_strip(const std::string & str) {
size_t start = 0;
size_t end = str.size();
while (start < end && std::isspace(str[start])) {
start++;
}
while (end > start && std::isspace(str[end - 1])) {
end--;
}
return str.substr(start, end - start);
} | O3 | cpp | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rbp
movq 0x8(%rsi), %r13
xorl %r15d, %r15d
testq %r13, %r13
je 0x95a33
movsbl (%rbp,%r15), %edi
callq 0x1d0d0
testl %eax, %eax
je 0x95a33
incq %r15
cmpq %r15, %r13
jne 0x95a19
movq %r13, %r15
cmpq %r13, %r15
movq %r13, %r12
cmovbq %r15, %r12
cmpq %r15, %r13
jbe 0x95a5a
movsbl -0x1(%rbp,%r13), %edi
decq %r13
callq 0x1d0d0
testl %eax, %eax
jne 0x95a3d
incq %r13
movq %r13, %r12
subq %r15, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1dcc0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rbp, [rsi]
mov r13, [rsi+8]
xor r15d, r15d
test r13, r13
jz short loc_95A33
loc_95A19:
movsx edi, byte ptr [rbp+r15+0]
call _isspace
test eax, eax
jz short loc_95A33
inc r15
cmp r13, r15
jnz short loc_95A19
mov r15, r13
loc_95A33:
cmp r15, r13
mov r12, r13
cmovb r12, r15
loc_95A3D:
cmp r13, r15
jbe short loc_95A5A
movsx edi, byte ptr [rbp+r13-1]
dec r13
call _isspace
test eax, eax
jnz short loc_95A3D
inc r13
mov r12, r13
loc_95A5A:
sub r12, r15
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_strip(long long a1, long long *a2)
{
long long v3; // rbp
unsigned long long v4; // r13
unsigned long long v5; // r15
unsigned long long v6; // r12
long long v7; // rdi
v3 = *a2;
v4 = a2[1];
v5 = 0LL;
if ( v4 )
{
while ( (unsigned int)isspace((unsigned int)*(char *)(v3 + v5)) )
{
if ( v4 == ++v5 )
{
v5 = v4;
break;
}
}
}
v6 = v4;
if ( v5 < v4 )
v6 = v5;
while ( v4 > v5 )
{
v7 = (unsigned int)*(char *)(v3 + v4-- - 1);
if ( !(unsigned int)isspace(v7) )
{
v6 = v4 + 1;
break;
}
}
std::string::substr(a1, a2, v5, v6 - v5);
return a1;
}
| string_strip:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RBP,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
XOR R15D,R15D
TEST R13,R13
JZ 0x00195a33
LAB_00195a19:
MOVSX EDI,byte ptr [RBP + R15*0x1]
CALL 0x0011d0d0
TEST EAX,EAX
JZ 0x00195a33
INC R15
CMP R13,R15
JNZ 0x00195a19
MOV R15,R13
LAB_00195a33:
CMP R15,R13
MOV R12,R13
CMOVC R12,R15
LAB_00195a3d:
CMP R13,R15
JBE 0x00195a5a
MOVSX EDI,byte ptr [RBP + R13*0x1 + -0x1]
DEC R13
CALL 0x0011d0d0
TEST EAX,EAX
JNZ 0x00195a3d
INC R13
MOV R12,R13
LAB_00195a5a:
SUB R12,R15
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x0011dcc0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_strip(std::__cxx11::string const&) */
string * string_strip(string *param_1)
{
char *pcVar1;
long lVar2;
int iVar3;
long *in_RSI;
ulong uVar4;
ulong uVar5;
ulong uVar6;
lVar2 = *in_RSI;
uVar4 = in_RSI[1];
uVar5 = 0;
uVar6 = uVar5;
if (uVar4 != 0) {
do {
iVar3 = isspace((int)*(char *)(lVar2 + uVar5));
uVar6 = uVar5;
if (iVar3 == 0) break;
uVar5 = uVar5 + 1;
uVar6 = uVar4;
} while (uVar4 != uVar5);
}
do {
if (uVar4 <= uVar6) break;
pcVar1 = (char *)(lVar2 + -1 + uVar4);
uVar4 = uVar4 - 1;
iVar3 = isspace((int)*pcVar1);
} while (iVar3 != 0);
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI);
return param_1;
}
|
|
478 | 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>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) | monkey531[P]llama/common/json.hpp | std::pair<iterator, bool> insert( const value_type& value )
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, value.first))
{
return {it, false};
}
}
Container::push_back(value);
return {--this->end(), true};
} | O1 | 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>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %r13
cmpq %r13, %rbx
sete %bpl
je 0xb9e17
movq (%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r15
movq 0x8(%rbx), %rdx
cmpq %r15, %rdx
jne 0xb9e02
testq %rdx, %rdx
je 0xb9e11
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x1b930
testl %eax, %eax
je 0xb9e11
addq $0x30, %rbx
cmpq %r13, %rbx
sete %bpl
jne 0xb9de5
jmp 0xb9e17
testb $0x1, %bpl
je 0xb9e3f
movq %r14, %rdi
movq (%rsp), %rsi
callq 0xb9e44
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
jmp 0xb9e2d
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rsi
mov r14, rdi
mov rbx, [rdi]
mov r13, [rdi+8]
cmp rbx, r13
setz bpl
jz short loc_B9E17
mov rax, [rsp+38h+var_38]
mov r12, [rax]
mov r15, [rax+8]
loc_B9DE5:
mov rdx, [rbx+8]
cmp rdx, r15
jnz short loc_B9E02
test rdx, rdx
jz short loc_B9E11
mov rdi, [rbx]
mov rsi, r12
call _bcmp
test eax, eax
jz short loc_B9E11
loc_B9E02:
add rbx, 30h ; '0'
cmp rbx, r13
setz bpl
jnz short loc_B9DE5
jmp short loc_B9E17
loc_B9E11:
test bpl, 1
jz short loc_B9E3F
loc_B9E17:
mov rdi, r14
mov rsi, [rsp+38h+var_38]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE9push_backERKSG_; 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>>>::push_back(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
loc_B9E2D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B9E3F:
xor edx, edx
jmp short loc_B9E2D
| 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>>>>::insert(
_QWORD *a1,
long long *a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // r13
bool v4; // bp
long long v5; // r12
long long v6; // r15
long long v7; // rdx
v2 = (_QWORD *)*a1;
v3 = (_QWORD *)a1[1];
v4 = *a1 == (_QWORD)v3;
if ( (_QWORD *)*a1 == v3 )
goto LABEL_9;
v5 = *a2;
v6 = a2[1];
while ( 1 )
{
v7 = v2[1];
if ( v7 == v6 && (!v7 || !(unsigned int)bcmp(*v2, v5)) )
break;
v2 += 6;
v4 = v2 == v3;
if ( v2 == v3 )
goto LABEL_9;
}
if ( v4 )
{
LABEL_9:
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>>>::push_back(
a1,
a2);
return a1[1] - 48LL;
}
return (long long)v2;
}
| insert:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
CMP RBX,R13
SETZ BPL
JZ 0x001b9e17
MOV RAX,qword ptr [RSP]
MOV R12,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_001b9de5:
MOV RDX,qword ptr [RBX + 0x8]
CMP RDX,R15
JNZ 0x001b9e02
TEST RDX,RDX
JZ 0x001b9e11
MOV RDI,qword ptr [RBX]
MOV RSI,R12
CALL 0x0011b930
TEST EAX,EAX
JZ 0x001b9e11
LAB_001b9e02:
ADD RBX,0x30
CMP RBX,R13
SETZ BPL
JNZ 0x001b9de5
JMP 0x001b9e17
LAB_001b9e11:
TEST BPL,0x1
JZ 0x001b9e3f
LAB_001b9e17:
MOV RDI,R14
MOV RSI,qword ptr [RSP]
CALL 0x001b9e44
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
LAB_001b9e2d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b9e3f:
XOR EDX,EDX
JMP 0x001b9e2d
|
/* 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> > > >::insert(std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > const&) */
int1 [16] __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>>>>
::insert(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_1)
{
int8 *puVar1;
void *__s2;
size_t sVar2;
size_t __n;
int iVar3;
int8 extraout_RDX;
int8 uVar4;
int8 *puVar5;
bool bVar6;
int1 auVar7 [16];
puVar5 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
bVar6 = puVar5 == puVar1;
if (!bVar6) {
__s2 = *(void **)param_1;
sVar2 = *(size_t *)(param_1 + 8);
do {
__n = puVar5[1];
if ((__n == sVar2) && ((__n == 0 || (iVar3 = bcmp((void *)*puVar5,__s2,__n), iVar3 == 0)))) {
if (!bVar6) {
uVar4 = 0;
goto LAB_001b9e2d;
}
break;
}
puVar5 = puVar5 + 6;
bVar6 = puVar5 == puVar1;
} while (!bVar6);
}
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>>>>
::push_back((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>>>>
*)this,param_1);
puVar5 = (int8 *)(*(long *)(this + 8) + -0x30);
uVar4 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_001b9e2d:
auVar7._8_8_ = uVar4;
auVar7._0_8_ = puVar5;
return auVar7;
}
|
|
479 | js_define_var | bluesky950520[P]quickjs/quickjs.c | static __exception int js_define_var(JSParseState *s, JSAtom name, int tok)
{
JSFunctionDef *fd = s->cur_func;
JSVarDefEnum var_def_type;
if (name == JS_ATOM_yield && fd->func_kind == JS_FUNC_GENERATOR) {
return js_parse_error(s, "yield is a reserved identifier");
}
if ((name == JS_ATOM_arguments || name == JS_ATOM_eval)
&& fd->is_strict_mode) {
return js_parse_error(s, "invalid variable name in strict mode");
}
if (tok == TOK_LET || tok == TOK_CONST) {
if (name == JS_ATOM_let)
return js_parse_error(s, "invalid lexical variable name 'let'");
// |undefined| is allowed as an identifier except at the global
// scope of a classic script; sloppy or strict doesn't matter
if (name == JS_ATOM_undefined
&& fd->scope_level == 1
&& fd->is_global_var
&& !fd->module) {
return js_parse_error(s, "'undefined' already declared");
}
}
switch(tok) {
case TOK_LET:
var_def_type = JS_VAR_DEF_LET;
break;
case TOK_CONST:
var_def_type = JS_VAR_DEF_CONST;
break;
case TOK_VAR:
var_def_type = JS_VAR_DEF_VAR;
break;
case TOK_CATCH:
var_def_type = JS_VAR_DEF_CATCH;
break;
default:
abort();
}
if (define_var(s, fd, name, var_def_type) < 0)
return -1;
return 0;
} | O1 | c | js_define_var:
pushq %rax
movl %esi, %eax
movq 0x90(%rdi), %rsi
cmpl $0x4e, %eax
je 0x65f9f
cmpl $0x3b, %eax
je 0x65f9f
cmpl $0x2d, %eax
jne 0x65fa9
cmpb $0x1, 0x84(%rsi)
jne 0x65f95
leaq 0x3b1d0(%rip), %rsi # 0xa1163
jmp 0x65fd6
cmpl $0x4e, %eax
je 0x65f9f
cmpl $0x3b, %eax
jne 0x65fa9
cmpw $0x0, 0x84(%rsi)
js 0x65fcf
cmpl $-0x38, %edx
jle 0x66002
cmpl $-0x2f, %edx
je 0x65fbc
cmpl $-0x37, %edx
jne 0x66043
cmpl $0x46, %eax
je 0x65fe4
cmpl $0x27, %eax
jne 0x65ffd
leaq 0x3b1da(%rip), %rsi # 0xa11a7
jmp 0x65fd6
leaq 0x3b1ac(%rip), %rsi # 0xa1182
xorl %eax, %eax
callq 0x2fce9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x66022
cmpl $0x1, 0xe8(%rsi)
jne 0x65ffd
cmpl $0x0, 0x40(%rsi)
je 0x65ffd
cmpq $0x0, 0x220(%rsi)
je 0x6603a
cmpl $-0x38, %edx
jg 0x66024
cmpl $-0x4f, %edx
je 0x66013
cmpl $-0x3d, %edx
jne 0x66043
movl $0x5, %ecx
jmp 0x66018
movl $0x6, %ecx
movl %eax, %edx
callq 0x62e66
sarl $0x1f, %eax
popq %rcx
retq
movl $0x1, %ecx
cmpl $-0x2f, %edx
je 0x66018
cmpl $-0x37, %edx
jne 0x66043
movl $0x2, %ecx
jmp 0x66018
leaq 0x3b18a(%rip), %rsi # 0xa11cb
jmp 0x65fd6
callq 0xe090
| js_define_var:
push rax
mov eax, esi
mov rsi, [rdi+90h]
cmp eax, 4Eh ; 'N'
jz short loc_65F9F
cmp eax, 3Bh ; ';'
jz short loc_65F9F
cmp eax, 2Dh ; '-'
jnz short loc_65FA9
cmp byte ptr [rsi+84h], 1
jnz short loc_65F95
lea rsi, aYieldIsAReserv; "yield is a reserved identifier"
jmp short loc_65FD6
loc_65F95:
cmp eax, 4Eh ; 'N'
jz short loc_65F9F
cmp eax, 3Bh ; ';'
jnz short loc_65FA9
loc_65F9F:
cmp word ptr [rsi+84h], 0
js short loc_65FCF
loc_65FA9:
cmp edx, 0FFFFFFC8h
jle short loc_66002
cmp edx, 0FFFFFFD1h
jz short loc_65FBC
cmp edx, 0FFFFFFC9h
jnz loc_66043
loc_65FBC:
cmp eax, 46h ; 'F'
jz short loc_65FE4
cmp eax, 27h ; '''
jnz short loc_65FFD
lea rsi, aInvalidLexical; "invalid lexical variable name 'let'"
jmp short loc_65FD6
loc_65FCF:
lea rsi, aInvalidVariabl; "invalid variable name in strict mode"
loc_65FD6:
xor eax, eax
call js_parse_error
mov eax, 0FFFFFFFFh
jmp short loc_66022
loc_65FE4:
cmp dword ptr [rsi+0E8h], 1
jnz short loc_65FFD
cmp dword ptr [rsi+40h], 0
jz short loc_65FFD
cmp qword ptr [rsi+220h], 0
jz short loc_6603A
loc_65FFD:
cmp edx, 0FFFFFFC8h
jg short loc_66024
loc_66002:
cmp edx, 0FFFFFFB1h
jz short loc_66013
cmp edx, 0FFFFFFC3h
jnz short loc_66043
mov ecx, 5
jmp short loc_66018
loc_66013:
mov ecx, 6
loc_66018:
mov edx, eax
call define_var
sar eax, 1Fh
loc_66022:
pop rcx
retn
loc_66024:
mov ecx, 1
cmp edx, 0FFFFFFD1h
jz short loc_66018
cmp edx, 0FFFFFFC9h
jnz short loc_66043
mov ecx, 2
jmp short loc_66018
loc_6603A:
lea rsi, aUndefinedAlrea; "'undefined' already declared"
jmp short loc_65FD6
loc_66043:
call _abort
| long long js_define_var(
long long *a1,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v16; // rsi
const char *v17; // rsi
int v19; // ecx
char v20; // [rsp-8h] [rbp-8h]
v20 = v14;
v16 = a1[18];
if ( a2 == 78 || a2 == 59 )
{
if ( *(__int16 *)(v16 + 132) < 0 )
{
v17 = "invalid variable name in strict mode";
goto LABEL_15;
}
}
else if ( a2 == 45 && *(_BYTE *)(v16 + 132) == 1 )
{
v17 = "yield is a reserved identifier";
LABEL_15:
js_parse_error(a1, (long long)v17, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20);
return 0xFFFFFFFFLL;
}
if ( (int)a3 <= -56 )
{
if ( (_DWORD)a3 == -79 )
{
v19 = 6;
return (unsigned int)((int)define_var(
a1,
v16,
a2,
v19,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) >> 31);
}
if ( (_DWORD)a3 == -61 )
{
v19 = 5;
return (unsigned int)((int)define_var(
a1,
v16,
a2,
v19,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) >> 31);
}
LABEL_28:
abort((const char *)a1, v16);
}
if ( (_DWORD)a3 != -47 && (_DWORD)a3 != -55 )
goto LABEL_28;
if ( a2 == 70 )
{
if ( *(_DWORD *)(v16 + 232) == 1 && *(_DWORD *)(v16 + 64) && !*(_QWORD *)(v16 + 544) )
{
v17 = "'undefined' already declared";
goto LABEL_15;
}
}
else if ( a2 == 39 )
{
v17 = "invalid lexical variable name 'let'";
goto LABEL_15;
}
v19 = 1;
if ( (_DWORD)a3 != -47 )
v19 = 2;
return (unsigned int)((int)define_var(
a1,
v16,
a2,
v19,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) >> 31);
}
| js_define_var:
PUSH RAX
MOV EAX,ESI
MOV RSI,qword ptr [RDI + 0x90]
CMP EAX,0x4e
JZ 0x00165f9f
CMP EAX,0x3b
JZ 0x00165f9f
CMP EAX,0x2d
JNZ 0x00165fa9
CMP byte ptr [RSI + 0x84],0x1
JNZ 0x00165f95
LEA RSI,[0x1a1163]
JMP 0x00165fd6
LAB_00165f95:
CMP EAX,0x4e
JZ 0x00165f9f
CMP EAX,0x3b
JNZ 0x00165fa9
LAB_00165f9f:
CMP word ptr [RSI + 0x84],0x0
JS 0x00165fcf
LAB_00165fa9:
CMP EDX,-0x38
JLE 0x00166002
CMP EDX,-0x2f
JZ 0x00165fbc
CMP EDX,-0x37
JNZ 0x00166043
LAB_00165fbc:
CMP EAX,0x46
JZ 0x00165fe4
CMP EAX,0x27
JNZ 0x00165ffd
LEA RSI,[0x1a11a7]
JMP 0x00165fd6
LAB_00165fcf:
LEA RSI,[0x1a1182]
LAB_00165fd6:
XOR EAX,EAX
CALL 0x0012fce9
MOV EAX,0xffffffff
JMP 0x00166022
LAB_00165fe4:
CMP dword ptr [RSI + 0xe8],0x1
JNZ 0x00165ffd
CMP dword ptr [RSI + 0x40],0x0
JZ 0x00165ffd
CMP qword ptr [RSI + 0x220],0x0
JZ 0x0016603a
LAB_00165ffd:
CMP EDX,-0x38
JG 0x00166024
LAB_00166002:
CMP EDX,-0x4f
JZ 0x00166013
CMP EDX,-0x3d
JNZ 0x00166043
MOV ECX,0x5
JMP 0x00166018
LAB_00166013:
MOV ECX,0x6
LAB_00166018:
MOV EDX,EAX
CALL 0x00162e66
SAR EAX,0x1f
LAB_00166022:
POP RCX
RET
LAB_00166024:
MOV ECX,0x1
CMP EDX,-0x2f
JZ 0x00166018
CMP EDX,-0x37
JNZ 0x00166043
MOV ECX,0x2
JMP 0x00166018
LAB_0016603a:
LEA RSI,[0x1a11cb]
JMP 0x00165fd6
LAB_00166043:
CALL 0x0010e090
|
int js_define_var(long param_1,int param_2,int param_3)
{
long lVar1;
int iVar2;
int8 uVar3;
char *pcVar4;
lVar1 = *(long *)(param_1 + 0x90);
if ((param_2 == 0x4e) || (param_2 == 0x3b)) {
if (*(short *)(lVar1 + 0x84) < 0) {
pcVar4 = "invalid variable name in strict mode";
goto LAB_00165fd6;
}
}
else if ((param_2 == 0x2d) && (*(char *)(lVar1 + 0x84) == '\x01')) {
pcVar4 = "yield is a reserved identifier";
goto LAB_00165fd6;
}
if (-0x38 < param_3) {
if ((param_3 != -0x2f) && (param_3 != -0x37)) goto LAB_00166043;
if (param_2 == 0x46) {
if (((*(int *)(lVar1 + 0xe8) == 1) && (*(int *)(lVar1 + 0x40) != 0)) &&
(*(long *)(lVar1 + 0x220) == 0)) {
pcVar4 = "\'int\' already declared";
goto LAB_00165fd6;
}
}
else if (param_2 == 0x27) {
pcVar4 = "invalid lexical variable name \'let\'";
LAB_00165fd6:
js_parse_error(param_1,pcVar4);
return -1;
}
if (-0x38 < param_3) {
uVar3 = 1;
if (param_3 != -0x2f) {
if (param_3 != -0x37) goto LAB_00166043;
uVar3 = 2;
}
goto LAB_00166018;
}
}
if (param_3 == -0x4f) {
uVar3 = 6;
}
else {
if (param_3 != -0x3d) {
LAB_00166043:
/* WARNING: Subroutine does not return */
abort();
}
uVar3 = 5;
}
LAB_00166018:
iVar2 = define_var(param_1,lVar1,param_2,uVar3);
return iVar2 >> 0x1f;
}
|
|
480 | llama_context::state_seq_save_file(int, char const*, int const*, unsigned long) | llama.cpp/src/llama-context.cpp | size_t llama_context::state_seq_save_file(llama_seq_id seq_id, const char * filepath, const llama_token * tokens, size_t n_token_count) {
llama_file file(filepath, "wb");
file.write_u32(LLAMA_STATE_SEQ_MAGIC);
file.write_u32(LLAMA_STATE_SEQ_VERSION);
// save the prompt
file.write_u32((uint32_t) n_token_count);
file.write_raw(tokens, sizeof(llama_token) * n_token_count);
// save the context state using stream saving
llama_io_write_file io(&file);
state_seq_write_data(io, seq_id);
const size_t res = file.tell();
GGML_ASSERT(res == sizeof(uint32_t) * 3 + sizeof(llama_token) * n_token_count + io.n_bytes());
return res;
} | O3 | cpp | llama_context::state_seq_save_file(int, char const*, int const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %r8, %rbx
movq %rcx, %r15
movl %esi, %ebp
movq %rdi, %r14
leaq 0xa222a(%rip), %rax # 0x1350e6
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x7d360
movq %r12, %rdi
movl $0x67677371, %esi # imm = 0x67677371
callq 0x76ba0
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
callq 0x76ba0
leaq 0x8(%rsp), %rdi
movl %ebx, %esi
callq 0x76ba0
shlq $0x2, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7c860
movq 0xf2b6b(%rip), %r15 # 0x185a80
addq $0x10, %r15
leaq 0x10(%rsp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movups %xmm0, 0x20(%rsi)
movq 0x220(%r14), %rdi
movl %ebp, %edx
callq 0x78b70
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
leaq 0x8(%rsp), %rdi
callq 0x768f0
movq %rax, %r14
movq 0x20(%rsp), %rax
addq %rbx, %rax
addq $0xc, %rax
cmpq %rax, %r14
jne 0x92f9d
movq %r15, 0x10(%rsp)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x92f83
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x789c0
leaq 0x8(%rsp), %rdi
callq 0x7a760
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa14ee(%rip), %rdi # 0x134492
leaq 0x9e096(%rip), %rdx # 0x131041
leaq 0xa224e(%rip), %rcx # 0x135200
movl $0x7db, %esi # imm = 0x7DB
xorl %eax, %eax
callq 0x7bca0
jmp 0x92fc0
movq %rax, %rbx
movq %r15, 0x10(%rsp)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x92fe4
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x789c0
jmp 0x92fe4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7a760
movq %rbx, %rdi
callq 0x7c350
| _ZN13llama_context19state_seq_save_fileEiPKcPKim:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, r8
mov r15, rcx
mov ebp, esi
mov r14, rdi
lea rax, aWb; "wb"
lea r12, [rsp+68h+var_60]
mov rdi, r12; this
mov rsi, rdx; char *
mov rdx, rax; char *
call __ZN10llama_fileC2EPKcS1_; llama_file::llama_file(char const*,char const*)
mov rdi, r12; this
mov esi, 67677371h; unsigned int
call __ZNK10llama_file9write_u32Ej; llama_file::write_u32(uint)
lea rdi, [rsp+68h+var_60]; this
mov esi, 2; unsigned int
call __ZNK10llama_file9write_u32Ej; llama_file::write_u32(uint)
lea rdi, [rsp+68h+var_60]; this
mov esi, ebx; unsigned int
call __ZNK10llama_file9write_u32Ej; llama_file::write_u32(uint)
shl rbx, 2
lea r12, [rsp+68h+var_60]
mov rdi, r12; this
mov rsi, r15; void *
mov rdx, rbx; unsigned __int64
call __ZNK10llama_file9write_rawEPKvm; llama_file::write_raw(void const*,ulong)
mov r15, cs:_ZTV19llama_io_write_file_ptr
add r15, 10h
lea rsi, [rsp+68h+var_58]; llama_io_write_i *
mov [rsi], r15
mov [rsi+8], r12
xorps xmm0, xmm0
movups xmmword ptr [rsi+10h], xmm0
movups xmmword ptr [rsi+20h], xmm0
mov rdi, [r14+220h]; this
mov edx, ebp; int
call __ZNK22llama_kv_cache_unified11state_writeER16llama_io_write_ii; llama_kv_cache_unified::state_write(llama_io_write_i &,int)
lea rdi, [rsp+68h+var_58]
mov rax, [rdi]
call qword ptr [rax+20h]
lea rdi, [rsp+68h+var_60]; this
call __ZNK10llama_file4tellEv; llama_file::tell(void)
mov r14, rax
mov rax, [rsp+68h+var_48]
add rax, rbx
add rax, 0Ch
cmp r14, rax
jnz short loc_92F9D
mov [rsp+68h+var_58], r15
mov rdi, [rsp+68h+var_40]; void *
test rdi, rdi
jz short loc_92F83
mov rsi, [rsp+68h+var_30]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92F83:
lea rdi, [rsp+68h+var_60]; this
call __ZN10llama_fileD2Ev; llama_file::~llama_file()
mov rax, r14
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_92F9D:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aResSizeofUint3; "res == sizeof(uint32_t) * 3 + sizeof(ll"...
mov esi, 7DBh
xor eax, eax
call _ggml_abort
jmp short $+2
loc_92FC0:
mov rbx, rax
mov [rsp+68h+var_58], r15
mov rdi, [rsp+68h+var_40]; void *
test rdi, rdi
jz short loc_92FE4
mov rsi, [rsp+68h+var_30]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_92FE4
mov rbx, rax
loc_92FE4:
lea rdi, [rsp+68h+var_60]; this
call __ZN10llama_fileD2Ev; llama_file::~llama_file()
mov rdi, rbx
call __Unwind_Resume
| long long llama_context::state_seq_save_file(
llama_kv_cache_unified **this,
int a2,
const char *a3,
const int *a4,
unsigned long long a5)
{
long long v7; // r14
long long v9; // rbx
_BYTE v10[8]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v11[2]; // [rsp+10h] [rbp-58h] BYREF
__int128 v12; // [rsp+20h] [rbp-48h]
__int128 v13; // [rsp+30h] [rbp-38h]
llama_file::llama_file((llama_file *)v10, a3, "wb");
llama_file::write_u32((llama_file *)v10, 0x67677371u);
llama_file::write_u32((llama_file *)v10, 2u);
llama_file::write_u32((llama_file *)v10, a5);
a5 *= 4LL;
llama_file::write_raw((llama_file *)v10, a4, a5);
v11[0] = &`vtable for'llama_io_write_file + 2;
v11[1] = v10;
v12 = 0LL;
v13 = 0LL;
llama_kv_cache_unified::state_write(this[68], (llama_io_write_i *)v11, a2);
(*(void (**)(void))(v11[0] + 32LL))();
v7 = llama_file::tell((llama_file *)v10);
if ( v7 != a5 + (_QWORD)v12 + 12 )
{
v9 = ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/src/llama-context.cpp",
2011LL,
"GGML_ASSERT(%s) failed",
"res == sizeof(uint32_t) * 3 + sizeof(llama_token) * n_token_count + io.n_bytes()");
v11[0] = &`vtable for'llama_io_write_file + 2;
if ( *((_QWORD *)&v12 + 1) )
operator delete(*((void **)&v12 + 1), *((_QWORD *)&v13 + 1) - *((_QWORD *)&v12 + 1));
llama_file::~llama_file((llama_file *)v10);
_Unwind_Resume(v9);
}
v11[0] = &`vtable for'llama_io_write_file + 2;
if ( *((_QWORD *)&v12 + 1) )
operator delete(*((void **)&v12 + 1), *((_QWORD *)&v13 + 1) - *((_QWORD *)&v12 + 1));
llama_file::~llama_file((llama_file *)v10);
return v7;
}
| state_seq_save_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,R8
MOV R15,RCX
MOV EBP,ESI
MOV R14,RDI
LEA RAX,[0x2350e6]
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,RDX
MOV RDX,RAX
CALL 0x0017d360
LAB_00192ecf:
MOV RDI,R12
MOV ESI,0x67677371
CALL 0x00176ba0
LEA RDI,[RSP + 0x8]
MOV ESI,0x2
CALL 0x00176ba0
LEA RDI,[RSP + 0x8]
MOV ESI,EBX
CALL 0x00176ba0
SHL RBX,0x2
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL 0x0017c860
MOV R15,qword ptr [0x00285a80]
ADD R15,0x10
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],R15
MOV qword ptr [RSI + 0x8],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x10],XMM0
MOVUPS xmmword ptr [RSI + 0x20],XMM0
MOV RDI,qword ptr [R14 + 0x220]
LAB_00192f37:
MOV EDX,EBP
CALL 0x00178b70
LEA RDI,[RSP + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
LAB_00192f49:
LEA RDI,[RSP + 0x8]
CALL 0x001768f0
MOV R14,RAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,RBX
ADD RAX,0xc
CMP R14,RAX
JNZ 0x00192f9d
MOV qword ptr [RSP + 0x10],R15
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00192f83
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,RDI
CALL 0x001789c0
LAB_00192f83:
LEA RDI,[RSP + 0x8]
CALL 0x0017a760
MOV RAX,R14
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00192f9d:
LEA RDI,[0x234492]
LEA RDX,[0x231041]
LEA RCX,[0x235200]
MOV ESI,0x7db
XOR EAX,EAX
CALL 0x0017bca0
|
/* llama_context::state_seq_save_file(int, char const*, int const*, unsigned long) */
long __thiscall
llama_context::state_seq_save_file
(llama_context *this,int param_1,char *param_2,int *param_3,ulong param_4)
{
long lVar1;
int *puVar2;
llama_file local_60 [8];
int *local_58;
llama_file *local_50;
long local_48;
void *pvStack_40;
int8 local_38;
long lStack_30;
llama_file::llama_file(local_60,param_2,"wb");
/* try { // try from 00192ecf to 00192f0d has its CatchHandler @ 00192fe1 */
llama_file::write_u32(local_60,0x67677371);
llama_file::write_u32(local_60,2);
llama_file::write_u32(local_60,(uint)param_4);
llama_file::write_raw(local_60,param_3,param_4 * 4);
puVar2 = PTR_vtable_00285a80 + 0x10;
local_48 = 0;
pvStack_40 = (void *)0x0;
local_38 = 0;
lStack_30 = 0;
local_58 = puVar2;
local_50 = local_60;
/* try { // try from 00192f37 to 00192f48 has its CatchHandler @ 00192fc0 */
llama_kv_cache_unified::state_write
(*(llama_kv_cache_unified **)(this + 0x220),(llama_io_write_i *)&local_58,param_1);
(**(code **)(local_58 + 0x20))();
/* try { // try from 00192f49 to 00192fbd has its CatchHandler @ 00192fbe */
lVar1 = llama_file::tell(local_60);
if (lVar1 == local_48 + param_4 * 4 + 0xc) {
local_58 = puVar2;
if (pvStack_40 != (void *)0x0) {
operator_delete(pvStack_40,lStack_30 - (long)pvStack_40);
}
llama_file::~llama_file(local_60);
return lVar1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/src/llama-context.cpp",0x7db,
"GGML_ASSERT(%s) failed",
"res == sizeof(uint32_t) * 3 + sizeof(llama_token) * n_token_count + io.n_bytes()");
}
|
|
481 | sp_head::add_instr_jump_forward_with_backpatch(THD*, sp_pcontext*, sp_label*) | eloqsql/sql/sp_head.cc | bool sp_head::add_instr_jump_forward_with_backpatch(THD *thd,
sp_pcontext *spcont,
sp_label *lab)
{
sp_instr_jump *i= new (thd->mem_root) sp_instr_jump(instructions(), spcont);
if (i == NULL || add_instr(i))
return true;
push_backpatch(thd, i, lab);
return false;
} | O0 | cpp | sp_head::add_instr_jump_forward_with_backpatch(THD*, sp_pcontext*, sp_label*):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x60(%rbp)
movl $0x50, %edi
callq 0x886b10
movq %rax, %rcx
movq %rcx, -0x58(%rbp)
movb $0x0, -0x31(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x50(%rbp)
je 0x9087eb
movq -0x68(%rbp), %rdi
movb $0x1, -0x31(%rbp)
callq 0x90f5b0
movl %eax, -0x6c(%rbp)
jmp 0x9087cf
movl -0x6c(%rbp), %esi
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rdx
callq 0x90f670
jmp 0x9087e1
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x9087eb
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x90880c
movq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x906c40
cmpl $0x0, %eax
je 0x908835
movb $0x1, -0x1(%rbp)
jmp 0x90884e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x908826
jmp 0x908833
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x886b80
jmp 0x908859
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x9068a0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x775a20
nopw %cs:(%rax,%rax)
| _ZN7sp_head37add_instr_jump_forward_with_backpatchEP3THDP11sp_pcontextP8sp_label:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov rsi, [rax+28h]
mov [rbp+var_60], rsi
mov edi, 50h ; 'P'
call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_58], rcx
mov [rbp+var_31], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_50], rax
jz short loc_9087EB
mov rdi, [rbp+var_68]; this
mov [rbp+var_31], 1
call _ZN7sp_head12instructionsEv; sp_head::instructions(void)
mov [rbp+var_6C], eax
jmp short $+2
loc_9087CF:
mov esi, [rbp+var_6C]; unsigned int
mov rdi, [rbp+var_58]; this
mov rdx, [rbp+var_20]; sp_pcontext *
call _ZN13sp_instr_jumpC2EjP11sp_pcontext; sp_instr_jump::sp_instr_jump(uint,sp_pcontext *)
jmp short $+2
loc_9087E1:
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
jmp short $+2
loc_9087EB:
mov rax, [rbp+var_50]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_90880C
mov rdi, [rbp+var_68]; this
mov rsi, [rbp+var_30]; sp_instr *
call _ZN7sp_head9add_instrEP8sp_instr; sp_head::add_instr(sp_instr *)
cmp eax, 0
jz short loc_908835
loc_90880C:
mov [rbp+var_1], 1
jmp short loc_90884E
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
test [rbp+var_31], 1
jnz short loc_908826
jmp short loc_908833
loc_908826:
mov rsi, [rbp+var_60]
mov rdi, [rbp+var_58]
call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *)
loc_908833:
jmp short loc_908859
loc_908835:
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_28]
call _ZN7sp_head14push_backpatchEP3THDP8sp_instrP8sp_label; sp_head::push_backpatch(THD *,sp_instr *,sp_label *)
mov [rbp+var_1], 0
loc_90884E:
mov al, [rbp+var_1]
and al, 1
add rsp, 70h
pop rbp
retn
loc_908859:
mov rdi, [rbp+var_40]
call __Unwind_Resume
| char sp_head::add_instr_jump_forward_with_backpatch(sp_head *a1, long long a2, sp_pcontext *a3, long long a4)
{
unsigned int v5; // [rsp+4h] [rbp-6Ch]
sp_instr_jump *v6; // [rsp+18h] [rbp-58h]
sp_instr *v7; // [rsp+20h] [rbp-50h]
v6 = (sp_instr_jump *)Sql_alloc::operator new(80LL, *(_QWORD *)(a2 + 40));
v7 = 0LL;
if ( v6 )
{
v5 = sp_head::instructions(a1);
sp_instr_jump::sp_instr_jump(v6, v5, a3);
v7 = v6;
}
if ( !v7 || (unsigned int)sp_head::add_instr(a1, v7) )
return 1;
sp_head::push_backpatch((long long)a1, a2, (long long)v7, a4);
return 0;
}
| _Rb_tree_iterator:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
/* std::_Rb_tree_iterator<unsigned int>::_Rb_tree_iterator(std::_Rb_tree_node_base*) */
void __thiscall
std::_Rb_tree_iterator<unsigned_int>::_Rb_tree_iterator
(_Rb_tree_iterator<unsigned_int> *this,_Rb_tree_node_base *param_1)
{
*(_Rb_tree_node_base **)this = param_1;
return;
}
|
|
482 | js_dataview_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_dataview_constructor(JSContext *ctx,
JSValue new_target,
int argc, JSValue *argv)
{
BOOL recompute_len = FALSE;
BOOL track_rab = FALSE;
JSArrayBuffer *abuf;
uint64_t offset;
uint32_t len;
JSValue buffer;
JSValue obj;
JSTypedArray *ta;
JSObject *p;
buffer = argv[0];
abuf = js_get_array_buffer(ctx, buffer);
if (!abuf)
return JS_EXCEPTION;
offset = 0;
if (argc > 1) {
if (JS_ToIndex(ctx, &offset, argv[1]))
return JS_EXCEPTION;
}
if (abuf->detached)
return JS_ThrowTypeErrorDetachedArrayBuffer(ctx);
if (offset > abuf->byte_length)
return JS_ThrowRangeError(ctx, "invalid byteOffset");
len = abuf->byte_length - offset;
if (argc > 2 && !JS_IsUndefined(argv[2])) {
uint64_t l;
if (JS_ToIndex(ctx, &l, argv[2]))
return JS_EXCEPTION;
if (l > len)
return JS_ThrowRangeError(ctx, "invalid byteLength");
len = l;
} else {
recompute_len = TRUE;
track_rab = array_buffer_is_resizable(abuf);
}
obj = js_create_from_ctor(ctx, new_target, JS_CLASS_DATAVIEW);
if (JS_IsException(obj))
return JS_EXCEPTION;
if (abuf->detached) {
/* could have been detached in js_create_from_ctor() */
JS_ThrowTypeErrorDetachedArrayBuffer(ctx);
goto fail;
}
// RAB could have been resized in js_create_from_ctor()
if (offset > abuf->byte_length) {
goto out_of_bound;
} else if (recompute_len) {
len = abuf->byte_length - offset;
} else if (offset + len > abuf->byte_length) {
out_of_bound:
JS_ThrowRangeError(ctx, "invalid byteOffset or byteLength");
goto fail;
}
ta = js_malloc(ctx, sizeof(*ta));
if (!ta) {
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
p = JS_VALUE_GET_OBJ(obj);
ta->obj = p;
ta->buffer = JS_VALUE_GET_OBJ(js_dup(buffer));
ta->offset = offset;
ta->length = len;
ta->track_rab = track_rab;
list_add_tail(&ta->link, &abuf->array_list);
p->u.typed_array = ta;
return obj;
} | O0 | c | js_dataview_constructor:
subq $0xd8, %rsp
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rdi, 0xb0(%rsp)
movl %ecx, 0xac(%rsp)
movq %r8, 0xa0(%rsp)
movl $0x0, 0x9c(%rsp)
movl $0x0, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x70(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0xb0(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x580b0
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x591f3
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x595db
movq $0x0, 0x88(%rsp)
cmpl $0x1, 0xac(%rsp)
jle 0x59251
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x88(%rsp), %rsi
callq 0x39140
cmpl $0x0, %eax
je 0x5924f
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x595db
jmp 0x59251
movq 0x90(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x59281
movq 0xb0(%rsp), %rdi
callq 0x58140
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x595db
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jbe 0x592c4
movq 0xb0(%rsp), %rdi
leaq 0xb8538(%rip), %rsi # 0x1117e0
movb $0x0, %al
callq 0x29670
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x595db
movq 0x90(%rsp), %rax
movslq (%rax), %rax
subq 0x88(%rsp), %rax
movl %eax, 0x84(%rsp)
cmpl $0x2, 0xac(%rsp)
jle 0x59397
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x28(%rax), %rsi
callq 0x2e260
cmpl $0x0, %eax
jne 0x59397
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0x28(%rax), %rcx
leaq 0x48(%rsp), %rsi
callq 0x39140
cmpl $0x0, %eax
je 0x5934d
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x595db
movq 0x48(%rsp), %rax
movl 0x84(%rsp), %ecx
cmpq %rcx, %rax
jbe 0x59389
movq 0xb0(%rsp), %rdi
leaq 0xb8486(%rip), %rsi # 0x1117f3
movb $0x0, %al
callq 0x29670
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x595db
movq 0x48(%rsp), %rax
movl %eax, 0x84(%rsp)
jmp 0x593b6
movl $0x1, 0x9c(%rsp)
movq 0x90(%rsp), %rdi
callq 0xda610
movl %eax, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movl $0x21, %ecx
callq 0x54e00
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x59426
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x595db
movq 0x90(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x59450
movq 0xb0(%rsp), %rdi
callq 0x58140
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
jmp 0x594fb
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jbe 0x5946a
jmp 0x594b4
cmpl $0x0, 0x9c(%rsp)
je 0x59490
movq 0x90(%rsp), %rax
movslq (%rax), %rax
subq 0x88(%rsp), %rax
movl %eax, 0x84(%rsp)
jmp 0x594d8
movq 0x88(%rsp), %rax
movl 0x84(%rsp), %ecx
addq %rcx, %rax
movq 0x90(%rsp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jbe 0x594d6
jmp 0x594b4
movq 0xb0(%rsp), %rdi
leaq 0xb8343(%rip), %rsi # 0x111806
movb $0x0, %al
callq 0x29670
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
jmp 0x594fb
jmp 0x594d8
jmp 0x594da
movq 0xb0(%rsp), %rdi
movl $0x30, %esi
callq 0x21cb0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x5952e
jmp 0x594fb
movq 0xb0(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x23c90
movl $0x0, 0xc8(%rsp)
movq $0x6, 0xd0(%rsp)
jmp 0x595db
movq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x216d0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x88(%rsp), %rax
movl %eax, %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x20(%rax)
movl 0x84(%rsp), %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x24(%rax)
movl 0x98(%rsp), %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0x58(%rsp), %rdi
movq 0x90(%rsp), %rsi
addq $0x18, %rsi
callq 0x23a50
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x60(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rdx
addq $0xd8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_dataview_constructor:
sub rsp, 0D8h
mov [rsp+0D8h+var_20], rsi
mov [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_28], rdi
mov [rsp+0D8h+var_2C], ecx
mov [rsp+0D8h+var_38], r8
mov [rsp+0D8h+var_3C], 0
mov [rsp+0D8h+var_40], 0
mov rax, [rsp+0D8h+var_38]
mov rcx, [rax]
mov [rsp+0D8h+var_68], rcx
mov rax, [rax+8]
mov [rsp+0D8h+var_60], rax
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_68]
mov rdx, [rsp+0D8h+var_60]
call js_get_array_buffer
mov [rsp+0D8h+var_48], rax
cmp [rsp+0D8h+var_48], 0
jnz short loc_591F3
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_595DB
loc_591F3:
mov [rsp+0D8h+var_50], 0
cmp [rsp+0D8h+var_2C], 1
jle short loc_59251
mov rdi, [rsp+0D8h+var_28]
mov rax, [rsp+0D8h+var_38]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+0D8h+var_50]
call JS_ToIndex
cmp eax, 0
jz short loc_5924F
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_595DB
loc_5924F:
jmp short $+2
loc_59251:
mov rax, [rsp+0D8h+var_48]
cmp byte ptr [rax+8], 0
jz short loc_59281
mov rdi, [rsp+0D8h+var_28]
call JS_ThrowTypeErrorDetachedArrayBuffer
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_595DB
loc_59281:
mov rax, [rsp+0D8h+var_50]
mov rcx, [rsp+0D8h+var_48]
movsxd rcx, dword ptr [rcx]
cmp rax, rcx
jbe short loc_592C4
mov rdi, [rsp+0D8h+var_28]
lea rsi, aInvalidByteoff; "invalid byteOffset"
mov al, 0
call JS_ThrowRangeError
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_595DB
loc_592C4:
mov rax, [rsp+0D8h+var_48]
movsxd rax, dword ptr [rax]
sub rax, [rsp+0D8h+var_50]
mov [rsp+0D8h+var_54], eax
cmp [rsp+0D8h+var_2C], 2
jle loc_59397
mov rax, [rsp+0D8h+var_38]
mov rdi, [rax+20h]
mov rsi, [rax+28h]
call JS_IsUndefined_0
cmp eax, 0
jnz loc_59397
mov rdi, [rsp+0D8h+var_28]
mov rax, [rsp+0D8h+var_38]
mov rdx, [rax+20h]
mov rcx, [rax+28h]
lea rsi, [rsp+0D8h+var_90]
call JS_ToIndex
cmp eax, 0
jz short loc_5934D
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_595DB
loc_5934D:
mov rax, [rsp+0D8h+var_90]
mov ecx, [rsp+0D8h+var_54]
cmp rax, rcx
jbe short loc_59389
mov rdi, [rsp+0D8h+var_28]
lea rsi, aInvalidBytelen; "invalid byteLength"
mov al, 0
call JS_ThrowRangeError
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_595DB
loc_59389:
mov rax, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_54], eax
jmp short loc_593B6
loc_59397:
mov [rsp+0D8h+var_3C], 1
mov rdi, [rsp+0D8h+var_48]
call array_buffer_is_resizable
mov [rsp+0D8h+var_40], eax
loc_593B6:
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_20]
mov rdx, [rsp+0D8h+var_18]
mov ecx, 21h ; '!'
call js_create_from_ctor
mov [rsp+0D8h+var_A0], rax
mov [rsp+0D8h+var_98], rdx
mov rax, [rsp+0D8h+var_A0]
mov [rsp+0D8h+var_78], rax
mov rax, [rsp+0D8h+var_98]
mov [rsp+0D8h+var_70], rax
mov rdi, [rsp+0D8h+var_78]
mov rsi, [rsp+0D8h+var_70]
call JS_IsException_1
cmp eax, 0
jz short loc_59426
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_595DB
loc_59426:
mov rax, [rsp+0D8h+var_48]
cmp byte ptr [rax+8], 0
jz short loc_59450
mov rdi, [rsp+0D8h+var_28]
call JS_ThrowTypeErrorDetachedArrayBuffer
mov [rsp+0D8h+var_B0], rax
mov [rsp+0D8h+var_A8], rdx
jmp loc_594FB
loc_59450:
mov rax, [rsp+0D8h+var_50]
mov rcx, [rsp+0D8h+var_48]
movsxd rcx, dword ptr [rcx]
cmp rax, rcx
jbe short loc_5946A
jmp short loc_594B4
loc_5946A:
cmp [rsp+0D8h+var_3C], 0
jz short loc_59490
mov rax, [rsp+0D8h+var_48]
movsxd rax, dword ptr [rax]
sub rax, [rsp+0D8h+var_50]
mov [rsp+0D8h+var_54], eax
jmp short loc_594D8
loc_59490:
mov rax, [rsp+0D8h+var_50]
mov ecx, [rsp+0D8h+var_54]
add rax, rcx
mov rcx, [rsp+0D8h+var_48]
movsxd rcx, dword ptr [rcx]
cmp rax, rcx
jbe short loc_594D6
jmp short $+2
loc_594B4:
mov rdi, [rsp+0D8h+var_28]
lea rsi, aInvalidByteoff_0; "invalid byteOffset or byteLength"
mov al, 0
call JS_ThrowRangeError
mov [rsp+0D8h+var_C0], rax
mov [rsp+0D8h+var_B8], rdx
jmp short loc_594FB
loc_594D6:
jmp short $+2
loc_594D8:
jmp short $+2
loc_594DA:
mov rdi, [rsp+0D8h+var_28]
mov esi, 30h ; '0'
call js_malloc
mov [rsp+0D8h+var_80], rax
cmp [rsp+0D8h+var_80], 0
jnz short loc_5952E
jmp short $+2
loc_594FB:
mov rdi, [rsp+0D8h+var_28]
mov rsi, [rsp+0D8h+var_78]
mov rdx, [rsp+0D8h+var_70]
call JS_FreeValue
mov dword ptr [rsp+0D8h+var_10], 0
mov [rsp+0D8h+var_8], 6
jmp loc_595DB
loc_5952E:
mov rax, [rsp+0D8h+var_78]
mov [rsp+0D8h+var_88], rax
mov rcx, [rsp+0D8h+var_88]
mov rax, [rsp+0D8h+var_80]
mov [rax+10h], rcx
mov rdi, [rsp+0D8h+var_68]
mov rsi, [rsp+0D8h+var_60]
call js_dup
mov [rsp+0D8h+var_D0], rax
mov [rsp+0D8h+var_C8], rdx
mov rcx, [rsp+0D8h+var_D0]
mov rax, [rsp+0D8h+var_80]
mov [rax+18h], rcx
mov rax, [rsp+0D8h+var_50]
mov ecx, eax
mov rax, [rsp+0D8h+var_80]
mov [rax+20h], ecx
mov ecx, [rsp+0D8h+var_54]
mov rax, [rsp+0D8h+var_80]
mov [rax+24h], ecx
mov ecx, [rsp+0D8h+var_40]
mov rax, [rsp+0D8h+var_80]
mov [rax+28h], ecx
mov rdi, [rsp+0D8h+var_80]
mov rsi, [rsp+0D8h+var_48]
add rsi, 18h
call list_add_tail_0
mov rcx, [rsp+0D8h+var_80]
mov rax, [rsp+0D8h+var_88]
mov [rax+30h], rcx
mov rax, [rsp+0D8h+var_78]
mov [rsp+0D8h+var_10], rax
mov rax, [rsp+0D8h+var_70]
mov [rsp+0D8h+var_8], rax
loc_595DB:
mov rax, [rsp+0D8h+var_10]
mov rdx, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
| long long js_dataview_constructor(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned long long *v13; // rsi
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
long long v20; // rdx
unsigned long long v21; // rcx
long long v22; // rdx
double v23; // xmm4_8
double v24; // xmm5_8
long long v25; // rdx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v30; // rdx
long long v31; // rdx
long long v32; // rsi
long long v33; // rdx
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
unsigned long long v39; // rcx
char v41; // [rsp+0h] [rbp-D8h]
_DWORD *v42; // [rsp+8h] [rbp-D0h]
unsigned long long v43; // [rsp+48h] [rbp-90h] BYREF
long long v44; // [rsp+50h] [rbp-88h]
long long v45; // [rsp+58h] [rbp-80h]
long long v46; // [rsp+60h] [rbp-78h]
long long v47; // [rsp+68h] [rbp-70h]
unsigned long long *v48; // [rsp+70h] [rbp-68h]
long long v49; // [rsp+78h] [rbp-60h]
unsigned int v50; // [rsp+84h] [rbp-54h]
unsigned long long v51; // [rsp+88h] [rbp-50h] BYREF
int *array_buffer; // [rsp+90h] [rbp-48h]
int is_resizable; // [rsp+98h] [rbp-40h]
int v54; // [rsp+9Ch] [rbp-3Ch]
long long v55; // [rsp+A0h] [rbp-38h]
int v56; // [rsp+ACh] [rbp-2Ch]
long long v57; // [rsp+B0h] [rbp-28h]
long long v58; // [rsp+B8h] [rbp-20h]
long long v59; // [rsp+C0h] [rbp-18h]
long long v60; // [rsp+C8h] [rbp-10h]
long long v61; // [rsp+D0h] [rbp-8h]
v58 = a2;
v59 = a3;
v57 = a1;
v56 = a4;
v55 = a5;
v54 = 0;
is_resizable = 0;
v48 = *(unsigned long long **)a5;
v49 = *(_QWORD *)(a5 + 8);
v13 = v48;
array_buffer = (int *)js_get_array_buffer(a1, (long long)v48, v49);
if ( array_buffer )
{
v51 = 0LL;
if ( v56 > 1 )
{
v13 = &v51;
if ( (unsigned int)JS_ToIndex(
v57,
&v51,
*(_DWORD **)(v55 + 16),
*(_QWORD *)(v55 + 24),
a6,
a7,
a8,
a9,
*(double *)v18.m128_u64,
*(double *)v19.m128_u64,
a12,
a13) )
{
LODWORD(v60) = 0;
v61 = 6LL;
return v60;
}
}
if ( *((_BYTE *)array_buffer + 8) )
{
v60 = JS_ThrowTypeErrorDetachedArrayBuffer(
v57,
a6,
a7,
a8,
a9,
v18,
v19,
a12,
a13,
(long long)v13,
v14,
v15,
v16,
v17);
v61 = v20;
return v60;
}
v21 = *array_buffer;
if ( v51 > v21 )
{
v60 = JS_ThrowRangeError(
v57,
(long long)"invalid byteOffset",
v14,
v21,
v16,
v17,
a6,
a7,
a8,
a9,
v18,
v19,
a12,
a13,
v41);
v61 = v22;
return v60;
}
v50 = *array_buffer - v51;
if ( v56 <= 2 || JS_IsUndefined_0(*(_QWORD *)(v55 + 32), *(_QWORD *)(v55 + 40)) )
{
v54 = 1;
is_resizable = array_buffer_is_resizable(array_buffer);
}
else
{
if ( (unsigned int)JS_ToIndex(
v57,
&v43,
*(_DWORD **)(v55 + 32),
*(_QWORD *)(v55 + 40),
a6,
a7,
a8,
a9,
v23,
v24,
a12,
a13) )
{
LODWORD(v60) = 0;
v61 = 6LL;
return v60;
}
if ( v43 > v50 )
{
v60 = JS_ThrowRangeError(
v57,
(long long)"invalid byteLength",
v25,
v50,
v26,
v27,
a6,
a7,
a8,
a9,
v28,
v29,
a12,
a13,
v41);
v61 = v30;
return v60;
}
v50 = v43;
}
v46 = js_create_from_ctor(v57, v58, v59, 33);
v47 = v31;
v32 = v31;
if ( JS_IsException_1(v46, v31) )
{
LODWORD(v60) = 0;
v61 = 6LL;
return v60;
}
if ( *((_BYTE *)array_buffer + 8) )
{
JS_ThrowTypeErrorDetachedArrayBuffer(v57, a6, a7, a8, a9, v37, v38, a12, a13, v32, v33, v34, v35, v36);
LABEL_28:
JS_FreeValue(v57, v46, v47);
LODWORD(v60) = 0;
v61 = 6LL;
return v60;
}
v39 = *array_buffer;
if ( v51 <= v39 )
{
if ( v54 )
{
v50 = *array_buffer - v51;
goto LABEL_27;
}
v39 = *array_buffer;
if ( v50 + v51 <= v39 )
{
LABEL_27:
v45 = js_malloc(v57, 48LL);
if ( v45 )
{
v44 = v46;
*(_QWORD *)(v45 + 16) = v46;
v42 = js_dup(v48, v49);
*(_QWORD *)(v45 + 24) = v42;
*(_DWORD *)(v45 + 32) = v51;
*(_DWORD *)(v45 + 36) = v50;
*(_DWORD *)(v45 + 40) = is_resizable;
list_add_tail_0(v45, (_QWORD *)array_buffer + 3);
*(_QWORD *)(v44 + 48) = v45;
v60 = v46;
v61 = v47;
return v60;
}
goto LABEL_28;
}
}
JS_ThrowRangeError(
v57,
(long long)"invalid byteOffset or byteLength",
v33,
v39,
v35,
v36,
a6,
a7,
a8,
a9,
v37,
v38,
a12,
a13,
v41);
goto LABEL_28;
}
LODWORD(v60) = 0;
v61 = 6LL;
return v60;
}
| js_dataview_constructor:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xb8],RSI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb0],RDI
MOV dword ptr [RSP + 0xac],ECX
MOV qword ptr [RSP + 0xa0],R8
MOV dword ptr [RSP + 0x9c],0x0
MOV dword ptr [RSP + 0x98],0x0
MOV RAX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x70],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x001580b0
MOV qword ptr [RSP + 0x90],RAX
CMP qword ptr [RSP + 0x90],0x0
JNZ 0x001591f3
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001595db
LAB_001591f3:
MOV qword ptr [RSP + 0x88],0x0
CMP dword ptr [RSP + 0xac],0x1
JLE 0x00159251
MOV RDI,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x88]
CALL 0x00139140
CMP EAX,0x0
JZ 0x0015924f
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001595db
LAB_0015924f:
JMP 0x00159251
LAB_00159251:
MOV RAX,qword ptr [RSP + 0x90]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x00159281
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x00158140
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x001595db
LAB_00159281:
MOV RAX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x90]
MOVSXD RCX,dword ptr [RCX]
CMP RAX,RCX
JBE 0x001592c4
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x2117e0]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x001595db
LAB_001592c4:
MOV RAX,qword ptr [RSP + 0x90]
MOVSXD RAX,dword ptr [RAX]
SUB RAX,qword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x84],EAX
CMP dword ptr [RSP + 0xac],0x2
JLE 0x00159397
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x20]
MOV RSI,qword ptr [RAX + 0x28]
CALL 0x0012e260
CMP EAX,0x0
JNZ 0x00159397
MOV RDI,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x28]
LEA RSI,[RSP + 0x48]
CALL 0x00139140
CMP EAX,0x0
JZ 0x0015934d
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001595db
LAB_0015934d:
MOV RAX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RSP + 0x84]
CMP RAX,RCX
JBE 0x00159389
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x2117f3]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x001595db
LAB_00159389:
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RSP + 0x84],EAX
JMP 0x001593b6
LAB_00159397:
MOV dword ptr [RSP + 0x9c],0x1
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x001da610
MOV dword ptr [RSP + 0x98],EAX
LAB_001593b6:
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
MOV ECX,0x21
CALL 0x00154e00
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00159426
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001595db
LAB_00159426:
MOV RAX,qword ptr [RSP + 0x90]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x00159450
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x00158140
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
JMP 0x001594fb
LAB_00159450:
MOV RAX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x90]
MOVSXD RCX,dword ptr [RCX]
CMP RAX,RCX
JBE 0x0015946a
JMP 0x001594b4
LAB_0015946a:
CMP dword ptr [RSP + 0x9c],0x0
JZ 0x00159490
MOV RAX,qword ptr [RSP + 0x90]
MOVSXD RAX,dword ptr [RAX]
SUB RAX,qword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x84],EAX
JMP 0x001594d8
LAB_00159490:
MOV RAX,qword ptr [RSP + 0x88]
MOV ECX,dword ptr [RSP + 0x84]
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x90]
MOVSXD RCX,dword ptr [RCX]
CMP RAX,RCX
JBE 0x001594d6
JMP 0x001594b4
LAB_001594b4:
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x211806]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
JMP 0x001594fb
LAB_001594d6:
JMP 0x001594d8
LAB_001594d8:
JMP 0x001594da
LAB_001594da:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x30
CALL 0x00121cb0
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x58],0x0
JNZ 0x0015952e
JMP 0x001594fb
LAB_001594fb:
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x00123c90
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x6
JMP 0x001595db
LAB_0015952e:
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x50],RAX
MOV RCX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x001216d0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x88]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x20],ECX
MOV ECX,dword ptr [RSP + 0x84]
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x24],ECX
MOV ECX,dword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x28],ECX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x90]
ADD RSI,0x18
CALL 0x00123a50
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xd0],RAX
LAB_001595db:
MOV RAX,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
int1 [16]
js_dataview_constructor
(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int iVar1;
int8 uVar2;
int1 auVar3 [16];
ulong local_90;
long local_88;
long local_80;
int1 local_78 [16];
int8 local_68;
int8 local_60;
uint local_54;
ulong local_50;
int *local_48;
int4 local_40;
int local_3c;
int8 *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_3c = 0;
local_40 = 0;
local_68 = *param_5;
local_60 = param_5[1];
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_48 = (int *)js_get_array_buffer(param_1,local_68,local_60);
if (local_48 == (int *)0x0) {
local_10 = 0;
local_8 = 6;
goto LAB_001595db;
}
local_50 = 0;
if ((1 < local_2c) && (iVar1 = JS_ToIndex(local_28,&local_50,local_38[2],local_38[3]), iVar1 != 0)
) {
local_10 = 0;
local_8 = 6;
goto LAB_001595db;
}
if ((char)local_48[2] != '\0') {
auVar3 = JS_ThrowTypeErrorDetachedArrayBuffer(local_28);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
goto LAB_001595db;
}
if ((ulong)(long)*local_48 < local_50) {
auVar3 = JS_ThrowRangeError(local_28,"invalid byteOffset");
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
goto LAB_001595db;
}
local_54 = *local_48 - (int)local_50;
if ((local_2c < 3) || (iVar1 = JS_IsUndefined(local_38[4],local_38[5]), iVar1 != 0)) {
local_3c = 1;
local_40 = array_buffer_is_resizable(local_48);
}
else {
iVar1 = JS_ToIndex(local_28,&local_90,local_38[4],local_38[5]);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001595db;
}
if (local_54 < local_90) {
auVar3 = JS_ThrowRangeError(local_28,"invalid byteLength");
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
goto LAB_001595db;
}
local_54 = (uint)local_90;
}
local_78 = js_create_from_ctor(local_28,local_20,local_18,0x21);
iVar1 = JS_IsException(local_78._0_8_,local_78._8_8_);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001595db;
}
if ((char)local_48[2] == '\0') {
if ((ulong)(long)*local_48 < local_50) {
LAB_001594b4:
JS_ThrowRangeError(local_28,"invalid byteOffset or byteLength");
}
else {
if (local_3c == 0) {
if ((ulong)(long)*local_48 < local_50 + local_54) goto LAB_001594b4;
}
else {
local_54 = *local_48 - (int)local_50;
}
local_80 = js_malloc(local_28,0x30);
if (local_80 != 0) {
local_88 = local_78._0_8_;
*(int8 *)(local_80 + 0x10) = local_78._0_8_;
uVar2 = js_dup(local_68,local_60);
*(int8 *)(local_80 + 0x18) = uVar2;
*(int *)(local_80 + 0x20) = (int)local_50;
*(uint *)(local_80 + 0x24) = local_54;
*(int4 *)(local_80 + 0x28) = local_40;
list_add_tail(local_80,local_48 + 6);
*(long *)(local_88 + 0x30) = local_80;
local_10 = local_78._0_4_;
uStack_c = local_78._4_4_;
local_8 = local_78._8_8_;
goto LAB_001595db;
}
local_80 = 0;
}
}
else {
JS_ThrowTypeErrorDetachedArrayBuffer(local_28);
}
JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_);
local_10 = 0;
local_8 = 6;
LAB_001595db:
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
|
|
483 | js_dataview_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_dataview_constructor(JSContext *ctx,
JSValue new_target,
int argc, JSValue *argv)
{
BOOL recompute_len = FALSE;
BOOL track_rab = FALSE;
JSArrayBuffer *abuf;
uint64_t offset;
uint32_t len;
JSValue buffer;
JSValue obj;
JSTypedArray *ta;
JSObject *p;
buffer = argv[0];
abuf = js_get_array_buffer(ctx, buffer);
if (!abuf)
return JS_EXCEPTION;
offset = 0;
if (argc > 1) {
if (JS_ToIndex(ctx, &offset, argv[1]))
return JS_EXCEPTION;
}
if (abuf->detached)
return JS_ThrowTypeErrorDetachedArrayBuffer(ctx);
if (offset > abuf->byte_length)
return JS_ThrowRangeError(ctx, "invalid byteOffset");
len = abuf->byte_length - offset;
if (argc > 2 && !JS_IsUndefined(argv[2])) {
uint64_t l;
if (JS_ToIndex(ctx, &l, argv[2]))
return JS_EXCEPTION;
if (l > len)
return JS_ThrowRangeError(ctx, "invalid byteLength");
len = l;
} else {
recompute_len = TRUE;
track_rab = array_buffer_is_resizable(abuf);
}
obj = js_create_from_ctor(ctx, new_target, JS_CLASS_DATAVIEW);
if (JS_IsException(obj))
return JS_EXCEPTION;
if (abuf->detached) {
/* could have been detached in js_create_from_ctor() */
JS_ThrowTypeErrorDetachedArrayBuffer(ctx);
goto fail;
}
// RAB could have been resized in js_create_from_ctor()
if (offset > abuf->byte_length) {
goto out_of_bound;
} else if (recompute_len) {
len = abuf->byte_length - offset;
} else if (offset + len > abuf->byte_length) {
out_of_bound:
JS_ThrowRangeError(ctx, "invalid byteOffset or byteLength");
goto fail;
}
ta = js_malloc(ctx, sizeof(*ta));
if (!ta) {
fail:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
p = JS_VALUE_GET_OBJ(obj);
ta->obj = p;
ta->buffer = JS_VALUE_GET_OBJ(js_dup(buffer));
ta->offset = offset;
ta->length = len;
ta->track_rab = track_rab;
list_add_tail(&ta->link, &abuf->array_list);
p->u.typed_array = ta;
return obj;
} | O1 | c | js_dataview_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbp
movl %ecx, %ebx
movq %rdx, 0x8(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdi, %r14
movq (%r8), %r12
movq 0x8(%r8), %r13
movq %r12, %rsi
movq %r13, %rdx
callq 0x38fcf
movl $0x6, %edx
testq %rax, %rax
je 0x399f8
movq %rax, %r15
movq $0x0, 0x28(%rsp)
cmpl $0x2, %ebx
jl 0x399ff
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x27a6f
movl $0x6, %edx
testl %eax, %eax
je 0x399ff
xorl %ebp, %ebp
jmp 0x39b4e
cmpb $0x0, 0x8(%r15)
je 0x39a1e
leaq 0x689ec(%rip), %rsi # 0xa23f9
xorl %ebp, %ebp
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x39b49
movq 0x28(%rsp), %rax
movslq (%r15), %rdx
cmpq %rdx, %rax
jbe 0x39a43
leaq 0x68d33(%rip), %rsi # 0xa2765
xorl %ebp, %ebp
movq %r14, %rdi
xorl %eax, %eax
callq 0x20add
jmp 0x39b49
subl %eax, %edx
cmpl $0x3, %ebx
movq %rax, 0x18(%rsp)
jl 0x39a58
movq 0x28(%rbp), %rcx
cmpl $0x3, %ecx
jne 0x39ab1
movq %rdx, (%rsp)
movl 0x4(%r15), %ebp
notl %ebp
shrl $0x1f, %ebp
xorl %ebx, %ebx
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl $0x21, %ecx
callq 0x36d56
movq %rax, 0x20(%rsp)
cmpl $0x6, %edx
je 0x39b47
movq %rax, 0x8(%rsp)
cmpb $0x0, 0x8(%r15)
je 0x39b03
movq %rdx, %rbx
leaq 0x68957(%rip), %rsi # 0xa23f9
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x39b36
movq %rdx, %rbx
movq 0x20(%rbp), %rdx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x27a6f
xorl %ebp, %ebp
testl %eax, %eax
jne 0x39aef
movq 0x10(%rsp), %rax
movq %rbx, %rcx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x39b60
leaq 0x68c93(%rip), %rsi # 0xa2778
movq %r14, %rdi
xorl %eax, %eax
callq 0x20add
xorl %ecx, %ecx
movq %rbx, %rax
movb $0x1, %bl
testb %cl, %cl
je 0x39b49
movq %rax, (%rsp)
jmp 0x39a67
movslq (%r15), %rax
movq 0x18(%rsp), %rsi
cmpq %rax, %rsi
ja 0x39b22
testb %bl, %bl
je 0x39b64
movl (%rsp), %ecx
movq %rsi, %rdi
addq %rcx, %rdi
cmpq %rax, %rdi
jbe 0x39b6a
movq %rdx, %rbx
leaq 0x68c5f(%rip), %rsi # 0xa278b
movq %r14, %rdi
xorl %eax, %eax
callq 0x20add
movq 0x18(%r14), %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x1d8c6
xorl %ebp, %ebp
movl $0x6, %edx
movq %rbp, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %cl
jmp 0x39af4
subl %esi, %eax
movq %rax, (%rsp)
movq %rdx, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0xede6
testq %rax, %rax
je 0x39b36
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %r12, 0x10(%rsp)
cmpl $-0x9, %r13d
jb 0x39b9a
movq 0x10(%rsp), %rdx
incl (%rdx)
movq %r12, 0x18(%rax)
movq 0x18(%rsp), %rdx
movl %edx, 0x20(%rax)
movq (%rsp), %rdx
movl %edx, 0x24(%rax)
movl %ebp, 0x28(%rax)
movq %r15, %rdx
addq $0x18, %rdx
movq 0x18(%r15), %rsi
movq %rax, 0x8(%rsi)
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
movq %rax, 0x18(%r15)
movq %rax, 0x30(%rcx)
movq 0x20(%rsp), %rbp
movq %rbx, %rdx
jmp 0x39b4e
| js_dataview_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbp, r8
mov ebx, ecx
mov [rsp+68h+var_60], rdx
mov [rsp+68h+var_38], rsi
mov r14, rdi
mov r12, [r8]
mov r13, [r8+8]
mov rsi, r12
mov rdx, r13
call js_get_array_buffer
mov edx, 6
test rax, rax
jz short loc_399F8
mov r15, rax
mov [rsp+68h+var_40], 0
cmp ebx, 2
jl short loc_399FF
mov rdx, [rbp+10h]
mov rcx, [rbp+18h]
lea rsi, [rsp+68h+var_40]
mov rdi, r14
call JS_ToIndex
mov edx, 6
test eax, eax
jz short loc_399FF
loc_399F8:
xor ebp, ebp
jmp loc_39B4E
loc_399FF:
cmp byte ptr [r15+8], 0
jz short loc_39A1E
lea rsi, aArraybufferIsD; "ArrayBuffer is detached"
xor ebp, ebp
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp loc_39B49
loc_39A1E:
mov rax, [rsp+68h+var_40]
movsxd rdx, dword ptr [r15]
cmp rax, rdx
jbe short loc_39A43
lea rsi, aInvalidByteoff; "invalid byteOffset"
xor ebp, ebp
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
jmp loc_39B49
loc_39A43:
sub edx, eax
cmp ebx, 3
mov [rsp+68h+var_50], rax
jl short loc_39A58
mov rcx, [rbp+28h]
cmp ecx, 3
jnz short loc_39AB1
loc_39A58:
mov [rsp+68h+var_68], rdx
mov ebp, [r15+4]
not ebp
shr ebp, 1Fh
xor ebx, ebx
loc_39A67:
mov rdi, r14
mov rsi, [rsp+68h+var_38]
mov rdx, [rsp+68h+var_60]
mov ecx, 21h ; '!'
call js_create_from_ctor
mov [rsp+68h+var_48], rax
cmp edx, 6
jz loc_39B47
mov [rsp+68h+var_60], rax
cmp byte ptr [r15+8], 0
jz short loc_39B03
mov rbx, rdx
lea rsi, aArraybufferIsD; "ArrayBuffer is detached"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp loc_39B36
loc_39AB1:
mov rbx, rdx
mov rdx, [rbp+20h]
lea rsi, [rsp+68h+var_58]
mov rdi, r14
call JS_ToIndex
xor ebp, ebp
test eax, eax
jnz short loc_39AEF
mov rax, [rsp+68h+var_58]
mov rcx, rbx
mov ecx, ecx
cmp rax, rcx
jbe loc_39B60
lea rsi, aInvalidBytelen; "invalid byteLength"
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
loc_39AEF:
xor ecx, ecx
mov rax, rbx
loc_39AF4:
mov bl, 1
test cl, cl
jz short loc_39B49
mov [rsp+68h+var_68], rax
jmp loc_39A67
loc_39B03:
movsxd rax, dword ptr [r15]
mov rsi, [rsp+68h+var_50]
cmp rsi, rax
ja short loc_39B22
test bl, bl
jz short loc_39B64
mov ecx, dword ptr [rsp+68h+var_68]
mov rdi, rsi
add rdi, rcx
cmp rdi, rax
jbe short loc_39B6A
loc_39B22:
mov rbx, rdx
lea rsi, aInvalidByteoff_0; "invalid byteOffset or byteLength"
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
loc_39B36:
mov rdi, [r14+18h]
mov rsi, [rsp+68h+var_60]
mov rdx, rbx
call JS_FreeValueRT
loc_39B47:
xor ebp, ebp
loc_39B49:
mov edx, 6
loc_39B4E:
mov rax, rbp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_39B60:
mov cl, 1
jmp short loc_39AF4
loc_39B64:
sub eax, esi
mov [rsp+68h+var_68], rax
loc_39B6A:
mov rbx, rdx
mov esi, 30h ; '0'
mov rdi, r14
call js_malloc
test rax, rax
jz short loc_39B36
mov rcx, [rsp+68h+var_48]
mov [rax+10h], rcx
mov [rsp+68h+var_58], r12
cmp r13d, 0FFFFFFF7h
jb short loc_39B9A
mov rdx, [rsp+68h+var_58]
inc dword ptr [rdx]
loc_39B9A:
mov [rax+18h], r12
mov rdx, [rsp+68h+var_50]
mov [rax+20h], edx
mov rdx, [rsp+68h+var_68]
mov [rax+24h], edx
mov [rax+28h], ebp
mov rdx, r15
add rdx, 18h
mov rsi, [r15+18h]
mov [rsi+8], rax
mov [rax], rsi
mov [rax+8], rdx
mov [r15+18h], rax
mov [rcx+30h], rax
mov rbp, [rsp+68h+var_48]
mov rdx, rbx
jmp loc_39B4E
| unsigned long long js_dataview_constructor(
long long a1,
long long a2,
long long a3,
int a4,
long long *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
_DWORD *v15; // r12
long long v16; // r13
long long array_buffer; // rax
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
int *v23; // r15
long long v24; // rbp
unsigned long long v25; // rdx
unsigned int v26; // edx
long long v27; // rcx
char v28; // bl
unsigned long long v29; // rax
long long v30; // rdx
long long v31; // rcx
long long v32; // r8
long long v33; // r9
__m128 v34; // xmm4
__m128 v35; // xmm5
long long v36; // rbx
unsigned int v37; // ebx
int v38; // eax
long long v39; // rdx
long long v40; // r8
long long v41; // r9
__m128 v42; // xmm4
__m128 v43; // xmm5
unsigned int v44; // eax
char v45; // cl
unsigned long long v46; // rax
long long v48; // rax
unsigned long long v49; // rcx
long long v50; // rsi
char v51; // [rsp+0h] [rbp-68h]
unsigned int v52; // [rsp+0h] [rbp-68h]
_DWORD *v54; // [rsp+8h] [rbp-60h]
_DWORD *v55; // [rsp+10h] [rbp-58h] BYREF
unsigned long long v56; // [rsp+18h] [rbp-50h]
unsigned long long v57; // [rsp+20h] [rbp-48h]
unsigned long long v58; // [rsp+28h] [rbp-40h] BYREF
long long v59; // [rsp+30h] [rbp-38h]
v59 = a2;
v15 = (_DWORD *)*a5;
v16 = a5[1];
array_buffer = js_get_array_buffer(a1, *a5, v16, a6, a7, a8, a9, a10, a11, a12, a13);
if ( !array_buffer )
return 0LL;
v23 = (int *)array_buffer;
v58 = 0LL;
if ( a4 >= 2 )
{
if ( (unsigned int)JS_ToIndex(
a1,
&v58,
a5[2],
a5[3],
a6,
a7,
a8,
a9,
*(double *)v21.m128_u64,
*(double *)v22.m128_u64,
a12,
a13) )
return 0LL;
}
if ( *((_BYTE *)v23 + 8) )
{
v24 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached",
6LL,
v18,
v19,
v20,
a6,
a7,
a8,
a9,
v21,
v22,
a12,
a13,
v51);
return v24;
}
v25 = *v23;
if ( v58 > v25 )
{
v24 = 0LL;
JS_ThrowRangeError(a1, (long long)"invalid byteOffset", v25, v18, v19, v20, a6, a7, a8, a9, v21, v22, a12, a13, v51);
return v24;
}
v26 = v25 - v58;
v56 = v58;
if ( a4 < 3 || (v27 = a5[5], (_DWORD)v27 == 3) )
{
v52 = v26;
LODWORD(v24) = v23[1] >= 0;
v28 = 0;
goto LABEL_12;
}
v37 = v26;
v38 = JS_ToIndex(
a1,
(unsigned long long *)&v55,
a5[4],
v27,
a6,
a7,
a8,
a9,
*(double *)v21.m128_u64,
*(double *)v22.m128_u64,
a12,
a13);
v24 = 0LL;
if ( !v38 )
{
v44 = (unsigned int)v55;
if ( (unsigned long long)v55 <= v37 )
{
v45 = 1;
goto LABEL_19;
}
JS_ThrowRangeError(a1, (long long)"invalid byteLength", v39, v37, v40, v41, a6, a7, a8, a9, v42, v43, a12, a13, v51);
}
v45 = 0;
v44 = v37;
LABEL_19:
v28 = 1;
if ( !v45 )
return v24;
v52 = v44;
LABEL_12:
v29 = js_create_from_ctor(a1, v59, a3, 33);
v57 = v29;
if ( (_DWORD)v30 == 6 )
return 0LL;
v54 = (_DWORD *)v29;
if ( *((_BYTE *)v23 + 8) )
{
v36 = v30;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached",
v30,
v31,
v32,
v33,
a6,
a7,
a8,
a9,
v34,
v35,
a12,
a13,
v52);
LABEL_25:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v54, v36);
return 0LL;
}
v46 = *v23;
if ( v56 > v46 )
{
LABEL_24:
v36 = v30;
JS_ThrowRangeError(
a1,
(long long)"invalid byteOffset or byteLength",
v30,
v31,
v32,
v33,
a6,
a7,
a8,
a9,
v34,
v35,
a12,
a13,
v52);
goto LABEL_25;
}
if ( v28 )
{
v31 = v52;
if ( v52 + v56 > v46 )
goto LABEL_24;
}
else
{
v52 = v46 - v56;
}
v36 = v30;
v48 = js_malloc(a1, 48LL);
if ( !v48 )
goto LABEL_25;
v49 = v57;
*(_QWORD *)(v48 + 16) = v57;
v55 = v15;
if ( (unsigned int)v16 >= 0xFFFFFFF7 )
++*v55;
*(_QWORD *)(v48 + 24) = v15;
*(_DWORD *)(v48 + 32) = v56;
*(_DWORD *)(v48 + 36) = v52;
*(_DWORD *)(v48 + 40) = v24;
v50 = *((_QWORD *)v23 + 3);
*(_QWORD *)(v50 + 8) = v48;
*(_QWORD *)v48 = v50;
*(_QWORD *)(v48 + 8) = v23 + 6;
*((_QWORD *)v23 + 3) = v48;
*(_QWORD *)(v49 + 48) = v48;
return v57;
}
| |||
484 | add_compiled_collation | eloqsql/mysys/charset.c | void add_compiled_collation(struct charset_info_st *cs)
{
DBUG_ASSERT(cs->number < array_elements(all_charsets));
all_charsets[cs->number]= cs;
cs->state|= MY_CS_AVAILABLE;
if ((my_hash_insert(&charset_name_hash, (uchar*) cs)))
{
#ifndef DBUG_OFF
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
DBUG_ASSERT(org);
DBUG_ASSERT(org->cs_name.str == cs->cs_name.str);
DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str));
#endif
}
} | O0 | c | add_compiled_collation:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x61c7e
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
leaq 0x3b02ef(%rip), %rax # 0x411f80
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x200, %ecx # imm = 0x200
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rsi
leaq 0x3b42d0(%rip), %rdi # 0x415f80
callq 0x64a20
cmpb $0x0, %al
je 0x61cbb
jmp 0x61cbb
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| add_compiled_collation:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_61C7E:
mov rdx, [rbp+var_8]
mov rax, [rbp+var_8]
mov eax, [rax]
mov ecx, eax
lea rax, all_charsets
mov [rax+rcx*8], rdx
mov rax, [rbp+var_8]
mov ecx, [rax+0Ch]
or ecx, 200h
mov [rax+0Ch], ecx
mov rsi, [rbp+var_8]
lea rdi, charset_name_hash
call my_hash_insert
cmp al, 0
jz short loc_61CBB
jmp short $+2
loc_61CBB:
add rsp, 10h
pop rbp
retn
| long long add_compiled_collation(unsigned int *a1)
{
all_charsets[*a1] = a1;
a1[3] |= 0x200u;
return my_hash_insert(&charset_name_hash, a1);
}
| add_compiled_collation:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00161c7e
LAB_00161c7e:
MOV RDX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x511f80]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x200
MOV dword ptr [RAX + 0xc],ECX
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x515f80]
CALL 0x00164a20
CMP AL,0x0
JZ 0x00161cbb
JMP 0x00161cbb
LAB_00161cbb:
ADD RSP,0x10
POP RBP
RET
|
void add_compiled_collation(uint *param_1)
{
(&all_charsets)[*param_1] = param_1;
param_1[3] = param_1[3] | 0x200;
my_hash_insert(charset_name_hash,param_1);
return;
}
|
|
485 | add_compiled_collation | eloqsql/mysys/charset.c | void add_compiled_collation(struct charset_info_st *cs)
{
DBUG_ASSERT(cs->number < array_elements(all_charsets));
all_charsets[cs->number]= cs;
cs->state|= MY_CS_AVAILABLE;
if ((my_hash_insert(&charset_name_hash, (uchar*) cs)))
{
#ifndef DBUG_OFF
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
DBUG_ASSERT(org);
DBUG_ASSERT(org->cs_name.str == cs->cs_name.str);
DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str));
#endif
}
} | O3 | c | add_compiled_collation:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rsi
movl (%rdi), %eax
leaq 0x38a50b(%rip), %rcx # 0x3d4b60
movq %rdi, (%rcx,%rax,8)
orb $0x2, 0xd(%rdi)
leaq 0x38e4fc(%rip), %rdi # 0x3d8b60
popq %rbp
jmp 0x4c01a
| add_compiled_collation:
push rbp
mov rbp, rsp
mov rsi, rdi
mov eax, [rdi]
lea rcx, all_charsets
mov [rcx+rax*8], rdi
or byte ptr [rdi+0Dh], 2
lea rdi, charset_name_hash
pop rbp
jmp my_hash_insert
| long long add_compiled_collation(unsigned int *a1)
{
all_charsets[*a1] = a1;
*((_BYTE *)a1 + 13) |= 2u;
return my_hash_insert(&charset_name_hash, a1);
}
| add_compiled_collation:
PUSH RBP
MOV RBP,RSP
MOV RSI,RDI
MOV EAX,dword ptr [RDI]
LEA RCX,[0x4d4b60]
MOV qword ptr [RCX + RAX*0x8],RDI
OR byte ptr [RDI + 0xd],0x2
LEA RDI,[0x4d8b60]
POP RBP
JMP 0x0014c01a
|
void add_compiled_collation(uint *param_1)
{
(&all_charsets)[*param_1] = param_1;
*(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2;
my_hash_insert(charset_name_hash,param_1);
return;
}
|
|
486 | my_mb_wc_utf8mb4_quick | eloqsql/strings/ctype-utf8.h | static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0x7c19f
movzbl (%rsi), %ecx
testb %cl, %cl
js 0x7c198
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0x7c19f
cmpb $-0x3e, %cl
jae 0x7c1a1
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %cl
ja 0x7c1d7
leaq 0x2(%rsi), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %r8
ja 0x7c19f
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
movl $0x0, %eax
cmpb $0x3f, %dl
ja 0x7c19f
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0x7c193
cmpb $-0x11, %cl
ja 0x7c239
leaq 0x3(%rsi), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %r8
ja 0x7c19f
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0x7c19d
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0x7c19d
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0x7c19f
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0x7c193
cmpb $-0xc, %cl
ja 0x7c19d
leaq 0x4(%rsi), %r8
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rdx, %r8
ja 0x7c19f
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0x7c19d
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0x7c19d
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0x7c19d
cmpl $0xf0, %ecx
sete %al
cmpb $-0x70, %r8b
setb %r9b
testb %r9b, %al
jne 0x7c19d
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
movl $0x0, %eax
testb %r10b, %r9b
jne 0x7c19f
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0x7c231
| my_mb_wc_utf8mb4_quick:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb short loc_7C19F
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_7C198
mov eax, 1
loc_7C193:
mov [rdi], rcx
jmp short loc_7C19F
loc_7C198:
cmp cl, 0C2h
jnb short loc_7C1A1
loc_7C19D:
xor eax, eax
loc_7C19F:
pop rbp
retn
loc_7C1A1:
cmp cl, 0DFh
ja short loc_7C1D7
lea r8, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp r8, rdx
ja short loc_7C19F
movzx edx, byte ptr [rsi+1]
xor edx, 80h
mov eax, 0
cmp dl, 3Fh ; '?'
ja short loc_7C19F
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_7C193
loc_7C1D7:
cmp cl, 0EFh
ja short loc_7C239
lea r8, [rsi+3]
mov eax, 0FFFFFF99h
cmp r8, rdx
ja short loc_7C19F
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_7C19D
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_7C19D
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_7C19F
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_7C231:
mov rcx, rsi
jmp loc_7C193
loc_7C239:
cmp cl, 0F4h
ja loc_7C19D
lea r8, [rsi+4]
mov eax, 0FFFFFF98h
cmp r8, rdx
ja loc_7C19F
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_7C19D
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_7C19D
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_7C19D
cmp ecx, 0F0h
setz al
cmp r8b, 90h
setb r9b
test al, r9b
jnz loc_7C19D
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
mov eax, 0
test r9b, r10b
jnz loc_7C19F
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_7C231
| long long my_mb_wc_utf8mb4_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
unsigned long long v4; // rcx
char v5; // dl
char v6; // si
unsigned long long v7; // rsi
char v8; // r8
char v9; // dl
char v10; // si
result = 4294967195LL;
if ( (unsigned long long)a2 >= a3 )
return result;
v4 = *a2;
if ( (v4 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_4:
*a1 = v4;
return result;
}
if ( (unsigned __int8)v4 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v4 > 0xDFu )
{
if ( (unsigned __int8)v4 > 0xEFu )
{
if ( (unsigned __int8)v4 <= 0xF4u )
{
result = 4294967192LL;
if ( (unsigned long long)(a2 + 4) > a3 )
return result;
v8 = a2[1];
if ( v8 <= -65 )
{
v9 = a2[2];
if ( v9 <= -65 )
{
v10 = a2[3];
if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) )
{
result = 0LL;
if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 )
return result;
v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F;
result = 4LL;
LABEL_18:
v4 = v7;
goto LABEL_4;
}
}
}
}
}
else
{
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) > a3 )
return result;
v5 = a2[1];
if ( v5 <= -65 )
{
v6 = a2[2];
if ( v6 <= -65 )
{
result = 0LL;
if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 )
return result;
v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F);
result = 3LL;
goto LABEL_18;
}
}
}
return 0LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
{
result = 0LL;
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
return result;
}
| my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x0017c19f
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x0017c198
MOV EAX,0x1
LAB_0017c193:
MOV qword ptr [RDI],RCX
JMP 0x0017c19f
LAB_0017c198:
CMP CL,0xc2
JNC 0x0017c1a1
LAB_0017c19d:
XOR EAX,EAX
LAB_0017c19f:
POP RBP
RET
LAB_0017c1a1:
CMP CL,0xdf
JA 0x0017c1d7
LEA R8,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP R8,RDX
JA 0x0017c19f
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
MOV EAX,0x0
CMP DL,0x3f
JA 0x0017c19f
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x0017c193
LAB_0017c1d7:
CMP CL,0xef
JA 0x0017c239
LEA R8,[RSI + 0x3]
MOV EAX,0xffffff99
CMP R8,RDX
JA 0x0017c19f
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x0017c19d
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x0017c19d
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x0017c19f
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_0017c231:
MOV RCX,RSI
JMP 0x0017c193
LAB_0017c239:
CMP CL,0xf4
JA 0x0017c19d
LEA R8,[RSI + 0x4]
MOV EAX,0xffffff98
CMP R8,RDX
JA 0x0017c19f
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x0017c19d
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x0017c19d
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x0017c19d
CMP ECX,0xf0
SETZ AL
CMP R8B,0x90
SETC R9B
TEST AL,R9B
JNZ 0x0017c19d
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
MOV EAX,0x0
TEST R9B,R10B
JNZ 0x0017c19f
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x0017c231
|
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
if (param_3 <= param_2) {
return 0xffffff9b;
}
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
goto LAB_0017c193;
}
if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
return 0xffffff99;
}
bVar2 = param_2[1];
if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) {
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
LAB_0017c231:
uVar5 = (ulong)uVar4;
goto LAB_0017c193;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
return 0xffffff98;
}
bVar1 = param_2[1];
if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) &&
(uVar4 != 0xf0 || 0x8f < bVar1)) {
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
goto LAB_0017c231;
}
}
}
uVar3 = 0;
}
else {
uVar3 = 1;
LAB_0017c193:
*param_1 = uVar5;
}
return uVar3;
}
|
|
487 | minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&) | monkey531[P]llama/common/minja.hpp | Context(Value && values, const std::shared_ptr<Context> & parent = nullptr) : values_(std::move(values)), parent_(parent) {
if (!values_.is_object()) throw std::runtime_error("Context values must be an object: " + values_.dump());
} | O3 | cpp | minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x8ecfd(%rip), %rax # 0x12f130
addq $0x10, %rax
movq %rax, (%rdi)
movups %xmm0, 0x18(%rdi)
xorl %r13d, %r13d
movq %r13, 0x30(%rdi)
movups 0x10(%rsi), %xmm0
movq %r13, 0x18(%rsi)
movups %xmm0, 0x28(%rdi)
movq %r13, 0x10(%rsi)
movq %r13, 0x40(%rdi)
movups 0x20(%rsi), %xmm0
movq %r13, 0x28(%rsi)
movups %xmm0, 0x38(%rdi)
movq %r13, 0x20(%rsi)
movq %r13, 0x50(%rdi)
movups 0x30(%rsi), %xmm0
movq %r13, 0x38(%rsi)
movups %xmm0, 0x48(%rdi)
movq %r13, 0x30(%rsi)
leaq 0x58(%rdi), %r12
leaq 0x40(%rsi), %rdi
movups 0x40(%rsi), %xmm0
movups %xmm0, 0x58(%rbx)
xorl %esi, %esi
callq 0x5c5ee
movb $0x0, 0x40(%r15)
movq %r13, 0x48(%r15)
movq %r12, %rdi
movl $0x1, %esi
callq 0x5c5ee
movq (%r14), %rax
movq %rax, 0x68(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0xa04d3
movq 0x8fab3(%rip), %rcx # 0x12ff78
cmpb $0x0, (%rcx)
je 0xa04cf
incl 0x8(%rax)
jmp 0xa04d3
lock
incl 0x8(%rax)
cmpq $0x0, 0x38(%rbx)
je 0xa04e9
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rbx), %r14
movl $0x10, %edi
callq 0x1b4d0
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8a0c8
leaq 0x53aa2(%rip), %rsi # 0xf3fb7
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x7c85d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x1c0a0
xorl %ebp, %ebp
movq 0x8faab(%rip), %rsi # 0x12ffe8
movq 0x8fa0c(%rip), %rdx # 0x12ff50
movq %r15, %rdi
callq 0x1c1c0
movq %rax, %r12
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa056a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1ba60
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa0585
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba60
testb %bpl, %bpl
jne 0xa05af
jmp 0xa05b7
movq %rax, %r12
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa05af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba60
jmp 0xa05af
movq %rax, %r12
movq %r15, %rdi
callq 0x1b760
movq 0x70(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
je 0xa05c9
callq 0x7140a
movq %r14, %rdi
callq 0x89da6
movq %rbx, %rdi
callq 0xa05e2
movq %r12, %rdi
callq 0x1c250
nop
| _ZN5minja7ContextC2EONS_5ValueERKSt10shared_ptrIS0_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea rax, _ZTVN5minja7ContextE; `vtable for'minja::Context
add rax, 10h
mov [rdi], rax
movups xmmword ptr [rdi+18h], xmm0
xor r13d, r13d
mov [rdi+30h], r13
movups xmm0, xmmword ptr [rsi+10h]
mov [rsi+18h], r13
movups xmmword ptr [rdi+28h], xmm0
mov [rsi+10h], r13
mov [rdi+40h], r13
movups xmm0, xmmword ptr [rsi+20h]
mov [rsi+28h], r13
movups xmmword ptr [rdi+38h], xmm0
mov [rsi+20h], r13
mov [rdi+50h], r13
movups xmm0, xmmword ptr [rsi+30h]
mov [rsi+38h], r13
movups xmmword ptr [rdi+48h], xmm0
mov [rsi+30h], r13
lea r12, [rdi+58h]
lea rdi, [rsi+40h]
movups xmm0, xmmword ptr [rsi+40h]
movups xmmword ptr [rbx+58h], xmm0
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15+40h], 0
mov [r15+48h], r13
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, [r14]
mov [rbx+68h], rax
mov rax, [r14+8]
mov [rbx+70h], rax
test rax, rax
jz short loc_A04D3
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_A04CF
inc dword ptr [rax+8]
jmp short loc_A04D3
loc_A04CF:
lock inc dword ptr [rax+8]
loc_A04D3:
cmp qword ptr [rbx+38h], 0
jz short loc_A04E9
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A04E9:
lea r14, [rbx+18h]
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rdi, [rsp+78h+var_70]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContextValuesM; "Context values must be an object: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, r15
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r12, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A056A
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A056A:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A0585
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A0585:
test bpl, bpl
jnz short loc_A05AF
jmp short loc_A05B7
mov r12, rax
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A05AF
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A05AF
mov r12, rax
loc_A05AF:
mov rdi, r15; void *
call ___cxa_free_exception
loc_A05B7:
mov rdi, [rbx+70h]
add rbx, 8
test rdi, rdi
jz short loc_A05C9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A05C9:
mov rdi, r14; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja7ContextEED2Ev; std::enable_shared_from_this<minja::Context>::~enable_shared_from_this()
mov rdi, r12
call __Unwind_Resume
| long long minja::Context::Context(long long a1, long long a2, _QWORD *a3)
{
__int128 v4; // xmm0
__int128 v5; // xmm0
__int128 v6; // xmm0
long long result; // rax
void *exception; // r15
_BYTE v9[16]; // [rsp+8h] [rbp-70h] BYREF
_BYTE v10[16]; // [rsp+28h] [rbp-50h] BYREF
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)a1 = &`vtable for'minja::Context + 2;
*(_OWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 48) = 0LL;
v4 = *(_OWORD *)(a2 + 16);
*(_QWORD *)(a2 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = v4;
*(_QWORD *)(a2 + 16) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
v5 = *(_OWORD *)(a2 + 32);
*(_QWORD *)(a2 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = v5;
*(_QWORD *)(a2 + 32) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v6 = *(_OWORD *)(a2 + 48);
*(_QWORD *)(a2 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = v6;
*(_QWORD *)(a2 + 48) = 0LL;
*(_OWORD *)(a1 + 88) = *(_OWORD *)(a2 + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64));
*(_BYTE *)(a2 + 64) = 0;
*(_QWORD *)(a2 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 88));
*(_QWORD *)(a1 + 104) = *a3;
result = a3[1];
*(_QWORD *)(a1 + 112) = result;
if ( result )
{
if ( _libc_single_threaded )
++*(_DWORD *)(result + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(result + 8));
}
if ( !*(_QWORD *)(a1 + 56) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, a1 + 24, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Context values must be an object: ", (long long)v9);
std::runtime_error::runtime_error(exception, v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
| Context:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x22f130]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOVUPS xmmword ptr [RDI + 0x18],XMM0
XOR R13D,R13D
MOV qword ptr [RDI + 0x30],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x10]
MOV qword ptr [RSI + 0x18],R13
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV qword ptr [RSI + 0x10],R13
MOV qword ptr [RDI + 0x40],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x20]
MOV qword ptr [RSI + 0x28],R13
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOV qword ptr [RSI + 0x20],R13
MOV qword ptr [RDI + 0x50],R13
MOVUPS XMM0,xmmword ptr [RSI + 0x30]
MOV qword ptr [RSI + 0x38],R13
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOV qword ptr [RSI + 0x30],R13
LEA R12,[RDI + 0x58]
LEA RDI,[RSI + 0x40]
MOVUPS XMM0,xmmword ptr [RSI + 0x40]
MOVUPS xmmword ptr [RBX + 0x58],XMM0
XOR ESI,ESI
CALL 0x0015c5ee
MOV byte ptr [R15 + 0x40],0x0
MOV qword ptr [R15 + 0x48],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x0015c5ee
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x68],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x70],RAX
TEST RAX,RAX
JZ 0x001a04d3
MOV RCX,qword ptr [0x0022ff78]
CMP byte ptr [RCX],0x0
JZ 0x001a04cf
INC dword ptr [RAX + 0x8]
JMP 0x001a04d3
LAB_001a04cf:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a04d3:
CMP qword ptr [RBX + 0x38],0x0
JZ 0x001a04e9
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a04e9:
LEA R14,[RBX + 0x18]
MOV EDI,0x10
CALL 0x0011b4d0
MOV R15,RAX
LAB_001a04fa:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018a0c8
LAB_001a050e:
LEA RSI,[0x1f3fb7]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0017c85d
MOV BPL,0x1
LAB_001a0527:
LEA RSI,[RSP + 0x28]
MOV RDI,R15
CALL 0x0011c0a0
XOR EBP,EBP
MOV RSI,qword ptr [0x0022ffe8]
MOV RDX,qword ptr [0x0022ff50]
MOV RDI,R15
CALL 0x0011c1c0
|
/* minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&) */
void __thiscall minja::Context::Context(Context *this,Value *param_1,shared_ptr *param_2)
{
long lVar1;
int8 uVar2;
runtime_error *this_00;
int1 local_70 [32];
string local_50 [32];
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__Context_0022f140;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x30) = 0;
uVar2 = *(int8 *)(param_1 + 0x18);
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(this + 0x28) = *(int8 *)(param_1 + 0x10);
*(int8 *)(this + 0x30) = uVar2;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(this + 0x40) = 0;
uVar2 = *(int8 *)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(this + 0x38) = *(int8 *)(param_1 + 0x20);
*(int8 *)(this + 0x40) = uVar2;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(this + 0x50) = 0;
uVar2 = *(int8 *)(param_1 + 0x38);
*(int8 *)(param_1 + 0x38) = 0;
*(int8 *)(this + 0x48) = *(int8 *)(param_1 + 0x30);
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)(param_1 + 0x30) = 0;
uVar2 = *(int8 *)(param_1 + 0x48);
*(int8 *)(this + 0x58) = *(int8 *)(param_1 + 0x40);
*(int8 *)(this + 0x60) = uVar2;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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((bool)((char)param_1 + '@'));
param_1[0x40] = (Value)0x0;
*(int8 *)(param_1 + 0x48) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + 'X'));
*(int8 *)(this + 0x68) = *(int8 *)param_2;
lVar1 = *(long *)(param_2 + 8);
*(long *)(this + 0x70) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022ff78 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
if (*(long *)(this + 0x38) != 0) {
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a04fa to 001a050d has its CatchHandler @ 001a05ac */
Value::dump_abi_cxx11_((int)local_70,(bool)((char)this + '\x18'));
/* try { // try from 001a050e to 001a0523 has its CatchHandler @ 001a058c */
std::operator+((char *)local_50,(string *)"Context values must be an object: ");
/* try { // try from 001a0527 to 001a054b has its CatchHandler @ 001a054c */
std::runtime_error::runtime_error(this_00,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50);
}
|
|
488 | walk_and_copy | eloqsql/storage/myisam/ft_nlq_search.c | static int walk_and_copy(FT_SUPERDOC *from,
uint32 count __attribute__((unused)), FT_DOC **to)
{
DBUG_ENTER("walk_and_copy");
from->doc.weight+=from->tmp_weight*from->word_ptr->weight;
(*to)->dpos=from->doc.dpos;
(*to)->weight=from->doc.weight;
(*to)++;
DBUG_RETURN(0);
} | O0 | c | walk_and_copy:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movsd 0x8(%rax), %xmm2
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
jmp 0xa66c1
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| walk_and_copy_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+18h]
mov rax, [rbp+var_8]
mov rax, [rax+10h]
movsd xmm2, qword ptr [rax+8]
mov rax, [rbp+var_8]
movsd xmm1, qword ptr [rax+8]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd qword ptr [rax+8], xmm0
mov rax, [rbp+var_8]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_18]
mov rax, [rax]
movsd qword ptr [rax+8], xmm0
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 10h
mov [rax], rcx
jmp short $+2
loc_A66C1:
xor eax, eax
pop rbp
retn
| long long walk_and_copy_0(long long a1, long long a2, long long a3)
{
*(double *)(a1 + 8) = *(double *)(a1 + 24) * *(double *)(*(_QWORD *)(a1 + 16) + 8LL) + *(double *)(a1 + 8);
**(_QWORD **)a3 = *(_QWORD *)a1;
*(_QWORD *)(*(_QWORD *)a3 + 8LL) = *(_QWORD *)(a1 + 8);
*(_QWORD *)a3 += 16LL;
return 0LL;
}
| walk_and_copy:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOVSD XMM2,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [RAX + 0x8]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RAX + 0x8],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVSD qword ptr [RAX + 0x8],XMM0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
JMP 0x001a66c1
LAB_001a66c1:
XOR EAX,EAX
POP RBP
RET
|
int8 walk_and_copy(int8 *param_1,int8 param_2,long *param_3)
{
param_1[1] = (double)param_1[3] * *(double *)(param_1[2] + 8) + (double)param_1[1];
*(int8 *)*param_3 = *param_1;
*(int8 *)(*param_3 + 8) = param_1[1];
*param_3 = *param_3 + 0x10;
return 0;
}
|
|
489 | LefDefParser::defiAssertion::Init() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiAssertion.cpp | void defiAssertion::Init() {
netName_ = (char*)malloc(32);
netNameLength_ = 32;
numItems_ = 0;
clear();
numItemsAllocated_ = 16;
items_ = (int**)malloc(sizeof(char*)*16);
itemTypes_ = (char*)malloc(16);
} | O3 | cpp | LefDefParser::defiAssertion::Init():
pushq %rbx
movq %rdi, %rbx
movl $0x20, %edi
callq 0x7270
movq %rax, 0x10(%rbx)
movl $0x20, 0x18(%rbx)
movl $0x0, 0x40(%rbx)
movq %rbx, %rdi
callq 0x2a136
movl $0x10, 0x44(%rbx)
movl $0x80, %edi
callq 0x7270
movq %rax, 0x50(%rbx)
movl $0x10, %edi
callq 0x7270
movq %rax, 0x48(%rbx)
popq %rbx
retq
nop
| _ZN12LefDefParser13defiAssertion4InitEv:
push rbx
mov rbx, rdi
mov edi, 20h ; ' '
call _malloc
mov [rbx+10h], rax
mov dword ptr [rbx+18h], 20h ; ' '
mov dword ptr [rbx+40h], 0
mov rdi, rbx; this
call _ZN12LefDefParser13defiAssertion5clearEv; LefDefParser::defiAssertion::clear(void)
mov dword ptr [rbx+44h], 10h
mov edi, 80h
call _malloc
mov [rbx+50h], rax
mov edi, 10h
call _malloc
mov [rbx+48h], rax
pop rbx
retn
| long long LefDefParser::defiAssertion::Init(LefDefParser::defiAssertion *this)
{
long long result; // rax
*((_QWORD *)this + 2) = malloc(0x20uLL);
*((_DWORD *)this + 6) = 32;
*((_DWORD *)this + 16) = 0;
LefDefParser::defiAssertion::clear(this);
*((_DWORD *)this + 17) = 16;
*((_QWORD *)this + 10) = malloc(0x80uLL);
result = malloc(0x10uLL);
*((_QWORD *)this + 9) = result;
return result;
}
| Init:
PUSH RBX
MOV RBX,RDI
MOV EDI,0x20
CALL 0x00107270
MOV qword ptr [RBX + 0x10],RAX
MOV dword ptr [RBX + 0x18],0x20
MOV dword ptr [RBX + 0x40],0x0
MOV RDI,RBX
CALL 0x0012a136
MOV dword ptr [RBX + 0x44],0x10
MOV EDI,0x80
CALL 0x00107270
MOV qword ptr [RBX + 0x50],RAX
MOV EDI,0x10
CALL 0x00107270
MOV qword ptr [RBX + 0x48],RAX
POP RBX
RET
|
/* LefDefParser::defiAssertion::Init() */
void __thiscall LefDefParser::defiAssertion::Init(defiAssertion *this)
{
void *pvVar1;
pvVar1 = malloc(0x20);
*(void **)(this + 0x10) = pvVar1;
*(int4 *)(this + 0x18) = 0x20;
*(int4 *)(this + 0x40) = 0;
clear(this);
*(int4 *)(this + 0x44) = 0x10;
pvVar1 = malloc(0x80);
*(void **)(this + 0x50) = pvVar1;
pvVar1 = malloc(0x10);
*(void **)(this + 0x48) = pvVar1;
return;
}
|
|
490 | my_thread_global_end | eloqsql/mysys/my_thr_init.c | void my_thread_global_end(void)
{
struct timespec abstime;
my_bool all_threads_killed= 1;
set_timespec(abstime, my_thread_end_wait_time);
mysql_mutex_lock(&THR_LOCK_threads);
while (THR_thread_count > 0)
{
int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads,
&abstime);
if (error == ETIMEDOUT || error == ETIME)
{
#ifdef HAVE_PTHREAD_KILL
/*
We shouldn't give an error here, because if we don't have
pthread_kill(), programs like mysqld can't ensure that all threads
are killed when we enter here.
*/
if (THR_thread_count)
fprintf(stderr,
"Error in my_thread_global_end(): %d threads didn't exit\n",
THR_thread_count);
#endif
all_threads_killed= 0;
break;
}
}
mysql_mutex_unlock(&THR_LOCK_threads);
my_thread_destroy_common_mutex();
/*
Only destroy the mutex & conditions if we don't have other threads around
that could use them.
*/
if (all_threads_killed)
{
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done= 0;
} | O0 | c | my_thread_global_end:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb $0x1, -0x11(%rbp)
callq 0xf6260
movq %rax, -0x28(%rbp)
imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8
leaq 0x1cacc4(%rip), %rcx # 0x2c70e8
movl (%rcx), %ecx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x8(%rbp)
leaq 0xb8e269(%rip), %rdi # 0xc8a6c8
leaq 0x5ec82(%rip), %rsi # 0x15b0e8
movl $0xce, %edx
callq 0xfc510
leaq 0xb8e051(%rip), %rax # 0xc8a4c8
cmpl $0x0, (%rax)
jbe 0xfc4e4
leaq 0xb8e2d5(%rip), %rdi # 0xc8a758
leaq 0xb8e23e(%rip), %rsi # 0xc8a6c8
leaq -0x10(%rbp), %rdx
leaq 0x5ec53(%rip), %rcx # 0x15b0e8
movl $0xd2, %r8d
callq 0xfc580
movl %eax, -0x2c(%rbp)
cmpl $0x6e, -0x2c(%rbp)
je 0xfc4af
cmpl $0x3e, -0x2c(%rbp)
jne 0xfc4e2
leaq 0xb8e012(%rip), %rax # 0xc8a4c8
cmpl $0x0, (%rax)
je 0xfc4dc
movq 0x1c7b1e(%rip), %rax # 0x2c3fe0
movq (%rax), %rdi
leaq 0xb8dffc(%rip), %rax # 0xc8a4c8
movl (%rax), %edx
leaq 0x5ec50(%rip), %rsi # 0x15b125
movb $0x0, %al
callq 0x2a180
movb $0x0, -0x11(%rbp)
jmp 0xfc4e4
jmp 0xfc470
leaq 0xb8e1dd(%rip), %rdi # 0xc8a6c8
callq 0xfc600
callq 0xfbee0
cmpb $0x0, -0x11(%rbp)
je 0xfc500
callq 0xfbf90
movb $0x0, 0xb8e289(%rip) # 0xc8a790
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_thread_global_end:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_11], 1
call my_hrtime
mov [rbp+var_28], rax
imul rax, [rbp+var_28], 3E8h
lea rcx, my_thread_end_wait_time
mov ecx, [rcx]
imul rcx, 3B9ACA00h
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_8], rdx
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0CEh
call inline_mysql_mutex_lock_26
loc_FC470:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jbe short loc_FC4E4
lea rdi, THR_COND_threads
lea rsi, THR_LOCK_threads
lea rdx, [rbp+var_10]
lea rcx, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 0D2h
call inline_mysql_cond_timedwait_1
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 6Eh ; 'n'
jz short loc_FC4AF
cmp [rbp+var_2C], 3Eh ; '>'
jnz short loc_FC4E2
loc_FC4AF:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jz short loc_FC4DC
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, THR_thread_count
mov edx, [rax]
lea rsi, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"...
mov al, 0
call _fprintf
loc_FC4DC:
mov [rbp+var_11], 0
jmp short loc_FC4E4
loc_FC4E2:
jmp short loc_FC470
loc_FC4E4:
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock_27
call my_thread_destroy_common_mutex
cmp [rbp+var_11], 0
jz short loc_FC500
call my_thread_destroy_internal_mutex
loc_FC500:
mov cs:my_thread_global_init_done, 0
add rsp, 30h
pop rbp
retn
| long long my_thread_global_end()
{
long long result; // rax
int v1; // [rsp+4h] [rbp-2Ch]
unsigned long long v2; // [rsp+10h] [rbp-20h]
char v3; // [rsp+1Fh] [rbp-11h]
_QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF
v3 = 1;
v2 = 1000000000LL * my_thread_end_wait_time + 1000 * my_hrtime();
v4[0] = v2 / 0x3B9ACA00;
v4[1] = v2 % 0x3B9ACA00;
inline_mysql_mutex_lock_26(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 206LL);
while ( THR_thread_count )
{
v1 = inline_mysql_cond_timedwait_1(
&THR_COND_threads,
&THR_LOCK_threads,
v4,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
210LL);
if ( v1 == 110 || v1 == 62 )
{
if ( THR_thread_count )
fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count);
v3 = 0;
break;
}
}
inline_mysql_mutex_unlock_27(&THR_LOCK_threads);
result = my_thread_destroy_common_mutex();
if ( v3 )
result = my_thread_destroy_internal_mutex();
my_thread_global_init_done = 0;
return result;
}
| my_thread_global_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV byte ptr [RBP + -0x11],0x1
CALL 0x001f6260
MOV qword ptr [RBP + -0x28],RAX
IMUL RAX,qword ptr [RBP + -0x28],0x3e8
LEA RCX,[0x3c70e8]
MOV ECX,dword ptr [RCX]
IMUL RCX,RCX,0x3b9aca00
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x8],RDX
LEA RDI,[0xd8a6c8]
LEA RSI,[0x25b0e8]
MOV EDX,0xce
CALL 0x001fc510
LAB_001fc470:
LEA RAX,[0xd8a4c8]
CMP dword ptr [RAX],0x0
JBE 0x001fc4e4
LEA RDI,[0xd8a758]
LEA RSI,[0xd8a6c8]
LEA RDX,[RBP + -0x10]
LEA RCX,[0x25b0e8]
MOV R8D,0xd2
CALL 0x001fc580
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x6e
JZ 0x001fc4af
CMP dword ptr [RBP + -0x2c],0x3e
JNZ 0x001fc4e2
LAB_001fc4af:
LEA RAX,[0xd8a4c8]
CMP dword ptr [RAX],0x0
JZ 0x001fc4dc
MOV RAX,qword ptr [0x003c3fe0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0xd8a4c8]
MOV EDX,dword ptr [RAX]
LEA RSI,[0x25b125]
MOV AL,0x0
CALL 0x0012a180
LAB_001fc4dc:
MOV byte ptr [RBP + -0x11],0x0
JMP 0x001fc4e4
LAB_001fc4e2:
JMP 0x001fc470
LAB_001fc4e4:
LEA RDI,[0xd8a6c8]
CALL 0x001fc600
CALL 0x001fbee0
CMP byte ptr [RBP + -0x11],0x0
JZ 0x001fc500
CALL 0x001fbf90
LAB_001fc500:
MOV byte ptr [0x00d8a790],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_thread_global_end(void)
{
bool bVar1;
int iVar2;
long lVar3;
ulong local_18;
ulong local_10;
bVar1 = true;
lVar3 = my_hrtime();
local_10 = lVar3 * 1000 + (ulong)my_thread_end_wait_time * 1000000000;
local_18 = local_10 / 1000000000;
local_10 = local_10 % 1000000000;
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xce);
do {
if (THR_thread_count == 0) goto LAB_001fc4e4;
iVar2 = inline_mysql_cond_timedwait
(THR_COND_threads,THR_LOCK_threads,&local_18,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2);
} while ((iVar2 != 0x6e) && (iVar2 != 0x3e));
if (THR_thread_count != 0) {
fprintf(*(FILE **)PTR_stderr_003c3fe0,
"Error in my_thread_global_end(): %d threads didn\'t exit\n",(ulong)THR_thread_count);
}
bVar1 = false;
LAB_001fc4e4:
inline_mysql_mutex_unlock(THR_LOCK_threads);
my_thread_destroy_common_mutex();
if (bVar1) {
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done = 0;
return;
}
|
|
491 | ma_hashtbl_init | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | my_bool _ma_hashtbl_init(MA_HASHTBL *hash,uint size,uint key_offset,uint key_length,
hash_get_key get_key,
void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
{
hash->records=0;
if (ma_init_dynamic_array_ci(&hash->array,sizeof(MA_HASHTBL_LINK),size,0))
{
hash->free=0; /* Allow call to hash_free */
return(TRUE);
}
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
hash->current_record= NO_RECORD; /* For the future */
hash->get_key=get_key;
hash->free=free_element;
hash->flags=flags;
if (flags & MA_HASHTBL_CASE_INSENSITIVE)
hash->calc_hashnr=calc_hashnr_caseup;
else
hash->calc_hashnr=calc_hashnr;
return(0);
} | O0 | c | ma_hashtbl_init:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movl -0x14(%rbp), %edx
movl $0x10, %esi
xorl %ecx, %ecx
callq 0x5d1a0
cmpb $0x0, %al
je 0x5f088
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x5f102
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xc(%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movl 0x10(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movl 0x10(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5f0ef
movq -0x10(%rbp), %rax
leaq 0x27(%rip), %rcx # 0x5f110
movq %rcx, 0x40(%rax)
jmp 0x5f0fe
movq -0x10(%rbp), %rax
leaq 0x96(%rip), %rcx # 0x5f190
movq %rcx, 0x40(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_hashtbl_init:
push rbp
mov rbp, rsp
sub rsp, 30h
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov dword ptr [rax+8], 0
mov rdi, [rbp+var_10]
add rdi, 18h
mov edx, [rbp+var_14]
mov esi, 10h
xor ecx, ecx
call ma_init_dynamic_array
cmp al, 0
jz short loc_5F088
mov rax, [rbp+var_10]
mov qword ptr [rax+38h], 0
mov [rbp+var_1], 1
jmp short loc_5F102
loc_5F088:
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], ecx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax+4], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 1
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0FFFFFFFFh
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+38h], rcx
mov ecx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov eax, [rbp+arg_0]
and eax, 1
cmp eax, 0
jz short loc_5F0EF
mov rax, [rbp+var_10]
lea rcx, calc_hashnr_caseup
mov [rax+40h], rcx
jmp short loc_5F0FE
loc_5F0EF:
mov rax, [rbp+var_10]
lea rcx, calc_hashnr
mov [rax+40h], rcx
loc_5F0FE:
mov [rbp+var_1], 0
loc_5F102:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ma_hashtbl_init(long long a1, unsigned int a2, int a3, int a4, long long a5, long long a6, int a7)
{
*(_DWORD *)(a1 + 8) = 0;
if ( ma_init_dynamic_array(a1 + 24, 0x10u, a2, 0) )
{
*(_QWORD *)(a1 + 56) = 0LL;
return 1;
}
else
{
*(_DWORD *)a1 = a3;
*(_DWORD *)(a1 + 4) = a4;
*(_DWORD *)(a1 + 12) = 1;
*(_DWORD *)(a1 + 16) = -1;
*(_QWORD *)(a1 + 48) = a5;
*(_QWORD *)(a1 + 56) = a6;
*(_DWORD *)(a1 + 20) = a7;
if ( (a7 & 1) != 0 )
*(_QWORD *)(a1 + 64) = calc_hashnr_caseup;
else
*(_QWORD *)(a1 + 64) = calc_hashnr;
return 0;
}
}
| _ma_hashtbl_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
MOV EDX,dword ptr [RBP + -0x14]
MOV ESI,0x10
XOR ECX,ECX
CALL 0x0015d1a0
CMP AL,0x0
JZ 0x0015f088
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015f102
LAB_0015f088:
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0xffffffff
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],RCX
MOV ECX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0015f0ef
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x15f110]
MOV qword ptr [RAX + 0x40],RCX
JMP 0x0015f0fe
LAB_0015f0ef:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x15f190]
MOV qword ptr [RAX + 0x40],RCX
LAB_0015f0fe:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015f102:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1
_ma_hashtbl_init(int4 *param_1,int4 param_2,int4 param_3,int4 param_4,
int8 param_5,int8 param_6,uint param_7)
{
char cVar1;
int1 local_9;
param_1[2] = 0;
cVar1 = ma_init_dynamic_array(param_1 + 6,0x10,param_2,0);
if (cVar1 == '\0') {
*param_1 = param_3;
param_1[1] = param_4;
param_1[3] = 1;
param_1[4] = 0xffffffff;
*(int8 *)(param_1 + 0xc) = param_5;
*(int8 *)(param_1 + 0xe) = param_6;
param_1[5] = param_7;
if ((param_7 & 1) == 0) {
*(code **)(param_1 + 0x10) = calc_hashnr;
}
else {
*(code **)(param_1 + 0x10) = calc_hashnr_caseup;
}
local_9 = 0;
}
else {
*(int8 *)(param_1 + 0xe) = 0;
local_9 = 1;
}
return local_9;
}
|
|
492 | sessions::init() | untodesu[P]voxelius/game/server/sessions.cc | void sessions::init(void)
{
globals::server_config.add_value("sessions.max_players", sessions::max_players);
globals::dispatcher.sink<protocol::LoginRequest>().connect<&on_login_request_packet>();
globals::dispatcher.sink<protocol::Disconnect>().connect<&on_disconnect_packet>();
globals::dispatcher.sink<VoxelSetEvent>().connect<&on_voxel_set>();
} | O3 | cpp | sessions::init():
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0xdf5fb(%rip), %rdi # 0x108950
leaq 0x8fb5d(%rip), %rsi # 0xb8eb9
leaq 0xdf7cd(%rip), %rdx # 0x108b30
callq 0x5140c
leaq 0xdfc19(%rip), %rdi # 0x108f88
movl $0x14341aff, %esi # imm = 0x14341AFF
callq 0x2ad2a
movq %rax, %rbx
leaq 0x8(%rax), %r14
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
callq 0x29afa
movq $0x0, (%rsp)
leaq 0x7b2(%rip), %rax # 0x29b4e
movq %rax, 0x8(%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x293b9
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x10(%rbx)
jmp 0x293c4
movq %rsp, %rdx
movq %r14, %rdi
callq 0x2cafe
leaq 0xdfbbd(%rip), %rdi # 0x108f88
movl $0x73d89a6b, %esi # imm = 0x73D89A6B
callq 0x2b176
movq %rax, %rbx
leaq 0x8(%rax), %r14
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
callq 0x2a5b2
movq $0x0, (%rsp)
leaq 0x120e(%rip), %rax # 0x2a606
movq %rax, 0x8(%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x29415
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x10(%rbx)
jmp 0x29420
movq %rsp, %rdx
movq %r14, %rdi
callq 0x2cf56
leaq 0xdfb61(%rip), %rdi # 0x108f88
movl $0xf31291e7, %esi # imm = 0xF31291E7
callq 0x2b5ac
movq %rax, %rbx
leaq 0x8(%rax), %r14
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
callq 0x2a766
movq $0x0, (%rsp)
leaq 0x1366(%rip), %rax # 0x2a7ba
movq %rax, 0x8(%rsp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x29471
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x10(%rbx)
jmp 0x2947c
movq %rsp, %rdx
movq %r14, %rdi
callq 0x2d096
addq $0x18, %rsp
popq %rbx
popq %r14
retq
| _ZN8sessions4initEv:
push r14
push rbx
sub rsp, 18h
lea rdi, _ZN7globals13server_configE; globals::server_config
lea rsi, aSessionsMaxPla; "sessions.max_players"
lea rdx, _ZN8sessions11max_playersE; sessions::max_players
call _ZN6Config9add_valueEPKcR12IConfigValue; Config::add_value(char const*,IConfigValue &)
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
mov esi, 14341AFFh
call _ZN4entt16basic_dispatcherISaIvEE6assureIN8protocol12LoginRequestEEERNS_8internal18dispatcher_handlerIT_S1_EEj; entt::basic_dispatcher<std::allocator<void>>::assure<protocol::LoginRequest>(uint)
mov rbx, rax
lea r14, [rax+8]
lea rdi, [rsp+28h+var_18]
mov [rdi], r14
call _ZN4entt4sinkINS_4sighIFvRN8protocol12LoginRequestEESaIvEEEE10disconnectITnDaXadL_ZL23on_login_request_packetRKS3_EEJEEEvDpOT0_
mov qword ptr [rsp+28h+var_28], 0
lea rax, _ZZN4entt8delegateIFvRN8protocol12LoginRequestEEE7connectITnDaXadL_ZL23on_login_request_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
mov qword ptr [rsp+28h+var_28+8], rax
mov rsi, [rbx+10h]
cmp rsi, [rbx+18h]
jz short loc_293B9
movups xmm0, [rsp+28h+var_28]
movups xmmword ptr [rsi], xmm0
add qword ptr [rbx+10h], 10h
jmp short loc_293C4
loc_293B9:
mov rdx, rsp
mov rdi, r14
call _ZNSt6vectorIN4entt8delegateIFvRN8protocol12LoginRequestEEEESaIS6_EE17_M_realloc_insertIJS6_EEEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEDpOT_; std::vector<entt::delegate<void ()(protocol::LoginRequest &)>>::_M_realloc_insert<entt::delegate<void ()(protocol::LoginRequest &)>>(__gnu_cxx::__normal_iterator<entt::delegate<void ()(protocol::LoginRequest &)>*,std::vector<entt::delegate<void ()(protocol::LoginRequest &)>>>,entt::delegate<void ()(protocol::LoginRequest &)> &&)
loc_293C4:
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
mov esi, 73D89A6Bh
call _ZN4entt16basic_dispatcherISaIvEE6assureIN8protocol10DisconnectEEERNS_8internal18dispatcher_handlerIT_S1_EEj; entt::basic_dispatcher<std::allocator<void>>::assure<protocol::Disconnect>(uint)
mov rbx, rax
lea r14, [rax+8]
lea rdi, [rsp+28h+var_18]
mov [rdi], r14
call _ZN4entt4sinkINS_4sighIFvRN8protocol10DisconnectEESaIvEEEE10disconnectITnDaXadL_ZL20on_disconnect_packetRKS3_EEJEEEvDpOT0_
mov qword ptr [rsp+28h+var_28], 0
lea rax, _ZZN4entt8delegateIFvRN8protocol10DisconnectEEE7connectITnDaXadL_ZL20on_disconnect_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
mov qword ptr [rsp+28h+var_28+8], rax
mov rsi, [rbx+10h]
cmp rsi, [rbx+18h]
jz short loc_29415
movups xmm0, [rsp+28h+var_28]
movups xmmword ptr [rsi], xmm0
add qword ptr [rbx+10h], 10h
jmp short loc_29420
loc_29415:
mov rdx, rsp
mov rdi, r14
call _ZNSt6vectorIN4entt8delegateIFvRN8protocol10DisconnectEEEESaIS6_EE17_M_realloc_insertIJS6_EEEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEDpOT_; std::vector<entt::delegate<void ()(protocol::Disconnect &)>>::_M_realloc_insert<entt::delegate<void ()(protocol::Disconnect &)>>(__gnu_cxx::__normal_iterator<entt::delegate<void ()(protocol::Disconnect &)>*,std::vector<entt::delegate<void ()(protocol::Disconnect &)>>>,entt::delegate<void ()(protocol::Disconnect &)> &&)
loc_29420:
lea rdi, _ZN7globals10dispatcherE; globals::dispatcher
mov esi, 0F31291E7h
call _ZN4entt16basic_dispatcherISaIvEE6assureI13VoxelSetEventEERNS_8internal18dispatcher_handlerIT_S1_EEj; entt::basic_dispatcher<std::allocator<void>>::assure<VoxelSetEvent>(uint)
mov rbx, rax
lea r14, [rax+8]
lea rdi, [rsp+28h+var_18]
mov [rdi], r14
call _ZN4entt4sinkINS_4sighIFvR13VoxelSetEventESaIvEEEE10disconnectITnDaXadL_ZL12on_voxel_setRKS2_EEJEEEvDpOT0_
mov qword ptr [rsp+28h+var_28], 0
lea rax, _ZZN4entt8delegateIFvR13VoxelSetEventEE7connectITnDaXadL_ZL12on_voxel_setRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_
mov qword ptr [rsp+28h+var_28+8], rax
mov rsi, [rbx+10h]
cmp rsi, [rbx+18h]
jz short loc_29471
movups xmm0, [rsp+28h+var_28]
movups xmmword ptr [rsi], xmm0
add qword ptr [rbx+10h], 10h
jmp short loc_2947C
loc_29471:
mov rdx, rsp
mov rdi, r14
call _ZNSt6vectorIN4entt8delegateIFvR13VoxelSetEventEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_; std::vector<entt::delegate<void ()(VoxelSetEvent &)>>::_M_realloc_insert<entt::delegate<void ()(VoxelSetEvent &)>>(__gnu_cxx::__normal_iterator<entt::delegate<void ()(VoxelSetEvent &)>*,std::vector<entt::delegate<void ()(VoxelSetEvent &)>>>,entt::delegate<void ()(VoxelSetEvent &)> &&)
loc_2947C:
add rsp, 18h
pop rbx
pop r14
retn
| long long ( * sessions::init(sessions *this, long long a2, long long a3, int a4, int a5, int a6))()
{
long long v6; // rbx
_OWORD *v7; // rsi
long long v8; // rbx
_OWORD *v9; // rsi
long long v10; // rbx
long long ( *result)(); // rax
_OWORD *v12; // rsi
__int128 v13; // [rsp+0h] [rbp-28h] BYREF
long long v14; // [rsp+10h] [rbp-18h]
Config::add_value(
(unsigned int)&globals::server_config,
(unsigned int)"sessions.max_players",
(unsigned int)&sessions::max_players,
a4,
a5,
a6,
v13,
DWORD2(v13),
v14);
v6 = entt::basic_dispatcher<std::allocator<void>>::assure<protocol::LoginRequest>(&globals::dispatcher, 338959103LL);
v14 = v6 + 8;
ZN4entt4sinkINS_4sighIFvRN8protocol12LoginRequestEESaIvEEEE10disconnectITnDaXadL_ZL23on_login_request_packetRKS3_EEJEEEvDpOT0_();
*(_QWORD *)&v13 = 0LL;
*((_QWORD *)&v13 + 1) = ZZN4entt8delegateIFvRN8protocol12LoginRequestEEE7connectITnDaXadL_ZL23on_login_request_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_;
v7 = *(_OWORD **)(v6 + 16);
if ( v7 == *(_OWORD **)(v6 + 24) )
{
std::vector<entt::delegate<void ()(protocol::LoginRequest &)>>::_M_realloc_insert<entt::delegate<void ()(protocol::LoginRequest &)>>(
v6 + 8,
v7,
&v13);
}
else
{
*v7 = v13;
*(_QWORD *)(v6 + 16) += 16LL;
}
v8 = entt::basic_dispatcher<std::allocator<void>>::assure<protocol::Disconnect>(&globals::dispatcher, 1943575147LL);
v14 = v8 + 8;
ZN4entt4sinkINS_4sighIFvRN8protocol10DisconnectEESaIvEEEE10disconnectITnDaXadL_ZL20on_disconnect_packetRKS3_EEJEEEvDpOT0_();
*(_QWORD *)&v13 = 0LL;
*((_QWORD *)&v13 + 1) = ZZN4entt8delegateIFvRN8protocol10DisconnectEEE7connectITnDaXadL_ZL20on_disconnect_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_;
v9 = *(_OWORD **)(v8 + 16);
if ( v9 == *(_OWORD **)(v8 + 24) )
{
std::vector<entt::delegate<void ()(protocol::Disconnect &)>>::_M_realloc_insert<entt::delegate<void ()(protocol::Disconnect &)>>(
v8 + 8,
v9,
&v13);
}
else
{
*v9 = v13;
*(_QWORD *)(v8 + 16) += 16LL;
}
v10 = entt::basic_dispatcher<std::allocator<void>>::assure<VoxelSetEvent>(&globals::dispatcher, 4078080487LL);
v14 = v10 + 8;
ZN4entt4sinkINS_4sighIFvR13VoxelSetEventESaIvEEEE10disconnectITnDaXadL_ZL12on_voxel_setRKS2_EEJEEEvDpOT0_();
*(_QWORD *)&v13 = 0LL;
result = ZZN4entt8delegateIFvR13VoxelSetEventEE7connectITnDaXadL_ZL12on_voxel_setRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_;
*((_QWORD *)&v13 + 1) = ZZN4entt8delegateIFvR13VoxelSetEventEE7connectITnDaXadL_ZL12on_voxel_setRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_;
v12 = *(_OWORD **)(v10 + 16);
if ( v12 == *(_OWORD **)(v10 + 24) )
return (long long ( *)())std::vector<entt::delegate<void ()(VoxelSetEvent &)>>::_M_realloc_insert<entt::delegate<void ()(VoxelSetEvent &)>>(
v10 + 8,
v12,
&v13);
*v12 = v13;
*(_QWORD *)(v10 + 16) += 16LL;
return result;
}
| init:
PUSH R14
PUSH RBX
SUB RSP,0x18
LEA RDI,[0x208950]
LEA RSI,[0x1b8eb9]
LEA RDX,[0x208b30]
CALL 0x0015140c
LEA RDI,[0x208f88]
MOV ESI,0x14341aff
CALL 0x0012ad2a
MOV RBX,RAX
LEA R14,[RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R14
CALL 0x00129afa
MOV qword ptr [RSP],0x0
LEA RAX,[0x129b4e]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RBX + 0x10]
CMP RSI,qword ptr [RBX + 0x18]
JZ 0x001293b9
MOVUPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RBX + 0x10],0x10
JMP 0x001293c4
LAB_001293b9:
MOV RDX,RSP
MOV RDI,R14
CALL 0x0012cafe
LAB_001293c4:
LEA RDI,[0x208f88]
MOV ESI,0x73d89a6b
CALL 0x0012b176
MOV RBX,RAX
LEA R14,[RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R14
CALL 0x0012a5b2
MOV qword ptr [RSP],0x0
LEA RAX,[0x12a606]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RBX + 0x10]
CMP RSI,qword ptr [RBX + 0x18]
JZ 0x00129415
MOVUPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RBX + 0x10],0x10
JMP 0x00129420
LAB_00129415:
MOV RDX,RSP
MOV RDI,R14
CALL 0x0012cf56
LAB_00129420:
LEA RDI,[0x208f88]
MOV ESI,0xf31291e7
CALL 0x0012b5ac
MOV RBX,RAX
LEA R14,[RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R14
CALL 0x0012a766
MOV qword ptr [RSP],0x0
LEA RAX,[0x12a7ba]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RBX + 0x10]
CMP RSI,qword ptr [RBX + 0x18]
JZ 0x00129471
MOVUPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RBX + 0x10],0x10
JMP 0x0012947c
LAB_00129471:
MOV RDX,RSP
MOV RDI,R14
CALL 0x0012d096
LAB_0012947c:
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* sessions::init() */
void sessions::init(void)
{
int8 *puVar1;
dispatcher_handler *pdVar2;
int8 local_28;
code *pcStack_20;
vector<entt::delegate<void(protocol::LoginRequest&)>,std::allocator<entt::delegate<void(protocol::LoginRequest&)>>>
*local_18;
Config::add_value((Config *)globals::server_config,"sessions.max_players",
(IConfigValue *)max_players);
pdVar2 = entt::basic_dispatcher<std::allocator<void>>::assure<protocol::LoginRequest>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0x14341aff);
local_18 = (vector<entt::delegate<void(protocol::LoginRequest&)>,std::allocator<entt::delegate<void(protocol::LoginRequest&)>>>
*)(pdVar2 + 8);
_ZN4entt4sinkINS_4sighIFvRN8protocol12LoginRequestEESaIvEEEE10disconnectITnDaXadL_ZL23on_login_request_packetRKS3_EEJEEEvDpOT0_
();
local_28 = 0;
pcStack_20 =
_ZZN4entt8delegateIFvRN8protocol12LoginRequestEEE7connectITnDaXadL_ZL23on_login_request_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
;
puVar1 = *(int8 **)(pdVar2 + 0x10);
if (puVar1 == *(int8 **)(pdVar2 + 0x18)) {
std::
vector<entt::delegate<void(protocol::LoginRequest&)>,std::allocator<entt::delegate<void(protocol::LoginRequest&)>>>
::_M_realloc_insert<entt::delegate<void(protocol::LoginRequest&)>>
((vector<entt::delegate<void(protocol::LoginRequest&)>,std::allocator<entt::delegate<void(protocol::LoginRequest&)>>>
*)(pdVar2 + 8),puVar1,&local_28);
}
else {
*puVar1 = 0;
puVar1[1] =
_ZZN4entt8delegateIFvRN8protocol12LoginRequestEEE7connectITnDaXadL_ZL23on_login_request_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
;
*(long *)(pdVar2 + 0x10) = *(long *)(pdVar2 + 0x10) + 0x10;
}
pdVar2 = entt::basic_dispatcher<std::allocator<void>>::assure<protocol::Disconnect>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0x73d89a6b);
local_18 = (vector<entt::delegate<void(protocol::LoginRequest&)>,std::allocator<entt::delegate<void(protocol::LoginRequest&)>>>
*)(pdVar2 + 8);
_ZN4entt4sinkINS_4sighIFvRN8protocol10DisconnectEESaIvEEEE10disconnectITnDaXadL_ZL20on_disconnect_packetRKS3_EEJEEEvDpOT0_
();
local_28 = 0;
pcStack_20 =
_ZZN4entt8delegateIFvRN8protocol10DisconnectEEE7connectITnDaXadL_ZL20on_disconnect_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
;
puVar1 = *(int8 **)(pdVar2 + 0x10);
if (puVar1 == *(int8 **)(pdVar2 + 0x18)) {
std::
vector<entt::delegate<void(protocol::Disconnect&)>,std::allocator<entt::delegate<void(protocol::Disconnect&)>>>
::_M_realloc_insert<entt::delegate<void(protocol::Disconnect&)>>
((vector<entt::delegate<void(protocol::Disconnect&)>,std::allocator<entt::delegate<void(protocol::Disconnect&)>>>
*)(pdVar2 + 8),puVar1,&local_28);
}
else {
*puVar1 = 0;
puVar1[1] =
_ZZN4entt8delegateIFvRN8protocol10DisconnectEEE7connectITnDaXadL_ZL20on_disconnect_packetRKS2_EEEEvvENUlPKvS3_E_8__invokeESA_S3_
;
*(long *)(pdVar2 + 0x10) = *(long *)(pdVar2 + 0x10) + 0x10;
}
pdVar2 = entt::basic_dispatcher<std::allocator<void>>::assure<VoxelSetEvent>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0xf31291e7);
local_18 = (vector<entt::delegate<void(protocol::LoginRequest&)>,std::allocator<entt::delegate<void(protocol::LoginRequest&)>>>
*)(pdVar2 + 8);
_ZN4entt4sinkINS_4sighIFvR13VoxelSetEventESaIvEEEE10disconnectITnDaXadL_ZL12on_voxel_setRKS2_EEJEEEvDpOT0_
();
local_28 = 0;
pcStack_20 =
_ZZN4entt8delegateIFvR13VoxelSetEventEE7connectITnDaXadL_ZL12on_voxel_setRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_
;
puVar1 = *(int8 **)(pdVar2 + 0x10);
if (puVar1 == *(int8 **)(pdVar2 + 0x18)) {
std::
vector<entt::delegate<void(VoxelSetEvent&)>,std::allocator<entt::delegate<void(VoxelSetEvent&)>>>
::_M_realloc_insert<entt::delegate<void(VoxelSetEvent&)>>
((vector<entt::delegate<void(VoxelSetEvent&)>,std::allocator<entt::delegate<void(VoxelSetEvent&)>>>
*)(pdVar2 + 8),puVar1,&local_28);
}
else {
*puVar1 = 0;
puVar1[1] =
_ZZN4entt8delegateIFvR13VoxelSetEventEE7connectITnDaXadL_ZL12on_voxel_setRKS1_EEEEvvENUlPKvS2_E_8__invokeES9_S2_
;
*(long *)(pdVar2 + 0x10) = *(long *)(pdVar2 + 0x10) + 0x10;
}
return;
}
|
|
493 | ftxui::borderHeavy(std::shared_ptr<ftxui::Node>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/border.cpp | Element borderHeavy(Element child) {
return std::make_shared<Border>(unpack(std::move(child)), HEAVY);
} | O1 | cpp | ftxui::borderHeavy(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq (%rsi), %rcx
leaq 0x18(%rsp), %rax
movq %rcx, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq 0x8(%rsi), %rdx
movq %rcx, 0x8(%rsi)
movq %rdx, 0x8(%rax)
movq %rcx, (%rsi)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x22c33
movl $0x80, %edi
callq 0xb3e0
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x36862(%rip), %rax # 0x580a0
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
movq (%rsp), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x8(%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq %r15, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x21dd2
leaq 0x28(%rsp), %rdi
callq 0x151c0
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq %rsp, %rdi
callq 0x151c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x218a4
callq 0x14c7c
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x151c0
movl $0x80, %esi
movq %r14, %rdi
callq 0xb400
jmp 0x218d0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x151c0
jmp 0x218dd
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x218ec
callq 0x14c7c
movq %rbx, %rdi
callq 0xb780
| _ZN5ftxui11borderHeavyESt10shared_ptrINS_4NodeEE:
push r15
push r14
push rbx
sub rsp, 40h
mov rbx, rdi
mov rcx, [rsi]
lea rax, [rsp+58h+var_40]
mov [rax], rcx
xor ecx, ecx
mov [rax+8], rcx
mov rdx, [rsi+8]
mov [rsi+8], rcx
mov [rax+8], rdx
mov [rsi], rcx
mov rdi, rsp
mov rsi, rax
call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>)
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_580A0
mov [r14], rax
mov r15, r14
add r15, 10h
mov rax, qword ptr [rsp+58h+var_58]
lea rsi, [rsp+58h+var_30]
mov [rsi], rax
movups xmm0, [rsp+58h+var_58+8]
movups xmmword ptr [rsi+8], xmm0
xorps xmm0, xmm0
movaps [rsp+58h+var_58], xmm0
mov [rsp+58h+var_48], 0
mov rdi, r15
mov edx, 2
xor ecx, ecx
call _ZN5ftxui12_GLOBAL__N_16BorderC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EENS_11BorderStyleESt8optionalINS_5ColorEE; ftxui::`anonymous namespace'::Border::Border(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle,std::optional<ftxui::Color>)
lea rdi, [rsp+58h+var_30]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov [rbx], r15
mov [rbx+8], r14
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, [rsp+58h+var_38]
test rdi, rdi
jz short loc_218A4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_218A4:
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_20]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov esi, 80h; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_218D0
mov rbx, rax
loc_218D0:
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
jmp short loc_218DD
mov rbx, rax
loc_218DD:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_218EC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_218EC:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * ftxui::borderHeavy(_QWORD *a1, long long *a2, long long a3, long long a4, int a5, int a6)
{
volatile signed __int32 *v6; // rdx
_QWORD *v7; // r14
int v8; // r8d
int v9; // r9d
void *v11; // [rsp+0h] [rbp-58h] BYREF
__int128 v12; // [rsp+8h] [rbp-50h]
long long v13; // [rsp+18h] [rbp-40h] BYREF
volatile signed __int32 *v14; // [rsp+20h] [rbp-38h]
void *v15; // [rsp+28h] [rbp-30h] BYREF
__int128 v16; // [rsp+30h] [rbp-28h]
v13 = *a2;
v14 = 0LL;
v6 = (volatile signed __int32 *)a2[1];
a2[1] = 0LL;
v14 = v6;
*a2 = 0LL;
ftxui::unpack<std::shared_ptr<ftxui::Node>>(
(unsigned int)&v11,
(unsigned int)&v13,
(_DWORD)v6,
0,
a5,
a6,
(_DWORD)v11,
v12);
v7 = (_QWORD *)operator new(0x80uLL);
v7[1] = 0x100000001LL;
*v7 = off_580A0;
v15 = v11;
v16 = v12;
ftxui::`anonymous namespace'::Border::Border((_DWORD)v7 + 16, (unsigned int)&v15, 2, 0, v8, v9, 0LL, 0LL, 0LL);
std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v15);
*a1 = v7 + 2;
a1[1] = v7;
std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v11);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
return a1;
}
| borderHeavy:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV RCX,qword ptr [RSI]
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX],RCX
XOR ECX,ECX
MOV qword ptr [RAX + 0x8],RCX
MOV RDX,qword ptr [RSI + 0x8]
MOV qword ptr [RSI + 0x8],RCX
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RSI],RCX
LAB_00121811:
MOV RDI,RSP
MOV RSI,RAX
CALL 0x00122c33
LAB_0012181c:
MOV EDI,0x80
CALL 0x0010b3e0
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x1580a0]
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
MOV RAX,qword ptr [RSP]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RSI + 0x8],XMM0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
LAB_0012186d:
MOV RDI,R15
MOV EDX,0x2
XOR ECX,ECX
CALL 0x00121dd2
LAB_0012187c:
LEA RDI,[RSP + 0x28]
CALL 0x001151c0
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,RSP
CALL 0x001151c0
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001218a4
CALL 0x00114c7c
LAB_001218a4:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
/* ftxui::borderHeavy(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::borderHeavy(ftxui *this,int8 *param_2)
{
int8 *puVar1;
int8 local_58;
int8 uStack_50;
int8 uStack_48;
int8 local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
int8 local_30;
int8 local_28;
int8 uStack_20;
local_40 = *param_2;
local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 00121811 to 0012181b has its CatchHandler @ 001218da */
unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_58,&local_40);
/* try { // try from 0012181c to 00121825 has its CatchHandler @ 001218cd */
puVar1 = (int8 *)operator_new(0x80);
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_001580a0;
local_30 = local_58;
local_28 = uStack_50;
uStack_20 = uStack_48;
local_58 = 0;
uStack_50 = 0;
uStack_48 = 0;
/* try { // try from 0012186d to 0012187b has its CatchHandler @ 001218b1 */
(anonymous_namespace)::Border::Border((Border *)(puVar1 + 2),&local_30,2,0);
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_30);
*(Border **)this = (Border *)(puVar1 + 2);
*(int8 **)(this + 8) = puVar1;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_58);
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
return this;
}
|
|
494 | ImPlot3D::SetupBoxScale(float, float, float) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | void SetupBoxScale(float x, float y, float z) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"SetupBoxScale() needs to be called after BeginPlot() and before any setup locking functions (e.g. PlotX)!");
IM_ASSERT_USER_ERROR(x > 0.0f && y > 0.0f && z > 0.0f, "SetupBoxScale() requires all aspect ratios to be greater than 0!");
ImPlot3DPlot& plot = *gp.CurrentPlot;
plot.BoxScale = ImPlot3DPoint(x, y, z);
} | O1 | cpp | ImPlot3D::SetupBoxScale(float, float, float):
pushq %rbx
subq $0x10, %rsp
movq 0x2e55d1(%rip), %rbx # 0x336c98
movq 0x28(%rbx), %rax
testq %rax, %rax
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movss %xmm0, 0x4(%rsp)
je 0x516eb
cmpb $0x1, 0x1e8(%rax)
jne 0x51709
leaq 0x243990(%rip), %rdi # 0x295082
callq 0x2161f4
movss 0x4(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movss 0xc(%rsp), %xmm2
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
jbe 0x5171b
ucomiss %xmm3, %xmm1
jbe 0x5171b
ucomiss %xmm3, %xmm2
ja 0x51739
leaq 0x2439ca(%rip), %rdi # 0x2950ec
callq 0x2161f4
movss 0x4(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movss 0xc(%rsp), %xmm2
movq 0x28(%rbx), %rax
movss %xmm0, 0x1c8(%rax)
movss %xmm1, 0x1cc(%rax)
movss %xmm2, 0x1d0(%rax)
addq $0x10, %rsp
popq %rbx
retq
| _ZN8ImPlot3D13SetupBoxScaleEfff:
push rbx
sub rsp, 10h
mov rbx, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov rax, [rbx+28h]
test rax, rax
movss [rsp+18h+var_C], xmm2
movss [rsp+18h+var_10], xmm1
movss [rsp+18h+var_14], xmm0
jz short loc_516EB
cmp byte ptr [rax+1E8h], 1
jnz short loc_51709
loc_516EB:
lea rdi, aSetupboxscaleN; "SetupBoxScale() needs to be called afte"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
movss xmm0, [rsp+18h+var_14]
movss xmm1, [rsp+18h+var_10]
movss xmm2, [rsp+18h+var_C]
loc_51709:
xorps xmm3, xmm3
ucomiss xmm0, xmm3
jbe short loc_5171B
ucomiss xmm1, xmm3
jbe short loc_5171B
ucomiss xmm2, xmm3
ja short loc_51739
loc_5171B:
lea rdi, aSetupboxscaleR; "SetupBoxScale() requires all aspect rat"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
movss xmm0, [rsp+18h+var_14]
movss xmm1, [rsp+18h+var_10]
movss xmm2, [rsp+18h+var_C]
loc_51739:
mov rax, [rbx+28h]
movss dword ptr [rax+1C8h], xmm0
movss dword ptr [rax+1CCh], xmm1
movss dword ptr [rax+1D0h], xmm2
add rsp, 10h
pop rbx
retn
| float * ImPlot3D::SetupBoxScale(ImPlot3D *this, float a2, float a3, float a4, const char *a5)
{
ImGui *v5; // rbx
long long v6; // rax
float *result; // rax
v5 = ImPlot3D::GImPlot3D;
v6 = *((_QWORD *)ImPlot3D::GImPlot3D + 5);
if ( !v6 || *(_BYTE *)(v6 + 488) == 1 )
ImGui::ErrorLog(
(ImGui *)"SetupBoxScale() needs to be called after BeginPlot() and before any setup locking functions (e.g. PlotX)!",
a5);
if ( a2 <= 0.0 || a3 <= 0.0 || a4 <= 0.0 )
ImGui::ErrorLog((ImGui *)"SetupBoxScale() requires all aspect ratios to be greater than 0!", a5);
result = (float *)*((_QWORD *)v5 + 5);
result[114] = a2;
result[115] = a3;
result[116] = a4;
return result;
}
| SetupBoxScale:
PUSH RBX
SUB RSP,0x10
MOV RBX,qword ptr [0x00436c98]
MOV RAX,qword ptr [RBX + 0x28]
TEST RAX,RAX
MOVSS dword ptr [RSP + 0xc],XMM2
MOVSS dword ptr [RSP + 0x8],XMM1
MOVSS dword ptr [RSP + 0x4],XMM0
JZ 0x001516eb
CMP byte ptr [RAX + 0x1e8],0x1
JNZ 0x00151709
LAB_001516eb:
LEA RDI,[0x395082]
CALL 0x003161f4
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS XMM1,dword ptr [RSP + 0x8]
MOVSS XMM2,dword ptr [RSP + 0xc]
LAB_00151709:
XORPS XMM3,XMM3
UCOMISS XMM0,XMM3
JBE 0x0015171b
UCOMISS XMM1,XMM3
JBE 0x0015171b
UCOMISS XMM2,XMM3
JA 0x00151739
LAB_0015171b:
LEA RDI,[0x3950ec]
CALL 0x003161f4
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS XMM1,dword ptr [RSP + 0x8]
MOVSS XMM2,dword ptr [RSP + 0xc]
LAB_00151739:
MOV RAX,qword ptr [RBX + 0x28]
MOVSS dword ptr [RAX + 0x1c8],XMM0
MOVSS dword ptr [RAX + 0x1cc],XMM1
MOVSS dword ptr [RAX + 0x1d0],XMM2
ADD RSP,0x10
POP RBX
RET
|
/* ImPlot3D::SetupBoxScale(float, float, float) */
void ImPlot3D::SetupBoxScale(float param_1,float param_2,float param_3)
{
long lVar1;
lVar1 = GImPlot3D;
if ((*(long *)(GImPlot3D + 0x28) == 0) ||
(*(char *)(*(long *)(GImPlot3D + 0x28) + 0x1e8) == '\x01')) {
ImGui::ErrorLog(
"SetupBoxScale() needs to be called after BeginPlot() and before any setup locking functions (e.g. PlotX)!"
);
}
if (((param_1 <= 0.0) || (param_2 <= 0.0)) || (param_3 <= 0.0)) {
ImGui::ErrorLog("SetupBoxScale() requires all aspect ratios to be greater than 0!");
}
lVar1 = *(long *)(lVar1 + 0x28);
*(float *)(lVar1 + 0x1c8) = param_1;
*(float *)(lVar1 + 0x1cc) = param_2;
*(float *)(lVar1 + 0x1d0) = param_3;
return;
}
|
|
495 | mi_update_blob_record | eloqsql/storage/myisam/mi_dynrec.c | int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,extra;
extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+
MI_DYN_DELETE_BLOCK_HEADER);
reclength= (info->s->base.pack_reclength+
_mi_calc_total_blob_length(info,record)+ extra);
if (!(rec_buff=(uchar*) my_alloca(reclength)))
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(-1);
}
reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
record);
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
reclength);
my_afree(rec_buff);
return(error);
} | O3 | c | mi_update_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x148(%rax), %r12
movq %rdx, %rsi
callq 0x7735c
leaq (%r12,%rax), %rsi
addq $0x5c, %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x9f6e1
testq %rax, %rax
je 0x77458
movq %rax, %r12
movq %rax, %r13
addq $0x18, %r13
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x76a22
movl %eax, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x76eae
movl %eax, %ebx
movq %r12, %rdi
callq 0x9f90e
movl %ebx, %eax
jmp 0x77468
callq 0xa13e6
movl $0x80, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_update_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi]
mov r12, [rax+148h]
mov rsi, rdx
call _mi_calc_total_blob_length
lea rsi, [r12+rax]
add rsi, 5Ch ; '\'
xor edi, edi
xor edx, edx
call my_malloc
test rax, rax
jz short loc_77458
mov r12, rax
mov r13, rax
add r13, 18h
mov rdi, r14
mov rsi, r13
mov rdx, r15
call _mi_rec_pack
mov ecx, eax
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call update_dynamic_record_0
mov ebx, eax
mov rdi, r12
call my_free
mov eax, ebx
jmp short loc_77468
loc_77458:
call _my_thread_var
mov dword ptr [rax], 80h
mov eax, 0FFFFFFFFh
loc_77468:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_update_blob_record(long long *a1, long long a2, char *a3)
{
long long v4; // r12
long long v5; // rax
long long v6; // rax
long long v7; // r12
long long v8; // r13
unsigned int v9; // eax
unsigned int updated; // ebx
v4 = *(_QWORD *)(*a1 + 328);
v5 = mi_calc_total_blob_length(a1, (long long)a3);
v6 = my_malloc(0LL, v4 + v5 + 92, 0LL);
if ( v6 )
{
v7 = v6;
v8 = v6 + 24;
v9 = mi_rec_pack((long long)a1, (_BYTE *)(v6 + 24), a3);
updated = update_dynamic_record_0(a1, a2, v8, v9);
my_free(v7);
return updated;
}
else
{
*(_DWORD *)my_thread_var(0LL) = 128;
return 0xFFFFFFFFLL;
}
}
| _mi_update_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RAX + 0x148]
MOV RSI,RDX
CALL 0x0017735c
LEA RSI,[R12 + RAX*0x1]
ADD RSI,0x5c
XOR EDI,EDI
XOR EDX,EDX
CALL 0x0019f6e1
TEST RAX,RAX
JZ 0x00177458
MOV R12,RAX
MOV R13,RAX
ADD R13,0x18
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL 0x00176a22
MOV ECX,EAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x00176eae
MOV EBX,EAX
MOV RDI,R12
CALL 0x0019f90e
MOV EAX,EBX
JMP 0x00177468
LAB_00177458:
CALL 0x001a13e6
MOV dword ptr [RAX],0x80
MOV EAX,0xffffffff
LAB_00177468:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _mi_update_blob_record(long *param_1,int8 param_2,int8 param_3)
{
int4 uVar1;
long lVar2;
long lVar3;
int4 *puVar4;
lVar3 = *(long *)(*param_1 + 0x148);
lVar2 = _mi_calc_total_blob_length(param_1,param_3);
lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5c,0);
if (lVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x80;
uVar1 = 0xffffffff;
}
else {
uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_3);
uVar1 = update_dynamic_record(param_1,param_2,lVar3 + 0x18,uVar1);
my_free(lVar3);
}
return uVar1;
}
|
|
496 | 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 0x1e4466(%rip), %rax # 0x2c75a0
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 0x2a350
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_cond_init_3:
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_3(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,[0x3c75a0]
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 0x0012a350
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;
}
|
|
497 | cxxopts::exceptions::option_requires_argument::option_requires_argument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | shubhamoy[P]dir2txt/include/cxxopts.hpp | explicit option_requires_argument(const std::string& option)
: parsing(
"Option " + LQUOTE + option + RQUOTE + " requires an argument"
)
{
} | O2 | cpp | cxxopts::exceptions::option_requires_argument::option_requires_argument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1201d(%rip), %rsi # 0x30156
leaq 0x32660(%rip), %rdx # 0x507a0
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x1a9a9
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1a98a
leaq 0x3265e(%rip), %rdx # 0x507c0
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x1a98a
leaq 0x1208d(%rip), %rdx # 0x30203
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x8d45
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d4a8
leaq 0x40(%rsp), %rdi
callq 0x8e46
leaq 0x20(%rsp), %rdi
callq 0x8e46
movq %rsp, %rdi
callq 0x8e46
leaq 0x60(%rsp), %rdi
callq 0x8e46
leaq 0x31389(%rip), %rax # 0x4f548
movq %rax, (%rbx)
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8e46
jmp 0x1e1e1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8e46
jmp 0x1e1f0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8e46
jmp 0x1e1fd
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x8e46
movq %rbx, %rdi
callq 0x85e0
nop
| _ZN7cxxopts10exceptions24option_requires_argumentC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 80h
mov r14, rsi
mov rbx, rdi
lea rsi, aOption_0; "Option "
lea rdx, _ZN7cxxopts12_GLOBAL__N_16LQUOTEB5cxx11E; cxxopts::`anonymous namespace'::LQUOTE
lea r15, [rsp+98h+var_38]
mov rdi, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, rsp
mov rsi, r15
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
lea rdx, _ZN7cxxopts12_GLOBAL__N_16RQUOTEB5cxx11E; cxxopts::`anonymous namespace'::RQUOTE
lea rdi, [rsp+98h+var_78]
mov rsi, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
lea rdx, aRequiresAnArgu; " requires an argument"
lea rdi, [rsp+98h+var_58]
lea rsi, [rsp+98h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rsi, [rsp+98h+var_58]
mov rdi, rbx
call _ZN7cxxopts10exceptions7parsingC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::exceptions::parsing::parsing(std::string const&)
lea rdi, [rsp+98h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rax, off_4F548
mov [rbx], rax
add rsp, 80h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1E1E1
mov rbx, rax
loc_1E1E1:
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1E1F0
mov rbx, rax
loc_1E1F0:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1E1FD
mov rbx, rax
loc_1E1FD:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| void ( ** cxxopts::exceptions::option_requires_argument::option_requires_argument(
_QWORD *a1,
long long a2))(cxxopts::exceptions::exception *__hidden this)
{
void ( **result)(cxxopts::exceptions::exception *__hidden); // rax
_BYTE v3[32]; // [rsp+0h] [rbp-98h] BYREF
_BYTE v4[32]; // [rsp+20h] [rbp-78h] BYREF
_QWORD v5[4]; // [rsp+40h] [rbp-58h] BYREF
_BYTE v6[56]; // [rsp+60h] [rbp-38h] BYREF
std::operator+<char>((long long)v6, (long long)"Option ", (long long)&cxxopts::`anonymous namespace'::LQUOTE[abi:cxx11]);
std::operator+<char>((long long)v3, (long long)v6, a2);
std::operator+<char>((long long)v4, (long long)v3, (long long)&cxxopts::`anonymous namespace'::RQUOTE[abi:cxx11]);
std::operator+<char>((long long)v5, (long long)v4, (long long)" requires an argument");
cxxopts::exceptions::parsing::parsing(a1, v5);
std::string::~string(v5);
std::string::~string(v4);
std::string::~string(v3);
std::string::~string(v6);
result = off_4F548;
*a1 = off_4F548;
return result;
}
| option_requires_argument:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x80
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x130156]
LEA RDX,[0x1507a0]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x0011a9a9
LAB_0011e14d:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x0011a98a
LAB_0011e15b:
LEA RDX,[0x1507c0]
LEA RDI,[RSP + 0x20]
MOV RSI,RSP
CALL 0x0011a98a
LAB_0011e16f:
LEA RDX,[0x130203]
LEA RDI,[RSP + 0x40]
LEA RSI,[RSP + 0x20]
CALL 0x00108d45
LAB_0011e185:
LEA RSI,[RSP + 0x40]
MOV RDI,RBX
CALL 0x0011d4a8
LAB_0011e192:
LEA RDI,[RSP + 0x40]
CALL 0x00108e46
LEA RDI,[RSP + 0x20]
CALL 0x00108e46
MOV RDI,RSP
CALL 0x00108e46
LEA RDI,[RSP + 0x60]
CALL 0x00108e46
LEA RAX,[0x14f548]
MOV qword ptr [RBX],RAX
ADD RSP,0x80
POP RBX
POP R14
POP R15
RET
|
/* cxxopts::exceptions::option_requires_argument::option_requires_argument(std::__cxx11::string
const&) */
void __thiscall
cxxopts::exceptions::option_requires_argument::option_requires_argument
(option_requires_argument *this,string *param_1)
{
string asStack_98 [32];
string local_78 [32];
string local_58 [32];
string local_38 [32];
std::operator+((char *)local_38,(string *)"Option ");
/* try { // try from 0011e14d to 0011e15a has its CatchHandler @ 0011e1fa */
std::operator+(asStack_98,local_38);
/* try { // try from 0011e15b to 0011e16e has its CatchHandler @ 0011e1ed */
std::operator+(local_78,asStack_98);
/* try { // try from 0011e16f to 0011e184 has its CatchHandler @ 0011e1de */
std::operator+(local_58,(char *)local_78);
/* try { // try from 0011e185 to 0011e191 has its CatchHandler @ 0011e1cf */
parsing::parsing((parsing *)this,local_58);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_78);
std::__cxx11::string::~string(asStack_98);
std::__cxx11::string::~string(local_38);
*(int ***)this = &PTR__exception_0014f548;
return;
}
|
|
498 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumPatchPoints() const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/surfaceData.h | bool isLinear() const { return _isLinear; } | O1 | c | OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumPatchPoints() const:
movb 0x6c(%rdi), %al
testb $0x4, %al
jne 0x97840
testb $0x8, %al
jne 0x97844
movq 0x70(%rdi), %rcx
movl 0x24(%rcx), %eax
addl 0x1c(%rcx), %eax
retq
movl 0x8(%rdi), %eax
retq
movl 0x8(%rdi), %eax
leal 0x1(,%rax,2), %eax
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE17GetNumPatchPointsEv:
mov al, [rdi+6Ch]
test al, 4
jnz short loc_97840
test al, 8
jnz short loc_97844
mov rcx, [rdi+70h]
mov eax, [rcx+24h]
add eax, [rcx+1Ch]
retn
loc_97840:
mov eax, [rdi+8]
retn
loc_97844:
mov eax, [rdi+8]
lea eax, ds:1[rax*2]
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumPatchPoints(long long a1)
{
char v1; // al
v1 = *(_BYTE *)(a1 + 108);
if ( (v1 & 4) != 0 )
return *(unsigned int *)(a1 + 8);
if ( (v1 & 8) != 0 )
return (unsigned int)(2 * *(_DWORD *)(a1 + 8) + 1);
return (unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 112) + 28LL) + *(_DWORD *)(*(_QWORD *)(a1 + 112) + 36LL));
}
| GetNumPatchPoints:
MOV AL,byte ptr [RDI + 0x6c]
TEST AL,0x4
JNZ 0x00197840
TEST AL,0x8
JNZ 0x00197844
MOV RCX,qword ptr [RDI + 0x70]
MOV EAX,dword ptr [RCX + 0x24]
ADD EAX,dword ptr [RCX + 0x1c]
RET
LAB_00197840:
MOV EAX,dword ptr [RDI + 0x8]
RET
LAB_00197844:
MOV EAX,dword ptr [RDI + 0x8]
LEA EAX,[0x1 + RAX*0x2]
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumPatchPoints() const */
int __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumPatchPoints(Surface<double> *this)
{
if (((byte)this[0x6c] & 4) != 0) {
return *(int *)(this + 8);
}
if (((byte)this[0x6c] & 8) == 0) {
return *(int *)(*(long *)(this + 0x70) + 0x24) + *(int *)(*(long *)(this + 0x70) + 0x1c);
}
return *(int *)(this + 8) * 2 + 1;
}
|
|
499 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumPatchPoints() const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/surfaceData.h | bool isLinear() const { return _isLinear; } | O3 | c | OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumPatchPoints() const:
movb 0x6c(%rdi), %al
testb $0x4, %al
jne 0x9a5ff
testb $0x8, %al
je 0x3c440
subq $0x28, %rsp
movl 0x8(%rdi), %eax
leaq 0x8(%rsp), %rdi
movq %rsi, (%rdi)
movl (%rdx), %ecx
movl %ecx, 0x8(%rdi)
movl 0x4(%rdx), %ecx
movl %ecx, 0xc(%rdi)
movl %eax, 0x10(%rdi)
imull %eax, %ecx
movslq %ecx, %rax
leaq (%rsi,%rax,8), %rax
movq %rax, 0x18(%rdi)
callq 0x3ab90
addq $0x28, %rsp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE18ComputePatchPointsEPdRKNS3_15PointDescriptorE:
mov al, [rdi+6Ch]
test al, 4
jnz short locret_9A5FF
test al, 8
jz __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE27computeIrregularPatchPointsEPdRKNS3_15PointDescriptorE; OpenSubdiv::v3_6_0::Bfr::Surface<double>::computeIrregularPatchPoints(double *,OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&)
sub rsp, 28h
mov eax, [rdi+8]
lea rdi, [rsp+28h+var_20]
mov [rdi], rsi
mov ecx, [rdx]
mov [rdi+8], ecx
mov ecx, [rdx+4]
mov [rdi+0Ch], ecx
mov [rdi+10h], eax
imul ecx, eax
movsxd rax, ecx
lea rax, [rsi+rax*8]
mov [rdi+18h], rax
call __ZN10OpenSubdiv6v3_6_03Bfr6points9SplitFaceIdE5ApplyERKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Parameters const&)
add rsp, 28h
locret_9A5FF:
retn
| char OpenSubdiv::v3_6_0::Bfr::Surface<double>::ComputePatchPoints(long long a1, long long a2, int *a3)
{
char result; // al
int v4; // eax
long long v5; // rcx
long long v6; // [rsp+0h] [rbp-20h] BYREF
int v7; // [rsp+8h] [rbp-18h]
int v8; // [rsp+Ch] [rbp-14h]
int v9; // [rsp+10h] [rbp-10h]
long long v10; // [rsp+18h] [rbp-8h]
result = *(_BYTE *)(a1 + 108);
if ( (result & 4) == 0 )
{
if ( (result & 8) != 0 )
{
v4 = *(_DWORD *)(a1 + 8);
v6 = a2;
v7 = *a3;
v8 = a3[1];
v9 = v4;
v5 = (unsigned int)(v4 * v8);
v10 = a2 + 8LL * (int)v5;
return OpenSubdiv::v3_6_0::Bfr::points::SplitFace<double>::Apply(&v6, a2, a3, v5);
}
else
{
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::computeIrregularPatchPoints(a1, a2, a3);
}
}
return result;
}
| ComputePatchPoints:
MOV AL,byte ptr [RDI + 0x6c]
TEST AL,0x4
JNZ 0x0019a5ff
TEST AL,0x8
JZ 0x0013c440
SUB RSP,0x28
MOV EAX,dword ptr [RDI + 0x8]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RSI
MOV ECX,dword ptr [RDX]
MOV dword ptr [RDI + 0x8],ECX
MOV ECX,dword ptr [RDX + 0x4]
MOV dword ptr [RDI + 0xc],ECX
MOV dword ptr [RDI + 0x10],EAX
IMUL ECX,EAX
MOVSXD RAX,ECX
LEA RAX,[RSI + RAX*0x8]
MOV qword ptr [RDI + 0x18],RAX
CALL 0x0013ab90
ADD RSP,0x28
LAB_0019a5ff:
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::ComputePatchPoints(double*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::ComputePatchPoints
(Surface<double> *this,double *param_1,PointDescriptor *param_2)
{
double *local_20;
int4 local_18;
int local_14;
int local_10;
double *local_8;
if (((byte)this[0x6c] & 4) == 0) {
if (((byte)this[0x6c] & 8) == 0) {
(*(code *)PTR_computeIrregularPatchPoints_001e4220)();
return;
}
local_10 = *(int *)(this + 8);
local_18 = *(int4 *)param_2;
local_14 = *(int *)(param_2 + 4);
local_8 = param_1 + local_14 * local_10;
local_20 = param_1;
points::SplitFace<double>::Apply((Parameters *)&local_20);
}
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.